mbox series

[v2,0/4] Add modules.builtin.modinfo support

Message ID 20191108172524.468494-1-gladkov.alexey@gmail.com (mailing list archive)
Headers show
Series Add modules.builtin.modinfo support | expand

Message

Alexey Gladkov Nov. 8, 2019, 5:25 p.m. UTC
The kernel since version v5.2-rc1 exports information about built-in
modules in the modules.builtin.modinfo. Now, kmod can show complete information
about the built-in modules as well as about external modules. Also kmod can
understand aliases of built-in modules.

Before:

$ modinfo block-major-9-1
modinfo: ERROR: Module block-major-9-1 not found.

After:

$ modinfo block-major-9-1
name:           md_mod
filename:       (builtin)
alias:          block-major-9-*
alias:          md
description:    MD RAID framework
license:        GPL
parm:           start_dirty_degraded:int
parm:           create_on_open:bool

v2:

* Don't use kmod_file() to parse modules.builtin.modinfo. Instead, parser reads
the file into the buffer by chunks, which reduces the amount of memory.

Alexey Gladkov (4):
  libkmod: Add parser for modules.builtin.modinfo
  libkmod: Add function to get list of built-in modules
  Lookup aliases in the modules.builtin.modinfo
  modinfo: Show information about built-in modules

 Makefile.am                |   1 +
 libkmod/libkmod-builtin.c  | 329 +++++++++++++++++++++++++++++++++++++
 libkmod/libkmod-internal.h |  10 ++
 libkmod/libkmod-module.c   |  73 +++++++-
 libkmod/libkmod.c          |  25 +++
 libkmod/libkmod.h          |   1 +
 tools/depmod.c             |  63 +++++++
 tools/modinfo.c            |  39 +++--
 8 files changed, 514 insertions(+), 27 deletions(-)
 create mode 100644 libkmod/libkmod-builtin.c

Comments

Alexey Gladkov Nov. 18, 2019, 11:17 p.m. UTC | #1
On Fri, Nov 08, 2019 at 06:25:19PM +0100, Alexey Gladkov wrote:
> The kernel since version v5.2-rc1 exports information about built-in
> modules in the modules.builtin.modinfo. Now, kmod can show complete information
> about the built-in modules as well as about external modules. Also kmod can
> understand aliases of built-in modules.

How about this version ?

> Before:
> 
> $ modinfo block-major-9-1
> modinfo: ERROR: Module block-major-9-1 not found.
> 
> After:
> 
> $ modinfo block-major-9-1
> name:           md_mod
> filename:       (builtin)
> alias:          block-major-9-*
> alias:          md
> description:    MD RAID framework
> license:        GPL
> parm:           start_dirty_degraded:int
> parm:           create_on_open:bool
> 
> v2:
> 
> * Don't use kmod_file() to parse modules.builtin.modinfo. Instead, parser reads
> the file into the buffer by chunks, which reduces the amount of memory.
> 
> Alexey Gladkov (4):
>   libkmod: Add parser for modules.builtin.modinfo
>   libkmod: Add function to get list of built-in modules
>   Lookup aliases in the modules.builtin.modinfo
>   modinfo: Show information about built-in modules
> 
>  Makefile.am                |   1 +
>  libkmod/libkmod-builtin.c  | 329 +++++++++++++++++++++++++++++++++++++
>  libkmod/libkmod-internal.h |  10 ++
>  libkmod/libkmod-module.c   |  73 +++++++-
>  libkmod/libkmod.c          |  25 +++
>  libkmod/libkmod.h          |   1 +
>  tools/depmod.c             |  63 +++++++
>  tools/modinfo.c            |  39 +++--
>  8 files changed, 514 insertions(+), 27 deletions(-)
>  create mode 100644 libkmod/libkmod-builtin.c
> 
> -- 
> 2.21.0
>
Alexey Gladkov Dec. 4, 2019, 3:27 p.m. UTC | #2
On Fri, Nov 08, 2019 at 06:25:19PM +0100, Alexey Gladkov wrote:
> The kernel since version v5.2-rc1 exports information about built-in
> modules in the modules.builtin.modinfo. Now, kmod can show complete information
> about the built-in modules as well as about external modules. Also kmod can
> understand aliases of built-in modules.
> 
> Before:
> 
> $ modinfo block-major-9-1
> modinfo: ERROR: Module block-major-9-1 not found.
> 
> After:
> 
> $ modinfo block-major-9-1
> name:           md_mod
> filename:       (builtin)
> alias:          block-major-9-*
> alias:          md
> description:    MD RAID framework
> license:        GPL
> parm:           start_dirty_degraded:int
> parm:           create_on_open:bool
> 
> v2:
> 
> * Don't use kmod_file() to parse modules.builtin.modinfo. Instead, parser reads
> the file into the buffer by chunks, which reduces the amount of memory.
> 
> Alexey Gladkov (4):
>   libkmod: Add parser for modules.builtin.modinfo
>   libkmod: Add function to get list of built-in modules
>   Lookup aliases in the modules.builtin.modinfo
>   modinfo: Show information about built-in modules

