kmod/patch: check for RHEL8 when setting HAVE_SIMPLE_ENABLE

Make sure we don't set HAVE_SIMPLE_ENABLE on rhel8 before rhel8.2

Fixes: b913b4b ("livepatch-patch-hook: skip klp_(un)register_patch() for RHEL-7.8+ kernels")
Fixes: #1031

Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
Artem Savkov 2019-08-22 11:47:52 +02:00
parent 6f5edcd573
commit 36120b9b08

View File

@ -65,7 +65,9 @@
#endif
#ifdef RHEL_RELEASE_CODE
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 8)
# if (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 8) && \
RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) || \
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 2)
# define HAVE_SIMPLE_ENABLE
# endif
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)