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

2019-07-29 Thread Simon Horman
On Fri, Jul 26, 2019 at 01:22:48AM +, Yoshihiro Shimoda wrote: > 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: > > >

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

2019-07-29 Thread Yoshihiro Shimoda
Hi Simon-san, > From: Simon Horman, Sent: Monday, July 29, 2019 5:15 PM > > > > > Unfortunately the previous version has already made it into usb-next > > > > > 23c46801d14cb647 dt-bindings: usb: renesas_gen3: Rename bindings > > > > > documentation file > > > > > > > > Ok, I guess we should go w

[PATCH] usb: musb: Fix a possible null-pointer dereference in musb_handle_intr_connect()

2019-07-29 Thread Jia-Ju Bai
In musb_handle_intr_connect(), there is an if statement on line 783 to check whether musb->hcd is NULL: if (musb->hcd) When musb->hcd is NULL, it is used on line 797: musb_host_poke_root_hub(musb); if (musb->hcd->status_urb) Thus, a possible null-pointer dereference may occur. To

[PATCH] usb: storage: sddr55: Fix a possible null-pointer dereference in sddr55_transport()

2019-07-29 Thread Jia-Ju Bai
In sddr55_transport(), there is an if statement on line 836 to check whether info->lba_to_pba is NULL: if (info->lba_to_pba == NULL || ...) When info->lba_to_pba is NULL, it is used on line 948: pba = info->lba_to_pba[lba]; Thus, a possible null-pointer dereference may occur. To fix this

Re: [PATCH] usb: storage: sddr55: Fix a possible null-pointer dereference in sddr55_transport()

2019-07-29 Thread Oliver Neukum
Am Montag, den 29.07.2019, 18:05 +0800 schrieb Jia-Ju Bai: Hi, > In sddr55_transport(), there is an if statement on line 836 to check > whether info->lba_to_pba is NULL: > if (info->lba_to_pba == NULL || ...) > > When info->lba_to_pba is NULL, it is used on line 948: > pba = info->lba_to

Re: Re: WARNING in iguanair_probe/usb_submit_urb

2019-07-29 Thread syzbot
Am Freitag, den 26.07.2019, 05:28 -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.txt?x=164

Re: WARNING in iguanair_probe/usb_submit_urb

2019-07-29 Thread Oliver Neukum
Am Freitag, den 26.07.2019, 05:28 -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.t

Re: [PATCH] usb: storage: sddr55: Fix a possible null-pointer dereference in sddr55_transport()

2019-07-29 Thread Jia-Ju Bai
On 2019/7/29 19:15, Oliver Neukum wrote: Am Montag, den 29.07.2019, 18:05 +0800 schrieb Jia-Ju Bai: Hi, In sddr55_transport(), there is an if statement on line 836 to check whether info->lba_to_pba is NULL: if (info->lba_to_pba == NULL || ...) When info->lba_to_pba is NULL, it is used

KASAN: use-after-free Write in usbvision_scratch_alloc

2019-07-29 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=1408919260 kernel config: https://syzkaller.appspot.com/x/.

WARNING in usbhid_raw_request/usb_submit_urb

2019-07-29 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=12386cb460 kernel config: https://syzkaller.appspot.com/x/.

[PATCH v2] usb: storage: sddr55: Fix a possible null-pointer dereference in sddr55_transport()

2019-07-29 Thread Jia-Ju Bai
In sddr55_transport(), there is an if statement on line 836 to check whether info->lba_to_pba is NULL: if (info->lba_to_pba == NULL || ...) When info->lba_to_pba is NULL, it is used on line 948: pba = info->lba_to_pba[lba]; Thus, a possible null-pointer dereference may occur. To fix this

Re: [PATCH v2] usb: storage: sddr55: Fix a possible null-pointer dereference in sddr55_transport()

2019-07-29 Thread Jia-Ju Bai
Sorry, I forgot to send to Oliver, so send it again. On 2019/7/29 19:49, Jia-Ju Bai wrote: In sddr55_transport(), there is an if statement on line 836 to check whether info->lba_to_pba is NULL: if (info->lba_to_pba == NULL || ...) When info->lba_to_pba is NULL, it is used on line 948:

