Commit 9ddd9baa authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Catalin Marinas

arm64: idreg-override: Create a pseudo feature for rodata=off

Add rodata=off to the set of kernel command line options that is parsed
early using the CPU feature override detection code, so we can easily
refer to it when creating the kernel mapping.
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240214122845.2033971-57-ardb+git@google.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent af73b9a2
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#define ARM64_SW_FEATURE_OVERRIDE_NOKASLR 0 #define ARM64_SW_FEATURE_OVERRIDE_NOKASLR 0
#define ARM64_SW_FEATURE_OVERRIDE_HVHE 4 #define ARM64_SW_FEATURE_OVERRIDE_HVHE 4
#define ARM64_SW_FEATURE_OVERRIDE_RODATA_OFF 8
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
......
...@@ -159,6 +159,7 @@ static const struct ftr_set_desc sw_features __prel64_initconst = { ...@@ -159,6 +159,7 @@ static const struct ftr_set_desc sw_features __prel64_initconst = {
.fields = { .fields = {
FIELD("nokaslr", ARM64_SW_FEATURE_OVERRIDE_NOKASLR, NULL), FIELD("nokaslr", ARM64_SW_FEATURE_OVERRIDE_NOKASLR, NULL),
FIELD("hvhe", ARM64_SW_FEATURE_OVERRIDE_HVHE, hvhe_filter), FIELD("hvhe", ARM64_SW_FEATURE_OVERRIDE_HVHE, hvhe_filter),
FIELD("rodataoff", ARM64_SW_FEATURE_OVERRIDE_RODATA_OFF, NULL),
{} {}
}, },
}; };
...@@ -190,6 +191,7 @@ static const struct { ...@@ -190,6 +191,7 @@ static const struct {
{ "arm64.nomops", "id_aa64isar2.mops=0" }, { "arm64.nomops", "id_aa64isar2.mops=0" },
{ "arm64.nomte", "id_aa64pfr1.mte=0" }, { "arm64.nomte", "id_aa64pfr1.mte=0" },
{ "nokaslr", "arm64_sw.nokaslr=1" }, { "nokaslr", "arm64_sw.nokaslr=1" },
{ "rodata=off", "arm64_sw.rodataoff=1" },
}; };
static int __init parse_hexdigit(const char *p, u64 *v) static int __init parse_hexdigit(const char *p, u64 *v)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment