<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/char/xillybus, branch linux-5.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-11-17T10:03:23Z</updated>
<entry>
<title>char: xillybus: fix msg_ep UAF in xillyusb_probe()</title>
<updated>2021-11-17T10:03:23Z</updated>
<author>
<name>Ziyang Xuan</name>
</author>
<published>2021-10-16T05:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7038cb714d121b377df9819f3c9a70cb95570ffa'/>
<id>urn:sha1:7038cb714d121b377df9819f3c9a70cb95570ffa</id>
<content type='text'>
commit 15c9a359094ec6251578b02387436bc64f11a477 upstream.

When endpoint_alloc() return failed in xillyusb_setup_base_eps(),
'xdev-&gt;msg_ep' will be freed but not set to NULL. That lets program
enter fail handling to cleanup_dev() in xillyusb_probe(). Check for
'xdev-&gt;msg_ep' is invalid in cleanup_dev() because 'xdev-&gt;msg_ep' did
not set to NULL when was freed. So the UAF problem for 'xdev-&gt;msg_ep'
is triggered.

==================================================================
BUG: KASAN: use-after-free in fifo_mem_release+0x1f4/0x210
CPU: 0 PID: 166 Comm: kworker/0:2 Not tainted 5.15.0-rc5+ #19
Call Trace:
 dump_stack_lvl+0xe2/0x152
 print_address_description.constprop.0+0x21/0x140
 ? fifo_mem_release+0x1f4/0x210
 kasan_report.cold+0x7f/0x11b
 ? xillyusb_probe+0x530/0x700
 ? fifo_mem_release+0x1f4/0x210
 fifo_mem_release+0x1f4/0x210
 ? __sanitizer_cov_trace_pc+0x1d/0x50
 endpoint_dealloc+0x35/0x2b0
 cleanup_dev+0x90/0x120
 xillyusb_probe+0x59a/0x700
...

Freed by task 166:
 kasan_save_stack+0x1b/0x40
 kasan_set_track+0x1c/0x30
 kasan_set_free_info+0x20/0x30
 __kasan_slab_free+0x109/0x140
 kfree+0x117/0x4c0
 xillyusb_probe+0x606/0x700

Set 'xdev-&gt;msg_ep' to NULL after being freed in xillyusb_setup_base_eps()
to fix the UAF problem.

Fixes: a53d1202aef1 ("char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)")
Cc: stable &lt;stable@vger.kernel.org&gt;
Acked-by: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Signed-off-by: Ziyang Xuan &lt;william.xuanziyang@huawei.com&gt;
Link: https://lore.kernel.org/r/20211016052047.1611983-1-william.xuanziyang@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>char: xillybus: Fix spelling mistake "overflew" -&gt; "overflowed"</title>
<updated>2021-06-03T12:11:08Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2021-06-01T10:22:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc196fed0394aa03ec75e22274edb18c8b03ad00'/>
<id>urn:sha1:cc196fed0394aa03ec75e22274edb18c8b03ad00</id>
<content type='text'>
There is a spelling mistake in a dev_err message. Fix it.

Acked-by: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Link: https://lore.kernel.org/r/20210601102201.8489-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>char: xillybus: Remove unneeded MODULE_VERSION() usage</title>
<updated>2021-06-03T12:10:03Z</updated>
<author>
<name>Eli Billauer</name>
</author>
<published>2021-05-28T09:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b71cdf15fcc1b1bbca01fe940bc9da261a99f20f'/>
<id>urn:sha1:b71cdf15fcc1b1bbca01fe940bc9da261a99f20f</id>
<content type='text'>
MODULE_VERSION is useless for in-kernel drivers, so these are removed from
files in drivers/char/xillybus/

Reported-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Link: https://lore.kernel.org/r/20210528092242.51104-2-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)</title>
<updated>2021-05-27T12:07:41Z</updated>
<author>
<name>Eli Billauer</name>
</author>
<published>2021-05-26T10:03:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a53d1202aef122894b6e46116a92174a9123db5d'/>
<id>urn:sha1:a53d1202aef122894b6e46116a92174a9123db5d</id>
<content type='text'>
The XillyUSB driver is the USB variant for the Xillybus FPGA IP core.
Even though it presents a nearly identical API on the FPGA and host,
it's almost a complete rewrite of the driver: The framework for exchanging
data on a USB bus is fundamentally different from doing the same with a
PCIe interface, which leaves very little in common between the existing
driver and the new one for XillyUSB.

Signed-off-by: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Link: https://lore.kernel.org/r/20210526100311.56327-3-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>char: xillybus: Move class-related functions to new xillybus_class.c</title>
<updated>2021-05-27T12:07:41Z</updated>
<author>
<name>Eli Billauer</name>
</author>
<published>2021-05-26T10:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8cb5d216ab3365bc85aac65da27f1c2b3dd6f366'/>
<id>urn:sha1:8cb5d216ab3365bc85aac65da27f1c2b3dd6f366</id>
<content type='text'>
This patch is a preparation for adding another related driver, XillyUSB.
In order to share some code between the existing Xillybus driver and the
one to be added, some functions are moved to xillybus_class.c

