Merge branch 'riscv-wx-mappings' into for-next
authorPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 1 Jul 2021 04:50:32 +0000 (21:50 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 1 Jul 2021 04:50:32 +0000 (21:50 -0700)
This contains both the short-term fix for the W+X boot mappings and the
larger cleanup.

* riscv-wx-mappings:
  riscv: Map the kernel with correct permissions the first time
  riscv: Introduce set_kernel_memory helper
  riscv: Simplify xip and !xip kernel address conversion macros
  riscv: Remove CONFIG_PHYS_RAM_BASE_FIXED
  riscv: mm: Fix W+X mappings at boot

1  2 
arch/riscv/Kconfig
arch/riscv/include/asm/page.h
arch/riscv/include/asm/pgtable.h
arch/riscv/kernel/setup.c
arch/riscv/mm/init.c

Simple merge
Simple merge
Simple merge
@@@ -289,11 -291,10 +289,6 @@@ void __init setup_arch(char **cmdline_p
        init_resources();
        sbi_init();
  
-       if (IS_ENABLED(CONFIG_STRICT_KERNEL_RWX)) {
-               protect_kernel_text_data();
-               protect_kernel_linear_mapping_text_rodata();
-       }
 -#ifdef CONFIG_SWIOTLB
 -      swiotlb_init(1);
 -#endif
--
  #ifdef CONFIG_KASAN
        kasan_init();
  #endif
Simple merge