livepatch-patch-hook: skip klp_(un)register_patch() for RHEL-7.8+ kernels

RHEL-7.8 backported upstream kernel commit 958ef1e39d24 ("livepatch:
Simplify API by removing registration step"), so add it to the kernels
using the simple registration API.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
Joe Lawrence 2019-08-12 16:05:02 -04:00
parent 1fe8fe66c2
commit b913b4bae0
1 changed files with 5 additions and 1 deletions

View File

@ -64,7 +64,11 @@
# define HAVE_CALLBACKS
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
#ifdef RHEL_RELEASE_CODE
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 8)
# define HAVE_SIMPLE_ENABLE
# endif
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
# define HAVE_SIMPLE_ENABLE
#endif