]> Git Repo - J-linux.git/commitdiff
Merge tag 'modules-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof...
authorLinus Torvalds <[email protected]>
Wed, 13 Mar 2024 19:40:58 +0000 (12:40 -0700)
committerLinus Torvalds <[email protected]>
Wed, 13 Mar 2024 19:40:58 +0000 (12:40 -0700)
Pull modules updates from Luis Chamberlain:
 "Christophe Leroy did most of the work on this release, first with a
  few cleanups on CONFIG_STRICT_KERNEL_RWX and ending with error
  handling for when set_memory_XX() can fail.

  This is part of a larger effort to clean up all these callers which
  can fail, modules is just part of it"

* tag 'modules-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
  module: Don't ignore errors from set_memory_XX()
  lib/test_kmod: fix kernel-doc warnings
  powerpc: Simplify strict_kernel_rwx_enabled()
  modules: Remove #ifdef CONFIG_STRICT_MODULE_RWX around rodata_enabled
  init: Declare rodata_enabled and mark_rodata_ro() at all time
  module: Change module_enable_{nx/x/ro}() to more explicit names
  module: Use set_memory_rox()

1  2 
init/main.c

diff --combined init/main.c
index 7dce08198b13352357a1262138c71460da1cb584,807df08c501ff1b4fbab0f74eb8e77c6df90459a..d002f30f7f24c99e124149cea43f613c15818fbe
@@@ -99,7 -99,6 +99,7 @@@
  #include <linux/init_syscalls.h>
  #include <linux/stackdepot.h>
  #include <linux/randomize_kstack.h>
 +#include <linux/pidfs.h>
  #include <net/net_namespace.h>
  
  #include <asm/io.h>
@@@ -604,6 -603,7 +604,6 @@@ static int __init rdinit_setup(char *st
  __setup("rdinit=", rdinit_setup);
  
  #ifndef CONFIG_SMP
 -static const unsigned int setup_max_cpus = NR_CPUS;
  static inline void setup_nr_cpu_ids(void) { }
  static inline void smp_prepare_cpus(unsigned int maxcpus) { }
  #endif
@@@ -776,10 -776,6 +776,10 @@@ void __init __weak smp_setup_processor_
  {
  }
  
 +void __init __weak smp_prepare_boot_cpu(void)
 +{
 +}
 +
  # if THREAD_SIZE >= PAGE_SIZE
  void __init __weak thread_stack_cache_init(void)
  {
@@@ -1063,7 -1059,6 +1063,7 @@@ void start_kernel(void
        seq_file_init();
        proc_root_init();
        nsfs_init();
 +      pidfs_init();
        cpuset_init();
        cgroup_init();
        taskstats_init_early();
@@@ -1401,10 -1396,9 +1401,9 @@@ static int __init set_debug_rodata(cha
  early_param("rodata", set_debug_rodata);
  #endif
  
- #ifdef CONFIG_STRICT_KERNEL_RWX
  static void mark_readonly(void)
  {
-       if (rodata_enabled) {
+       if (IS_ENABLED(CONFIG_STRICT_KERNEL_RWX) && rodata_enabled) {
                /*
                 * load_module() results in W+X mappings, which are cleaned
                 * up with call_rcu().  Let's make sure that queued work is
                rcu_barrier();
                mark_rodata_ro();
                rodata_test();
-       } else
+       } else if (IS_ENABLED(CONFIG_STRICT_KERNEL_RWX)) {
                pr_info("Kernel memory protection disabled.\n");
+       } else if (IS_ENABLED(CONFIG_ARCH_HAS_STRICT_KERNEL_RWX)) {
+               pr_warn("Kernel memory protection not selected by kernel config.\n");
+       } else {
+               pr_warn("This architecture does not have kernel memory protection.\n");
+       }
  }
- #elif defined(CONFIG_ARCH_HAS_STRICT_KERNEL_RWX)
- static inline void mark_readonly(void)
- {
-       pr_warn("Kernel memory protection not selected by kernel config.\n");
- }
- #else
- static inline void mark_readonly(void)
- {
-       pr_warn("This architecture does not have kernel memory protection.\n");
- }
- #endif
  
  void __weak free_initmem(void)
  {
@@@ -1550,7 -1538,6 +1543,7 @@@ static noinline void __init kernel_init
        sched_init_smp();
  
        workqueue_init_topology();
 +      async_init();
        padata_init();
        page_alloc_init_late();
  
This page took 0.060395 seconds and 4 git commands to generate.