Re: WARNING in iguanair_probe/usb_submit_urb

2019-07-29 Thread Oliver Neukum
Am Freitag, den 26.07.2019, 05:28 -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.t

Re: WARNING in iguanair_probe/usb_submit_urb

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

KASAN reporting bug in ath6kl

2019-07-29 Thread Oliver Neukum
Hi, I am looking at this report: Title: general protection fault in ath6kl_usb_alloc_urb_from_pipe Last occurred: 0 days ago Reported: 102 days ago Branches: Mainline (with usb-fuzzer patches) Dashboard link: https://syzkaller.appspot.com/bug?id=cd8b9cfe5

[PATCH 4.19.y 0/3] usb: dwc3: Prevent requests from being queued twice

2019-07-29 Thread Saranya Gopal
With recent changes in AOSP, adb is now using asynchronous I/O. While adb works good for the most part, there have been issues with adb root/unroot commands which cause adb hang. The issue is caused by a request being queued twice. A series of 3 patches from Felipe Balbi in upstream tree fixes this

[PATCH 4.19.y 2/3] usb: dwc3: gadget: prevent dwc3_request from being queued twice

2019-07-29 Thread Saranya Gopal
From: Felipe Balbi [Upstream commit b2b6d601365a1acb90b87c85197d79] Queueing the same request twice can introduce hard-to-debug problems. At least one function driver - Android's f_mtp.c - is known to cause this problem. While that function is out-of-tree, this is a problem that's easy enough t

[PATCH 4.19.y 1/3] usb: dwc3: gadget: add dwc3_request status tracking

2019-07-29 Thread Saranya Gopal
From: Felipe Balbi [Upstream commit a3af5e3ad3f11a0001317da9e9fb78b] This patch starts tracking dwc3_request status. A following patch will build on top of this to prevent a request from being queued twice. Signed-off-by: Felipe Balbi Signed-off-by: Saranya Gopal --- drivers/usb/dwc3/core.h

[PATCH 4.19.y 3/3] usb: dwc3: gadget: remove req->started flag

2019-07-29 Thread Saranya Gopal
From: Felipe Balbi [Upstream commit 7c3d7dc89e57a1d43acea935882dd8713c9e639f] Now that we have req->status, we don't need this extra flag anymore. It's safe to remove it. Signed-off-by: Felipe Balbi Signed-off-by: Saranya Gopal --- drivers/usb/dwc3/core.h | 2 -- drivers/usb/dwc3/gadget.c

Re: [PATCH v2] usb: storage: sddr55: Fix a possible null-pointer dereference in sddr55_transport()

2019-07-29 Thread Alan Stern
On Mon, 29 Jul 2019, Jia-Ju Bai wrote: > In sddr55_transport(), there is an if statement on line 836 to check > whether info->lba_to_pba is NULL: > if (info->lba_to_pba == NULL || ...) > > When info->lba_to_pba is NULL, it is used on line 948: > pba = info->lba_to_pba[lba]; > > Thus, a p

Re: [RFC PATCH] usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests

2019-07-29 Thread Heikki Krogerus
Hi, On Wed, Jul 24, 2019 at 09:30:37PM -0700, Guenter Roeck wrote: > TCPM may receive PD messages associated with unknown or unsupported > alternate modes. If that happens, calls to typec_match_altmode() > will return NULL. The tcpm code does not currently take this into > account. This results in

Re: [PATCH v2] usb: typec: tcpm: Add NULL check before dereferencing config

2019-07-29 Thread Heikki Krogerus
On Wed, Jul 24, 2019 at 07:38:32AM -0700, Guenter Roeck wrote: > When instantiating tcpm on an NXP OM 13588 board with NXP PTN5110, > the following crash is seen when writing into the 'preferred_role' > sysfs attribute. > > Unable to handle kernel NULL pointer dereference at virtual address 00

Re: [PATCH v8 08/11] usb: roles: get usb-role-switch from parent

2019-07-29 Thread Heikki Krogerus
On Wed, Jul 24, 2019 at 04:50:42PM +0800, Chunfeng Yun wrote: > when the USB host controller is the parent of the connector, > usually type-B, sometimes don't need the graph, so we should > check whether it's parent registers usb-role-switch or not > firstly, and get it if exists. > > Signed-off-b

