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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <36698be6-d260-41e3-904d-61e3be5463d0@nvidia.com>
Date: Thu, 5 Feb 2026 13:44:07 -0800
From: John Hubbard <jhubbard@...dia.com>
To: Danilo Krummrich <dakr@...nel.org>, Matthew Wilcox <willy@...radead.org>
Cc: Gary Guo <gary@...yguo.net>, Alexandre Courbot <acourbot@...dia.com>,
 Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>,
 Alistair Popple <apopple@...dia.com>, Eliot Courtney <ecourtney@...dia.com>,
 Zhi Wang <zhiw@...dia.com>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>, Bjorn Helgaas <bhelgaas@...gle.com>,
 Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
 Boqun Feng <boqun.feng@...il.com>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>,
 Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>, nouveau@...ts.freedesktop.org,
 rust-for-linux@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpu: nova-core: fix aux device registration for multi-GPU
 systems

On 2/5/26 6:19 AM, Danilo Krummrich wrote:
> On Thu Feb 5, 2026 at 2:48 PM CET, Matthew Wilcox wrote:
>> On Thu, Feb 05, 2026 at 01:44:27PM +0000, Gary Guo wrote:
>>>> Fix this by using an atomic counter to generate unique IDs for each
>>>> GPU's aux device registration. The TODO item to eventually use XArray
>>>> for recycling aux device IDs is retained, but for now, this works very
>>>> nicely.
>>>>
>>>> This has the side effect of making debugfs[1] work on multi-GPU systems.
>>>
>>> Hi John,
>>>
>>> Looks like this is something that should be achieved via IDA?
>>
>> Yes, if you have no need to go from ID to pointer, an IDA is better.
>> That said, as far as I understand what this code is doing, an atomic_t
>> solves the problem just fine and is cheaper.
> 
> I agree, for now an atomic should be perfectly fine. Though, with enough
> patience binding/unbinding the driver from sysfs you can probably make this
> overflow. :)
> 
> The reason for the Xarray TODO is that it is one option for a place where
> nova-core can store nova-drm / vGPU specific data, once either vGPU or nova-drm
> attaches to the auxiliary device. But I think there may be better alternatives.

OK, this seems like enough information to post a v2, thanks!

thanks,
-- 
John Hubbard


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