summaryrefslogtreecommitdiff
path: root/arch/arm64/include
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-02-14 15:28:57 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2024-02-16 15:42:31 +0300
commitaf73b9a2dd39fb458627a325dcdc9c76e274eae0 (patch)
tree58b2965c50d30ca6c877dbabe90dd616bb5a564b /arch/arm64/include
parent35876f35f4821c92fb1bbff7eec5780dba4fffdb (diff)
downloadlinux-af73b9a2dd39fb458627a325dcdc9c76e274eae0.tar.xz
arm64: kaslr: Use feature override instead of parsing the cmdline again
The early kaslr code open codes the detection of 'nokaslr' on the kernel command line, and this is no longer necessary now that the feature detection code, which also looks for the same string, executes before this code. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20240214122845.2033971-56-ardb+git@google.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r--arch/arm64/include/asm/cpufeature.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
index acd8f4949583..e309255b7f04 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -954,6 +954,11 @@ static inline bool arm64_test_sw_feature_override(int feat)
&arm64_sw_feature_override);
}
+static inline bool kaslr_disabled_cmdline(void)
+{
+ return arm64_test_sw_feature_override(ARM64_SW_FEATURE_OVERRIDE_NOKASLR);
+}
+
u32 get_kvm_ipa_limit(void);
void dump_cpu_features(void);