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

2019-07-30 Thread Chunfeng Yun
Hi Heikki, On Mon, 2019-07-29 at 17:25 +0300, Heikki Krogerus wrote: > 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 regis

RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.

2019-07-30 Thread Pawel Laszczak
Hi Felipe, What about this patch. I just noticed that prefix is incorrect "1/3". Can it stay or should I send it again ? Cheers, Pawel >>>Pawel Laszczak writes: >> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h >> index 69f1b6328532..c156817672c4 100644 >> --- a/in

Re: [PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl

2019-07-30 Thread David Miller
From: Arnd Bergmann Date: Tue, 30 Jul 2019 21:50:28 +0200 > Each of these drivers has a copy of the same trivial helper function to > convert the pointer argument and then call the native ioctl handler. > > We now have a generic implementation of that, so use it. > > Acked-by: Greg Kroah-Hartma

Re: [PATCH v5 13/29] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-07-30 Thread Dan Williams
On Tue, Jul 30, 2019 at 12:59 PM Arnd Bergmann wrote: > > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architecture, wh

[PATCH v5 13/29] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-07-30 Thread Arnd Bergmann
The .ioctl and .compat_ioctl file operations have the same prototype so they can both point to the same function, which works great almost all the time when all the commands are compatible. One exception is the s390 architecture, where a compat pointer is only 31 bit wide, and converting it into a

[PATCH v5 14/29] compat_ioctl: use correct compat_ptr() translation in drivers

2019-07-30 Thread Arnd Bergmann
A handful of drivers all have a trivial wrapper around their ioctl handler, but don't call the compat_ptr() conversion function at the moment. In practice this does not matter, since none of them are used on the s390 architecture and for all other architectures, compat_ptr() does not do anything, b

[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl

2019-07-30 Thread Arnd Bergmann
Each of these drivers has a copy of the same trivial helper function to convert the pointer argument and then call the native ioctl handler. We now have a generic implementation of that, so use it. Acked-by: Greg Kroah-Hartman Acked-by: Michael S. Tsirkin Reviewed-by: Jarkko Sakkinen Reviewed-

[PATCH v6 46/57] usb: Remove dev_err() usage after platform_get_irq()

2019-07-30 Thread Stephen Boyd
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | plat

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-07-30 Thread syzbot
syzbot has found a reproducer for 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=10619cec60 kernel config: https://syzkaller.ap

Re: Oops in xhci_endpoint_reset

2019-07-30 Thread Mathias Nyman
On 30.7.2019 18.49, Enric Balletbo Serra wrote: Hi, Missatge de Bob Gleitsmann del dia ds., 27 de jul. 2019 a les 23:39: OK, here's the result of the bisection: ef513be0a9057cc6baf5d29566aaaefa214ba344 is the first bad commit commit ef513be0a9057cc6baf5d29566aaaefa214ba344 Author: Jim Lin D

Re: Oops in xhci_endpoint_reset

2019-07-30 Thread Mathias Nyman
On 27.7.2019 23.43, Bob Gleitsmann wrote: OK, here's the result of the bisection: ef513be0a9057cc6baf5d29566aaaefa214ba344 is the first bad commit commit ef513be0a9057cc6baf5d29566aaaefa214ba344 Author: Jim Lin Date: Mon Jun 3 18:53:44 2019 +0800 ?? usb: xhci: Add Clear_TT_Buffer ?

Re: Oops in xhci_endpoint_reset

2019-07-30 Thread Enric Balletbo Serra
Hi, Missatge de Bob Gleitsmann del dia ds., 27 de jul. 2019 a les 23:39: > > OK, here's the result of the bisection: > > ef513be0a9057cc6baf5d29566aaaefa214ba344 is the first bad commit > commit ef513be0a9057cc6baf5d29566aaaefa214ba344 > Author: Jim Lin > Date: Mon Jun 3 18:53:44 2019 +0800

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-07-30 Thread Alexander Potapenko
On Tue, Jul 30, 2019 at 4:22 PM 'Andrey Konovalov' via syzkaller-bugs wrote: > > On Tue, Jul 30, 2019 at 4:20 PM Andrey Konovalov > wrote: > > > > On Tue, Jul 30, 2019 at 4:17 PM Alan Stern > > wrote: > > > > > > On Tue, 30 Jul 2019, syzbot wrote: > > > > > > > Hello, > > > > > > > > syzbot fo

Re: Linux 5.2, usb: typec: Support for Alternate Modes

2019-07-30 Thread Heikki Krogerus
Hi Matthew, Copying the respective mailing list. On Wed, Jul 17, 2019 at 09:22:10AM +0100, Matthew Nicholson wrote: > Hi, > > Thanks for your work on the linux. > > I am using dell xps13 with a wd15 type-c docking station, on Archlinux. > Under kernel version 5.2 (and 5.2.1) I was running into

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-07-30 Thread Oliver Neukum
Am Dienstag, den 30.07.2019, 16:12 +0200 schrieb Andrey Konovalov: > On Tue, Jul 30, 2019 at 4:10 PM Alan Stern wrote: > > > > On Mon, 29 Jul 2019, syzbot wrote: > > > > > Hello, > > > > > > syzbot found the following crash on: > > > > > > HEAD commit:6a3599ce usb-fuzzer: main usb gadget f

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-07-30 Thread Andrey Konovalov
On Tue, Jul 30, 2019 at 4:20 PM Andrey Konovalov wrote: > > On Tue, Jul 30, 2019 at 4:17 PM Alan Stern wrote: > > > > On Tue, 30 Jul 2019, syzbot wrote: > > > > > Hello, > > > > > > syzbot found the following crash on: > > > > > > HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN to > >

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-07-30 Thread Andrey Konovalov
On Tue, Jul 30, 2019 at 4:17 PM Alan Stern wrote: > > On Tue, 30 Jul 2019, syzbot wrote: > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN to pr_warn_rate.. > > git tree: kmsan > > console output: https://syzkaller.ap

Re: KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-07-30 Thread Alan Stern
On Tue, 30 Jul 2019, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN to pr_warn_rate.. > git tree: kmsan > console output: https://syzkaller.appspot.com/x/log.txt?x=13e95183a0 > kernel config: https://syzka

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-07-30 Thread Andrey Konovalov
On Tue, Jul 30, 2019 at 4:10 PM Alan Stern wrote: > > On Mon, 29 Jul 2019, 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 > > conso

Re: WARNING in usbhid_raw_request/usb_submit_urb

2019-07-30 Thread Alan Stern
On Mon, 29 Jul 2019, 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=12386cb460

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

2019-07-30 Thread Alan Stern
On Mon, 29 Jul 2019, Gustavo A. R. Silva wrote: > 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 fal

Re: WARNING in snd_usb_motu_microbookii_communicate/usb_submit_urb

2019-07-30 Thread Alan Stern
On Tue, 23 Jul 2019, Andrey Konovalov wrote: > On Sat, Jul 20, 2019 at 4:14 PM Hillf Danton wrote: > > Wow it finally comes up at the third time with sound/usb/quirks.c:999 > > tippointing to commit 801ebf1043ae ("ALSA: usb-audio: Sanity checks > > for each pipe and EP types"). > > > > That comm

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

2019-07-30 Thread Guenter Roeck
On 7/30/19 5:07 AM, Heikki Krogerus wrote: On Mon, Jul 29, 2019 at 10:31:04AM -0700, Guenter Roeck wrote: 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

WARNING in mxl111sf_ctrl_msg

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

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

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

KASAN: user-memory-access Read in hidraw_ioctl

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

KMSAN: uninit-value in smsc95xx_wait_eeprom

2019-07-30 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:beaab8a3 fix KASAN build git tree: kmsan console output: https://syzkaller.appspot.com/x/log.txt?x=1685d8bfa0 kernel config: https://syzkaller.appspot.com/x/.config?x=4db781fe35a84ef5 dashboard link: https://syzkaller.appspot

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

2019-07-30 Thread Douglas Gilbert
On 2019-07-30 2:07 p.m., Heikki Krogerus wrote: On Mon, Jul 29, 2019 at 10:31:04AM -0700, Guenter Roeck wrote: 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 unkno

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

2019-07-30 Thread Heikki Krogerus
On Mon, Jul 29, 2019 at 10:31:04AM -0700, Guenter Roeck wrote: > 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

Re: [alsa-devel] [PATCH] ALSA: usb-audio: Fix gpf in snd_usb_pipe_sanity_check

2019-07-30 Thread Takashi Iwai
On Tue, 30 Jul 2019 13:28:56 +0200, Hillf Danton wrote: > > > On Tue, 30 Jul 2019 18:08:02 +0800 Takashi Iwai wrote: > > > > You don't have to copy the whole these texts at all. > > In general, it'd suffice to point out the dashboard URL, and if the > > stack trace is mandatory, drop the useless

Re: WARNING in usbtouch_open

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

Re: [alsa-devel] [PATCH] ALSA: usb-audio: Fix gpf in snd_usb_pipe_sanity_check

2019-07-30 Thread Takashi Iwai
On Tue, 30 Jul 2019 12:07:56 +0200, Takashi Iwai wrote: > > On Tue, 30 Jul 2019 11:24:36 +0200, > Hillf Danton wrote: > > Signed-off-by: Hillf Danton BTW, is this address a typo? Takashi

Re: WARNING in usbtouch_open

2019-07-30 Thread Oliver Neukum
Am Montag, den 29.07.2019, 09:38 -0700 schrieb 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.tx

Re: [alsa-devel] [PATCH] ALSA: usb-audio: Fix gpf in snd_usb_pipe_sanity_check

2019-07-30 Thread Takashi Iwai
On Tue, 30 Jul 2019 11:24:36 +0200, Hillf Danton wrote: > > > 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=1

KMSAN: kernel-usb-infoleak in pcan_usb_pro_send_req

2019-07-30 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:41550654 [UPSTREAM] KVM: x86: degrade WARN to pr_warn_rate.. git tree: kmsan console output: https://syzkaller.appspot.com/x/log.txt?x=13e95183a0 kernel config: https://syzkaller.appspot.com/x/.config?x=40511ad0c5945201 dashb

KMSAN: kernel-usb-infoleak in ttusb_dec_send_command

2019-07-30 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:f23a6010 kmsan: dropped process_future_ranges() git tree: kmsan console output: https://syzkaller.appspot.com/x/log.txt?x=10b3dac7a0 kernel config: https://syzkaller.appspot.com/x/.config?x=40511ad0c5945201 dashboard link: ht

KMSAN: uninit-value in read_eprom_word

2019-07-30 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:3351e2b9 usb-fuzzer: main usb gadget fuzzer driver git tree: kmsan console output: https://syzkaller.appspot.com/x/log.txt?x=13105d85a0 kernel config: https://syzkaller.appspot.com/x/.config?x=40511ad0c5945201 dashboard link:

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

2019-07-30 Thread Gopal, Saranya
> 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

Re: general protection fault in flexcop_usb_probe

2019-07-30 Thread Dmitry Vyukov
On Tue, Jul 30, 2019 at 9:51 AM Oliver Neukum wrote: > > Am Montag, den 29.07.2019, 18:54 +0200 schrieb Andrey Konovalov: > > Hi, > > > Thanks a lot for fixing all of these USB bugs! > > I fear the day we get serious about MA USB. > All these issues will turn into security issues. > > > The usb-fu

Re: general protection fault in flexcop_usb_probe

2019-07-30 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: general protection fault in flexcop_usb_probe

2019-07-30 Thread Oliver Neukum
Am Montag, den 29.07.2019, 18:54 +0200 schrieb Andrey Konovalov: Hi, > Thanks a lot for fixing all of these USB bugs! I fear the day we get serious about MA USB. All these issues will turn into security issues. > The usb-fuzzer branch is working again, so it should be possible to > use it for t

KASAN reporting: general protection fault in flexcop_usb_probe

2019-07-30 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: general protection fault in snd_usb_pipe_sanity_check

2019-07-30 Thread Takashi Iwai
On Mon, 29 Jul 2019 18:38:06 +0200, syzbot wrote: > > 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?

[PATCH v2 2/2] usb: xhci-mtk: add an optional xhci_ck clock

2019-07-30 Thread Chunfeng Yun
Some SoCs may have an optional clock xhci_ck (125M or 200M), it usually uses the same PLL as sys_ck, so support it. Signed-off-by: Chunfeng Yun --- v2 no changes --- drivers/usb/host/xhci-mtk.c | 13 + drivers/usb/host/xhci-mtk.h | 1 + 2 files changed, 14 insertions(+) diff --git

[PATCH v2 1/2] dt-bindings: usb: mtk-xhci: add an optional xhci_ck clock

2019-07-30 Thread Chunfeng Yun
Add a new optional clock xhci_ck Signed-off-by: Chunfeng Yun --- v2 changes: 1. add the new clock at the end, suggested by Rob --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindi