[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKdAkRTxvJjuocVgENDPsmTjV+uNbD81wgReLRyF4CUFqzTF0Q@mail.gmail.com>
Date: Thu, 28 Mar 2019 14:33:56 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: Lucas De Marchi <lucas.de.marchi@...il.com>,
Jessica Yu <jeyu@...nel.org>,
Alexey Gladkov <gladkov.alexey@...il.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
"open list:ABI/API" <linux-api@...r.kernel.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Gleb Fotengauer-Malinovskiy <glebfm@...linux.org>,
"Dmitry V. Levin" <ldv@...linux.org>,
Rusty Russell <rusty@...tcorp.com.au>,
linux-modules <linux-modules@...r.kernel.org>
Subject: Re: [RESEND PATCH v1] moduleparam: Save information about built-in
modules in separate file
On Thu, Mar 28, 2019 at 11:45 AM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Thu, Mar 28, 2019 at 10:41:59AM -0700, Lucas De Marchi wrote:
> > On Wed, Mar 27, 2019 at 8:40 AM Jessica Yu <jeyu@...nel.org> wrote:
> > > >No. There are definitely not all modules. I have a builtin sha256_generic,
> > > >but I can't find him in the /sys/module.
> > >
> > > Yeah, you'll only find builtin modules under /sys/module/ if it has any module
> > > parameters, otherwise you won't find it there. As Masahiro already mentioned,
> > > if a builtin module has any parameters, they would be accessible under /sys/module/.
> >
> > Could we please change that and add the sysfs entry regardless of
> > what's being discussed here? Not having the entry there simply because
> > we don't have parameters for that module always annoyed me.
What is the benefit compared to wasting some memory for the directory?
>
> What is the sysfs directory going to show? Will it just be empty?
>
> Feel free to send a patch for this, but from what I remember, it wasn't
> the easiest thing to do for some reason. But given that the code was
> implemented before git was, I can't quite remember.
I am pretty sure we allow empty attribute groups, so it is probbaly as
simple as removing "If (!params) return 0;" form
module_param_sysfs_setup() and making sure we always create
"parameters" group instead of doing it on first visible parameter in
add_sysfs_param(). I suppose we no longer want to skip over parameters
that are not readable nor writable either?
Thanks.
--
Dmitry
Powered by blists - more mailing lists