summarylogtreecommitdiffstats
path: root/grsec_arch.patch
diff options
context:
space:
mode:
authorVi0L02015-12-23 18:56:11 +0100
committerVi0L02015-12-23 18:56:11 +0100
commit7e1b4af54c67cf4eb9fef7d94d3e9a59f55e8a77 (patch)
tree2f3ce6cf80db8e0a7d49a137c6ed418f2c5badaa /grsec_arch.patch
parent7566f4f49cafe3405a9cc9b04c098938f3b5a94d (diff)
downloadaur-7e1b4af54c67cf4eb9fef7d94d3e9a59f55e8a77.tar.gz
updated to 15.201.2401 + initial 4.4 kernel and grsec support
Diffstat (limited to 'grsec_arch.patch')
-rw-r--r--grsec_arch.patch77
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));
+ }
+