Re: [PATCH v5 2/6] usb: gadget: u_serial: reimplement console support

2019-08-10 Thread Michał Mirosław
On Fri, Aug 09, 2019 at 03:05:55PM +0300, Felipe Balbi wrote: > > Hi, > > Michał Mirosław writes: > > Rewrite console support to fix a few shortcomings of the old code > > preventing its use with multiple ports. This removes some duplicated > > code and replaces a custom kthread with simpler wor

[PATCH v6 4/7] usb: gadget: u_serial: allow more console gadget ports

2019-08-10 Thread Michał Mirosław
Allow configuring more than one console using USB serial or ACM gadget. By default, only first (ttyGS0) is a console, but this may be changed using function's new "console" attribute. Signed-off-by: Michał Mirosław --- v6: rebased on balbi/testing/next v5: fixed locking in gserial_get_conso

[PATCH v6 3/7] usb: gadget: u_serial: make OBEX port not a console

2019-08-10 Thread Michał Mirosław
Prevent OBEX serial port from ever becoming a console. Console messages will definitely break the protocol, and since you have to instantiate the port making it explicitly for OBEX, there is no point in allowing console to break it by mistake. Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroa

[PATCH v6 6/7] usb: gadget: legacy/serial: allow dynamic removal

2019-08-10 Thread Michał Mirosław
Legacy serial USB gadget is still useful as an early console, before userspace is up. Later it could be replaced with proper configfs-configured composite gadget - that use case is enabled by this patch. Signed-off-by: Michał Mirosław --- v6: rebased on balbi/testing/next v5: no changes v4

[PATCH v6 5/7] usb: gadget: u_serial: diagnose missed console messages

2019-08-10 Thread Michał Mirosław
Insert markers in console stream marking places where data is missing. This makes the hole in the data stand out clearly instead of glueing together unrelated messages. Example output as seen from USB host side: [0.064078] pinctrl core: registered pin 16 (UART3_RTS_N PC0) on 7868.pinmux

[PATCH v6 2/7] usb: gadget: u_serial: reimplement console support

2019-08-10 Thread Michał Mirosław
Rewrite console support to fix a few shortcomings of the old code preventing its use with multiple ports. This removes some duplicated code and replaces a custom kthread with simpler workqueue item. Only port ttyGS0 gets to be a console for now. Signed-off-by: Michał Mirosław Reviewed-by: Greg K

[PATCH v6 7/7] usb: gadget: u_serial: use mutex for serialising open()s

2019-08-10 Thread Michał Mirosław
Remove home-made waiting mechanism from gs_open() and rely on portmaster's mutex to do the job. Note: This releases thread waiting on close() when another thread open()s simultaneously. Signed-off-by: Michał Mirosław --- v6: initial revision, new in the patchset --- drivers/usb/gadget/funct

[PATCH v6 0/7] usb: gadget: u_serial: console improvements

2019-08-10 Thread Michał Mirosław
This series makes it possible to have more control over console using USB serial gadget ports. This can be useful when you need more than one USB console or are configuring multiple serial port function via configfs. The patches are against balbi/testing/next tree. You can also pull from: https

[PATCH v6 1/7] usb: gadget: u_serial: add missing port entry locking

2019-08-10 Thread Michał Mirosław
gserial_alloc_line() misses locking (for a release barrier) while resetting port entry on TTY allocation failure. Fix this. Cc: sta...@vger.kernel.org Signed-off-by: Michał Mirosław Reviewed-by: Greg Kroah-Hartman Tested-by: Ladislav Michl --- v6: rebased on balbi/testing/next v5: no chang

Re: [PATCH v2] dt-bindings: usb: renesas_gen3: Rename bindings documentation file to reflect IP block

2019-08-10 Thread Sergei Shtylyov
Hello! On 10.08.2019 0:37, Simon Horman wrote: For consistency with the naming of (most) other documentation files for DT bindings for Renesas IP blocks rename the Renesas USB3.0 peripheral documentation file from renesas,usb3.txt to renesas,usb3-peri.txt This refines a recent rename from rene

Re: [PATCH 03/22] ARM: omap1: move omap15xx local bus handling to usb.c

