arm64: kpti: Use early_param for kpti= command-line option
PATCH 1/1 arm64: kpti: Use early_param for kpti= command-line option
We inspect __kpti_forced early on as part of the cpufeature enable callback which remaps the swapper page table using non-global entries.
Ensure that __kpti_forced has been updated to reflect the kpti= command-line option before we start using it.
--- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/cpufeature.c +1 -1
@@ -937,7 +937,7 @@ static int __init parse_kpti(char *str) __kpti_forced = enabled ?1 :-1 ; return 0; } -__setup ("kpti=" , parse_kpti); +early_param ("kpti=" , parse_kpti);#endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */ #ifdef CONFIG_ARM64_HW_AFDBM
Signature · 1 line
2.1.4
Catalin Marinas
maintainerPATCH 1/1 arm64: kpti: Use early_param for kpti= command-line option
Quoted 8 lines · Will Deacon
We inspect
__kpti_forcedearly on as part of the cpufeature enable callback which remaps the swapper page table using non-global entries.Ensure that
__kpti_forcedhas been updated to reflect the kpti= command-line option before we start using it.Reported-by Wei Xu <[email protected]>Signed-off-by Will Deacon <[email protected]>
Does it need a fixes tag?
Signature · 1 line
Catalin
PATCH 1/1 arm64: kpti: Use early_param for kpti= command-line option
Quoted 7 lines · Catalin Marinas
Quoted 6 lines · Will Deacon
We inspect
__kpti_forcedearly on as part of the cpufeature enable callback which remaps the swapper page table using non-global entries.Ensure that
__kpti_forcedhas been updated to reflect the kpti= command-line option before we start using it.
Quoted 6 lines
Quoted 2 lines
Reported-by Wei Xu <[email protected]>Signed-off-by Will Deacon <[email protected]>Does it need a fixes tag?
Fixes ea1e3de85e94 ("arm64: entry: Add fake CPU feature for unmapping the kernel at EL0")
Perhaps, but really this is just a performance optimisation for the kpti=off case where we don't actually need to put the nG mappings down.
Will
PATCH 1/1 arm64: kpti: Use early_param for kpti= command-line option
In reply to Will DeaconHi Will,
Quoted 17 lines · Will Deacon
We inspect
__kpti_forcedearly on as part of the cpufeature enable callback which remaps the swapper page table using non-global entries.Ensure that
__kpti_forcedhas been updated to reflect the kpti= command-line option before we start using it.Reported-by Wei Xu <[email protected]>Signed-off-by Will Deacon <[email protected]>--- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/kernel/cpufeature.c +0
-0
arch/arm64/kernel/cpufeature.c static int __init parse_kpti(char *str) · line 940
Quoted 5 lines
arch/arm64/kernel/cpufeature.c +1
-1@@ -937,7 +937,7 @@ static int __init parse_kpti(char *str) __kpti_forced = enabled ?1 :-1 ;return 0 ; } -__setup ("kpti=" , parse_kpti); +early_param ("kpti=" , parse_kpti);
%s/kpti=/kpti
Thanks!
Best Regards,
Wei
Quoted 4 lines
arch/arm64/kernel/cpufeature.c +0
-0#endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */ #ifdef CONFIG_ARM64_HW_AFDBM