diff options
Diffstat (limited to 'grsec_arch.patch')
-rw-r--r-- | grsec_arch.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/grsec_arch.patch b/grsec_arch.patch new file mode 100644 index 000000000000..323e44fd02fa --- /dev/null +++ b/grsec_arch.patch @@ -0,0 +1,77 @@ +diff -uNr 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c +--- 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-12-19 21:14:13.251002548 +0100 ++++ 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-12-19 21:36:27.703783498 +0100 +@@ -6465,11 +6465,21 @@ + + if(static_cpu_has(X86_FEATURE_XSAVE)) { + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) ++#ifdef CONFIG_GRKERNSEC ++ copy_xregs_to_kernel(&fpu->state->xsave); ++ if (!(fpu->state->xsave.header.xfeatures & XFEATURE_MASK_FP)) ++#else + copy_xregs_to_kernel(&fpu->state.xsave); + if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP)) ++#endif + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) ++#ifdef CONFIG_GRKERNSEC ++ copy_xregs_to_kernel(&fpu->state->xsave); ++ if (!(fpu->state->xsave.header.xfeatures & XSTATE_FP)) ++#else + copy_xregs_to_kernel(&fpu->state.xsave); + if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP)) ++#endif + #else + fpu_xsave(fpu); + if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP)) +@@ -6486,8 +6496,12 @@ + #if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) + : [fx] "=m" (fpu->state->fsave)); + #else ++#ifdef CONFIG_GRKERNSEC ++ : [fx] "=m" (fpu->state->fsave)); ++#else + : [fx] "=m" (fpu->state.fsave)); + #endif ++#endif + return 0; + } + +diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_acpi.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_acpi.c +--- 15.12/common/lib/modules/fglrx//build_mod/kcl_acpi.c 2015-12-19 21:14:13.247669219 +0100 ++++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_acpi.c 2015-12-19 21:10:27.224899708 +0100 +@@ -145,7 +145,11 @@ + return NOTIFY_OK; + } + ++#ifdef CONFIG_GRKERNSEC ++static notifier_block_no_const firegl_acpi_lid_notifier = { ++#else + static struct notifier_block firegl_acpi_lid_notifier = { ++#endif + .notifier_call = firegl_acpi_lid_event, + }; + #endif +@@ -400,7 +404,11 @@ + KCL_DEBUG_ERROR ("Could not allocate enough memory for video notifier_block\n"); + return -ENOMEM; + } ++#ifdef CONFIG_GRKERNSEC ++ ((notifier_block_no_const*)(*nb))->notifier_call = firegl_acpi_video_event; ++#else + ((struct notifier_block*)(*nb))->notifier_call = firegl_acpi_video_event; ++#endif + return register_acpi_notifier((struct notifier_block*)(*nb)); + } + +@@ -413,7 +421,11 @@ + KCL_DEBUG_ERROR ("Could not allocate enough memory for ac notifier_block\n"); + return -ENOMEM; + } ++#ifdef CONFIG_GRKERNSEC ++ ((notifier_block_no_const*)(*nb))->notifier_call = firegl_acpi_ac_event; ++#else + ((struct notifier_block*)(*nb))->notifier_call = firegl_acpi_ac_event; ++#endif + return register_acpi_notifier((struct notifier_block*)(*nb)); + } + |