File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 26
26
#include <linux/pgtable.h>
27
27
#include <linux/stackprotector.h>
28
28
#include <linux/utsname.h>
29
+ #include <linux/acpi.h>
29
30
30
31
#include <asm/alternative.h>
31
32
#include <asm/cmdline.h>
@@ -516,6 +517,21 @@ static bool pku_disabled;
516
517
517
518
static __always_inline void setup_pku (struct cpuinfo_x86 * c )
518
519
{
520
+ /*
521
+ * OSPKE seems broken on Apple Virtualization.
522
+ * https://lore.kernel.org/regressions/CAG8fp8QvH71Wi_y7b7tgFp7knK38rfrF7rRHh-gFKqeS0gxY6Q@mail.gmail.com/T/#u
523
+ *
524
+ * TODO: conditionally enable pku depending on the DMI BIOS version when Apple
525
+ * fixes the issue.
526
+ *
527
+ * However, this would be still not enough because DMI is missing when vmlinuz
528
+ * is directly loaded into VM.
529
+ */
530
+ if (!memcmp (acpi_gbl_FADT .header .oem_table_id , "Apple Vz" , 8 )) {
531
+ pr_info ("pku: disabled on Apple Virtualization platform (Intel) due to a bug\n" );
532
+ pku_disabled = true;
533
+ }
534
+
519
535
if (c == & boot_cpu_data ) {
520
536
if (pku_disabled || !cpu_feature_enabled (X86_FEATURE_PKU ))
521
537
return ;
You can’t perform that action at this time.
0 commit comments