David Kaplan
b53c6bd5d2
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
2024-04-24 14:30:21 +02:00
..
2024-03-13 11:54:05 -07:00
2024-04-11 10:30:33 +02:00
2024-04-24 14:05:25 +02:00
2024-03-24 04:03:54 +01:00
2024-03-22 11:40:56 +01:00
2024-03-14 17:43:30 -07:00
2024-01-03 11:46:22 +01:00
2024-02-15 22:07:37 +01:00
2023-12-01 15:00:43 -06:00
2024-02-21 19:38:03 +01:00
2022-10-17 16:41:06 +02:00
2024-01-10 10:52:28 +01:00
2023-08-30 10:11:16 +02:00
2024-04-01 20:37:56 -07:00
2023-08-17 17:07:09 +02:00
2023-12-15 16:25:55 -08:00
2023-08-05 08:31:41 +02:00
2022-04-29 14:37:59 -07:00
2022-11-25 13:01:55 -05:00
2024-03-11 19:23:16 -07:00
2024-03-15 12:37:59 -07:00
2023-05-18 11:56:18 -07:00
2022-10-17 16:41:05 +02:00
2022-10-17 16:41:05 +02:00
2024-01-10 10:52:28 +01:00
2024-03-22 10:07:45 +01:00
2022-08-29 12:19:25 +02:00
2023-12-01 15:00:43 -06:00
2024-03-26 15:22:35 +01:00
2024-01-31 22:01:51 +01:00
2024-01-31 22:03:32 +01:00
2023-10-03 10:38:07 +02:00
2023-10-03 10:38:07 +02:00
2024-01-10 10:52:28 +01:00
2023-10-18 22:15:01 +02:00
2024-03-24 05:00:36 +01:00
2024-01-10 10:52:28 +01:00
2024-03-12 09:55:57 +01:00
2024-02-25 18:53:08 +01:00
2023-01-31 20:09:26 +01:00
2023-10-27 20:36:49 +02:00
2023-08-17 17:07:09 +02:00
2024-03-15 13:03:13 -07:00
2022-10-17 16:41:05 +02:00
2022-10-17 16:41:05 +02:00
2023-08-09 12:00:55 -07:00
2024-02-08 08:45:35 -05:00
2023-10-03 10:38:07 +02:00
2024-01-31 22:03:36 +01:00
2023-10-10 15:22:02 -07:00
2024-02-15 22:07:42 +01:00
2022-06-24 09:48:55 +02:00
2024-03-14 17:43:30 -07:00
2023-09-24 11:00:13 +02:00
2024-03-18 19:03:42 -04:00
2024-02-07 17:05:21 +01:00
2024-01-10 10:52:28 +01:00
2024-02-23 17:48:23 -08:00
2024-03-14 17:43:30 -07:00
2023-12-10 23:33:09 +01:00
2024-03-23 12:41:48 +01:00
2023-08-05 08:31:42 +02:00
2023-08-09 12:00:55 -07:00
2024-03-26 10:07:59 +01:00
2023-12-10 23:34:37 +01:00
2023-07-31 17:54:27 +02:00
2023-05-18 11:56:18 -07:00
2022-06-20 18:01:16 +02:00
2024-03-26 15:22:35 +01:00
2023-10-20 11:24:22 +02:00
2024-04-24 14:30:21 +02:00
2024-03-11 19:53:15 -07:00
2023-08-02 15:01:51 -07:00
2023-06-05 09:57:20 +02:00
2024-02-23 17:48:23 -08:00
2022-07-09 13:12:32 +02:00
2023-03-23 23:18:58 +01:00
2022-12-10 10:33:11 -06:00
2022-03-28 19:38:51 -07:00
2023-12-17 22:33:55 +01:00
2023-12-20 10:57:51 +01:00
2024-04-04 10:40:19 +02:00
2024-03-01 12:47:37 +01:00
2024-04-22 18:38:28 +02:00
2024-04-04 10:40:30 +02:00
2023-09-19 09:18:34 -07:00
2023-08-02 15:01:50 -07:00
2023-11-08 08:55:37 -08:00
2023-12-27 11:49:56 -05:00
2024-03-14 17:43:30 -07:00
2024-03-23 12:22:04 +01:00
2024-01-10 10:52:29 +01:00
2024-03-04 12:01:39 +01:00
2024-02-27 00:23:55 +01:00
2022-09-26 19:46:16 -07:00
2023-01-12 13:06:36 +01:00
2023-12-06 12:41:49 +09:00
2022-05-26 22:03:52 -04:00
2024-03-11 19:53:15 -07:00
2023-10-27 20:36:57 +02:00
2024-02-07 17:05:21 +01:00
2022-10-03 14:03:25 -07:00
2023-09-21 08:41:23 +02:00
2022-12-05 11:55:18 +01:00
2022-04-14 14:09:43 +02:00
2024-02-23 17:48:22 -08:00
2024-02-23 17:48:22 -08:00
2024-02-14 10:49:37 +01:00
2024-02-15 22:07:38 +01:00
2024-03-26 15:22:35 +01:00