Re: KERNEL CRASH when using XHCI devices (affects any architecture, any USB device)

2019-07-25 Thread Mathias Nyman
On 24.7.2019 19.29, Maik Stohn wrote: Am 24.07.2019 um 18:03 schrieb Mathias Nyman : On 24.7.2019 17.34, Maik Stohn wrote: Am 24.07.2019 um 16:20 schrieb Greg KH : On Wed, Jul 24, 2019 at 03:27:51PM +0200, Maik Stohn wrote: KERNEL CRASH when using XHCI devices (affects any architecture, any

Re: [PATCH v1] usb: dwc2: Switch to use device_property_count_u32()

2019-07-25 Thread Minas Harutyunyan
On 7/23/2019 11:17 PM, Andy Shevchenko wrote: Use use device_property_count_u32() directly, that makes code neater. Signed-off-by: Andy Shevchenko --- Acked-by: Minas Harutyunyan drivers/usb/dwc2/params.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb

Re: [bugzilla-dae...@bugzilla.kernel.org: [Bug 204095] New: freeze while write on external usb 3.0 hard disk]

2019-07-25 Thread Greg KH
On Mon, Jul 15, 2019 at 01:47:44PM -0400, Alan Stern wrote: > On Mon, 15 Jul 2019, John Yost wrote: > > > On 7/15/19 11:16 AM, Alan Stern wrote: > > > On Sun, 14 Jul 2019, Theodore Y. Ts'o wrote: > > > > > >> This bug was initially (and wrongly) assigned to the ext4 component, > > >> when it's ve

[PATCH] xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT).

2019-07-25 Thread Mathias Nyman
A second regression was found in the immediate data transfer (IDT) support which was added to 5.2 kernel IDT is used to transfer small amounts of data (up to 8 bytes) in the field normally used for data dma address, thus avoiding dma mapping. If the data was not already dma mapped, then IDT suppo

Re: [PATCH v2 2/2] dt-bindings: usb: renesas_gen3: Rename bindings documentation file

2019-07-25 Thread Greg Kroah-Hartman
On Thu, Jul 11, 2019 at 10:03:03AM +0200, Simon Horman wrote: > On Wed, Jul 03, 2019 at 02:28:51PM +0200, Geert Uytterhoeven wrote: > > Hi Simon, > > > > On Wed, Jul 3, 2019 at 10:35 AM Simon Horman > > wrote: > > > For consistency with the naming of (most) other documentation files for DT > > >

Re: [RFC] usbfs: Add ioctls for runtime suspend and resume

2019-07-25 Thread Mayuresh Kulkarni
On Fri, 2019-07-05 at 14:51 -0400, Alan Stern wrote: > On Wed, 3 Jul 2019, Mayuresh Kulkarni wrote: > > > > > As you had mentioned in one of the comment before, the only addition > > to > > the patch I have locally is - > > usbfs_notify_resume() has usbfs_mutex lock around list traversal. > > >

Re: [RFC] usbfs: Add ioctls for runtime suspend and resume

2019-07-25 Thread Greg KH
On Thu, Jul 25, 2019 at 10:10:27AM +0100, Mayuresh Kulkarni wrote: > On Fri, 2019-07-05 at 14:51 -0400, Alan Stern wrote: > > On Wed, 3 Jul 2019, Mayuresh Kulkarni wrote: > > > > > > > > As you had mentioned in one of the comment before, the only addition > > > to > > > the patch I have locally i

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

2019-07-25 Thread Oliver Neukum
Am Mittwoch, den 24.07.2019, 17:02 -0400 schrieb Alan Stern: > On Wed, 24 Jul 2019, Oliver Neukum wrote: > > > drivers/hid/usbhid/hid-core.c | 13 + > > 1 file changed, 13 insertions(+) > > > > diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c > > index c7bc9

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

2019-07-25 Thread Andrey Konovalov
On Wed, Jul 24, 2019 at 11:16 PM syzbot wrote: > > Hello, > > syzbot tried to test the proposed patch but build/boot failed: 5.3-rc1 has a boot time bug, so the usb-fuzzer branch is broken right now. Could you try using the usb-fuzzer-usb-testing-2019.07.11 branch instead for testing your patches

WARNING: ODEBUG bug in __free_pages_ok

2019-07-25 Thread syzbot
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=10d72ef060 kernel config: https://syzkaller.appspot.com/x/.

