diff --git a/kernel-modules/patches/a409284ad5be9a95bfd65b9eac6f179094d5b36af9a6ba3548fa98ee4d23a7a5.patch b/kernel-modules/patches/a409284ad5be9a95bfd65b9eac6f179094d5b36af9a6ba3548fa98ee4d23a7a5.patch index 42b9c8fd50e..8e4dac50000 100644 --- a/kernel-modules/patches/a409284ad5be9a95bfd65b9eac6f179094d5b36af9a6ba3548fa98ee4d23a7a5.patch +++ b/kernel-modules/patches/a409284ad5be9a95bfd65b9eac6f179094d5b36af9a6ba3548fa98ee4d23a7a5.patch @@ -74,6 +74,32 @@ index 70a05e1..405ce66 100644 } void task_cputime(struct task_struct *t, cputime_t *utime, cputime_t *stime) +diff --git a/ppm_events.c b/ppm_events.c +index cc3eb98..dd78949 100644 +--- a/ppm_events.c ++++ b/ppm_events.c +@@ -38,6 +38,7 @@ or GPL2.txt for full copies of the license. + #include "ppm_events.h" + #include "ppm.h" + #include "ppm_flag_helpers.h" ++#include "ppm_version.h" + + /* + * The kernel patched with grsecurity makes the default access_ok trigger a +@@ -46,10 +47,10 @@ or GPL2.txt for full copies of the license. + #ifdef access_ok_noprefault + #define ppm_access_ok access_ok_noprefault + #else +-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) +-#define ppm_access_ok(type, addr, size) access_ok(type, addr, size) +-#else ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) || (PPM_RHEL_RELEASE_CODE > 0 && PPM_RHEL_RELEASE_CODE >= PPM_RHEL_RELEASE_VERSION(8, 1)) + #define ppm_access_ok(type, addr, size) access_ok(addr, size) ++#else ++#define ppm_access_ok(type, addr, size) access_ok(type, addr, size) + #endif + #endif + diff --git a/ppm_version.h b/ppm_version.h new file mode 100644 index 0000000..4c7c400