linux-next: manual merge of the mm-nonmm-unstable tree with the origin tree
From: Mark Brown
Date: Mon Sep 14 2026 - 06:39:52 EST
Hi all,
Today's linux-next merge of the mm-nonmm-unstable tree got a conflict in:
init/main.c
between commit:
7812d6dab0698 ("bootconfig: Fix integer overflow in initrd size check")
from the origin tree and commits:
5271eb8b27ac5 ("bootconfig: fix integer overflow in initrd size check")
aeba8e66e7c7b ("bootconfig: move BOOTCONFIG_FOOTER_SIZE to include/linux/bootconfig.h")
from the mm-nonmm-unstable 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.
diff --combined init/main.c
index 31f2bf54976ab,54bab27e0d8c7..0000000000000
--- a/init/main.c
+++ b/init/main.c
@@@ -278,7 -278,7 +278,7 @@@ static void * __init get_boot_config_fr
int i;
if (!initrd_end || initrd_end < initrd_start ||
- initrd_end - initrd_start < BOOTCONFIG_MAGIC_LEN + 8)
+ initrd_end - initrd_start < BOOTCONFIG_FOOTER_SIZE)
return NULL;
data = (char *)initrd_end - BOOTCONFIG_MAGIC_LEN;
@@@ -548,12 -548,12 +548,12 @@@ static int __init unknown_bootoption(ch
/* Environment option */
unsigned int i;
for (i = 0; envp_init[i]; i++) {
+ if (!strncmp(param, envp_init[i], len+1))
+ break;
if (i == MAX_INIT_ENVS) {
panic_later = "env";
panic_param = param;
}
- if (!strncmp(param, envp_init[i], len+1))
- break;
}
envp_init[i] = param;
} else {
@@@ -581,7 -581,7 +581,7 @@@ static int __init init_setup(char *str
* the shell think it should execute a script with such name.
* So we ignore all arguments entered _before_ init=... [MJ]
*/
- for (i = 1; i < MAX_INIT_ARGS; i++)
+ for (i = 1; i <= MAX_INIT_ARGS; i++)
argv_init[i] = NULL;
return 1;
}
@@@ -594,7 -594,7 +594,7 @@@ static int __init rdinit_setup(char *st
ramdisk_execute_command = str;
ramdisk_execute_command_set = true;
/* See "auto" comment in init_setup */
- for (i = 1; i < MAX_INIT_ARGS; i++)
+ for (i = 1; i <= MAX_INIT_ARGS; i++)
argv_init[i] = NULL;
return 1;
}
@@@ -1349,6 -1349,57 +1349,57 @@@ static inline void do_trace_initcall_le
}
#endif /* !TRACEPOINTS_ENABLED */
+ extern struct initcall_modname __start_initcall_modnames[];
+ extern struct initcall_modname __stop_initcall_modnames[];
+
+ /* module_denylist is a comma-separated list of module names */
+ static char *module_denylist;
+ bool __init_or_module module_is_denylisted(const char *module_name)
+ {
+ const char *p;
+ size_t len;
+
+ if (!module_denylist)
+ return false;
+
+ for (p = module_denylist; *p; p += len) {
+ len = strcspn(p, ",");
+ if (strlen(module_name) == len && parameqn(module_name, p, len))
+ return true;
+ if (p[len] == ',')
+ len++;
+ }
+ return false;
+ }
+ core_param(module_denylist, module_denylist, charp, 0400);
+ core_param(module_blacklist, module_denylist, charp, 0400);
+
+ static const char *__init get_builtin_modname(initcall_t fn)
+ {
+ struct initcall_modname *p;
+
+ for (p = __start_initcall_modnames; p < __stop_initcall_modnames; p++) {
+ if (p->initcall_fn == fn)
+ return p->modname;
+ }
+ return NULL;
+ }
+
+ static void __init do_one_initcall_builtin(initcall_t fn)
+ {
+ const char *modname;
+
+ if (module_denylist) {
+ modname = get_builtin_modname(fn);
+ if (modname && module_is_denylisted(modname)) {
+ pr_info("Skipping initcall for denylisted built-in module %s\n",
+ modname);
+ return;
+ }
+ }
+ do_one_initcall(fn);
+ }
+
int __init_or_module do_one_initcall(initcall_t fn)
{
int count = preempt_count();
@@@ -1421,7 -1472,7 +1472,7 @@@ static void __init do_initcall_level(in
do_trace_initcall_level(initcall_level_names[level]);
for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++)
- do_one_initcall(initcall_from_entry(fn));
+ do_one_initcall_builtin(initcall_from_entry(fn));
}
static void __init do_initcalls(void)
@@@ -1466,7 -1517,7 +1517,7 @@@ static void __init do_pre_smp_initcalls
do_trace_initcall_level("early");
for (fn = __initcall_start; fn < __initcall0_start; fn++)
- do_one_initcall(initcall_from_entry(fn));
+ do_one_initcall_builtin(initcall_from_entry(fn));
}
static int run_init_process(const char *init_filename)
@@@ -1653,7 -1704,7 +1704,7 @@@ static noinline void __init kernel_init
*/
set_mems_allowed(node_states[N_MEMORY]);
- cad_pid = get_pid(task_pid(current));
+ rcu_assign_pointer(cad_pid, get_pid(task_pid(current)));
smp_prepare_cpus(setup_max_cpus);
Attachment:
signature.asc
Description: PGP signature