diff options
Diffstat (limited to 'init')
| -rw-r--r-- | init/Kconfig | 47 | ||||
| -rw-r--r-- | init/init_task.c | 1 | ||||
| -rw-r--r-- | init/initramfs.c | 9 | ||||
| -rw-r--r-- | init/main.c | 13 |
4 files changed, 44 insertions, 26 deletions
diff --git a/init/Kconfig b/init/Kconfig index 444ce811ea67..2937c4d308ae 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -82,6 +82,21 @@ config RUSTC_LLVM_VERSION int default $(rustc-llvm-version) +config RUSTC_LLVM_MAJOR_VERSION + int + default $(shell,expr $(rustc-llvm-version) / 10000) + +config RUSTC_CLANG_LLVM_COMPATIBLE + bool + default y if CC_IS_CLANG && RUSTC_LLVM_MAJOR_VERSION = $(shell,expr $(cc-version) / 10000) + help + This indicates whether Rust and Clang use LLVM of the same major + version. + + Operations involving handling LLVM IR or bitcode (e.g. cross-language + LTO) require the same LLVM major version to work properly. For best + compatibility it is recommended that the exact same LLVM is used. + config ARCH_HAS_CC_CAN_LINK bool @@ -146,7 +161,7 @@ config CC_HAS_COUNTED_BY config CC_HAS_COUNTED_BY_PTR bool # supported since clang 22 - default y if CC_IS_CLANG && CLANG_VERSION >= 220000 + default y if CC_IS_CLANG && CLANG_VERSION >= 220100 # supported since gcc 16.0.0 default y if CC_IS_GCC && GCC_VERSION >= 160000 @@ -163,12 +178,6 @@ config LD_CAN_USE_KEEP_IN_OVERLAY # https://github.com/llvm/llvm-project/pull/130661 def_bool LD_IS_BFD || LLD_VERSION >= 210000 -config RUSTC_HAS_SLICE_AS_FLATTENED - def_bool RUSTC_VERSION >= 108000 - -config RUSTC_HAS_COERCE_POINTEE - def_bool RUSTC_VERSION >= 108400 - config RUSTC_HAS_SPAN_FILE def_bool RUSTC_VERSION >= 108800 @@ -960,6 +969,11 @@ config CC_IMPLICIT_FALLTHROUGH default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5) default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough) +config CC_MS_EXTENSIONS + string + default "-fms-anonymous-structs" if $(cc-option,-fms-anonymous-structs) + default "-fms-extensions" + # Currently, disable gcc-10+ array-bounds globally. # It's still broken in gcc-13, so no upper bound yet. config GCC10_NO_ARRAY_BOUNDS @@ -997,7 +1011,7 @@ config NUMA_BALANCING bool "Memory placement aware NUMA scheduler" depends on ARCH_SUPPORTS_NUMA_BALANCING depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY - depends on SMP && NUMA && MIGRATION && !PREEMPT_RT + depends on SMP && NUMA_MIGRATION && !PREEMPT_RT help This option adds support for automatic NUMA aware memory/task placement. The mechanism is quite primitive and is based on migrating memory when @@ -1176,6 +1190,10 @@ config EXT_GROUP_SCHED endif #CGROUP_SCHED +config EXT_SUB_SCHED + def_bool y + depends on SCHED_CLASS_EXT && CGROUPS + config SCHED_MM_CID def_bool y depends on SMP && RSEQ @@ -1386,12 +1404,14 @@ config UTS_NS config TIME_NS bool "TIME namespace" - depends on GENERIC_GETTIMEOFDAY default y help In this namespace boottime and monotonic clocks can be set. The time will keep going with the same pace. +config TIME_NS_VDSO + def_bool TIME_NS && GENERIC_GETTIMEOFDAY + config IPC_NS bool "IPC namespace" depends on (SYSVIPC || POSIX_MQUEUE) @@ -2178,9 +2198,7 @@ config RUST depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO) depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC select CFI_ICALL_NORMALIZE_INTEGERS if CFI - depends on !CALL_PADDING || RUSTC_VERSION >= 108100 depends on !KASAN_SW_TAGS - depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300 help Enables Rust support in the kernel. @@ -2204,12 +2222,7 @@ config RUSTC_VERSION_TEXT config BINDGEN_VERSION_TEXT string depends on RUST - # The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0 - # (https://github.com/rust-lang/rust-bindgen/pull/2678) and 0.71.0 - # (https://github.com/rust-lang/rust-bindgen/pull/3040). It can be removed - # when the minimum version is upgraded past the latter (0.69.1 and 0.71.1 - # both fixed the issue). - default "$(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null)" + default "$(shell,$(BINDGEN) --version 2>/dev/null)" # # Place an empty function call at each tracepoint site. Can be diff --git a/init/init_task.c b/init/init_task.c index 5c838757fc10..b5f48ebdc2b6 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -169,6 +169,7 @@ struct task_struct init_task __aligned(L1_CACHE_BYTES) = { .journal_info = NULL, INIT_CPU_TIMERS(init_task) .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(init_task.pi_lock), + .blocked_lock = __RAW_SPIN_LOCK_UNLOCKED(init_task.blocked_lock), .timer_slack_ns = 50000, /* 50 usec default slack */ .thread_pid = &init_struct_pid, .thread_node = LIST_HEAD_INIT(init_signals.thread_head), diff --git a/init/initramfs.c b/init/initramfs.c index 139baed06589..58db15fb18fd 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -212,7 +212,7 @@ static void __init parse_header(char *s) hdr_csum = parsed[12]; } -/* FSM */ +/* Finite-state machine */ static __initdata enum state { Start, @@ -652,13 +652,6 @@ disable: void __weak __init free_initrd_mem(unsigned long start, unsigned long end) { -#ifdef CONFIG_ARCH_KEEP_MEMBLOCK - unsigned long aligned_start = ALIGN_DOWN(start, PAGE_SIZE); - unsigned long aligned_end = ALIGN(end, PAGE_SIZE); - - memblock_free((void *)aligned_start, aligned_end - aligned_start); -#endif - free_reserved_area((void *)start, (void *)end, POISON_FREE_INITMEM, "initrd"); } diff --git a/init/main.c b/init/main.c index 1cb395dd94e4..96f93bb06c49 100644 --- a/init/main.c +++ b/init/main.c @@ -36,6 +36,7 @@ #include <linux/kmod.h> #include <linux/kprobes.h> #include <linux/kmsan.h> +#include <linux/ksysfs.h> #include <linux/vmalloc.h> #include <linux/kernel_stat.h> #include <linux/start_kernel.h> @@ -105,6 +106,7 @@ #include <linux/ptdump.h> #include <linux/time_namespace.h> #include <linux/unaligned.h> +#include <linux/vdso_datastore.h> #include <net/net_namespace.h> #include <asm/io.h> @@ -833,7 +835,14 @@ static inline void initcall_debug_enable(void) #ifdef CONFIG_RANDOMIZE_KSTACK_OFFSET DEFINE_STATIC_KEY_MAYBE_RO(CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT, randomize_kstack_offset); -DEFINE_PER_CPU(u32, kstack_offset); +DEFINE_PER_CPU(struct rnd_state, kstack_rnd_state); + +static int __init random_kstack_init(void) +{ + prandom_seed_full_state(&kstack_rnd_state); + return 0; +} +late_initcall(random_kstack_init); static int __init early_randomize_kstack_offset(char *buf) { @@ -1119,6 +1128,7 @@ void start_kernel(void) srcu_init(); hrtimers_init(); softirq_init(); + vdso_setup_data_pages(); timekeeping_init(); time_init(); @@ -1473,6 +1483,7 @@ static void __init do_initcalls(void) static void __init do_basic_setup(void) { cpuset_init_smp(); + ksysfs_init(); driver_init(); init_irq_proc(); do_ctors(); |
