linux-next: manual merge of the sysctl tree with the modules tree
Hi all,
Today's linux-next merge of the sysctl tree got a conflict in:
include/linux/module.h
between commits:
6633d3a45a8c ("module: move 'struct module_use' to internal.h") a55842991352 ("module: make structure definitions always visible")
from the modules tree and commit:
6bb37af62634 ("module: Move modprobe_path and modules_disabled ctl_tables into the module subsys")
from the sysctl tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 25 lines
Cheers,
Stephen Rothwell
diff --cc include/linux/module.h
index 3b665cb0cabe,e93cdb92ad92..000000000000
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@@ -584,17 -608,6 +584,16 @@@ struct module
#define MODULE_ARCH_INIT {}
#endif
+#ifdef CONFIG_MODULES
+
- extern int modules_disabled; /* for sysctl */
+/* Get/put a kernel symbol (calls must be symmetric) */
+void *__symbol_get(const char *symbol);
+void *__symbol_get_gpl(const char *symbol);
+#define symbol_get(x) ({ \
+ static const char __notrim[] \
+ __used __section(".no_trim_symbol") = __stringify(x); \
+ (typeof(&x))(__symbol_get(__stringify(x))); })
+
#ifndef HAVE_ARCH_KALLSYMS_SYMBOL_VALUE
static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym)
{Quoted 15 lines · Stephen Rothwell
Hi all,
Today's linux-next merge of the sysctl tree got a conflict in:
include/linux/module.hbetween commits:
6633d3a45a8c("module: move 'structmodule_use' tointernal.h")a55842991352("module: make structure definitions always visible")from the modules tree and commit:
6bb37af62634("module: Movemodprobe_pathandmodules_disabledctl_tablesinto the module subsys")
Quoted 8 lines
from the sysctl tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Quickly reviewed this with Daniel Gomez <[email protected]> one of the modules maintainers and this solution is the correct one.
Best
Quoted 27 lines
Signature · 3 lines
-- Cheers, Stephen Rothwellinclude/linux/module.h +0
-1@@@ -584,17 -608,6 +584,16 @@@ struct module#define MODULE_ARCH_INIT {}#endif +#ifdef CONFIG_MODULES + - extern int modules_disabled; /* for sysctl */ +/* Get/put a kernel symbol (calls must be symmetric) */ +void *__symbol_get(const char *symbol); +void *__symbol_get_gpl(const char *symbol); +#define symbol_get(x) ({ \ + static const char __notrim[] \ + __used __section(".no_trim_symbol") = __stringify(x); \ + (typeof(&x))(__symbol_get(__stringify(x))); }) + #ifndef HAVE_ARCH_KALLSYMS_SYMBOL_VALUE static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym) {
Signature · 1 line
Joel Granados
Hi all,
Quoted 36 lines · On Mon, 14 Jul 2025 17:59:16 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the sysctl tree got a conflict in:
include/linux/module.hbetween commits:
6633d3a45a8c("module: move 'structmodule_use' tointernal.h")a55842991352("module: make structure definitions always visible")from the modules tree and commit:
6bb37af62634("module: Movemodprobe_pathandmodules_disabledctl_tablesinto the module subsys")from the sysctl tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
include/linux/module.h +0
-1@@@ -584,17 -608,6 +584,16 @@@ struct module#define MODULE_ARCH_INIT {}#endif +#ifdef CONFIG_MODULES + - extern int modules_disabled; /* for sysctl */ +/* Get/put a kernel symbol (calls must be symmetric) */
include/linux/module.h
Quoted 10 lines
include/linux/module.h +0
-0+void *__symbol_get(const char *symbol); +void *__symbol_get_gpl(const char *symbol); +#define symbol_get(x) ({ \ + static const char __notrim[] \ + __used __section(".no_trim_symbol") = __stringify(x); \ + (typeof(&x))(__symbol_get(__stringify(x))); }) +#ifndef HAVE_ARCH_KALLSYMS_SYMBOL_VALUE static inline unsigned long kallsyms_symbol_value (const Elf_Sym *sym) {
This is now a conflict between the modules tree and Linus' tree.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 35 lines · Stephen Rothwell
Hi all,
Quoted 32 lines · On Mon, 14 Jul 2025 17:59:16 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the sysctl tree got a conflict in:
include/linux/module.hbetween commits:
6633d3a45a8c("module: move 'structmodule_use' tointernal.h")a55842991352("module: make structure definitions always visible")from the modules tree and commit:
6bb37af62634("module: Movemodprobe_pathandmodules_disabledctl_tablesinto the module subsys")from the sysctl tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
include/linux/module.h +0
-0@@@ -584,17 -608,6 +584,16 @@@ struct module#define MODULE_ARCH_INIT {}#endif
Quoted 16 lines
Quoted 6 lines
+#ifdef
CONFIG_MODULES
+
- extern intmodules_disabled; /* for sysctl */ +/* Get/put a kernel symbol (calls must be symmetric) */ +void *__symbol_get(const char *symbol);
+void *__symbol_get_gpl(const char *symbol);Quoted 8 lines
+#define
symbol_get(x)({ \
+ static const char __notrim[] \
+__used__section(".no_trim_symbol")=__stringify(x); \
+ (typeof(&x))(__symbol_get(__stringify(x))); })
+
#ifndefHAVE_ARCH_KALLSYMS_SYMBOL_VALUE
static inline unsigned longkallsyms_symbol_value(const Elf_Sym *sym){This is now a conflict between the modules tree and Linus' tree.
Thanks for the heads-up.
modules tree is now rebased on top of Linus's tree with the conflict solved.
Quoted 4 lines · Stephen Rothwell
Hi all,
Quoted 1 line · On Mon, 14 Jul 2025 17:59:16 +1000 Stephen Rothwell <[email protected]>…
...
Quoted 9 lines
Quoted 9 lines
include/linux/module.h +0
-0@@@ -584,17 -608,6 +584,16 @@@ struct module#define MODULE_ARCH_INIT {}#endif
Quoted 16 lines
Quoted 6 lines
+#ifdef
CONFIG_MODULES
+
- extern intmodules_disabled; /* for sysctl */ +/* Get/put a kernel symbol (calls must be symmetric) */ +void *__symbol_get(const char *symbol);
+void *__symbol_get_gpl(const char *symbol);Quoted 8 lines
+#define
symbol_get(x)({ \
+ static const char __notrim[] \
+__used__section(".no_trim_symbol")=__stringify(x); \
+ (typeof(&x))(__symbol_get(__stringify(x))); })
+
#ifndefHAVE_ARCH_KALLSYMS_SYMBOL_VALUE
static inline unsigned longkallsyms_symbol_value(const Elf_Sym *sym){This is now a conflict between the modules tree and Linus' tree.
That makes sense. The sysctl PR was merged at the end of July. It should be fixed in the same way as described in this thread. @Daniel: Ping me if you need any feedback from my part.
Best
Signature · 1 line
Joel Granados