selecting both features.
Signed-off-by: Sami Tolvanen
Co-developed-by: Matthew Maurer
Signed-off-by: Matthew Maurer
---
init/Kconfig | 3 ++-
rust/Makefile | 34 --
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
Document where exported and imported symbols are kept, format options,
and limitations.
Signed-off-by: Matthew Maurer
---
Documentation/kbuild/modules.rst | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild
If you know that your kernel modules will only ever be loaded by a newer
kernel, you can disable BASIC_MODVERSIONS to save space. This also
allows easy creation of test modules to see how tooling will respond to
modules that only have the new format.
Signed-off-by: Matthew Maurer
---
kernel
appropriately
encoded in the extended section. These symbols will be skipped in the
previous encoding. An error will still be generated if
CONFIG_EXTENDED_MODVERSIONS is not set.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
kernel/module/Kconfig| 10
scripts
usage of this information.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 ++-
kernel/module/internal.h| 11 +
kernel/module/main.c| 92 +
kernel/module/version.c
2778044-1-mmau...@google.com/
- Add loading/verification refactor before modifying, per Luis's request
v1:
https://lore.kernel.org/rust-for-linux/20231115185858.2110875-1-mmau...@google.com/
--
2.47.0.rc1.288.g06298d1525-goog
---
Matthew Maurer (4):
modules: Support extended MO
selecting both features.
Signed-off-by: Sami Tolvanen
Co-developed-by: Matthew Maurer
Signed-off-by: Matthew Maurer
---
init/Kconfig | 3 ++-
rust/Makefile | 34 --
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
If you know that your kernel modules will only ever be loaded by a newer
kernel, you can disable BASIC_MODVERSIONS to save space. This also
allows easy creation of test modules to see how tooling will respond to
modules that only have the new format.
Signed-off-by: Matthew Maurer
---
kernel
Document where exported and imported symbols are kept, format options,
and limitations.
Signed-off-by: Matthew Maurer
---
Documentation/kbuild/modules.rst | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild
appropriately
encoded in the extended section. These symbols will be skipped in the
previous encoding. An error will still be generated if
CONFIG_EXTENDED_MODVERSIONS is not set.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
kernel/module/Kconfig| 10
scripts
usage of this information.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 ++-
kernel/module/internal.h| 11 +
kernel/module/main.c| 92 +
kernel/module/version.c
rust-for-linux/20231115185858.2110875-1-mmau...@google.com/
--
2.47.0.rc1.288.g06298d1525-goog
---
Matthew Maurer (4):
modules: Support extended MODVERSIONS info
modpost: Produce extended MODVERSIONS information
modules: Allow extended modversions without basic MODVERSIONS
Document where exported and imported symbols are kept, format options,
and limitations.
Signed-off-by: Matthew Maurer
---
Documentation/kbuild/modules.rst | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild
selecting both features.
Signed-off-by: Sami Tolvanen
Co-developed-by: Matthew Maurer
Signed-off-by: Matthew Maurer
---
init/Kconfig | 3 ++-
rust/Makefile | 34 --
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
If you know that your kernel modules will only ever be loaded by a newer
kernel, you can disable BASIC_MODVERSIONS to save space. This also
allows easy creation of test modules to seee how tooling will respond to
modules that only have the new format.
Signed-off-by: Matthew Maurer
---
kernel
usage of this information.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 ++-
kernel/module/internal.h| 11 +
kernel/module/main.c| 92 +
kernel/module/version.c
appropriately
encoded in the extended section. These symbols will be skipped in the
previous encoding. An error will still be generated if
CONFIG_EXTENDED_MODVERSIONS is not set.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
kernel/module/Kconfig| 10
scripts
's request
v1:
https://lore.kernel.org/rust-for-linux/20231115185858.2110875-1-mmau...@google.com/
--
2.47.0.rc1.288.g06298d1525-goog
---
Matthew Maurer (4):
modules: Support extended MODVERSIONS info
modpost: Produce extended MODVERSIONS information
modules: Allow e
>
> I already acked version 8, which AFAICS is identical to this version
> (for this patch at least).
>
> Not sure if you dropped my ack on purpose, but here have another one :)
>
> Acked-by: Michael Ellerman (powerpc)
>
> cheers
It was not removed intentionally, thanks for the re-ack :)
selecting both features.
Signed-off-by: Sami Tolvanen
Co-developed-by: Matthew Maurer
Signed-off-by: Matthew Maurer
---
init/Kconfig | 3 ++-
rust/Makefile | 34 --
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
appropriately
encoded in the extended section. These symbols will be skipped in the
previous encoding. An error will still be generated if
CONFIG_EXTENDED_MODVERSIONS is not set.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
kernel/module/Kconfig| 10
scripts
Document where exported and imported symbols are kept, format options,
and limitations.
Signed-off-by: Matthew Maurer
---
Documentation/kbuild/modules.rst | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild
If you know that your kernel modules will only ever be loaded by a newer
kernel, you can disable BASIC_MODVERSIONS to save space. This also
allows easy creation of test modules to seee how tooling will respond to
modules that only have the new format.
Signed-off-by: Matthew Maurer
---
kernel
linux/20231115185858.2110875-1-mmau...@google.com/
--
2.47.0.rc1.288.g06298d1525-goog
---
Matthew Maurer (4):
modules: Support extended MODVERSIONS info
modpost: Produce extended MODVERSIONS information
modules: Allow extended modversions without basic MODVERSIONS
Documentation
usage of this information.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 ++-
kernel/module/internal.h| 11 +
kernel/module/main.c| 92 +
kernel/module/version.c
> > depends on !COMPILE_TEST
> > + selects BASIC_MODVERSIONS
>
> tested? 'selects' is not valid.
>
Apologies. Tested before making BASIC_MODVERSIONS default. I've fixed
this locally, and will re-test with the whole stack before resending.
If you know that your kernel modules will only ever be loaded by a newer
kernel, you can disable BASIC_MODVERSIONS to save space. This also
allows easy creation of test modules to seee how tooling will respond to
modules that only have the new format.
Signed-off-by: Matthew Maurer
---
kernel
selecting both features.
Signed-off-by: Sami Tolvanen
Co-developed-by: Matthew Maurer
Signed-off-by: Matthew Maurer
---
init/Kconfig | 3 ++-
rust/Makefile | 34 --
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
Document where exported and imported symbols are kept, format options,
and limitations.
Signed-off-by: Matthew Maurer
---
Documentation/kbuild/modules.rst | 20
1 file changed, 20 insertions(+)
diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild
appropriately
encoded in the extended section. These symbols will be skipped in the
previous encoding. An error will still be generated if
CONFIG_EXTENDED_MODVERSIONS is not set.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
kernel/module/Kconfig| 10
scripts
quest
v1:
https://lore.kernel.org/rust-for-linux/20231115185858.2110875-1-mmau...@google.com/
--
2.47.0.rc1.288.g06298d1525-goog
---
Matthew Maurer (4):
modules: Support extended MODVERSIONS info
modpost: Produce extended MODVERSIONS information
modules: Allow extended mo
usage of this information.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 ++-
kernel/module/internal.h| 11 +
kernel/module/main.c| 92 +
kernel/module/version.c
On Thu, Nov 7, 2024 at 2:38 PM Luis Chamberlain wrote:
>
> On Wed, Nov 06, 2024 at 02:19:38PM -0800, Matthew Maurer wrote:
> > >
> > > > If booted against an old kernel, it will
> > > > behave as though there is no modversions information.
> > >
> Thinking about this some more, if we're going down enabling a new
> option, it seems to beg the question if the old *two* ksymtab sections
> could just be folded into the a new one where the "gpl only" thing
> becomes just one "column" as you call it. Reasons I ask, it seems like
> we're duplicat
Adding Lucas DeMarchi to the thread after voicing an interest in the
modpost patch.
On Thu, Oct 31, 2024 at 12:49 AM Luis Chamberlain wrote:
>
> On Wed, Oct 30, 2024 at 10:06:12PM -0700, Matthew Maurer wrote:
> > On Wed, Oct 30, 2024 at 9:37 PM Luis Chamberlain wrote:
> > >
On Wed, Nov 6, 2024 at 10:27 PM Lucas De Marchi
wrote:
>
> On Wed, Nov 06, 2024 at 02:19:38PM -0800, Matthew Maurer wrote:
> >>
> >> > If booted against an old kernel, it will
> >> > behave as though there is no modversions information.
> >>
> &g
>
> > If booted against an old kernel, it will
> > behave as though there is no modversions information.
>
> Huh? This I don't get. If you have the new libkmod and boot
> an old kernel, that should just not break becauase well, long
> symbols were not ever supported properly anyway, so no regressio
On Fri, Nov 1, 2024 at 2:10 PM Luis Chamberlain wrote:
>
> On Thu, Oct 31, 2024 at 01:00:28PM -0700, Matthew Maurer wrote:
> > > The question is, if only extended moversions are used, what new tooling
> > > requirements are there? Can you test using only extended modvers
> The question is, if only extended moversions are used, what new tooling
> requirements are there? Can you test using only extended modversions?
>
> Luis
I'm not sure precisely what you're asking for. Do you want:
1. A kconfig that suppresses the emission of today's MODVERSIONS
format? This wou
On Wed, Oct 30, 2024 at 9:37 PM Luis Chamberlain wrote:
>
> On Thu, Oct 31, 2024 at 12:22:36PM +1100, Michael Ellerman wrote:
> > Matthew Maurer writes:
> > > Adds a new format for MODVERSIONS which stores each field in a separate
> > > ELF section. This initi
selecting both features.
Signed-off-by: Sami Tolvanen
Co-developed-by: Matthew Maurer
Signed-off-by: Matthew Maurer
---
init/Kconfig | 3 ++-
rust/Makefile | 33 +++--
2 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
appropriately
encoded in the extended section. These symbols will be skipped in the
previous encoding. An error will still be generated if
CONFIG_EXTENDED_MODVERSIONS is not set.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
kernel/module/Kconfig| 10
scripts
usage of this information.
Reviewed-by: Sami Tolvanen
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 ++-
kernel/module/internal.h| 11 +
kernel/module/main.c| 92 +
kernel/module/version.c
;s suggestion.
v2: https://lore.kernel.org/all/20231118025748.2778044-1-mmau...@google.com/
- Add loading/verification refactor before modifying, per Luis's request
v1:
https://lore.kernel.org/rust-for-linux/20231115185858.2110875-1-mmau...@google.com/
--
2.47.0.rc1.288.g06298d15
> Sorry I realise it's version 7, but although the above looks correct it's
> kind of dense.
>
> I think the below would also work and is (I think) easier to follow, and
> is more obviously similar to the existing code. I'm sure your version is
> faster, but I don't think it's that performance crit
efore modifying, per Luis's request
v1:
https://lore.kernel.org/rust-for-linux/20231115185858.2110875-1-mmau...@google.com/
Matthew Maurer (5):
export_report: Rehabilitate script
modules: Support extended MODVERSIONS info
export_report: Tolerate additional `.mod.c` content
usage of this information.
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 ++-
kernel/module/internal.h| 11 +
kernel/module/main.c| 92 +
kernel/module/version.c | 45
4
appropriately
encoded in the extended section. These symbols will be skipped in the
previous encoding. An error will still be generated if
CONFIG_EXTENDED_MODVERSIONS is not set.
Signed-off-by: Matthew Maurer
---
kernel/module/Kconfig| 10
scripts/Makefile.modpost | 1 +
scripts/mod
selecting both features.
Signed-off-by: Sami Tolvanen
Co-developed-by: Matthew Maurer
Signed-off-by: Matthew Maurer
---
init/Kconfig | 3 ++-
rust/Makefile | 32 ++--
2 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index
So, the basic things I can think of to test here are:
1. The kernel can still load the previous MODVERSIONS format
2. The kernel can load the new MODVERSIONS format
3. If we artificially tweak a CRC in the previous format, it will fail to load.
4. If we artificially tweak a CRC in the new format,
usage of this information.
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 23 -
kernel/module/internal.h| 11
kernel/module/main.c| 92 ++---
kernel/module/version.c | 45
4 files changed
On Fri, Oct 11, 2024 at 3:22 PM Luis Chamberlain wrote:
>
> On Wed, Sep 25, 2024 at 11:38:29PM +, Matthew Maurer wrote:
> > Adds a new format for MODVERSIONS which stores each field in a separate
> > ELF section. This initially adds support for variable length names, but
Thanks for the catch. I've sent up v5 to include that fix. I've also
added a changelog and made sure the patches make it to linux-modules@
as Daniel suggested.
On Wed, Sep 25, 2024 at 4:00 PM Sami Tolvanen wrote:
>
> Hi Matt,
>
> On Tue, Sep 24, 2024 at 09:19:56PM +
usage of this information.
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 23 -
kernel/module/internal.h| 11
kernel/module/main.c| 92 ++---
kernel/module/version.c | 45
4 files changed
usage of this information.
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 -
kernel/module/internal.h| 11
kernel/module/main.c| 92 ++---
kernel/module/version.c | 43 +++
4 files changed
On Fri, Aug 16, 2024 at 4:04 PM Michael Ellerman wrote:
>
> Matthew Maurer writes:
> > Adds a new format for MODVERSIONS which stores each field in a separate
> > ELF section. This initially adds support for variable length names, but
> > could later be used to
usage of this information.
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 -
kernel/module/internal.h| 11
kernel/module/main.c| 92 ++---
kernel/module/version.c | 43 +++
4 files changed
> > >
> > > > With regards to future directions that likely won't work for loosening
> > > > it:
> > > > Unfortunately, the .rmeta format itself is not stable, so I wouldn't
> > > > want to
> > > > teach genksyms to open it up and split out the pieces for specific
> > > > functions.
> > > > Exte
> So, even if you enable CONFIG_MODVERSIONS,
> nothing is checked for Rust.
> Genksyms computes a CRC from "int foo", and
> the module subsystem confirms it is a "int"
> variable.
>
> We know this check always succeeds.
>
> Why is this useful?
The reason this is immediately useful is that it allows
The new version info format has a superset of symbols in the old format.
Since this is a tool for in-tree modules, we don't need to parse the old
one with this tool any longer.
Signed-off-by: Matthew Maurer
---
scripts/export_report.pl | 22 ++
1 file changed, 10 inser
With variable length symbol names from extended modversions, we can
enable MODVERSIONS alongside RUST due to support for its longer symbol
names.
Signed-off-by: Matthew Maurer
---
init/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/init/Kconfig b/init/Kconfig
index 9ffb103fc927
leading dots, we reproduce
the munging for the new format. Other architectures do not appear to
have architecture-specific usage of this information.
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 25 -
kernel/module/internal.h| 11
kernel/module/main.c
o ensure offsets are inbounds of strtab
While some of these oversights would normally be worrying, all of the
potentially unverified accesses occur after signature check, and only in
response to a user who can load a kernel module.
Signed-off-by: Matthew Maurer
---
kernel/module/internal.h |
* modules.order has .o files when in a build dir, support this
* .mod.c source layout has changed, update regexes to match
* Add a stage 3, to be more robust against additional .mod.c content
Signed-off-by: Matthew Maurer
---
scripts/export_report.pl | 9 +++--
1 file changed, 7 insertions
the
added clarity and checks were valuable.
[1] https://lore.kernel.org/lkml/2023061155.1349375-1-g...@garyguo.net/
[2]
https://lore.kernel.org/lkml/CAK7LNATsuszFR7JB5ZkqVS1W=hWr9=e7btf+mvgj+nxt3az...@mail.gmail.com/
[3] https://lore.kernel.org/lkml/zvznh%2fpa5hivr...@bombadil.infradead.org/
Matt
possible to enable
MODVERSIONS and RUST at the same time.
Signed-off-by: Matthew Maurer
---
arch/powerpc/kernel/module_64.c | 24 +-
init/Kconfig| 1 -
kernel/module/internal.h| 16 ++-
kernel/module/main.c| 9 +++-
kernel/module/version.c
66 matches
Mail list logo