RE: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-13 Thread Peter Chen
> > On 2019-05-10 05:10, Peter Chen wrote: > > > >> Marek Szyprowski writes: > >>> Commit 69bec7259853 ("USB: core: let USB device know device node") > >>> added support for attaching devicetree node for USB devices. The > >>> mentioned commit however identifies the given USB device node only b

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-13 Thread Marek Szyprowski
Hi Peter, On 2019-05-13 11:00, Peter Chen wrote: >> On 2019-05-10 05:10, Peter Chen wrote: Marek Szyprowski writes: > Commit 69bec7259853 ("USB: core: let USB device know device node") > added support for attaching devicetree node for USB devices. The > mentioned commit however i

RE: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-13 Thread Peter Chen
> On 2019-05-13 11:00, Peter Chen wrote: > >> On 2019-05-10 05:10, Peter Chen wrote: > Marek Szyprowski writes: > > Commit 69bec7259853 ("USB: core: let USB device know device node") > > added support for attaching devicetree node for USB devices. The > > mentioned commit howeve

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-13 Thread Marek Szyprowski
Hi Peter, On 2019-05-13 11:23, Peter Chen wrote: >> On 2019-05-13 11:00, Peter Chen wrote: On 2019-05-10 05:10, Peter Chen wrote: >> Marek Szyprowski writes: >>> Commit 69bec7259853 ("USB: core: let USB device know device node") >>> added support for attaching devicetree node for

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-13 Thread Måns Rullgård
Marek Szyprowski writes: > Hi Peter, > > On 2019-05-10 05:10, Peter Chen wrote: >> >>> Marek Szyprowski writes: Commit 69bec7259853 ("USB: core: let USB device know device node") added support for attaching devicetree node for USB devices. The mentioned commit however identifies t

Re: [PATCH v3] usb: core: verify devicetree nodes for USB devices

2019-05-13 Thread Måns Rullgård
Marek Szyprowski writes: > Hi Peter, > > On 2019-05-13 11:23, Peter Chen wrote: >>> On 2019-05-13 11:00, Peter Chen wrote: > On 2019-05-10 05:10, Peter Chen wrote: >>> Marek Szyprowski writes: Commit 69bec7259853 ("USB: core: let USB device know device node") added supp

Re: [PATCH 1/5] USB: serial: fix unthrottle races

2019-05-13 Thread Johan Hovold
On Thu, Apr 25, 2019 at 06:05:36PM +0200, Johan Hovold wrote: > Fix two long-standing bugs which could potentially lead to memory > corruption or leave the port throttled until it is reopened (on weakly > ordered systems), respectively, when read-URB completion races with > unthrottle(). > > First

Re: [PATCH 1/5] USB: serial: fix unthrottle races

2019-05-13 Thread Greg Kroah-Hartman
On Mon, May 13, 2019 at 12:43:39PM +0200, Johan Hovold wrote: > On Thu, Apr 25, 2019 at 06:05:36PM +0200, Johan Hovold wrote: > > Fix two long-standing bugs which could potentially lead to memory > > corruption or leave the port throttled until it is reopened (on weakly > > ordered systems), respec

Re: [PATCH 0/5] usb: gadget: udc: lpc32xx: add stotg04 phy support

2019-05-13 Thread James Grant
Tested with a board containing LPC3250 SOC and STOTG04 PHY by using serial gadget. Needed patch "[PATCH] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC" also. Tested-by: James Grant Regards, James Grant. On 09/04/2019 14:09, Alexandre Belloni Wrote: Hi, This series starts

Re: [PATCH] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC

2019-05-13 Thread James Grant
Tested with a board containing LPC3250 SOC and STOTG04 PHY by using serial gadget. Needed patch series starting with "[PATCH 0/5] usb: gadget: udc: lpc32xx: add stotg04 phy support" also. Tested-by: James Grant Regards, James Grant. On 11/05/2019 00:42, Alexandre Belloni wrote: Gadget dri

Re: [PATCH 1/5] USB: serial: fix unthrottle races

2019-05-13 Thread Johan Hovold
On Mon, May 13, 2019 at 12:56:06PM +0200, Greg Kroah-Hartman wrote: > On Mon, May 13, 2019 at 12:43:39PM +0200, Johan Hovold wrote: > > On Thu, Apr 25, 2019 at 06:05:36PM +0200, Johan Hovold wrote: > > > Fix two long-standing bugs which could potentially lead to memory > > > corruption or leave the

Re: [PATCH v2] usb: renesas_usbhs: Use specific struct instead of USBHS_TYPE_* enums

2019-05-13 Thread Simon Horman
On Mon, May 13, 2019 at 11:40:29AM +0900, Yoshihiro Shimoda wrote: > This patch adds a specific struct "usbhs_of_data" to add a new SoC > data easily instead of code basis in the future. > > Signed-off-by: Yoshihiro Shimoda > Reviewed-by: Geert Uytterhoeven Hi Shimoda-san, the minor suggestion

Re: [PATCH v2 02/15] ARM: dts: rza2mevb: Add 48MHz USB clock

2019-05-13 Thread Simon Horman
On Thu, May 09, 2019 at 03:11:29PM -0500, Chris Brandt wrote: > The RZ/A2M EVB has a 48MHz clock attached to USB_X1. > > Signed-off-by: Chris Brandt Thanks, This looks fine to me but I will wait to see if there are other reviews before applying. Reviewed-by: Simon Horman

Re: [PATCH v2 01/15] ARM: dts: r7s9210: Add USB clock

2019-05-13 Thread Simon Horman
On Thu, May 09, 2019 at 03:11:28PM -0500, Chris Brandt wrote: > Add USB clock node. If present, this clock input must be 48MHz. > > Signed-off-by: Chris Brandt Thanks, This looks fine to me but I will wait to see if there are other reviews before applying. Reviewed-by: Simon Horman

Re: [PATCH 1/5] USB: serial: fix unthrottle races

2019-05-13 Thread Greg Kroah-Hartman
On Mon, May 13, 2019 at 01:46:01PM +0200, Johan Hovold wrote: > On Mon, May 13, 2019 at 12:56:06PM +0200, Greg Kroah-Hartman wrote: > > On Mon, May 13, 2019 at 12:43:39PM +0200, Johan Hovold wrote: > > > On Thu, Apr 25, 2019 at 06:05:36PM +0200, Johan Hovold wrote: > > > > Fix two long-standing bug

Re: [PATCH 1/5] USB: serial: fix unthrottle races

2019-05-13 Thread Johan Hovold
On Mon, May 13, 2019 at 02:51:31PM +0200, Greg Kroah-Hartman wrote: > On Mon, May 13, 2019 at 01:46:01PM +0200, Johan Hovold wrote: > > Thanks. The issue has been there since v3.3 so I guess you could queue > > it for all stable trees. > > Doesn't apply cleanly for 4.4.y or 3.18.y, so if it's rea

Re: [REGRESSION] usb: gadget: f_fs: Allow scatter-gather buffers

2019-05-13 Thread Andrzej Pietrasiewicz
Hi John, W dniu 09.05.2019 o 23:23, John Stultz pisze: On Thu, May 9, 2019 at 11:25 AM John Stultz wrote: On Thu, May 9, 2019 at 7:02 AM Andrzej Pietrasiewicz wrote: Ok. Apologies for earlier confusion. So the kzalloc/memset fix you sent for f_fs.c does seem to avoid the crash on bo

RE: [PATCH v2 3/3] usb: dwc3: gadget: Add support for disabling U1 and U2 entries

2019-05-13 Thread Anurag Kumar Vulisha
Hi Thinh, >-Original Message- >From: Thinh Nguyen [mailto:thinh.ngu...@synopsys.com] >Sent: Saturday, May 11, 2019 7:18 AM >To: Anurag Kumar Vulisha ; Thinh Nguyen >; Greg Kroah-Hartman >; Rob Herring ; Mark Rutland >; Felipe Balbi ; Claus H. Stovgaard > >Cc: linux-usb@vger.kernel.org; dev

Re: KASAN: slab-out-of-bounds Write in usb_get_bos_descriptor

2019-05-13 Thread Alan Stern
On Fri, 10 May 2019, 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.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=124794d8a0

Unitialisation of SOC USB pads

2019-05-13 Thread Igor Plyatov
Dear Thibaut and others, can you please explain who must configure AT91SAM9G20 SOC pads to operate as USB Host port - AT91Bootstrap, U-Boot bootloader, Linux kernel or this is not required at all? I ask, because during connection of USB disk, my board complains usb 1-1: device descriptor rea

Re: KASAN: slab-out-of-bounds Write in usb_get_bos_descriptor

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

Initialisation of SOC USB pads

2019-05-13 Thread Igor Plyatov
Dear developers, can you please explain who must configure AT91SAM9G20 SOC pads to operate as USB Host port? Is it AT91Bootstrap, U-Boot bootloader, Linux kernel or this is not required at all? I ask, because during connection of USB disk, my board complains usb 1-1: device descriptor read/6

Re: Initialisation of SOC USB pads

2019-05-13 Thread Alan Stern
On Mon, 13 May 2019, Igor Plyatov wrote: > Dear developers, > > can you please explain who must configure AT91SAM9G20 SOC pads to > operate as USB Host port? Is it AT91Bootstrap, U-Boot bootloader, Linux > kernel or this is not required at all? > > I ask, because during connection of USB disk,

[PATCH] USB: serial: option: add support for Simcom SIM7500/SIM7600 RNDIS mode

2019-05-13 Thread Jörgen Storvist
Added IDs for Simcom SIM7500/SIM7600 series cellular module in RNDIS mode. Reserved the interface for ADB. T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 7 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1e0e ProdID=9011 Rev=03.18 S: Manufacturer=SimTech,

