musb: Could not flush host TX2 fifo: csr: 2403

2019-08-21 Thread Yegor Yefremov
I'm moving our systems to the recent kernel and have encountered an older musb issue [1] that occurs with some 3G/4G modems. In this case it is SIMCom 7600G-H. After this dump occurs the modem is still working though. [ 45.585644] [ cut here ] [ 45.590785] WARNING: CPU

Re: [RFC 1/4] Add usb_get_address and usb_set_address support

2019-08-21 Thread Oliver Neukum
Am Dienstag, den 20.08.2019, 22:18 + schrieb charles.h...@dellteam.com: > The core USB driver message.c is missing get/set address functionality This should go into usbnet. The CDC parser is where it is because it is needed for serial and network devices. As serial devices do not have a MAC, t

Re: f_mass_storage vs drivers/target

2019-08-21 Thread Greg KH
On Wed, Aug 21, 2019 at 01:38:49PM +1000, Benjamin Herrenschmidt wrote: > Hi folks ! > > It seems that f_mass_storage duplicates (well maybe predates too..) a > lot of what's in drivers/target. It predates it by a long time. > Anybody working on implementing a new version of f_mass_storage that

Re: [RFC 2/4] Allow cdc_ncm to set MAC address in hardware

2019-08-21 Thread Oliver Neukum
Am Dienstag, den 20.08.2019, 22:21 + schrieb charles.h...@dellteam.com: > This patch adds support for pushing a MAC address out to USB based > ethernet controllers driven by cdc_ncm. With this change, ifconfig can > now set the device's MAC address. For example, the Dell Universal Dock > D600

Re: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-21 Thread Roger Quadros
On 19/08/2019 17:19, Alan Stern wrote: > On Mon, 19 Aug 2019, Roger Quadros wrote: > >> On 15/08/2019 17:39, Alan Stern wrote: >>> On Thu, 15 Aug 2019, Roger Quadros wrote: >>> Felipe & Alan, On 21/07/2019 21:32, Pawel Laszczak wrote: > This patch introduce new Cadence USBSS

Re: [RFC 0/4] Add support into cdc_ncm for MAC address pass through

2019-08-21 Thread Oliver Neukum
Am Dienstag, den 20.08.2019, 22:15 + schrieb charles.h...@dellteam.com: > In recent testing of a Dell Universal Dock D6000, I found that MAC address > pass through is not supported in the Linux drivers. Hi, thank you for writing this code. It adds cool functionality. There are, however, a fe

[PATCH] usb: gadget: udc: core: Fix error case while binding pending gadget drivers

2019-08-21 Thread Roger Quadros
If binding a pending gadget driver fails we should not remove it from the pending driver list, otherwise it will cause a segmentation fault later when the gadget driver is unloaded. Test case: - Make sure no UDC is available - modprobe g_mass_storage file=wrongfile - Load UDC driver so it becomes

problems with Edgeport/416

2019-08-21 Thread walter harms
Hello List, does some use linux with an Edgeport/416 ? I have a strange problem. the device is resetting soon after i started using it (but not immediately). I do not see a kernel OOPS but a common pattern is: 2019-08-20T15:19:39.825812+00:00 omnfrmo10 kernel: [683270.658623] usb 7-1.1.2: New US

AW: problems with Edgeport/416

2019-08-21 Thread Schmid, Carsten
Hi Walter, i had a similar issue with a different device. Please check, if you have dynamic debug enabled in your kernel (/sys/kernel/debug/dynamic_debug/control exists) Then you can enable additional kernel messages using echo -n 'module xhci_hcd =p' > /sys/kernel/debug/dynamic_debug/control ech

[PATCH v3 04/11] modpost: add support for symbol namespaces

2019-08-21 Thread Matthias Maennich
Add support for symbols that are exported into namespaces. For that, extract any namespace suffix from the symbol name. In addition, emit a warning whenever a module refers to an exported symbol without explicitly importing the namespace that it is defined in. This patch consistently adds the names

[PATCH v3 03/11] module: add support for symbol namespaces.

2019-08-21 Thread Matthias Maennich
The EXPORT_SYMBOL_NS() and EXPORT_SYMBOL_NS_GPL() macros can be used to export a symbol to a specific namespace. There are no _GPL_FUTURE and _UNUSED variants because these are currently unused, and I'm not sure they are necessary. I didn't add EXPORT_SYMBOL_NS() for ASM exports; this patch sets