general protection fault in holtek_kbd_input_event

2019-07-25 Thread syzbot
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=14e6d3d060 kernel config: https://syzkaller.appspot.com/x/.

WARNING in __uwb_rc_neh_rm

2019-07-25 Thread syzbot
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=17eb58cc60 kernel config: https://syzkaller.appspot.com/x/.

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

2019-07-25 Thread Oliver Neukum
Am Dienstag, den 23.07.2019, 05:48 -0700 schrieb syzbot: > 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.

general protection fault in gigaset_probe

2019-07-25 Thread syzbot
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=11865a5c60 kernel config: https://syzkaller.appspot.com/x/.

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

2019-07-25 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: KASAN: use-after-free Read in usbhid_power == BUG: KASAN: use-after-free in __lock_acquire+0x3a5d/0x5340 kernel/locking/lockdep.c:3665 Read

[PATCH v2] usbip: tools: fix GCC8 warning for strncpy

2019-07-25 Thread Liu, Changcheng
GCC8 started emitting warning about using strncpy with number of bytes exactly equal destination size which could lead to non-zero terminated string being copied. Use "SYSFS_PATH_MAX - 1" & "SYSFS_BUS_ID_SIZE - 1" as number of bytes to ensure name is always zero-terminated. Signed-off-by: Changche

Re: Titan Ridge xHCI may stop to working after re-plugging the dock

2019-07-25 Thread Kai-Heng Feng
at 22:45, Mathias Nyman wrote: On 22.7.2019 12.44, Kai-Heng Feng wrote: Hi Mika and Mathias, I’ve filed a bug [1] which renders docking station unusable. I am not sure it's a bug in PCI, Thunderbolt or xHCI so raise the issue to you both. [1] https://bugzilla.kernel.org/show_bug.cgi?id=2

Re: [PATCH v2] usbip: tools: fix GCC8 warning for strncpy

2019-07-25 Thread shuah
On 7/25/19 7:22 AM, Liu, Changcheng wrote: GCC8 started emitting warning about using strncpy with number of bytes exactly equal destination size which could lead to non-zero terminated string being copied. Use "SYSFS_PATH_MAX - 1" & "SYSFS_BUS_ID_SIZE - 1" as number of bytes to ensure name is alw

Копия: Make Money 10000$ Per Day With Bitcoin

2019-07-25 Thread Федерация Кёкусин-кан карате-до Республики Крым
Это копия сообщения, которое вы отправили Александр Викторович Джемерис через Федерация Кёкусин-кан карате-до Республики Крым Это письмо отправлено с сайта http://karate-crimea.ru/ от: Donaldliels How would you use $30,000 to make more money: http://v.ht/vZgiVY?LDNswrUZLhgTRR

Re: [PATCH v2] usbip: tools: fix GCC8 warning for strncpy

2019-07-25 Thread Liu, Changcheng
On 08:19 Thu 25 Jul, shuah wrote: > On 7/25/19 7:22 AM, Liu, Changcheng wrote: > > GCC8 started emitting warning about using strncpy with number of bytes > > exactly equal destination size which could lead to non-zero terminated > > string being copied. Use "SYSFS_PATH_MAX - 1" & "SYSFS_BUS_ID_SIZE

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

2019-07-25 Thread Alan Stern
On Thu, 25 Jul 2019, Oliver Neukum wrote: > Am Mittwoch, den 24.07.2019, 17:02 -0400 schrieb Alan Stern: > > On Wed, 24 Jul 2019, Oliver Neukum wrote: > > > > > drivers/hid/usbhid/hid-core.c | 13 + > > > 1 file changed, 13 insertions(+) > > > > > > diff --git a/drivers/hid/usbhid/h

Re: [RFC] usbfs: Add ioctls for runtime suspend and resume

2019-07-25 Thread Alan Stern
On Thu, 25 Jul 2019, Greg KH wrote: > > > Still to do: Write up the documentation.��In fact, the existing > > > description of usbfs in Documentation/driver-api/usb/usb.rst is sadly > > > out of date.��And it deserves to be split out into a separate file of > > > its own -- but I'm not sure where

Re: [PATCH v3 1/7] drivers: Introduce device lookup variants by name

