RE: 5.2.x kernel: WD 8TB USB Drives: Unaligned partial completion (resid=78, sector_sz=512)

2019-08-08 Thread Justin Piszcz
-Original Message- From: Martin K. Petersen [mailto:martin.peter...@oracle.com] Sent: Wednesday, August 7, 2019 10:04 PM To: Justin Piszcz Cc: 'LKML'; linux-usb@vger.kernel.org; linux-s...@vger.kernel.org Subject: Re: 5.2.x kernel: WD 8TB USB Drives: Unaligned partial completion (resid

Re: [PATCH v2 2/2] usb: chipidea: add role switch class support

2019-08-08 Thread kbuild test robot
Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc3 next-20190807] [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/commits/jun-li-nxp

RE: [PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-08 Thread Hayes Wang
Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > Sent: Wednesday, August 07, 2019 6:10 AM [...] > On Tue, 6 Aug 2019 19:18:04 +0800, Hayes Wang wrote: > > Let rx_frag_head_sz and rx_max_agg_num could be modified dynamically > > through the sysfs. > > > > Signed-off-by: Hayes Wang > > Please

usb zero copy dma handling

2019-08-08 Thread yvahkhfo . 1df7f8c2
Hello linux-usb and linux-arm. Ccing security@ because "the kernel dma code is mapping randomish kernel/user mem to a user process" seems to have security implications even though i didnt research that aspect past "its a 100% reliable way to crash a raspi from userspace". tried submitting this t

Re: usb zero copy dma handling

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: > Hello linux-usb and linux-arm. > > Ccing security@ because "the kernel dma code is mapping randomish > kernel/user mem to a user process" seems to have security implications > even though i didnt research that aspect

[PATCH] MAINTAINERS: mark wusbcore and UWB as obsolete

2019-08-08 Thread Greg Kroah-Hartman
Joe rightly points out that we should be using the "Obsolete" status for these two subsystems. Also I got the path name wrong for the wusbcore tree. Reported-by: Joe Perches Fixes: 71ed79b0e4be ("USB: Move wusbcore and UWB to staging as it is obsolete") Signed-off-by: Greg Kroah-Hartman diff -

RE: [PATCH v2 2/2] usb: chipidea: add role switch class support

2019-08-08 Thread Peter Chen
> USB role is fully controlled by usb role switch consumer(e.g. typec), usb > port can be > at host mode(USB_ROLE_HOST), device mode connected to > host(USB_ROLE_DEVICE), or not connecting any parter(USB_ROLE_NONE). > %s/parter/partner ? Are there any ways you could get external cable status

[Patch V6 6/8] arm64: tegra: Enable xudc on Jetson TX1

2019-08-08 Thread Nagarjuna Kristam
Enable XUSB device mode driver for USB0 slot on Jetson TX1. Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo --- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 31 +- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-

[Patch V6 5/8] arm64: tegra: Add xudc node for Tegra210

2019-08-08 Thread Nagarjuna Kristam
Tegra210 has one XUSB device mode controller, which can be operated HS and SS modes. Add DT support for XUSB device mode controller. Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff

[Patch V6 2/8] phy: tegra: xusb: Add usb3 port fake support on Tegra210

2019-08-08 Thread Nagarjuna Kristam
On Tegra210, usb2 only otg/peripheral ports dont work in device mode. They need an assosciated usb3 port to work in device mode. Identify an unused usb3 port and assign it as a fake USB3 port to USB2 only port whose mode is otg/peripheral. Based on work by BH Hsieh . Signed-off-by: Nagarjuna Kris

[Patch V6 0/8] Tegra XUSB gadget driver support

2019-08-08 Thread Nagarjuna Kristam
This is the sixth version of series "Tegra XUSB gadget driver support" Patches 1-3 are phy driver changes to add support for device mode. Patches 4-7 are changes related to XUSB device mode controller driver. Patch 8 is to enable XUDC driver in defconfig Test Steps(USB 2.0): - Enable "USB Gadget

[Patch V6 1/8] phy: tegra: xusb: Add XUSB dual mode support on Tegra210

2019-08-08 Thread Nagarjuna Kristam
Configure the port capabilities based on usb_dr_mode settings. Based on work by JC Kuo . Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo Acked-by: Thierry Reding --- drivers/phy/tegra/xusb-tegra210.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git

[Patch V6 4/8] dt-bindings: usb: Add NVIDIA Tegra XUSB device mode controller binding

2019-08-08 Thread Nagarjuna Kristam
Add device-tree binding documentation for the XUSB device mode controller present on Tegra210 SoC. This controller supports the USB 3.0 specification. Signed-off-by: Nagarjuna Kristam Reviewed-by: JC Kuo --- .../devicetree/bindings/usb/nvidia,tegra-xudc.txt | 110 + 1 file

[Patch V6 3/8] phy: tegra: xusb: Add vbus override support on Tegra210

2019-08-08 Thread Nagarjuna Kristam
Tegra XUSB device control driver needs to control vbus override during its operations, add API for the support. Signed-off-by: Nagarjuna Kristam --- drivers/phy/tegra/xusb-tegra210.c | 57 +++ drivers/phy/tegra/xusb.c | 22 +++ drivers/phy

[Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

2019-08-08 Thread Nagarjuna Kristam
This patch adds UDC driver for tegra XUSB 3.0 device mode controller. XUSB device mode controller supports SS, HS and FS modes Based on work by: Mark Kuo Hui Fu Andrew Bresticker Signed-off-by: Nagarjuna Kristam Acked-by: Thierry Reding --- drivers/usb/gadget/udc/Kconfig | 11 +

[Patch V6 8/8] arm64: defconfig: Enable tegra XUDC driver

2019-08-08 Thread Nagarjuna Kristam
Enable support for Nvidia XUSB device mode controller driver. Signed-off-by: Nagarjuna Kristam --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 97c5078..89afd5c 100644 --- a/arch/arm64/configs/d

[PATCH v2 0/2 RESEND] Fix USB3.0 DRD PHY calibration issues (DWC3/XHCI) on Exynos542x SoCs

2019-08-08 Thread Marek Szyprowski
Dear All, Commit d8c80bb3b55b ("phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800") added support for Exynos5 USB3.0 DRD PHY calibration, what enabled proper Super-Speed enumeration of USB3.0 devices connected to various Exynos5 SoCs. After some time it turned out that the mentioned pa

[PATCH v2 1/2 RESEND] usb: core: phy: add support for PHY calibration

2019-08-08 Thread Marek Szyprowski
Some PHYs (for example Exynos5 USB3.0 DRD PHY) require calibration to be done after every USB HCD reset. Generic PHY framework has been already extended with phy_calibrate() function in commit 36914111e682 ("drivers: phy: add calibrate method"). This patch adds support for it to generic PHY handlin

[PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls

2019-08-08 Thread Marek Szyprowski
Calls to USB2 generic PHY calibrate() method has been moved to HCD core, which now successfully handles generic PHYs and their calibration after every HCD reset. This fixes all the timing issues related to PHY calibration done directly from DWC3 driver: incorrect operation after system suspend/resu

[PATCH] usb: iowarrior: fix deadlock on disconnect

2019-08-08 Thread Oliver Neukum
We have to drop the mutex before we close() upon disconnect() as close() needs the lock. This is safe to do by dropping the mutex as intfdata is already set to NULL, so open() will fail. Fixes: 03f36e885fc26 ("USB: open disconnect race in iowarrior") Reported-by: syzbot+a64a382964bf6c71a...@syzkal

Re: [PATCH] MAINTAINERS: mark wusbcore and UWB as obsolete

2019-08-08 Thread Greg Kroah-Hartman
On Thu, Aug 08, 2019 at 11:25:09AM +0200, Greg Kroah-Hartman wrote: > Joe rightly points out that we should be using the "Obsolete" status for > these two subsystems. Even with that change, I don't see get_maintainers.pl tell me I shouldn't be sending a patch in for this area: $ cat x.patch diff

[PATCH] Revert "USB: rio500: simplify locking"

2019-08-08 Thread Oliver Neukum
This reverts commit d710734b06770814de2bfa2819420fb5df7f3a81. This simplification causes a deadlock. Reported-by: syzbot+7bbcbe9c9ff0cd495...@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum --- drivers/usb/misc/rio500.c | 43 +++ 1 file changed, 27

Re: usb zero copy dma handling

2019-08-08 Thread Robin Murphy
On 2019-08-08 9:58 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: Hello linux-usb and linux-arm. Ccing security@ because "the kernel dma code is mapping randomish kernel/user mem to a user process" seems to have security implications even thou

Re: [PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls

2019-08-08 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > Calls to USB2 generic PHY calibrate() method has been moved to HCD core, > which now successfully handles generic PHYs and their calibration after > every HCD reset. This fixes all the timing issues related to PHY > calibration done directly from DWC3 driver: inco

Re: usb zero copy dma handling

2019-08-08 Thread Russell King - ARM Linux admin
On Thu, Aug 08, 2019 at 10:58:11AM +0200, Greg KH wrote: > But the main issue here is what exactly is this "fixing"? What is wrong > with the existing code that non-x86 systems have such a problem with? > Shouldn't all of these dma issues be handled by the platform with the > remap_pfn_range() cal

Re: usb zero copy dma handling

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 10:46:24AM +0100, Robin Murphy wrote: > On 2019-08-08 9:58 am, Greg KH wrote: > > On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org > > wrote: > > > Hello linux-usb and linux-arm. > > > > > > Ccing security@ because "the kernel dma code is mapping ra

Re: usb zero copy dma handling

2019-08-08 Thread Oliver Neukum
Am Donnerstag, den 08.08.2019, 10:59 +0100 schrieb Russell King - ARM Linux admin: > On Thu, Aug 08, 2019 at 10:58:11AM +0200, Greg KH wrote: > > But the main issue here is what exactly is this "fixing"? What is wrong > > with the existing code that non-x86 systems have such a problem with? > > Sh

Re: [PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls

2019-08-08 Thread Marek Szyprowski
Hi Felipe, On 2019-08-08 11:51, Felipe Balbi wrote: > Marek Szyprowski writes: >> Calls to USB2 generic PHY calibrate() method has been moved to HCD core, >> which now successfully handles generic PHYs and their calibration after >> every HCD reset. This fixes all the timing issues related to PHY

Re: usb zero copy dma handling

2019-08-08 Thread Robin Murphy
On 2019-08-08 11:07 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:24AM +0100, Robin Murphy wrote: On 2019-08-08 9:58 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: Hello linux-usb and linux-arm. Ccing security@ because "the kernel dma cod

Re: [PATCH] MAINTAINERS: mark wusbcore and UWB as obsolete

2019-08-08 Thread Joe Perches
On Thu, 2019-08-08 at 11:41 +0200, Greg Kroah-Hartman wrote: > On Thu, Aug 08, 2019 at 11:25:09AM +0200, Greg Kroah-Hartman wrote: > > Joe rightly points out that we should be using the "Obsolete" status for > > these two subsystems. > > Even with that change, I don't see get_maintainers.pl tell m

Re: [PATCH] MAINTAINERS: mark wusbcore and UWB as obsolete

2019-08-08 Thread Greg Kroah-Hartman
On Thu, Aug 08, 2019 at 04:15:44AM -0700, Joe Perches wrote: > On Thu, 2019-08-08 at 11:41 +0200, Greg Kroah-Hartman wrote: > > On Thu, Aug 08, 2019 at 11:25:09AM +0200, Greg Kroah-Hartman wrote: > > > Joe rightly points out that we should be using the "Obsolete" status for > > > these two subsyste

Re: [PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-08 Thread Maciej Fijalkowski
On Thu, 8 Aug 2019 08:52:51 + Hayes Wang wrote: > Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > > Sent: Wednesday, August 07, 2019 6:10 AM > [...] > > On Tue, 6 Aug 2019 19:18:04 +0800, Hayes Wang wrote: > > > Let rx_frag_head_sz and rx_max_agg_num could be modified dynamically >

RE: [PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-08 Thread Hayes Wang
Maciej Fijalkowski [mailto:maciejromanfijalkow...@gmail.com] > Sent: Thursday, August 08, 2019 7:50 PM [...] > > Excuse me again. > > I find the kernel supports the copybreak of Ethtool. > > However, I couldn't find a command of Ethtool to use it. > > Ummm there's set_tunable ops. Amazon's ena dri

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

2019-08-08 Thread Andrey Konovalov
On Wed, Aug 7, 2019 at 8:31 PM Alan Stern wrote: > > On Wed, 7 Aug 2019, syzbot wrote: > > > Hello, > > > > syzbot has tested the proposed patch and the reproducer did not trigger > > crash: > > > > Reported-and-tested-by: > > syzbot+1b2449b7b5dc240d1...@syzkaller.appspotmail.com > > > > Tested on

Re: KASAN: use-after-free Read in dvb_usb_device_exit (2)

2019-08-08 Thread Andrey Konovalov
On Thu, Aug 8, 2019 at 10:03 AM Hillf Danton wrote: > > > [respin due to "Sender frequency limited" and therefore the Cc list once > cut short:(] > > Tue, 06 Aug 2019 06:18:08 -0700 > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget

Re: [PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls

2019-08-08 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > On 2019-08-08 11:51, Felipe Balbi wrote: >> Marek Szyprowski writes: >>> Calls to USB2 generic PHY calibrate() method has been moved to HCD core, >>> which now successfully handles generic PHYs and their calibration after >>> every HCD reset. This fixes all the ti

KASAN: use-after-free Read in usbhid_raw_request

2019-08-08 Thread syzbot
Hello, syzbot found 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=1600051660 kernel config: https://syzkaller.appspot.com/x/.

BUG: bad usercopy in ld_usb_read

2019-08-08 Thread syzbot
Hello, syzbot found 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=13aeaece60 kernel config: https://syzkaller.appspot.com/x/.

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

2019-08-08 Thread Felipe Balbi
Hi, Stephen Boyd writes: > 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;

Re: [PATCH v3] usb: dwc3: gadget: trb_dequeue is not updated properly

2019-08-08 Thread Felipe Balbi
Hi, John Stultz writes: > On Thu, Jul 18, 2019 at 6:12 PM Thinh Nguyen > wrote: >> fei.y...@intel.com wrote: >> > From: Fei Yang >> > >> > If scatter-gather operation is allowed, a large USB request is split into >> > multiple TRBs. These TRBs are chained up by setting DWC3_TRB_CTRL_CHN bit >

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

2019-08-08 Thread Dmitry Vyukov
On Thu, Aug 8, 2019 at 2:28 PM Andrey Konovalov wrote: > > On Wed, Aug 7, 2019 at 8:31 PM Alan Stern wrote: > > > > On Wed, 7 Aug 2019, syzbot wrote: > > > > > Hello, > > > > > > syzbot has tested the proposed patch and the reproducer did not trigger > > > crash: > > > > > > Reported-and-tested-b

Re: BUG: bad usercopy in ld_usb_read

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 05:38:06AM -0700, syzbot wrote: > Hello, > > syzbot found 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.t

Re: [PATCH] usb: dwc3: remove generic PHYs forwarding for XHCI device

2019-08-08 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > Commit 08f871a3aca2 ("usb: dwc3: host: convey the PHYs to xhci") added > forwarding of the generic PHYs from DWC3 core to the instantiated XHCI-plat > device. However XHCI(-plat) driver never gained support for generic PHYs, > thus the lookup added by that commit

Re: KASAN: use-after-free Read in dvb_usb_device_exit (2)

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

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

2019-08-08 Thread Andrey Konovalov
On Thu, Aug 8, 2019 at 2:44 PM Dmitry Vyukov wrote: > > On Thu, Aug 8, 2019 at 2:28 PM Andrey Konovalov wrote: > > > > On Wed, Aug 7, 2019 at 8:31 PM Alan Stern wrote: > > > > > > On Wed, 7 Aug 2019, syzbot wrote: > > > > > > > Hello, > > > > > > > > syzbot has tested the proposed patch and the

Re: usb zero copy dma handling

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 12:07:26PM +0200, Greg KH wrote: > On Thu, Aug 08, 2019 at 10:46:24AM +0100, Robin Murphy wrote: > > On 2019-08-08 9:58 am, Greg KH wrote: > > > On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org > > > wrote: > > > > Hello linux-usb and linux-arm. > >

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

2019-08-08 Thread Alan Stern
On Thu, 8 Aug 2019, Andrey Konovalov wrote: > On Thu, Aug 8, 2019 at 2:44 PM Dmitry Vyukov wrote: > > > > On Thu, Aug 8, 2019 at 2:28 PM Andrey Konovalov > > wrote: > > > > > > On Wed, Aug 7, 2019 at 8:31 PM Alan Stern > > > wrote: > > > > > > > > On Wed, 7 Aug 2019, syzbot wrote: > > > > > >

Re: [PATCH v4 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-08 Thread Suwan Kim
On Tue, Aug 06, 2019 at 09:31:54PM +0900, Suwan Kim wrote: > There are bugs on vhci with usb 3.0 storage device. In USB, each SG > list entry buffer should be divisible by the bulk max packet size. > But with native SG support, this problem doesn't matter because the > SG buffer is treated as conti

Re: Re: possible deadlock in open_rio

2019-08-08 Thread syzbot
On Wed, 7 Aug 2019, Oliver Neukum wrote: Am Mittwoch, den 07.08.2019, 10:07 -0400 schrieb Alan Stern: > On Wed, 7 Aug 2019, Oliver Neukum wrote: > > technically yes. However in practical terms the straight revert I sent > > out yesterday should fix it. > > I didn't see the revert, and it d

Re: Re: possible deadlock in open_rio

2019-08-08 Thread syzbot
On Wed, 7 Aug 2019, Oliver Neukum wrote: Am Mittwoch, den 07.08.2019, 10:07 -0400 schrieb Alan Stern: > On Wed, 7 Aug 2019, Oliver Neukum wrote: > > technically yes. However in practical terms the straight revert I sent > > out yesterday should fix it. > > I didn't see the revert, and it d

Re: possible deadlock in open_rio

2019-08-08 Thread Alan Stern
On Wed, 7 Aug 2019, Oliver Neukum wrote: > Am Mittwoch, den 07.08.2019, 10:07 -0400 schrieb Alan Stern: > > On Wed, 7 Aug 2019, Oliver Neukum wrote: > > > technically yes. However in practical terms the straight revert I sent > > > out yesterday should fix it. > > > > I didn't see the revert, an

[PATCH] usb: cdc-acm: make sure a refcount is taken early enough

2019-08-08 Thread Oliver Neukum
destroy() will decrement the refcount on the interface, so that it needs to be taken so early that it never undercounts. Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)") Reported-and-tested-by: syzbot+1b2449b7b5dc240d1...@syzkaller.appspotmail.com Signed-off-by: Oliv

Re: possible deadlock in open_rio

2019-08-08 Thread Andrey Konovalov
On Thu, Aug 8, 2019 at 4:33 PM Alan Stern wrote: > > On Wed, 7 Aug 2019, Oliver Neukum wrote: > > > Am Mittwoch, den 07.08.2019, 10:07 -0400 schrieb Alan Stern: > > > On Wed, 7 Aug 2019, Oliver Neukum wrote: > > > > > technically yes. However in practical terms the straight revert I sent > > > > o

[balbi-usb:testing/next 2/13] drivers/usb/phy/phy-tahvo.c:434:4: error: 'struct device_driver' has no member named 'dev_groups'; did you mean 'groups'?

2019-08-08 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: d06a2c3f683a591efce9d02b2b60ef346df5ae02 commit: 2a714ea6d90d9d1b510ba424652a2e3dfd547267 [2/13] USB: phy: tahvo: convert platform driver to use dev_groups config: sh-allmodconfig (attached as .con

Re: [PATCH v2] usbfs: Add ioctls for runtime power management

2019-08-08 Thread Greg KH
On Wed, Aug 07, 2019 at 10:29:50AM -0400, Alan Stern wrote: > It has been requested that usbfs should implement runtime power > management, instead of forcing the device to remain at full power as > long as the device file is open. This patch introduces that new > feature. > > It does so by addin

[PATCH v5 0/2] usbip: Implement SG support

2019-08-08 Thread Suwan Kim
There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this problem doesn't matter because the SG buffer is treated as contiguous buffer. But without native SG support, USB storage driver bre

[PATCH v5 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-08-08 Thread Suwan Kim
vhci doesn’t do DMA for remote device. Actually, the real DMA operation is done by network card driver. vhci just passes virtual address of the buffer to the network stack, so vhci doesn’t use and need dma address of the buffer of the URB. But HCD provides DMA mapping and unmapping function by def

[PATCH v5 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-08 Thread Suwan Kim
There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this problem doesn't matter because the SG buffer is treated as contiguous buffer. But without native SG support, USB storage driver bre

Re: [PATCH] MAINTAINERS: mark wusbcore and UWB as obsolete

2019-08-08 Thread Joe Perches
On Thu, 2019-08-08 at 13:23 +0200, Greg Kroah-Hartman wrote: > On Thu, Aug 08, 2019 at 04:15:44AM -0700, Joe Perches wrote: > > On Thu, 2019-08-08 at 11:41 +0200, Greg Kroah-Hartman wrote: > > > On Thu, Aug 08, 2019 at 11:25:09AM +0200, Greg Kroah-Hartman wrote: > > > > Joe rightly points out that

Re: usb zero copy dma handling

2019-08-08 Thread Christoph Hellwig
On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: > --- a/drivers/usb/core/devio.c > +++ b/drivers/usb/core/devio.c > @@ -238,9 +238,14 @@ static int usbdev_mmap(struct file *file, struct > vm_area_struct *vma) > usbm->vma_use_count = 1; > INIT_LIST_HEAD(&

Re: usb zero copy dma handling

2019-08-08 Thread Christoph Hellwig
On Thu, Aug 08, 2019 at 09:10:15AM -0700, Christoph Hellwig wrote: > On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org > wrote: > > --- a/drivers/usb/core/devio.c > > +++ b/drivers/usb/core/devio.c > > @@ -238,9 +238,14 @@ static int usbdev_mmap(struct file *file, struct >

Re: [PATCH v5 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci

2019-08-08 Thread shuah
On 8/8/19 9:54 AM, Suwan Kim wrote: vhci doesn’t do DMA for remote device. Actually, the real DMA operation is done by network card driver. vhci just passes virtual address of the buffer to the network stack, so vhci doesn’t use and need dma address of the buffer of the URB. But HCD provides DMA

Re: [PATCH v5 2/2] usbip: Implement SG support to vhci-hcd and stub driver

2019-08-08 Thread shuah
On 8/8/19 9:54 AM, Suwan Kim wrote: There are bugs on vhci with usb 3.0 storage device. In USB, each SG list entry buffer should be divisible by the bulk max packet size. But with native SG support, this problem doesn't matter because the SG buffer is treated as contiguous buffer. But without nat

Re: usb zero copy dma handling

2019-08-08 Thread Russell King - ARM Linux admin
On Thu, Aug 08, 2019 at 09:10:15AM -0700, Christoph Hellwig wrote: > On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org > wrote: > > --- a/drivers/usb/core/devio.c > > +++ b/drivers/usb/core/devio.c > > @@ -238,9 +238,14 @@ static int usbdev_mmap(struct file *file, struct >

[PATCH] USB: rio500: Fix lockdep violation

2019-08-08 Thread Alan Stern
The syzbot fuzzer found a lockdep violation in the rio500 driver: == WARNING: possible circular locking dependency detected 5.3.0-rc2+ #23 Not tainted --

Re: possible deadlock in iowarrior

2019-08-08 Thread Alan Stern
On Wed, 7 Aug 2019, Oliver Neukum wrote: > > PS: syzbot reported a similar lock inversion problem (involving two > > mutexes rather than just one) in drivers/usb/misc/iowarrior.c. > > Probably the two drivers need similar fixes. > > No, but I got a fix. > > Regards > Oliver

Re: [PATCH] USB: rio500: Fix lockdep violation

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 01:34:08PM -0400, Alan Stern wrote: > The syzbot fuzzer found a lockdep violation in the rio500 driver: > > == > WARNING: possible circular locking dependency detected > 5.3.0-rc2+ #23 Not tainted >

Re: [PATCH] USB: rio500: Fix lockdep violation

2019-08-08 Thread Alan Stern
On Thu, 8 Aug 2019, Greg KH wrote: > On Thu, Aug 08, 2019 at 01:34:08PM -0400, Alan Stern wrote: > > The syzbot fuzzer found a lockdep violation in the rio500 driver: > > > > == > > WARNING: possible circular locking dependency detected

Re: [PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-08 Thread Jakub Kicinski
On Thu, 8 Aug 2019 12:16:50 +, Hayes Wang wrote: > Maciej Fijalkowski [mailto:maciejromanfijalkow...@gmail.com] > > Sent: Thursday, August 08, 2019 7:50 PM > > > Excuse me again. > > > I find the kernel supports the copybreak of Ethtool. > > > However, I couldn't find a command of Ethtool to

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

2019-08-08 Thread Andrey Konovalov
On Thu, Jul 25, 2019 at 5:09 PM Alan Stern wrote: > > 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

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

2019-08-08 Thread Alan Stern
On Thu, 8 Aug 2019, Andrey Konovalov wrote: > On Thu, Jul 25, 2019 at 5:09 PM Alan Stern wrote: > > > > 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

Re: BUG: bad usercopy in hidraw_ioctl

2019-08-08 Thread Kees Cook
On Wed, Aug 07, 2019 at 12:58:21PM -0700, Matthew Wilcox wrote: > On Wed, Aug 07, 2019 at 12:28:06PM -0700, syzbot wrote: > > usercopy: Kernel memory exposure attempt detected from wrapped address > > (offset 0, size 0)! > > [ cut here ] > > kernel BUG at mm/usercopy.c:98! >

Re: [PATCH 05/12] USB: usblp: convert to use dev_groups

2019-08-08 Thread Pete Zaitcev
On Tue, 6 Aug 2019 16:44:55 +0200 Greg Kroah-Hartman wrote: > Cc: Pete Zaitcev > Signed-off-by: Greg Kroah-Hartman Signed-off-by: Pete Zaitcev Always hated that irregular error unrolling, but was too lazy to fix it. -- Pete

Re: BUG: bad usercopy in hidraw_ioctl

2019-08-08 Thread Kees Cook
On Thu, Aug 08, 2019 at 02:49:25AM +0100, Al Viro wrote: > On Wed, Aug 07, 2019 at 12:58:21PM -0700, Matthew Wilcox wrote: > > On Wed, Aug 07, 2019 at 12:28:06PM -0700, syzbot wrote: > > > usercopy: Kernel memory exposure attempt detected from wrapped address > > > (offset 0, size 0)! > > > ---

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

2019-08-08 Thread Arnd Bergmann
The mach/memory.h file only exists to implement a dma offset for "Local Bus" devices, and that consists of the OHCI USB controller for practical purposes. The generic dma-mapping interface has gained this exact feature some years ago and can do it much more efficiently, so replace the complex __ar

[PATCH 04/22] ARM: omap1: move ohci phy power handling to board files

2019-08-08 Thread Arnd Bergmann
Two boards require a a special handler to control their transceiver power. Move the corresponding code into the board files and out of the common code. The osk board already has a dependency on TPS65010, this adds another one, with the same hack to get it to compile with CONFIG_TPS65010=m. Signed

[PATCH 05/22] ARM: omap1: move mach/usb.h to include/linux/soc

2019-08-08 Thread Arnd Bergmann
The register definitions in this header are used in at least four different places, with little hope of completely cleaning that up. Split up the file into a portion that becomes a linux-wide header under include/linux/soc/ti/, and the parts that are actually only needed by board files. Signed-of

[PATCH 10/22] usb: omap: avoid mach/*.h headers

2019-08-08 Thread Arnd Bergmann
The omap usb drivers still rely on mach/*.h headers that are explicitly or implicitly included, but all the required definitions are now in include/linux/soc/ti/, so use those instead and allow compile-testing on other architectures. Signed-off-by: Arnd Bergmann --- drivers/usb/gadget/udc/Kconfi

[PATCH 15/22] ARM: omap1: move mach/*.h into mach directory

2019-08-08 Thread Arnd Bergmann
Most of the header files are no longer referenced from outside arch/arm/mach-omap1, so move them all to that place directly and change their users to use the new location. The exceptions are: - mach/tc.h is used by arch/arm/plat-omap/dma.c - mach/compress.h is used by the core architecture code -

[PATCH] USB: serial: ftdi_sio: add support for FT232H CBUS gpios

2019-08-08 Thread Matthew Michilot
Enable support for cbus gpios on FT232H. The cbus configuration is stored in one word in the EEPROM at byte-offset 0x1a with the mux config for ACBUS5, ACBUS6, ACBUS8 and ACBUS9 (only pins that can be configured as I/O mode). Tested using FT232H by configuring one ACBUS pin at a time. Review-by:

Re: BUG: bad usercopy in ld_usb_read

2019-08-08 Thread Kees Cook
On Thu, Aug 08, 2019 at 02:46:54PM +0200, Greg KH wrote: > On Thu, Aug 08, 2019 at 05:38:06AM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:e96407b4 usb-fuzzer: main usb gadget fuzzer driver > > git tree: https://github.com/google/kasan

[PATCH] usb: dwc3: Update soft-reset wait polling rate

2019-08-08 Thread Thinh Nguyen
Starting from DWC_usb31 version 1.90a and later, the DCTL.CSFRST bit will not be cleared until after all the internal clocks are synchronized during soft-reset. This may take a little more than 50ms. Set the polling rate at 20ms instead. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.c |

RE: [PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-08 Thread Hayes Wang
Jakub Kicinski [jakub.kicin...@netronome.com] [..]> The kernel could support it. And I has finished it. > > However, when I want to test it by ethtool, I couldn't find suitable > > command. > > I couldn't find relative feature in the source code of ethtool, either. > It's possible it's not implem

[PATCH] [RFC] usb: gadget: hid: Add "single_ep" option

2019-08-08 Thread Benjamin Herrenschmidt
Some host drivers really do not like keyboards having an OUT endpoint. For example, most UEFI forked from EDK2 before 2006 (or was it 2008 ?) have a bug, they'll try to use the *last* interrupt EP in the descriptor list and just assume it's an IN endpoint. Newer UEFIs use the *first* interrupt end

Re: [PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-08 Thread David Miller
From: Hayes Wang Date: Fri, 9 Aug 2019 03:38:53 + > Jakub Kicinski [jakub.kicin...@netronome.com] > [..]> The kernel could support it. And I has finished it. >> > However, when I want to test it by ethtool, I couldn't find suitable >> > command. >> > I couldn't find relative feature in the s

Re: [balbi-usb:testing/next 2/13] drivers/usb/phy/phy-tahvo.c:434:4: error: 'struct device_driver' has no member named 'dev_groups'; did you mean 'groups'?

2019-08-08 Thread Felipe Balbi
Hi, kbuild test robot writes: > tree: > https://kernel.googlesource.com/pub/scm/linux/kernel/git/balbi/usb.git > testing/next > head: d06a2c3f683a591efce9d02b2b60ef346df5ae02 > commit: 2a714ea6d90d9d1b510ba424652a2e3dfd547267 [2/13] USB: phy: tahvo: > convert platform driver to use dev_

Re: [PATCH] [RFC] usb: gadget: hid: Add "single_ep" option

2019-08-08 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > Some host drivers really do not like keyboards having an OUT endpoint. > > For example, most UEFI forked from EDK2 before 2006 (or was it 2008 ?) > have a bug, they'll try to use the *last* interrupt EP in the > descriptor list and just assume it's an IN en

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

2019-08-08 Thread Felipe Balbi
Arnd Bergmann writes: > The mach/memory.h file only exists to implement a dma offset for "Local > Bus" devices, and that consists of the OHCI USB controller for practical > purposes. > > The generic dma-mapping interface has gained this exact feature some > years ago and can do it much more effic

Re: [PATCH] [RFC] usb: gadget: hid: Add "single_ep" option

2019-08-08 Thread Benjamin Herrenschmidt
On Fri, 2019-08-09 at 08:31 +0300, Felipe Balbi wrote: > Hi, > > Benjamin Herrenschmidt writes: > > > Some host drivers really do not like keyboards having an OUT > > endpoint. > > > > For example, most UEFI forked from EDK2 before 2006 (or was it 2008 > > ?) > > have a bug, they'll try to use