[PATCH v3 05/11] module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS

2019-08-21 Thread Matthias Maennich
If MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is enabled (default=n), the requirement for modules to import all namespaces that are used by the module is relaxed. Enabling this option effectively allows (invalid) modules to be loaded while only a warning is emitted. Disabling this option keeps the en

[PATCH v3 01/11] module: support reading multiple values per modinfo tag

2019-08-21 Thread Matthias Maennich
Similar to modpost's get_next_modinfo(), introduce get_next_modinfo() in kernel/module.c to acquire any further values associated with the same modinfo tag name. That is useful for any tags that have multiple occurrences (such as 'alias'), but is in particular introduced here as part of the symbol

[PATCH v3 02/11] export: explicitly align struct kernel_symbol

2019-08-21 Thread Matthias Maennich
This change allows growing struct kernel_symbol without wasting bytes to alignment. It also concretized the alignment of ksymtab entries if relative references are used for ksymtab entries. struct kernel_symbol was already implicitly being aligned to the word size, except on x86_64 and m68k, where

[PATCH v3 06/11] export: allow definition default namespaces in Makefiles or sources

2019-08-21 Thread Matthias Maennich
To avoid excessive usage of EXPORT_SYMBOL_NS(sym, MY_NAMESPACE), where MY_NAMESPACE will always be the namespace we are exporting to, allow exporting all definitions of EXPORT_SYMBOL() and friends by defining DEFAULT_SYMBOL_NAMESPACE. For example, to export all symbols defined in usb-common into t

[PATCH v3 08/11] scripts: Coccinelle script for namespace dependencies.

2019-08-21 Thread Matthias Maennich
A script that uses the '.ns_deps' files generated by modpost to automatically add the required symbol namespace dependencies to each module. Usage: 1) Move some symbols to a namespace with EXPORT_SYMBOL_NS() or define DEFAULT_SYMBOL_NAMESPACE 2) Run 'make' (or 'make modules') and get warnings a

[PATCH v3 07/11] modpost: add support for generating namespace dependencies

2019-08-21 Thread Matthias Maennich
This patch adds an option to modpost to generate a .ns_deps file per module, containing the namespace dependencies for that module. E.g. if the linked module my-module.ko would depend on the symbol myfunc.MY_NS in the namespace MY_NS, the my-module.ns_deps file created by modpost would contain the

[PATCH v3 09/11] usb-storage: remove single-use define for debugging

2019-08-21 Thread Matthias Maennich
USB_STORAGE was defined as "usb-storage: " and used in a single location as argument to printk. In order to be able to use the name 'USB_STORAGE', drop the definition and use the string directly for the printk call. Signed-off-by: Matthias Maennich --- drivers/usb/storage/debug.h| 2 -- driv

[PATCH v3 10/11] RFC: usb-storage: export symbols in USB_STORAGE namespace

2019-08-21 Thread Matthias Maennich
Modules using these symbols are required to explicitly import the namespace. This patch was generated with the following steps and serves as a reference to use the symbol namespace feature: 1) Define DEFAULT_SYMBOL_NAMESPACE in the corresponding Makefile 2) make (see warnings during modpost abo

Re: problems with Edgeport/416

2019-08-21 Thread walter harms
Am 21.08.2019 13:43, schrieb Schmid, Carsten: > Hi Walter, > > i had a similar issue with a different device. > Please check, if you have dynamic debug enabled in your kernel > (/sys/kernel/debug/dynamic_debug/control exists) > ll /sys/kernel/debug/dynamic_debug/control -rw-r--r-- 1 root roo

AW: problems with Edgeport/416

2019-08-21 Thread Schmid, Carsten
> > (doing a "cat /sys/kernel/debug/dynamic_debug/control | grep usb" helps > much) > > > I see a bunch of messages. what do you expect me to do ? I have 412 lines, > should > i send them ? > From the log of your kernel messages, it seems that uhci_hcd takes over the transport. So you should do

Re: KASAN: use-after-free Write in usb_anchor_resume_wakeups

2019-08-21 Thread Andrey Konovalov
On Tue, Jul 9, 2019 at 2:27 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:7829a896 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=160b9

Re: [PATCH v3 09/11] usb-storage: remove single-use define for debugging

2019-08-21 Thread Greg KH
On Wed, Aug 21, 2019 at 12:49:24PM +0100, Matthias Maennich wrote: > USB_STORAGE was defined as "usb-storage: " and used in a single location > as argument to printk. In order to be able to use the name > 'USB_STORAGE', drop the definition and use the string directly for the > printk call. > > Sig

Re: [PATCH v3 10/11] RFC: usb-storage: export symbols in USB_STORAGE namespace

2019-08-21 Thread Greg KH
On Wed, Aug 21, 2019 at 12:49:25PM +0100, Matthias Maennich wrote: > Modules using these symbols are required to explicitly import the > namespace. This patch was generated with the following steps and serves > as a reference to use the symbol namespace feature: > > 1) Define DEFAULT_SYMBOL_NAMES

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-08-21 Thread Andrey Konovalov
On Tue, Aug 13, 2019 at 10:13 PM Alan Stern wrote: > > On Mon, 12 Aug 2019, syzbot wrote: > > > Hello, > > > > syzbot has tested the proposed patch but the reproducer still triggered > > crash: > > KASAN: invalid-free in hcd_buffer_free > > This bug report shows that Hillf's fix isn't exactly righ

Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Tue, Jul 23, 2019 at 2:48 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:6a3599ce usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=107e

Re: Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread syzbot
On Tue, Jul 23, 2019 at 2:48 PM syzbot wrote: Hello, syzbot found the following crash on: HEAD commit:6a3599ce usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=107e726460

Re: Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread syzbot
On Tue, Jul 23, 2019 at 2:48 PM syzbot wrote: Hello, syzbot found the following crash on: HEAD commit:6a3599ce usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=107e726460

Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 21, 2019 at 2:54 PM Andrey Konovalov wrote: > > On Tue, Jul 23, 2019 at 2:48 PM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:6a3599ce usb-fuzzer: main usb gadget fuzzer driver > > git tree: https://github.com/google/kasan.gi

Re: Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread syzbot
On Sun, Aug 11, 2019 at 10:46 PM syzbot wrote: syzbot has found a reproducer for the following crash on: HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?

Re: Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread syzbot
On Sun, Aug 11, 2019 at 10:46 PM syzbot wrote: syzbot has found a reproducer for the following crash on: HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Sun, Aug 11, 2019 at 10:46 PM syzbot wrote: > > syzbot has found a reproducer for the following crash on: > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log

WARNING in smsusb_start_streaming/usb_submit_urb

2019-08-21 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:eea39f24 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=139ec19c60 kernel config: https://syzkaller.appspot.com/x/.

WARNING in flexcop_usb_probe/usb_submit_urb

2019-08-21 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:eea39f24 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=151c664c60 kernel config: https://syzkaller.appspot.com/x/.

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 21, 2019 at 2:57 PM Andrey Konovalov wrote: > > On Sun, Aug 11, 2019 at 10:46 PM syzbot > wrote: > > > > syzbot has found a reproducer for the following crash on: > > > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > > git tree: https://github.com/google/k

Re: problems with Edgeport/416

2019-08-21 Thread walter harms
Am 21.08.2019 14:20, schrieb Greg KH: > On Wed, Aug 21, 2019 at 01:48:46PM +0200, walter harms wrote: >> >> >> Am 21.08.2019 13:20, schrieb Greg KH: >>> On Wed, Aug 21, 2019 at 12:27:24PM +0200, walter harms wrote: Hello List, does some use linux with an Edgeport/416 ? I have

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-08-21 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+a7a6b9c609b9457c6...@syzkaller.appspotmail.com Tested on: commit: 7f7867ff usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasa

AW: problems with Edgeport/416

2019-08-21 Thread Schmid, Carsten
> > Different computer but same cables i guess the device is ok. > But maybe the USB port of the computer is broken. > NTL I found that little gem: > https://www.fclose.com/linux-kernels/594677/usb-io_ti-add-heartbeat-to- > keep-idle-ep-416-ports-from-disconnecting-linux-4-3/ > > The behavior

Re: [PATCH v3 09/11] usb-storage: remove single-use define for debugging

2019-08-21 Thread Thomas Gleixner
On Wed, 21 Aug 2019, Matthias Maennich wrote: > USB_STORAGE was defined as "usb-storage: " and used in a single location > as argument to printk. In order to be able to use the name > 'USB_STORAGE', drop the definition and use the string directly for the > printk call. > > Signed-off-by: Matthias

Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: KASAN: use-after-free Read in hidraw_ioctl == BUG: KASAN: use-after-free in hidraw_ioctl+0x609/0xaf0 drivers/hid/hidraw.c:380 Read of size 4