[PATCH] USB: Fix slab-out-of-bounds write in usb_get_bos_descriptor

2019-05-13 Thread Alan Stern
The syzkaller USB fuzzer found a slab-out-of-bounds write bug in the USB core, caused by a failure to check the actual size of a BOS descriptor. This patch adds a check to make sure the descriptor is at least as large as it is supposed to be, so that the code doesn't inadvertently access memory be

Re: [v3 PATCH] dt-binding: usb: add usb-role-switch property

2019-05-13 Thread Rob Herring
On Wed, 8 May 2019 17:17:44 +0800, Chunfeng Yun wrote: > Add a property usb-role-switch to tell the driver that use > USB Role Switch framework to handle the role switch, > it's useful when the driver has already supported other ways, > such as extcon framework etc. > > Cc: Biju Das > Cc: Yu Chen

Re: [PATCH v3 1/3] doc: dt: bindings: usb: dwc3: Update entries for disabling U1 and U2

2019-05-13 Thread Rob Herring
On Fri, 10 May 2019 12:37:26 +0530, Anurag Kumar Vulisha wrote: > This patch updates the documentation with the information related > to the quirks that needs to be added for disabling the link entering > into the U1 and U2 states > > Signed-off-by: Anurag Kumar Vulisha > --- > Changes in v3: >

Re: [REGRESSION] usb: gadget: f_fs: Allow scatter-gather buffers

2019-05-13 Thread John Stultz
On Mon, May 13, 2019 at 7:08 AM Andrzej Pietrasiewicz wrote: > W dniu 09.05.2019 o 23:23, John Stultz pisze: > > So yes, the kzalloc/memset patch is a clear improvement, as it avoids > > the bootup crash on dwc2, and seems like it should go in. > > > > However, there is still the outstanding issue

Re: [PATCH] USB: Fix slab-out-of-bounds write in usb_get_bos_descriptor

2019-05-13 Thread Greg KH
On Mon, May 13, 2019 at 01:14:29PM -0400, Alan Stern wrote: > The syzkaller USB fuzzer found a slab-out-of-bounds write bug in the > USB core, caused by a failure to check the actual size of a BOS > descriptor. This patch adds a check to make sure the descriptor is at > least as large as it is sup

RE: [PATCH v2 04/15] dt-bindings: rcar-gen3-phy-usb2: Document use of usb_x1

2019-05-13 Thread Chris Brandt
Hi Geert and Shimoda-san, On Fri, May 10, 2019, Geert Uytterhoeven wrote: > > I think we can reuse it like below: > > > > - clock-names: Name of the clocks. This property is model-dependent. > > - R-Car Gen3 SoCs use a single functional clock. The clock doesn't > need to be > > named. > >

Re: [PATCH v2 04/15] dt-bindings: rcar-gen3-phy-usb2: Document use of usb_x1

2019-05-13 Thread Geert Uytterhoeven
Hi Chris, On Mon, May 13, 2019 at 11:07 PM Chris Brandt wrote: > On Fri, May 10, 2019, Geert Uytterhoeven wrote: > > > I think we can reuse it like below: > > > > > > - clock-names: Name of the clocks. This property is model-dependent. > > > - R-Car Gen3 SoCs use a single functional clock. The

RE: [PATCH v2 04/15] dt-bindings: rcar-gen3-phy-usb2: Document use of usb_x1

2019-05-13 Thread Chris Brandt
Hi Geert, Thank you for the quick reply. On Mon, May 13, 2019, Geert Uytterhoeven wrote: > > [phy-rcar-gen3-usb2.c] > > usb_x1_clk = devm_clk_get(dev, "usb_x1"); > > if (!IS_ERR(usb_x1_clk))) > > if (clk_get_rate(usb_x1_clk)) > > if (!IS_ERR(usb_x1_clk) && clk_ge

[BUG REPORT] usb: dwc3: "failed to enable ep0out" when enabling mass storage mode

2019-05-13 Thread evan
root@gnarbox-2:~# I still get the error when using the gadget configfs instead of g_mass_storage. I still get the error on kernel 5.0.5. Do you have any idea what's happening here? What steps can I take to help debug this? Thanks, Evan dwc3-trace-20190513.txz Description: application/xz

Lack of length checking in USB configuration may allow buffer overflow

2019-05-13 Thread Rick Mark
Hey All, I was seeing a linux VM crash due to malformed USB configuration payloads being malformed. I'm testing this patch now which should provide better security checking (but this is my first patch so be kind if I have things wrong.) R >From d7b0dd52f3b3b38126504b17d2d9c9ceaa572edf Mon Sep 1

[PATCH] USB: serial: pl2303: add Allied Telesis VT-Kit3

2019-05-13 Thread Chris Packham
This is adds the vendor and device id for the AT-VT-Kit3 which is a pl2303-based device. Signed-off-by: Chris Packham --- drivers/usb/serial/pl2303.c | 1 + drivers/usb/serial/pl2303.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303