diff options
author | Will Deacon <[email protected]> | 2023-11-17 13:14:22 +0000 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2023-11-22 18:46:05 +0000 |
commit | acfa60dbe03802d6afd28401aa47801270e82021 (patch) | |
tree | 91d247bcb84bfbe50b1816d95d13bd82a1985e46 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) |
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: 2e8cff0a0eee ("arm64: fix rodata=full")
Cc: Ard Biesheuvel <[email protected]>
Cc: Mark Rutland <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Reviewed-by: "Russell King (Oracle)" <[email protected]>
Reviewed-by: Ard Biesheuvel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions