We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a44ca8f commit b7c21bcCopy full SHA for b7c21bc
arch/x86/mm/pti.c
@@ -421,6 +421,16 @@ static inline bool pti_kernel_image_global_ok(void)
421
if (boot_cpu_has(X86_FEATURE_K8))
422
return false;
423
424
+ /*
425
+ * RANDSTRUCT derives its hardening benefits from the
426
+ * attacker's lack of knowledge about the layout of kernel
427
+ * data structures. Keep the kernel image non-global in
428
+ * cases where RANDSTRUCT is in use to help keep the layout a
429
+ * secret.
430
+ */
431
+ if (IS_ENABLED(CONFIG_GCC_PLUGIN_RANDSTRUCT))
432
+ return false;
433
+
434
return true;
435
}
436
0 commit comments