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: <877c83eouc.fsf@kernel.org>
Date: Fri, 13 Dec 2024 13:42:35 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Greg KH" <gregkh@...uxfoundation.org>, Jens Axboe <axboe@...nel.dk>
Cc: "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>,  "Alice Ryhl" <aliceryhl@...gle.com>,
  "Masahiro Yamada" <masahiroy@...nel.org>,  "Nathan Chancellor"
 <nathan@...nel.org>,  "Nicolas Schier" <nicolas@...sle.eu>,  "Trevor
 Gross" <tmgross@...ch.edu>,  "Adam Bratschi-Kaye" <ark.email@...il.com>,
  <rust-for-linux@...r.kernel.org>,  <linux-kernel@...r.kernel.org>,
  <linux-kbuild@...r.kernel.org>, Tamir Duberstein <tamird@...il.com>
Subject: Re: [PATCH v3 4/4] rust: add parameter support to the `module!` macro

"Greg KH" <gregkh@...uxfoundation.org> writes:

> On Fri, Dec 13, 2024 at 12:30:49PM +0100, Andreas Hindborg wrote:
>> This patch includes changes required for Rust kernel modules to utilize
>> module parameters. This code implements read only support for integer
>> types without `sysfs` support.
>
> read-only is VERY limited, and as such, only good for boot options,
> which as I mentioned before, is not how any "modern" kernel driver
> should be doing things.

I only added what is required to get rust null block compatibility
going. I did not want to add dead code - I heard that is frowned upon.

> And no sysfs interaction?  That's going to confuse the heck out of
> people wondering why the option they added doesn't show up in the same
> place it normally would if they did it in C, right?  Not that I'm saying
> this should be done at all, just that this is going to be confusing
> right off the bat which is probably not a good idea.

No, these work the same way as their counter parts in C. They reuse the
same C machinery. They just only allow the user to specify a subset of
the permission flags.

The C null_blk parameters are actually configured to appear read-only in
sysfs. I guess I should add that in a follow-up.

> Friends don't let friends add new module parameters to the kernel :)

OK, that makes sense. But I'm trying to build something that plugs
in where we currently have a piece of C code that relies on module
parameters.

Jens, would you be OK with Rust null block only providing configuration
through configfs?


Best regards,
Andreas Hindborg






Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