ping.

>  Makefile.am                |   1 +
>  libkmod/libkmod-builtin.c  | 329 +++++++++++++++++++++++++++++++++++++
>  libkmod/libkmod-internal.h |  10 ++
>  libkmod/libkmod-module.c   |  73 +++++++-
>  libkmod/libkmod.c          |  25 +++
>  libkmod/libkmod.h          |   1 +
>  tools/depmod.c             |  63 +++++++
>  tools/modinfo.c            |  39 +++--
>  8 files changed, 514 insertions(+), 27 deletions(-)
>  create mode 100644 libkmod/libkmod-builtin.c
> 
> -- 
> 2.21.0
>
Lucas De Marchi Dec. 20, 2019, 6:45 p.m. UTC | #3
On Wed, Dec 4, 2019 at 7:27 AM Alexey Gladkov <gladkov.alexey@gmail.com> wrote:
>
> On Fri, Nov 08, 2019 at 06:25:19PM +0100, Alexey Gladkov wrote:
> > The kernel since version v5.2-rc1 exports information about built-in
> > modules in the modules.builtin.modinfo. Now, kmod can show complete information
> > about the built-in modules as well as about external modules. Also kmod can
> > understand aliases of built-in modules.
> >
> > Before:
> >
> > $ modinfo block-major-9-1
> > modinfo: ERROR: Module block-major-9-1 not found.
> >
> > After:
> >
> > $ modinfo block-major-9-1
> > name:           md_mod
> > filename:       (builtin)
> > alias:          block-major-9-*
> > alias:          md
> > description:    MD RAID framework
> > license:        GPL
> > parm:           start_dirty_degraded:int
> > parm:           create_on_open:bool
> >
> > v2:
> >
> > * Don't use kmod_file() to parse modules.builtin.modinfo. Instead, parser reads
> > the file into the buffer by chunks, which reduces the amount of memory.
> >
> > Alexey Gladkov (4):
> >   libkmod: Add parser for modules.builtin.modinfo
> >   libkmod: Add function to get list of built-in modules
> >   Lookup aliases in the modules.builtin.modinfo
> >   modinfo: Show information about built-in modules
>
> ping.

sorry for the delay, it took me some time to go through it and review.

Applied,
thanks

Lucas De Marchi

>
> >  Makefile.am                |   1 +
> >  libkmod/libkmod-builtin.c  | 329 +++++++++++++++++++++++++++++++++++++
> >  libkmod/libkmod-internal.h |  10 ++
> >  libkmod/libkmod-module.c   |  73 +++++++-
> >  libkmod/libkmod.c          |  25 +++
> >  libkmod/libkmod.h          |   1 +
> >  tools/depmod.c             |  63 +++++++
> >  tools/modinfo.c            |  39 +++--
> >  8 files changed, 514 insertions(+), 27 deletions(-)
> >  create mode 100644 libkmod/libkmod-builtin.c
> >
> > --
> > 2.21.0
> >
>
> --
> Rgrds, legion
>