Skip to content

Commit

Permalink
Fix ppm_access_ok macro for RHEL 8
Browse files Browse the repository at this point in the history
RHEL 8 backports the definition of access_ok from 5.0.
  • Loading branch information
gnosek committed Aug 8, 2019
1 parent 8461166 commit 584d37e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions driver/ppm_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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, 0))
#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

Expand Down

0 comments on commit 584d37e

Please sign in to comment.