KASAN reporting: general protection fault in flexcop_usb_probe

2019-07-29 Thread Oliver Neukum
Reacting to this: Title: general protection fault in flexcop_usb_probe Last occurred: 0 days ago Reported: 102 days ago Branches: Mainline (with usb-fuzzer patches) Dashboard link: https://syzkaller.appspot.com/bug?id=c0203bd72037d0 7493f4b7562411e4f5f4553

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

2019-07-29 Thread Heikki Krogerus
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 2/2] usbip: Implement SG support to vhci

2019-07-29 Thread Suwan Kim
Hi Shuah, On Tue, Jul 23, 2019 at 06:21:53PM -0600, shuah wrote: > Hi Suwan, > > On 7/5/19 10:43 AM, Suwan Kim wrote: > > There are bugs on vhci with usb 3.0 storage device. Originally, vhci > > doesn't supported SG, so USB storage driver on vhci breaks SG list > > into multiple URBs and it cause

Re: general protection fault in flexcop_usb_probe

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

Re: [PATCH v1] usb: typec: tcpm: Switch to use fwnode_property_count_uXX()

2019-07-29 Thread Heikki Krogerus
On Tue, Jul 23, 2019 at 10:37:50PM +0300, Andy Shevchenko wrote: > Use use fwnode_property_count_uXX() directly, that makes code neater. > > Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus > --- > drivers/usb/typec/tcpm/tcpm.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletion

Re: [PATCH v1] usb: typec: mux: Switch to use fwnode_property_count_uXX()

2019-07-29 Thread Heikki Krogerus
On Tue, Jul 23, 2019 at 10:47:26PM +0300, Andy Shevchenko wrote: > Use fwnode_property_count_uXX() directly, that makes code neater. > > Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus > --- > drivers/usb/typec/mux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -

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

2019-07-29 Thread Heikki Krogerus
On Tue, Jul 23, 2019 at 11:18:32PM +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

Re: [PATCH] usb: storage: sddr55: Fix a possible null-pointer dereference in sddr55_transport()

2019-07-29 Thread kbuild test robot
Hi Jia-Ju, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [cannot apply to v5.3-rc2 next-20190729] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH v2 2/2] usbip: Implement SG support to vhci

2019-07-29 Thread shuah
On 7/29/19 8:52 AM, Suwan Kim wrote: Hi Shuah, On Tue, Jul 23, 2019 at 06:21:53PM -0600, shuah wrote: Hi Suwan, On 7/5/19 10:43 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. Originally, vhci doesn't supported SG, so USB storage driver on vhci breaks SG list into mul

Re: [PATCH] usb: phy: ab8500-usb: Mark expected switch fall-throughs

2019-07-29 Thread Kees Cook
On Sun, Jul 28, 2019 at 07:06:31PM -0500, Gustavo A. R. Silva wrote: > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warnings: > > drivers/usb/phy/phy-ab8500-usb.c: In function 'ab8500_usb_link_status_update': > drivers/usb/phy/phy-ab8500-usb.c:424:9

general protection fault in snd_usb_pipe_sanity_check

2019-07-29 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7f7867ff 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=12befdc860 kernel config: https://syzkaller.appspot.com/x/.

WARNING in usbtouch_open

2019-07-29 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7f7867ff 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=1503f4ec60 kernel config: https://syzkaller.appspot.com/x/.

Re: general protection fault in flexcop_usb_probe

2019-07-29 Thread Andrey Konovalov
On Mon, Jul 29, 2019 at 5:05 PM syzbot wrote: > > Hello, > > syzbot has tested the proposed patch and the reproducer did not trigger > crash: > > Reported-and-tested-by: > syzbot+d93dff37e6a89431c...@syzkaller.appspotmail.com > > Tested on: > > commit: 6a3599ce usb-fuzzer: main usb gadget

Re: [PATCH 4.19.y 3/3] usb: dwc3: gadget: remove req->started flag