2019-07-25 Thread Alexandre Belloni
On 23/07/2019 23:18:32+0100, Suzuki K Poulose wrote: > Add a helper to match the device name for device lookup. Also > reuse this generic exported helper for the existing bus_find_device_by_name(). > and add similar variants for driver/class. > > Cc: Alessandro Zummo > Cc: Alexander Aring > Cc:

Re: [RFC] usbfs: Add ioctls for runtime suspend and resume

2019-07-25 Thread Greg KH
On Thu, Jul 25, 2019 at 11:18:09AM -0400, Alan Stern wrote: > On Thu, 25 Jul 2019, Greg KH wrote: > > > > > Still to do: Write up the documentation.??In fact, the existing > > > > description of usbfs in Documentation/driver-api/usb/usb.rst is sadly > > > > out of date.??And it deserves to be spli

Re: [PATCH v2] usbip: tools: fix GCC8 warning for strncpy

2019-07-25 Thread shuah
On 7/25/19 8:44 AM, Liu, Changcheng wrote: On 08:19 Thu 25 Jul, shuah wrote: On 7/25/19 7:22 AM, Liu, Changcheng wrote: GCC8 started emitting warning about using strncpy with number of bytes exactly equal destination size which could lead to non-zero terminated string being copied. Use "SYSFS_P

Re: [PATCH v3 3/7] drivers: Introduce device lookup variants by fwnode

2019-07-25 Thread Mathieu Poirier
On Tue, Jul 23, 2019 at 11:18:34PM +0100, Suzuki K Poulose wrote: > Add a helper to match the firmware node handle of a device and provide > wrappers for {bus/class/driver}_find_device() APIs to avoid proliferation > of duplicate custom match functions. > > Cc: "David S. Miller" > Cc: Doug Ledfor

Re: [PATCH V2 1/2] usb: dwc3: Add node to update cache type setting

2019-07-25 Thread Rob Herring
On Wed, Jul 24, 2019 at 8:29 PM Ran Wang wrote: > > Hi Rob, > > On Thursday, July 25, 2019 04:42 Rob Herring wrote: > > > > On Fri, Jul 12, 2019 at 02:42:05PM +0800, Ran Wang wrote: > > > Some Layerscape paltforms (such as LS1088A, LS2088A, etc) encounter > > > USB detect failues when adding dma-

RE: [PATCH v2 2/2] dt-bindings: usb: renesas_gen3: Rename bindings documentation file

2019-07-25 Thread Yoshihiro Shimoda
Hi Greg, > From: Greg Kroah-Hartman, Sent: Thursday, July 25, 2019 6:10 PM > > On Thu, Jul 11, 2019 at 10:03:03AM +0200, Simon Horman wrote: > > On Wed, Jul 03, 2019 at 02:28:51PM +0200, Geert Uytterhoeven wrote: > > > Hi Simon, > > > > > > On Wed, Jul 3, 2019 at 10:35 AM Simon Horman > > > wro

RE: [PATCH V2 1/2] usb: dwc3: Add node to update cache type setting

2019-07-25 Thread Ran Wang
Hi Felipe, On Friday, July 26, 2019 05:56, Rob Herring wrote: > > On Wed, Jul 24, 2019 at 8:29 PM Ran Wang wrote: > > > > Hi Rob, > > > > On Thursday, July 25, 2019 04:42 Rob Herring wrote: > > > > > > On Fri, Jul 12, 2019 at 02:42:05PM +0800, Ran Wang wrote: > > > > Some Layerscape paltforms

[PATCH 1/2] usb: gadget: composite: Clear "suspended" on reset/disconnect

2019-07-25 Thread Benjamin Herrenschmidt
In some cases, one can get out of suspend with a reset or a disconnect followed by a reconnect. Previously we would leave a stale suspended flag set. Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/composite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/co

[PATCH 2/2] usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt

2019-07-25 Thread Benjamin Herrenschmidt
If fsg_disable() and fsg_set_alt() are called too closely to each other (for example due to a quick reset/reconnect), what can happen is that fsg_set_alt sets common->new_fsg from an interrupt while handle_exception is trying to process the config change caused by fsg_disable(): fsg_disabl

[PATCH 0/2] usb: gadget: Composite and Mass Storage fixes

2019-07-25 Thread Benjamin Herrenschmidt
These two fixes have been rotting on the list for a while. The mass storage one should probably go to stable as well (Felipe ? Alan ?) as people have been chasing that for years and it can crash your kernel.

