linux/arch/arm64/mm
Will Deacon acfa60dbe0 arm64: mm: Fix "rodata=on" when CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
When CONFIG_RODATA_FULL_DEFAULT_ENABLED=y, passing "rodata=on" on the
kernel command-line (rather than "rodata=full") should turn off the
"full" behaviour, leaving writable linear aliases of read-only kernel
memory. Unfortunately, the option has no effect in this situation and
the only way to disable the "rodata=full" behaviour is to disable rodata
protection entirely by passing "rodata=off".

Fix this by parsing the "on" and "off" options in the arch code,
additionally enforcing that 'rodata_full' cannot be set without also
setting 'rodata_enabled', allowing us to simplify a couple of checks
in the process.

Fixes: 2e8cff0a0e ("arm64: fix rodata=full")
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20231117131422.29663-1-will@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-11-22 18:46:05 +00:00
..
cache.S
context.c arm64/mm: remove now-superfluous ISBs from TTBR writes 2023-06-15 17:47:54 +01:00
copypage.c
dma-mapping.c
extable.c
fault.c arm64: Avoid cpus_have_const_cap() for ARM64_HAS_EPAN 2023-10-16 14:17:04 +01:00
fixmap.c
flush.c arm64: implement the new page table range API 2023-08-24 16:20:20 -07:00
hugetlbpage.c arm64 updates for 6.7: 2023-11-01 09:34:55 -10:00
init.c As usual, lots of singleton and doubleton patches all over the tree and 2023-11-02 20:53:31 -10:00
ioremap.c arm64 : mm: add wrapper function ioremap_prot() 2023-08-18 10:12:36 -07:00
kasan_init.c arm64, kasan: update comment in kasan_init 2023-10-18 14:34:15 -07:00
Makefile
mmap.c arm64: Avoid cpus_have_const_cap() for ARM64_HAS_EPAN 2023-10-16 14:17:04 +01:00
mmu.c arm64: Avoid cpus_have_const_cap() for ARM64_WORKAROUND_2645198 2023-10-16 14:17:07 +01:00
mteswap.c mm/swap: stop using page->private on tail pages for THP_SWAP 2023-08-24 16:20:28 -07:00
pageattr.c arm64: mm: Fix "rodata=on" when CONFIG_RODATA_FULL_DEFAULT_ENABLED=y 2023-11-22 18:46:05 +00:00
pgd.c
physaddr.c
proc.S arm64: Use a positive cpucap for FP/SIMD 2023-10-16 14:17:03 +01:00
ptdump_debugfs.c
ptdump.c
trans_pgd-asm.S
trans_pgd.c Add x86 shadow stack support 2023-08-31 12:20:12 -07:00