Linux-Modules Archive on lore.kernel.org
 help / Atom feed
* Re: [RESEND PATCH v1] moduleparam: Save information about built-in modules in separate file
       [not found]     ` <20190327154025.GB23293@linux-8ccs>
@ 2019-03-28 17:41       ` Lucas De Marchi
  2019-03-28 18:45         ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas De Marchi @ 2019-03-28 17:41 UTC (permalink / raw)
  To: Jessica Yu
  Cc: Alexey Gladkov, Masahiro Yamada, Michal Marek,
	Linux Kernel Mailing List, Linux Kbuild mailing list, linux-api,
	Kirill A . Shutemov, Gleb Fotengauer-Malinovskiy,
	Dmitry V. Levin, Dmitry Torokhov, Rusty Russell, linux-modules

On Wed, Mar 27, 2019 at 8:40 AM Jessica Yu <jeyu@kernel.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.

Lucas De Marchi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RESEND PATCH v1] moduleparam: Save information about built-in modules in separate file
  2019-03-28 17:41       ` [RESEND PATCH v1] moduleparam: Save information about built-in modules in separate file Lucas De Marchi
@ 2019-03-28 18:45         ` Greg KH
  2019-03-28 21:33           ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2019-03-28 18:45 UTC (permalink / raw)
  To: Lucas De Marchi
  Cc: Jessica Yu, Alexey Gladkov, Masahiro Yamada, Michal Marek,
	Linux Kernel Mailing List, Linux Kbuild mailing list, linux-api,
	Kirill A . Shutemov, Gleb Fotengauer-Malinovskiy,
	Dmitry V. Levin, Dmitry Torokhov, Rusty Russell, linux-modules

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@kernel.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 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.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RESEND PATCH v1] moduleparam: Save information about built-in modules in separate file
  2019-03-28 18:45         ` Greg KH
@ 2019-03-28 21:33           ` Dmitry Torokhov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2019-03-28 21:33 UTC (permalink / raw)
  To: Greg KH
  Cc: Lucas De Marchi, Jessica Yu, Alexey Gladkov, Masahiro Yamada,
	Michal Marek, Linux Kernel Mailing List,
	Linux Kbuild mailing list, open list:ABI/API,
	Kirill A . Shutemov, Gleb Fotengauer-Malinovskiy,
	Dmitry V. Levin, Rusty Russell, linux-modules

On Thu, Mar 28, 2019 at 11:45 AM Greg KH <gregkh@linuxfoundation.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@kernel.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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190315101013.GN8455@Legion-PC.fortress>
     [not found] ` <CAK7LNATsm23e_CuyfFw7_CR8xZQ3HnwNHCXhEm_zQZU2PUGK5A@mail.gmail.com>
     [not found]   ` <20190326172411.GA15936@Legion-PC.fortress>
     [not found]     ` <20190327154025.GB23293@linux-8ccs>
2019-03-28 17:41       ` [RESEND PATCH v1] moduleparam: Save information about built-in modules in separate file Lucas De Marchi
2019-03-28 18:45         ` Greg KH
2019-03-28 21:33           ` Dmitry Torokhov

Linux-Modules Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-modules/0 linux-modules/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-modules linux-modules/ https://lore.kernel.org/linux-modules \
		linux-modules@vger.kernel.org linux-modules@archiver.kernel.org
	public-inbox-index linux-modules


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-modules


AGPL code for this site: git clone https://public-inbox.org/ public-inbox