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@xxxxxxxxxxxxxx/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(-) -- 2.42.0.869.gea05f2083d-goog