livepatch-patch-hook: fix HAVE_SIMPLE_ENABLE

Signed-off-by: hubin <hubin73@huawei.com>
This commit is contained in:
hubin 2022-05-12 13:06:47 +08:00
parent fc7fe24459
commit 20a53a07e0
2 changed files with 15 additions and 9 deletions

View File

@ -1,7 +1,7 @@
From e8a1f76c0409720106df90e6358d2b00c496b74d Mon Sep 17 00:00:00 2001
From 5b34dae2eaf57c33beb5cd4e3972a4580259a5fc Mon Sep 17 00:00:00 2001
From: hubin <hubin73@huawei.com>
Date: Tue, 10 May 2022 15:26:25 +0800
Subject: [PATCH 1/9] livepatch-patch-hook: disable HAVE_SIMPLE_ENABLE to keep
Subject: [PATCH] livepatch-patch-hook: disable HAVE_SIMPLE_ENABLE to keep
register and unregister step of hotpatch
Signed-off-by: Bin Hu <hubin73@huawei.com>
@ -10,18 +10,18 @@ Signed-off-by: Bin Hu <hubin73@huawei.com>
1 file changed, 2 deletions(-)
diff --git a/kmod/patch/livepatch-patch-hook.c b/kmod/patch/livepatch-patch-hook.c
index 9e56fe3..339b00f 100644
index 9e56fe3..b565a6a 100644
--- a/kmod/patch/livepatch-patch-hook.c
+++ b/kmod/patch/livepatch-patch-hook.c
@@ -78,8 +78,6 @@
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 2)
# define HAVE_KLP_REPLACE
@@ -70,8 +70,6 @@
RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 2)
# define HAVE_SIMPLE_ENABLE
# endif
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
-# define HAVE_KLP_REPLACE
-# define HAVE_SIMPLE_ENABLE
#endif
#ifndef KLP_REPLACE_ENABLE
#ifdef RHEL_RELEASE_CODE
--
2.31.0.windows.1

View File

@ -1,7 +1,7 @@
Name: kpatch
Epoch: 1
Version: 0.9.5
Release: 7
Release: 8
Summary: A Linux dynamic kernel patching infrastructure
License: GPLv2
@ -111,6 +111,12 @@ popd
%{_mandir}/man1/*.1.gz
%changelog
* Thu May 12 2022 Bin Hu <hubin73@huawei.com> -1:0.9.5-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:livepatch-patch-hook: fix HAVE_SIMPLE_ENABLE
* Tue May 10 2022 Bin Hu <hubin73@huawei.com> -1:0.9.5-7
- Type:bugfix
- ID:NA