Re: [PATCH v4 4/4] rust: add parameter support to the `module!` macro
From: Greg KH
Date: Thu Jan 09 2025 - 12:17:27 EST
On Thu, Jan 09, 2025 at 02:03:39PM +0100, Andreas Hindborg wrote:
> "Greg KH" <gregkh@xxxxxxxxxxxxxxxxxxx> writes:
>
> > On Thu, Jan 09, 2025 at 11:54:59AM +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.
> >
> > I know you want to keep this simple for now, but will you have to go and
> > touch all users of this when you do add the sysfs support later? sysfs
> > wants the mode of the file to be set here, so how do you think of that
> > happening?
>
> We would add the required fields to the `module!` macro as optional
> fields. No need to touch everyone. Leaving out the sysfs file permission
> field would cause the parameter to not show up in sysfs.
Ok, that sounds reasonable, thanks!
greg k-h