Skip to content

Support MODVERSIONS by disabling Rust modules

Matthew Maurer linux-kbuild linux-modules lkml rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3kconfig: Extend expr_depends_symbol to recursescripts/kconfig/expr.c scripts/kconfig/expr.h scripts/kconfig/menu.c+18 -80 replies
2/3kconfig: Add special rust_modules config optionscripts/kconfig/confdata.c scripts/kconfig/expr.h scripts/kconfig/lexer.l +4 more+52 -42 replies
3/3rust: Require RUST_MODULES for module supportinit/Kconfig kernel/module/Kconfig rust/exports.c+22 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Support MODVERSIONS by disabling Rust modules

The goal of this patch series is to allow MODVERSIONS to be turned on alongside RUST. Gary Guo previously proposed to adjust the API to support Rust symbols' greater length:
https://lore.kernel.org/lkml/CANiq72n4MbR+AE7eHfVQZOu26FeSttQnEEMT3Jpft+CcGwk9jw@mail.gmail.com/T/

This did not land, so I'm proposing an alternate solution - users who want to use Rust, but who do not need Rust modules, can disable Rust module support in order to retain modversions support. This has the added bonus of removing exported symbols from the kernel surface if we know they won't be used due to lack of Rust module support in the environment.

Matthew Maurer (3):
kconfig: Extend expr_depends_symbol to recurse
kconfig: Add special rust_modules config option
rust: Require RUST_MODULES for module support

 init/Kconfig               | 21 +++++++++++++++++----
 kernel/module/Kconfig      |  1 +
 rust/exports.c             |  4 ++++
 scripts/kconfig/confdata.c |  3 +++
 scripts/kconfig/expr.c     | 22 ++++++++++++++++------
 scripts/kconfig/expr.h     |  3 ++-
 scripts/kconfig/lexer.l    |  1 +
 scripts/kconfig/lkc.h      |  1 +
 scripts/kconfig/menu.c     |  9 ++++++---
 scripts/kconfig/parser.y   | 12 ++++++++++++
 scripts/kconfig/symbol.c   | 31 +++++++++++++++++++++++++++++--
 11 files changed, 92 insertions(+), 16 deletions(-)
Signature · 1 line
2.42.0.869.gea05f2083d-goog