Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 4085063

Browse files
maurerTreehugger Robot
authored andcommitted
ANDROID: rust: allow MODVERSIONS by no longer exporting symbols
Rust symbols on the kernel interface don't support MODVERSIONS, but users may want to use Rust only for built-in components. Specifically, the new binder driver will be built-in and this allows us to enable RUST without disabling MODVERSIONS to support that. Work is still ongoing on the list to determine a form of MODVERSIONS support that upstream will support. In the meantime, this patch stops us from exporting Rust symbols to modules, so we won't accidentally enable support for Rust modules in our kernel before MODVERSIONS is working upstream. This patch does not belong upstream as it is a local placeholder to unblock deployment of the Rust binder driver until an upstream solution can be decided on. Link: https://lore.kernel.org/lkml/CAGSQo005hRiUZdeppCifDqG9zFDJRwahpBLE4x7-MyfJscn7tQ@mail.gmail.com/ Signed-off-by: Matthew Maurer <[email protected]> Bug: 308623792 Change-Id: I6d5a27af73e64eb2b5b922c5ebb825c4e4b5b312
1 parent ba32cf0 commit 4085063

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

init/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,6 @@ config RUST
18851885
bool "Rust support"
18861886
depends on HAVE_RUST
18871887
depends on RUST_IS_AVAILABLE
1888-
depends on !MODVERSIONS
18891888
depends on !GCC_PLUGINS
18901889
depends on !RANDSTRUCT
18911890
depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE

rust/exports.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include <linux/module.h>
1515

16-
#define EXPORT_SYMBOL_RUST_GPL(sym) extern int sym; EXPORT_SYMBOL_GPL(sym)
16+
#define EXPORT_SYMBOL_RUST_GPL(sym)
1717

1818
#include "exports_core_generated.h"
1919
#include "exports_alloc_generated.h"

0 commit comments

Comments
 (0)