diff options
author | Marc Zyngier <maz@kernel.org> | 2023-06-09 18:21:46 +0200 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2023-06-13 01:17:23 +0200 |
commit | 0ddc312b7c73049d982d173fee4c5dabf1727ebb (patch) | |
tree | a0ccb7d32815bbbb8d185222eab87ba5058c4e27 /arch/arm64/include/asm/cpufeature.h | |
parent | arm64: Prevent the use of is_kernel_in_hyp_mode() in hypervisor code (diff) | |
download | linux-0ddc312b7c73049d982d173fee4c5dabf1727ebb.tar.xz linux-0ddc312b7c73049d982d173fee4c5dabf1727ebb.zip |
arm64: Turn kaslr_feature_override into a generic SW feature override
Disabling KASLR from the command line is implemented as a feature
override. Repaint it slightly so that it can further be used as
more generic infrastructure for SW override purposes.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20230609162200.2024064-4-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/include/asm/cpufeature.h')
-rw-r--r-- | arch/arm64/include/asm/cpufeature.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index 6bf013fb110d..bc1009890180 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -15,6 +15,8 @@ #define MAX_CPU_FEATURES 128 #define cpu_feature(x) KERNEL_HWCAP_ ## x +#define ARM64_SW_FEATURE_OVERRIDE_NOKASLR 0 + #ifndef __ASSEMBLY__ #include <linux/bug.h> @@ -925,6 +927,8 @@ extern struct arm64_ftr_override id_aa64smfr0_override; extern struct arm64_ftr_override id_aa64isar1_override; extern struct arm64_ftr_override id_aa64isar2_override; +extern struct arm64_ftr_override arm64_sw_feature_override; + u32 get_kvm_ipa_limit(void); void dump_cpu_features(void); |