diff options
author | David Kaplan <david.kaplan@amd.com> | 2024-04-21 21:17:28 +0200 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2024-04-24 14:30:21 +0200 |
commit | b53c6bd5d271d023857174b8fd3e32f98ae51372 (patch) | |
tree | eeafd7ae6d4e509710ad73bca78776bc62c7fb47 /tools/perf/scripts/python/sched-migration.py | |
parent | 2718a7fdf292b2dcb49c856fa8a6a955ebbbc45f (diff) |
x86/cpu: Fix check for RDPKRU in __show_regs()
cpu_feature_enabled(X86_FEATURE_OSPKE) does not necessarily reflect
whether CR4.PKE is set on the CPU. In particular, they may differ on
non-BSP CPUs before setup_pku() is executed. In this scenario, RDPKRU
will #UD causing the system to hang.
Fix by checking CR4 for PKE enablement which is always correct for the
current CPU.
The scenario happens by inserting a WARN* before setup_pku() in
identiy_cpu() or some other diagnostic which would lead to calling
__show_regs().
[ bp: Massage commit message. ]
Signed-off-by: David Kaplan <david.kaplan@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20240421191728.32239-1-bp@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions