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: <Z5NzTsm7Hw-OD4n5@pollux>
Date: Fri, 24 Jan 2025 12:02:38 +0100
From: Danilo Krummrich <dakr@...nel.org>
To: Lyude Paul <lyude@...hat.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	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 07:33:28PM -0500, Lyude Paul wrote:
> On Thu, 2025-01-23 at 07:23 +0100, Greg Kroah-Hartman wrote:
> > On Wed, Jan 22, 2025 at 06:49:22PM -0500, Lyude Paul wrote:
> > 
> > And modules are code, not data.  Let's not start to even attempt to tie
> > lifetimes of device structures to module code, that way lies madness and
> > rolls back the work we did decades ago to split the two apart :)
> 
> To make sure I'm understanding you properly, by "are code not data" you're
> suggesting that resources (devices, driver registrations, etc.) should have
> their lifetime entirely managed by the kernel and not as part of the module
> data structure correct?

I think that's two different things.

Driver registrations are bound to the module lifetime and in Rust, where we have
a structure that represents the module lifetime, driver registrations are part
of the module structure. That's fine.

Device are more of a concern here, since they ideally orginate from real
hardware and hence shouldn't be bound to a module lifetime.

I think a virtual device would need to be an exception though. What else, if not
the module should define its lifetime?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