linux-stable/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 arm64: Also reset KASAN tag if page is not PG_mte_tagged 2023-05-16 14:58:54 +01:00
dma-mapping.c Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"" 2023-03-30 16:23:03 +01:00
extable.c
fault.c arm64: Avoid cpus_have_const_cap() for ARM64_HAS_EPAN 2023-10-16 14:17:04 +01:00
fixmap.c arm64: mm: always map fixmap at page granularity 2023-04-11 18:55:28 +01:00
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 arm64: mm: move fixmap code to its own file 2023-04-11 18:55:28 +01:00
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.c arm64: add FIXADDR_TOT_{START,SIZE} 2023-04-11 18:55:28 +01:00
ptdump_debugfs.c
trans_pgd-asm.S
trans_pgd.c Add x86 shadow stack support 2023-08-31 12:20:12 -07:00