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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <875848ec-f92b-48a9-b5c2-792bb0121824@suse.com>
Date: Tue, 13 May 2025 10:21:06 +0200
From: Oliver Neukum <oneukum@...e.com>
To: David Wang <00107082@....com>, mathias.nyman@...el.com,
 gregkh@...uxfoundation.org
Cc: stern@...land.harvard.edu, linux-usb@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] USB: xhci: use urb hcpriv mempool for private data

Hi,

On 13.05.25 07:55, David Wang wrote:
> xhci keeps alloc/free private data for each enqueue/dequeue cycles,
> when using a USB webcam, the memory allocation frequency could reach
> about 1k/s.
> 
> URB objects have longer lifecycle than private data, hand over ownership
> of private data to urb can save lots of memory allocations over time.

I am afraid I need to make a comment about a principal issue.

This patch set overlooks a fundamental issue. You cannot guarantee
that an URB is reused by the same HC. For example you cannot rule
out that the next time your URB is resubmitted, it will land with
XHCI again.

That means you cannot touch just how one HCD handles private data.
Or you need to record which HC the URB was last used for.

	Regards
		Oliver


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