XILLYBUS_CLASS is added to Kconfig and is common to all drivers in this
group. The relation with the existing XILLYBUS symbol is "select" rather
than "depends on" XILLYBUS_CLASS, or else "make olddefconfig" will silently
turn off XILLYBUS, which is currently enabled in several distributions.

XILLYBUS_CLASS doesn't depend on anything else, hence using it with
"select" poses no risk for a broken configuration.

After the future addition of the XillyUSB module, the tree of symbols
will be as follows:

XILLYBUS_CLASS --+-- XILLYBUS --+-- XILLYBUS_PCIE
                 |              |
                 |              +-- XILLYBUS_OF
                 |
                 +-- XILLYUSB

XILLYBUS is for drivers based upon memory registers + DMA-based interfaces,
and it's combined with XILLYBUS_PCIE and/or XILLYBUS_OF.

XILLYUSB is for the USB variant only.

Or a more detailed, bottom-up outline:

* CONFIG_XILLYBUS_PCIE -&gt; xillybus_pcie.c: Functions related to PCIe.
* CONFIG_XILLYBUS_OF -&gt; xillybus_of.c: Functions related to Xillybus as a
  peripheral on an FPGA / Processor combo chip.
* CONFIG_XILLYBUS -&gt; xillybus_core.c: Functions that are common to the two
  above, mainly access to the peripheral with memory-mapped registers and
  DMA.
* CONFIG_XILLYUSB -&gt; xillyusb.c: The driver for the USB variant, accesses
  the peripheral through the USB framework.
* CONFIG_XILLYBUS_CLASS -&gt; xillybus_class.c: The new module, which contains
  the class and API parts that would otherwise appear both in
  xillybus_core.c and xillyusb.c. Contains utility functions for the two
  latter.

And since I'm at it, comments on the module names are added in the
Kconfig's help part.

The functions are exported with the non-GPL EXPORT_SYMBOL (a matter of
taste).

Signed-off-by: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Link: https://lore.kernel.org/r/20210526100311.56327-2-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>char: xillybus: use devm_platform_ioremap_resource() to simplify code</title>
<updated>2019-11-05T17:29:21Z</updated>
<author>
<name>YueHaibing</name>
</author>
<published>2019-10-16T09:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=482c86cc37b7fa884843ec37edd1847c5463e3a9'/>
<id>urn:sha1:482c86cc37b7fa884843ec37edd1847c5463e3a9</id>
<content type='text'>
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Acked-by: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Link: https://lore.kernel.org/r/20191016092546.26332-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PCI: Move ASPM declarations to linux/pci.h</title>
<updated>2019-08-28T13:28:39Z</updated>
<author>
<name>Krzysztof Wilczynski</name>
</author>
<published>2019-08-27T09:56:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ce2e76a0420801fb4b53b9e6850940e6b326433'/>
<id>urn:sha1:7ce2e76a0420801fb4b53b9e6850940e6b326433</id>
<content type='text'>
Move ASPM definitions and function prototypes from include/linux/pci-aspm.h
to include/linux/pci.h so users only need to include &lt;linux/pci.h&gt;:

  PCIE_LINK_STATE_L0S
  PCIE_LINK_STATE_L1
  PCIE_LINK_STATE_CLKPM
  pci_disable_link_state()
  pci_disable_link_state_locked()
  pcie_no_aspm()

No functional changes intended.

Link: https://lore.kernel.org/r/20190827095620.11213-1-kw@linux.com
Signed-off-by: Krzysztof Wilczynski &lt;kw@linux.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 402</title>
<updated>2019-06-05T15:37:13Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-06-01T08:08:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6377d905913cf3bc855408373ff2022386f586f'/>
<id>urn:sha1:a6377d905913cf3bc855408373ff2022386f586f</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the smems of the gnu general public license as published by
  the free software foundation version 2 of the license

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 5 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Armijn Hemel &lt;armijn@tjaldur.nl&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531190111.946565886@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier - Makefile/Kconfig</title>
<updated>2019-05-21T08:50:46Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-19T12:07:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1'/>
<id>urn:sha1:ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1</id>
<content type='text'>
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PCI: Add Altera vendor ID</title>
<updated>2018-03-14T18:13:47Z</updated>
<author>
<name>Johannes Thumshirn</name>
</author>
<published>2018-03-12T09:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4ccc893ce2ab819171f797e8b2c702cc87cb84a'/>
<id>urn:sha1:c4ccc893ce2ab819171f797e8b2c702cc87cb84a</id>
<content type='text'>
Add the Altera PCI Vendor id to pci_ids.h and remove the private
definitions from xillybus_pcie.c and altera-cvp.c.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Cc: Anatolij Gustschin &lt;agust@denx.de&gt;
Acked-by: Eli Billauer &lt;eli.billauer@gmail.com&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
