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] [day] [month] [year] [list]
Message-ID: <2025012342-zen-luminance-094c@gregkh>
Date: Thu, 23 Jan 2025 15:17:23 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Lyude Paul <lyude@...hat.com>, rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Maíra Canal <mairacanal@...eup.net>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Miguel Ojeda <ojeda@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <benno.lossin@...ton.me>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>
Subject: Re: [PATCH 2/2] rust/kernel: Add platform::ModuleDevice

On Thu, Jan 23, 2025 at 11:21:28AM +0100, Danilo Krummrich wrote:
> On Thu, Jan 23, 2025 at 07:23:08AM +0100, Greg Kroah-Hartman wrote:
> > On Wed, Jan 22, 2025 at 06:49:22PM -0500, Lyude Paul wrote:
> > > A number of kernel modules work with virtual devices, where being virtual
> > > implies that there's no physical device to actually be plugged into the
> > > system. Because of that, such modules need to be able to manually
> > > instantiate a kernel device themselves - which can then be probed in the
> > > same manner as any other kernel device.
> > > 
> > > This adds support for such a usecase by introducing another platform device
> > > type, ModuleDevice. This type is interchangeable with normal platform
> > > devices, with the one exception being that it controls the lifetime of the
> > > registration of the device.
> > 
> > Sorry, but a "virtual" device is NOT a platform device at all.  Platform
> > devices are things that are not on a real bus and are described by
> > firmware somehow.
> > 
> > The kernel has "virtual" devices today just fine, look at
> > /sys/devices/virtual/ so why not just use that api instead of making up
> > something new?
> 
> I think we briefly discussed this in another mail thread [1] for the example of
> the vKMS driver [2] in the past.
> 
> In [1] you mentioned that with the virtual device API, things are a bit
> inconvenient and that you want to follow up on this.

And my intern ended up doing other things last summer and never got to
this, sorry.  I've not had the time either.  Let me try to get to it
next week, but no promises...

But that doesn't excuse the abuse of platform devices, that's not ok,
and I'm not going to want to take this change at all, sorry.

Again, if anything, we should be using LESS platform devices in the
kernel, not more.  And especially never using them for devices like this
that are NOT a platform device at all.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