Re: [PATCH v2 0/5] MODVERSIONS + RUST Redux

2023-11-27 Thread Matthew Maurer
> > > > > > > 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. > > > >

Re: [PATCH v2 0/5] MODVERSIONS + RUST Redux

2023-11-22 Thread Matthew Maurer
> 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

[PATCH v2 5/5] export_report: Use new version info format

2023-11-17 Thread Matthew Maurer
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 insertions

[PATCH v2 4/5] rust: Allow MODVERSIONS

2023-11-17 Thread Matthew Maurer
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

[PATCH v2 3/5] modpost: Extended modversion support

2023-11-17 Thread Matthew Maurer
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

[PATCH v2 2/5] modules: Refactor + kdoc elf_validity_cached_copy

2023-11-17 Thread Matthew Maurer
pt to 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 |

[PATCH v2 1/5] export_report: Rehabilitate script

2023-11-17 Thread Matthew Maurer
* 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

[PATCH v2 0/5] MODVERSIONS + RUST Redux

2023-11-17 Thread Matthew Maurer
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/ Matthew Maurer

[PATCH 2/3] modpost: Extended modversion support

2023-11-15 Thread Matthew Maurer
it 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