aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec/fix-xen-ssp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/linux-grsec/fix-xen-ssp.patch')
-rw-r--r--main/linux-grsec/fix-xen-ssp.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/main/linux-grsec/fix-xen-ssp.patch b/main/linux-grsec/fix-xen-ssp.patch
new file mode 100644
index 0000000000..ebe352ed19
--- /dev/null
+++ b/main/linux-grsec/fix-xen-ssp.patch
@@ -0,0 +1,36 @@
+diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
+index de1c6d4..25cf7f8 100644
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
+@@ -1566,6 +1566,15 @@ asmlinkage __visible void __init xen_start_kernel(void)
+ */
+ __userpte_alloc_gfp &= ~__GFP_HIGHMEM;
+
++ /* Get mfn list */
++ xen_build_dynamic_phys_to_machine();
++
++ /*
++ * Set up kernel GDT and segment registers, mainly so that
++ * -fstack-protector code can be executed.
++ */
++ xen_setup_gdt(0);
++
+ /* Work out if we support NX */
+ #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
+ if ((cpuid_eax(0x80000000) & 0xffff0000) == 0x80000000 &&
+@@ -1579,15 +1588,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
+ }
+ #endif
+
+- /* Get mfn list */
+- xen_build_dynamic_phys_to_machine();
+-
+- /*
+- * Set up kernel GDT and segment registers, mainly so that
+- * -fstack-protector code can be executed.
+- */
+- xen_setup_gdt(0);
+-
+ xen_init_irq_ops();
+ xen_init_cpuid_mask();
+