2019-08-10 Thread Christoph Hellwig
Thanks for doing this! The odd platforms have always been very confusing. > diff --git a/arch/arm/mach-omap1/include/mach/omap1510.h > b/arch/arm/mach-omap1/include/mach/omap1510.h > index 3d235244bf5c..7af9c0c7c5ab 100644 > --- a/arch/arm/mach-omap1/include/mach/omap1510.h > +++ b/arch/arm/mach

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

2019-08-10 Thread Hans de Goede
Hi, On 09-08-19 14:38, Schmid, Carsten wrote: Hi again, Hey, i did not want to trigger an eartquake in the basement of the kernel ;-) My intention was to prevent some crashes, and help developers to find their bugs. I think my patch exactly does this. Hehe, actually drivers not being able

Re: [PATCH v2] dt-bindings: usb: renesas_gen3: Rename bindings documentation file to reflect IP block

2019-08-10 Thread Greg Kroah-Hartman
On Sat, Aug 10, 2019 at 08:40:15AM +0200, Geert Uytterhoeven wrote: > Hi Simon, > > On Fri, Aug 9, 2019 at 11:37 PM Simon Horman > wrote: > > For consistency with the naming of (most) other documentation files for DT > > bindings for Renesas IP blocks rename the Renesas USB3.0 peripheral > > doc

[GIT PULL] USB fixes for 5.3-rc4

2019-08-10 Thread Greg KH
The following changes since commit 609488bc979f99f805f34e9a32c1e3b71179d10b: Linux 5.3-rc2 (2019-07-28 12:47:02 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git tags/usb-5.3-rc4 for you to fetch changes up to 27709ae4e2fe6cf7da2ae45

[PATCH] usb: host: fotg2: restart hcd after port reset

2019-08-10 Thread Linus Walleij
From: Hans Ulli Kroll On the Gemini SoC the FOTG2 stalls after port reset so restart the HCD after each port reset. Signed-off-by: Hans Ulli Kroll Signed-off-by: Linus Walleij --- drivers/usb/host/fotg210-hcd.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/fotg210-h

[PATCH] usb: chipidea: imx: fix EPROBE_DEFER support during driver probe

2019-08-10 Thread André Draszik
If driver probe needs to be deferred, e.g. because ci_hdrc_add_device() isn't ready yet, this driver currently misbehaves badly: a) success is still reported to the driver core (meaning a 2nd probe attempt will never be done), leaving the driver in a dysfunctional state and the ha

Re: BUG: bad usercopy in ld_usb_read

2019-08-10 Thread syzbot
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?x=17cf0b1660 kernel config: https://syzkaller.ap

Re: BUG: bad usercopy in ld_usb_read

2019-08-10 Thread Kees Cook
On Fri, Aug 09, 2019 at 11:13:00AM -0400, Alan Stern wrote: > In fact, I don't see why any of the computations here should overflow > or wrap around, or even give rise to a negative value. If syzbot had a > reproducer we could get more debugging output -- but it doesn't. Yeah, this is odd. The on

Re: [GIT PULL] USB fixes for 5.3-rc4

2019-08-10 Thread pr-tracker-bot
The pull request you sent on Sat, 10 Aug 2019 13:51:55 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git tags/usb-5.3-rc4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/1041f5092179ab3dfb8ceb8f1f54bc07d4ba3399 Thank you! -- Deet-doot-dot, I am a

RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-10 Thread Pawel Laszczak
Hi, > >Pawel Laszczak writes: +static int cdns3_gadget_start(struct cdns3 *cdns) +{ + struct cdns3_device *priv_dev; + u32 max_speed; + int ret; + + priv_dev = kzalloc(sizeof(*priv_dev), GFP_KERNEL); + if (!priv_dev) + return -ENOMEM; >>>

[PATCH] media: em28xx: modules workqueue not inited for 2nd device

2019-08-10 Thread Sean Young
syzbot reports an error on flush_request_modules() for the second device. This workqueue was never initialised so simply remove the offending line. usb 1-1: USB disconnect, device number 2 em28xx 1-1:1.153: Disconnecting em28xx #1 [ cut here ] WARNING: CPU: 0 PID: 12 at ker