Re: [PATCH v3 09/11] usb-storage: remove single-use define for debugging

2019-08-21 Thread Greg KH
On Wed, Aug 21, 2019 at 03:21:22PM +0200, Thomas Gleixner wrote: > On Wed, 21 Aug 2019, Matthias Maennich wrote: > > > USB_STORAGE was defined as "usb-storage: " and used in a single location > > as argument to printk. In order to be able to use the name > > 'USB_STORAGE', drop the definition and

[PATCH] usb: dwc3: meson-g12a: fix suspend resume regulator unbalanced disables

2019-08-21 Thread Neil Armstrong
When going in suspend, in Device mode, then resuming back leads to the following: unbalanced disables for USB_PWR_EN WARNING: CPU: 0 PID: 163 at ../drivers/regulator/core.c:2590 _regulator_disable+0x104/0x180 Hardware name: Amlogic Meson G12A U200 Development Board (DT) [...] pc : _regulator_disa

Re: problems with Edgeport/416

2019-08-21 Thread Greg KH
On Wed, Aug 21, 2019 at 03:04:48PM +0200, walter harms wrote: > > > Am 21.08.2019 14:20, schrieb Greg KH: > > On Wed, Aug 21, 2019 at 01:48:46PM +0200, walter harms wrote: > >> > >> > >> Am 21.08.2019 13:20, schrieb Greg KH: > >>> On Wed, Aug 21, 2019 at 12:27:24PM +0200, walter harms wrote: > >>

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: KASAN: slab-out-of-bounds Read in hidraw_ioctl == BUG: KASAN: slab-out-of-bounds in strlen+0x79/0x90 lib/string.c:525 Read of size 1 at addr ff

Re: problems with Edgeport/416

2019-08-21 Thread walter harms
Am 21.08.2019 15:20, schrieb Schmid, Carsten: >> >> Different computer but same cables i guess the device is ok. >> > But maybe the USB port of the computer is broken. > >> NTL I found that little gem: >> https://www.fclose.com/linux-kernels/594677/usb-io_ti-add-heartbeat-to- >> keep-idle-ep-41

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 21, 2019 at 3:09 PM syzbot wrote: > > Hello, > > syzbot has tested the proposed patch and the reproducer did not trigger > crash: > > Reported-and-tested-by: > syzbot+a7a6b9c609b9457c6...@syzkaller.appspotmail.com > > Tested on: > > commit: 7f7867ff usb-fuzzer: main usb gadget

Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 21, 2019 at 3:27 PM syzbot wrote: > > Hello, > > syzbot has tested the proposed patch but the reproducer still triggered > crash: > KASAN: use-after-free Read in hidraw_ioctl OK, so this looks like a different bug. > > =

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 21, 2019 at 3:37 PM syzbot wrote: > > Hello, > > syzbot has tested the proposed patch but the reproducer still triggered > crash: > KASAN: slab-out-of-bounds Read in hidraw_ioctl Same here, a different bug. > > == > BUG:

Re: [PATCH] HID: USB: Fix general protection fault caused by Logitech driver

2019-08-21 Thread Andrey Konovalov
On Tue, Aug 20, 2019 at 10:00 PM Alan Stern wrote: > > The syzbot fuzzer found a general protection fault in the HID subsystem: > > kasan: CONFIG_KASAN_INLINE enabled > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN > CPU: 0 PID:

AW: problems with Edgeport/416

2019-08-21 Thread Schmid, Carsten
> > uname -a > Linux omnfrmo10 4.12.14-lp151.28.10-vanilla #1 SMP Sat Jul 13 17:59:31 UTC > 2019 (0ab03b7) x86_64 x86_64 x86_64 GNU/Linux > 4.12.14 - it should have the heartbeat patch introduced in 4.3 > i see a lot, see attached file The dyndbg for the driver is active :-) The log you sent

Re: f_mass_storage vs drivers/target

2019-08-21 Thread Alan Stern
On Wed, 21 Aug 2019, Benjamin Herrenschmidt wrote: > Hi folks ! > > It seems that f_mass_storage duplicates (well maybe predates too..) a > lot of what's in drivers/target. > > Anybody working on implementing a new version of f_mass_storage that > is layered upon drivers/target instead ? That wo

Re: [PATCH] usb: gadget: udc: core: Fix error case while binding pending gadget drivers

