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: <1335f63c.7bea.196c8c53bef.Coremail.00107082@163.com>
Date: Tue, 13 May 2025 16:31:31 +0800 (CST)
From: "David Wang" <00107082@....com>
To: "Oliver Neukum" <oneukum@...e.com>
Cc: mathias.nyman@...el.com, gregkh@...uxfoundation.org,
	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



At 2025-05-13 16:21:06, "Oliver Neukum" <oneukum@...e.com> wrote:
>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.

No, I don't think which HC the URB was last used for concerns here.
A URB cannot be used by two HC at the same time, as long as this hold, I don't see reason
 worrying about who use this private data before.

This patch for xhci dose not assume which HC use the private data mempool  previously, nor
should other HCs.

Or, do I misunderstand your comments?

David

>
>	Regards
>		Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