Skip to content

Commit

Permalink
arm64: kpti: Use early_param for kpti= command-line option
Browse files Browse the repository at this point in the history
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.

Fixes: ea1e3de ("arm64: entry: Add fake CPU feature for unmapping the kernel at EL0")
Cc: <[email protected]> # 4.16.x-
Reported-by: Wei Xu <[email protected]>
Tested-by: Sudeep Holla <[email protected]>
Tested-by: Wei Xu <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
wildea01 authored and ctmarinas committed Jun 22, 2018
1 parent b154886 commit b5b7dd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/kernel/cpufeature.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5b7dd6

Please sign in to comment.