2019-08-21 Thread Alan Stern
On Wed, 21 Aug 2019, Roger Quadros wrote: > If binding a pending gadget driver fails we should not > remove it from the pending driver list, otherwise it > will cause a segmentation fault later when the gadget driver is > unloaded. > Signed-off-by: Roger Quadros > --- > drivers/usb/gadget/udc/c

Re: [PATCH v3 10/11] RFC: usb-storage: export symbols in USB_STORAGE namespace

2019-08-21 Thread Jessica Yu
+++ Greg KH [21/08/19 05:38 -0700]: On Wed, Aug 21, 2019 at 12:49:25PM +0100, Matthias Maennich wrote: Modules using these symbols are required to explicitly import the namespace. This patch was generated with the following steps and serves as a reference to use the symbol namespace feature: 1

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread Alan Stern
On Wed, 21 Aug 2019, syzbot wrote: > Hello, > > syzbot has tested the proposed patch but the reproducer still triggered > crash: > KASAN: slab-out-of-bounds Read in hidraw_ioctl > > == > BUG: KASAN: slab-out-of-bounds in strlen+0x

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: KASAN: slab-out-of-bounds Read in hidraw_ioctl == BUG: KASAN: slab-out-of-bounds in strlen+0x79/0x90 lib/string.c:525 Read of size 1 at addr ff

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread Alan Stern
On Wed, 21 Aug 2019, syzbot wrote: > Hello, > > syzbot has tested the proposed patch but the reproducer still triggered > crash: > KASAN: slab-out-of-bounds Read in hidraw_ioctl > > == > BUG: KASAN: slab-out-of-bounds in strlen+0x

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+5a6c4ec678a0c6ee8...@syzkaller.appspotmail.com Tested on: commit: e96407b4 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasa

Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread Alan Stern
#syz test: https://github.com/google/kasan.git e96407b4 Index: usb-devel/drivers/hid/hidraw.c === --- usb-devel.orig/drivers/hid/hidraw.c +++ usb-devel/drivers/hid/hidraw.c @@ -370,7 +370,7 @@ static long hidraw_ioctl(struct file *fi

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread Alan Stern
On Wed, 21 Aug 2019, Andrey Konovalov wrote: > On Wed, Aug 21, 2019 at 3:37 PM syzbot > wrote: > > > > Hello, > > > > syzbot has tested the proposed patch but the reproducer still triggered > > crash: > > KASAN: slab-out-of-bounds Read in hidraw_ioctl > > Same here, a different bug. It looks li

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 21, 2019 at 6:24 PM Alan Stern wrote: > > On Wed, 21 Aug 2019, Andrey Konovalov wrote: > > > On Wed, Aug 21, 2019 at 3:37 PM syzbot > > wrote: > > > > > > Hello, > > > > > > syzbot has tested the proposed patch but the reproducer still triggered > > > crash: > > > KASAN: slab-out-of-b

Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger crash: Reported-and-tested-by: syzbot+ded1794a717e3b235...@syzkaller.appspotmail.com Tested on: commit: e96407b4 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasa

Re: KASAN: use-after-free Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 21, 2019 at 6:38 PM syzbot wrote: > > Hello, > > syzbot has tested the proposed patch and the reproducer did not trigger > crash: > > Reported-and-tested-by: > syzbot+ded1794a717e3b235...@syzkaller.appspotmail.com > > Tested on: > > commit: e96407b4 usb-fuzzer: main usb gadget

Re: KASAN: slab-out-of-bounds Read in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 21, 2019 at 6:26 PM Andrey Konovalov wrote: > > On Wed, Aug 21, 2019 at 6:24 PM Alan Stern wrote: > > > > On Wed, 21 Aug 2019, Andrey Konovalov wrote: > > > > > On Wed, Aug 21, 2019 at 3:37 PM syzbot > > > wrote: > > > > > > > > Hello, > > > > > > > > syzbot has tested the proposed p

Re: KASAN: use-after-free Read in hiddev_ioctl

2019-08-21 Thread Andrey Konovalov
On Tue, Aug 6, 2019 at 3:18 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=17322

Re: BUG: bad usercopy in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 7, 2019 at 9:28 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=151b2

Re: KASAN: use-after-free Read in usbhid_wait_io

2019-08-21 Thread Andrey Konovalov
On Mon, Aug 5, 2019 at 1:58 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=136be

Re: WARNING in hiddev_ioctl/usb_submit_urb