[PATCH v3 03/10] usb: gadget: aspeed: Fix EP0 stall handling

2019-07-25 Thread Benjamin Herrenschmidt
When stalling EP0, we need to wait for an ACK interrupt, otherwise we may get out of sync on the next setup packet data phase. Also we need to ignore the direction when processing that interrupt as the HW reports a potential mismatch. Implement this by adding a stall state to EP0. This fixes some

[PATCH v3 10/10] usb: gadget: aspeed: Implement dummy hub TT requests

2019-07-25 Thread Benjamin Herrenschmidt
We just accept them instead of stalling and return zeros on GetTTState. Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/udc/aspeed-vhub/hub.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/gadget/udc/aspeed-vhub/hub.c b/drivers/usb/gadget/udc/aspeed-vhub/hub.

[PATCH v3 07/10] usb: gadget: aspeed: Remove unused "suspended" flag

2019-07-25 Thread Benjamin Herrenschmidt
The state bit in the hub is sufficient Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/udc/aspeed-vhub/dev.c | 4 drivers/usb/gadget/udc/aspeed-vhub/vhub.h | 1 - 2 files changed, 5 deletions(-) diff --git a/drivers/usb/gadget/udc/aspeed-vhub/dev.c b/drivers/usb/gadget/udc/a

[PATCH v3 01/10] usb: gadget: aspeed: Don't set port enable change bit on reset

2019-07-25 Thread Benjamin Herrenschmidt
This bit should be only set when the port enable goes down, for example, on errors. Not when it gets set after a port reset. Some USB stacks seem to be sensitive to this and fails enumeration. Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/udc/aspeed-vhub/hub.c | 9 - 1 fil

[PATCH v3 06/10] usb: gadget: aspeed: Rework the reset logic

2019-07-25 Thread Benjamin Herrenschmidt
We had some dodgy code using the speed setting to decide whether a port reset would reset the device or just enable it. Instead, if the device is disabled and has a gadget attached, a reset will enable it. If it's already enabled, a reset will reset it. Signed-off-by: Benjamin Herrenschmidt ---

[PATCH 00/10] usb: gadget: aspeed: Bug fixes

2019-07-25 Thread Benjamin Herrenschmidt
So I finally got back an Aspeed eval board, and thus resumed maintaining and handling bug reports for this driver. This is a series that fixes a number of enumeration related issues with a variety of hosts, OSes, and circumstances (ie, plugging/unplugging at funny times, etc...). I also added dum

[PATCH v3 09/10] usb: Add definitions for the USB2.0 hub TT requests

2019-07-25 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- include/linux/usb/hcd.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index bab27ccc8ff5..367f9b39ac56 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -591,6 +591,10 @@ exte

[PATCH v3 08/10] usb: gadget: aspeed: Improve debugging when nuking

2019-07-25 Thread Benjamin Herrenschmidt
When nuking requests, it's useful to display how many were actually nuked. It has proven handy when debugging issues where EP0 went in a wrong state. Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/udc/aspeed-vhub/core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) d

[PATCH v3 05/10] usb: gadget: aspeed: Check suspend/resume callback existence

2019-07-25 Thread Benjamin Herrenschmidt
.. before calling them Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/udc/aspeed-vhub/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/aspeed-vhub/dev.c b/drivers/usb/gadget/udc/aspeed-vhub/dev.c index 71e2416858fd..5f7e3b6de531

[PATCH v3 04/10] usb: gadget: aspeed: Don't reject requests on suspended devices

2019-07-25 Thread Benjamin Herrenschmidt
A disconnect may just suspend the hub in absence of a physical disconnect detection. If we start rejecting requests, the mass storage function gets into a spin trying to requeue the same request for ever and hangs. Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/udc/aspeed-vhub/dev.

[PATCH v3 02/10] usb: gadget: aspeed: Cleanup EP0 state on port reset

2019-07-25 Thread Benjamin Herrenschmidt
Otherwise, we can have a stale state after a disconnect and reconnect causing errors on the first SETUP packet to the device. Signed-off-by: Benjamin Herrenschmidt --- drivers/usb/gadget/udc/aspeed-vhub/dev.c | 3 +++ drivers/usb/gadget/udc/aspeed-vhub/ep0.c | 9 + drivers/usb/gadget/u