2019-07-29 Thread Greg KH
On Mon, Jul 29, 2019 at 07:13:39PM +0530, Saranya Gopal wrote: > From: Felipe Balbi > > [Upstream commit 7c3d7dc89e57a1d43acea935882dd8713c9e639f] > > Now that we have req->status, we don't need this extra flag > anymore. It's safe to remove it. > > Signed-off-by: Felipe Balbi > Signed-off-by:

Re: [PATCH 4.19.y 2/3] usb: dwc3: gadget: prevent dwc3_request from being queued twice

2019-07-29 Thread Greg KH
On Mon, Jul 29, 2019 at 07:13:38PM +0530, Saranya Gopal wrote: > From: Felipe Balbi > > [Upstream commit b2b6d601365a1acb90b87c85197d79] > > Queueing the same request twice can introduce hard-to-debug > problems. At least one function driver - Android's f_mtp.c - is known > to cause this problem

INFO: trying to register non-static key in ida_destroy

2019-07-29 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7f7867ff 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=16ee1d7c60 kernel config: https://syzkaller.appspot.com/x/.

RE: [PATCH 4.19.y 3/3] usb: dwc3: gadget: remove req->started flag

2019-07-29 Thread Gopal, Saranya
> > > > [Upstream commit 7c3d7dc89e57a1d43acea935882dd8713c9e639f] > > > > Now that we have req->status, we don't need this extra flag > > anymore. It's safe to remove it. > > > > Signed-off-by: Felipe Balbi > > Signed-off-by: Saranya Gopal > > --- > > drivers/usb/dwc3/core.h | 2 -- > > drive

RE: [PATCH 4.19.y 2/3] usb: dwc3: gadget: prevent dwc3_request from being queued twice

2019-07-29 Thread Gopal, Saranya
> On Mon, Jul 29, 2019 at 07:13:38PM +0530, Saranya Gopal wrote: > > From: Felipe Balbi > > > > [Upstream commit b2b6d601365a1acb90b87c85197d79] > > > > Queueing the same request twice can introduce hard-to-debug > > problems. At least one function driver - Android's f_mtp.c - is known > > to caus

Re: [PATCH 4.19.y 2/3] usb: dwc3: gadget: prevent dwc3_request from being queued twice

2019-07-29 Thread Greg KH
On Mon, Jul 29, 2019 at 05:06:13PM +, Gopal, Saranya wrote: > > On Mon, Jul 29, 2019 at 07:13:38PM +0530, Saranya Gopal wrote: > > > From: Felipe Balbi > > > > > > [Upstream commit b2b6d601365a1acb90b87c85197d79] > > > > > > Queueing the same request twice can introduce hard-to-debug > > > pro

Re: [RFC PATCH] usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests

2019-07-29 Thread Guenter Roeck
On Mon, Jul 29, 2019 at 05:04:57PM +0300, Heikki Krogerus wrote: > Hi, > > On Wed, Jul 24, 2019 at 09:30:37PM -0700, Guenter Roeck wrote: > > TCPM may receive PD messages associated with unknown or unsupported > > alternate modes. If that happens, calls to typec_match_altmode() > > will return NUL

Re: general protection fault in flexcop_usb_probe

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

Re: [PATCH 4.19.y 0/3] usb: dwc3: Prevent requests from being queued twice

2019-07-29 Thread Greg KH
On Mon, Jul 29, 2019 at 07:13:36PM +0530, Saranya Gopal wrote: > With recent changes in AOSP, adb is now using asynchronous I/O. > While adb works good for the most part, there have been issues with > adb root/unroot commands which cause adb hang. The issue is caused > by a request being queued twi

Re: [PATCH] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields

2019-07-29 Thread John Stultz
On Tue, Jul 23, 2019 at 1:27 PM John Stultz wrote: > > From: Anurag Kumar Vulisha > > The present code in dwc3_gadget_ep_reclaim_completed_trb() will check > for IOC/LST bit in the event->status and returns if IOC/LST bit is > set. This logic doesn't work if multiple TRBs are queued per > request

[PATCH] usb: host: ohci-tmio: Mark expected switch fall-throughs

2019-07-29 Thread Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: arm): drivers/usb/host/ohci-tmio.c: In function ‘tmio_stop_hc’: ./include/linux/device.h:1499:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_err(dev, dev_fmt(