lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 23 Apr 2015 16:06:49 +0200
From:	Johan Hovold <johan@...nel.org>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Felipe Balbi <balbi@...com>,
	Alan Stern <stern@...land.harvard.edu>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Stephen Warren <swarren@...dotorg.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Alexandre Courbot <gnurou@...il.com>,
	linux-tegra@...r.kernel.org, Johan Hovold <johan@...nel.org>
Subject: [PATCH v2 0/3] USB: fix inefficient copy of unaligned buffers

These patches (for 4.1) make sure that only the received data is copied
from the temporary buffers used for unaligned transfers.

I discovered this when debugging an issue where the Beaglebone Black
would lock up on disconnect.

Turns out it was related to the transfer_buffers not being properly
aligned, causing musb to use temporary buffers for the transfers. On
transfer errors (e.g. during disconnect), the full buffer content was
still being copied, something which would alter timings enough to
prevent the disconnect from being detected and processed.

The first patch in the series works around the problem in that
particular set up, but obviously does not solve the underlying issue,
which needs to be analysed further.

I also included a corresponding patch for ehci-tegra that has been
compile tested only.

Note that the octeon-hcd driver in staging, which also uses temporary
buffers for unaligned transfers, was broken for isochronous transfers.
The third patch fixes that, but is also untested due to lack of
hardware.

Johan


v2:
 - Make sure to copy the full buffer for isochronous transfers, in which
   case the received data is not necessarily contiguous (thanks Alan).
 - Drop stable tags as this is really just an optimisation.


Johan Hovold (3):
  USB: musb: fix inefficient copy of unaligned buffers
  USB: ehci-tegra: fix inefficient copy of unaligned buffers
  staging: octeon-usb: fix unaligned isochronous transfers

 drivers/staging/octeon-usb/octeon-hcd.c | 12 +++++++++---
 drivers/usb/host/ehci-tegra.c           | 12 +++++++++---
 drivers/usb/musb/musb_host.c            |  9 +++++++--
 3 files changed, 25 insertions(+), 8 deletions(-)

-- 
2.0.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