2019-08-21 Thread Andrey Konovalov
On Wed, Aug 7, 2019 at 4:28 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=14f54

Re: KASAN: slab-out-of-bounds Read in usbhid_close

2019-08-21 Thread Andrey Konovalov
On Tue, Aug 6, 2019 at 3:18 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=117a9

Re: BUG: unable to handle kernel paging request in au0828_usb_disconnect

2019-08-21 Thread Andrey Konovalov
On Mon, Apr 29, 2019 at 2:06 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:43151d6c usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan/tree/usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=106

[PATCH] HID: hidraw: Fix invalid read in hidraw_ioctl

2019-08-21 Thread Alan Stern
The syzbot fuzzer has reported a pair of problems in the hidraw_ioctl() function: slab-out-of-bounds read and use-after-free read. An example of the first: BUG: KASAN: slab-out-of-bounds in strlen+0x79/0x90 lib/string.c:525 Read of size 1 at addr 8881c8035f38 by task syz-executor.4/2833 CPU:

Re: [PATCH] ARM: s3c64xx: squash samsung_usb_phy.h into setup-usb-phy.c

2019-08-21 Thread Krzysztof Kozlowski
On Tue, Aug 20, 2019 at 12:56:02AM +0900, Masahiro Yamada wrote: > This is only used by arch/arm/mach-s3c64xx/setup-usb-phy.c > > $ git grep samsung_usb_phy_type > include/linux/usb/samsung_usb_phy.h:enum samsung_usb_phy_type { > $ git grep USB_PHY_TYPE_DEVICE > arch/arm/mach-s3c64xx/setup-usb-phy

Re: [PATCH] usb: dwc3: meson-g12a: fix suspend resume regulator unbalanced disables

2019-08-21 Thread Kevin Hilman
Neil Armstrong writes: > When going in suspend, in Device mode, then resuming back leads > to the following: > > unbalanced disables for USB_PWR_EN > WARNING: CPU: 0 PID: 163 at ../drivers/regulator/core.c:2590 > _regulator_disable+0x104/0x180 > Hardware name: Amlogic Meson G12A U200 Development

Re: [PATCH v2 2/5] dt-bindings: phy: Modify Stingray USB PHY #phy-cells

2019-08-21 Thread Rob Herring
On Wed, Jul 31, 2019 at 03:49:52PM +0530, Srinath Mannam wrote: > Increase #phy-cells from 1 to 2 to have bitmask of PHY enabled ports. And from 0 to 1... Are you going to update all the dts files so when we convert this to schema we don't get a bunch of warnings? (Feel free to convert this to

Re: [PATCH v2 4/5] dt-bindings: usb-xhci: Add platform specific compatible for Stingray xHCI

2019-08-21 Thread Rob Herring
On Wed, 31 Jul 2019 15:49:54 +0530, Srinath Mannam wrote: > Add Platform specific compatible, because xHCI of this SoC has an issue > with HS port which has to reset on disconnect event. > > Signed-off-by: Srinath Mannam > --- > Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + > 1 file

Re: [PATCH] usb-storage: Add new JMS567 revision to unusual_devs

2019-08-21 Thread Alan Stern
On Fri, 16 Aug 2019, Henk van der Laan wrote: > Revision 0x0117 suffers from an identical issue to earlier revisions, > therefore it should be added to the quirks list. > > Signed-off-by: Henk van der Laan > --- > drivers/usb/storage/unusual_devs.h | 2 +- > 1 file changed, 1 insertion(+), 1 de

[PATCH] net: usb: Delete unnecessary checks before the macro call “dev_kfree_skb”

2019-08-21 Thread Markus Elfring
From: Markus Elfring Date: Wed, 21 Aug 2019 22:16:02 +0200 The dev_kfree_skb() function performs also input parameter validation. Thus the test around the shown calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/usb/lg-

Re: [Patch V6 4/8] dt-bindings: usb: Add NVIDIA Tegra XUSB device mode controller binding

2019-08-21 Thread Rob Herring
On Thu, 8 Aug 2019 15:07:22 +0530, Nagarjuna Kristam wrote: > Add device-tree binding documentation for the XUSB device mode controller > present on Tegra210 SoC. This controller supports the USB 3.0 > specification. > > Signed-off-by: Nagarjuna Kristam > Reviewed-by: JC Kuo > --- > .../devicet

WARNING: bad usercopy in hidraw_ioctl

2019-08-21 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:eea39f24 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=128c664c60 kernel config: https://syzkaller.appspot.com/x/.

Re: [PATCH v3 10/11] RFC: usb-storage: export symbols in USB_STORAGE namespace

2019-08-21 Thread Christoph Hellwig
On Wed, Aug 21, 2019 at 12:49:25PM +0100, Matthias Maennich wrote: > Modules using these symbols are required to explicitly import the > namespace. This patch was generated with the following steps and serves > as a reference to use the symbol namespace feature: > > 1) Define DEFAULT_SYMBOL_NAMES

