Skip to content

Commit

Permalink
Final component of patch from, will fix issues with rhel8
Browse files Browse the repository at this point in the history
  • Loading branch information
robbycochran committed Sep 25, 2019
1 parent 1b4e3c1 commit 1227dab
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1227dab

Please sign in to comment.