Re: [RFC 1/4] Add usb_get_address and usb_set_address support

2019-08-21 Thread Charles.Hyde
> > This is a VERY cdc-net-specific function. It is not a "generic" USB > function at all. Why does it belong in the USB core? Shouldn't it live > in the code that handles the other cdc-net-specific logic? > > thanks, > > greg k-h Thank you for this feedback, Greg. I was not sure about addin

Re: WARNING: bad usercopy in hidraw_ioctl

2019-08-21 Thread Andrey Konovalov
On Thu, Aug 22, 2019 at 12:38 AM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:eea39f24 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=128

Re: [RFC 1/4] Add usb_get_address and usb_set_address support

2019-08-21 Thread Charles.Hyde
>> The core USB driver message.c is missing get/set address functionality >> that stops ifconfig from being able to push MAC addresses out to USB >> based ethernet devices. Without this functionality, some USB devices >> stop responding to ethernet packets when using ifconfig to change MAC >> addr

Re: f_mass_storage vs drivers/target

2019-08-21 Thread Benjamin Herrenschmidt
On Wed, 2019-08-21 at 10:25 -0400, Alan Stern wrote: > On Wed, 21 Aug 2019, Benjamin Herrenschmidt wrote: > > > Hi folks ! > > > > It seems that f_mass_storage duplicates (well maybe predates too..) > a > > lot of what's in drivers/target. > > > > Anybody working on implementing a new version of

Re: [PATCH v5 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-21 Thread Suwan Kim
On Thu, Aug 08, 2019 at 10:21:42AM -0600, shuah wrote: > On 8/8/19 9:54 AM, Suwan Kim wrote: > > There are bugs on vhci with usb 3.0 storage device. In USB, each SG > > list entry buffer should be divisible by the bulk max packet size. > > But with native SG support, this problem doesn't matter bec

Reminder: 52 active syzbot reports in usb subsystem

2019-08-21 Thread Eric Biggers
[This email was generated by a script. Let me know if you have any suggestions to make it better, or if you want it re-generated with the latest status.] Of the syzbot reports that have (re-)occurred in the last 7 days, I've manually marked 52 of them as possibly being bugs in the usb subsystem.

Re: f_mass_storage vs drivers/target

2019-08-21 Thread Benjamin Herrenschmidt
On Thu, 2019-08-22 at 10:10 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2019-08-21 at 10:25 -0400, Alan Stern wrote: > > On Wed, 21 Aug 2019, Benjamin Herrenschmidt wrote: > > > > > Hi folks ! > > > > > > It seems that f_mass_storage duplicates (well maybe predates too..) > > > > a > > > lot

Re: f_mass_storage vs drivers/target

2019-08-21 Thread Benjamin Herrenschmidt
On Thu, 2019-08-22 at 14:58 +1000, Benjamin Herrenschmidt wrote: > > Ah lovely ... the 338x fails in EP autoconf with f_tcm, digging... > > While digging I found this gem: > > /* USB3380: use same address for usb and hardware endpoints */ > snprintf(name, sizeof(name), "ep%d%s", usb_

Re: f_mass_storage vs drivers/target

2019-08-21 Thread Benjamin Herrenschmidt
On Thu, 2019-08-22 at 15:14 +1000, Benjamin Herrenschmidt wrote: > - No UDC driver other than dummy sets max_streams, and f_tcm requires 4, > so f_tcm will fail with *any* superspeed UDC driver as far as I can tell. > > Was it ever tested with USB 3 ? Ok so I spoke too soon... dwc3 does, I didn't

Re: [v3 08/11] scripts: Coccinelle script for namespace dependencies

2019-08-21 Thread Markus Elfring
> +generate_deps_for_ns() { > + $SPATCH --very-quiet --in-place --sp-file \ > + $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2 > +} I would appreciate more constructive answers for specific software development concerns. https://lore.kernel.org/lkml/1c4420f4-361c