!108 backport upstream patches
From: @xiezhipeng1 Reviewed-by: @hubin95 Signed-off-by: @hubin95
This commit is contained in:
commit
18f8d0ba63
32
0056-kpatch-build-ignore-init-version-timestamp.o.patch
Normal file
32
0056-kpatch-build-ignore-init-version-timestamp.o.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 934b3b3c0c12be2435f8edbe484c2696dda93864 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Lawrence <joe.lawrence@redhat.com>
|
||||
Date: Mon, 16 Jan 2023 09:33:55 -0500
|
||||
Subject: [PATCH] kpatch-build: ignore init/version-timestamp.o
|
||||
|
||||
Kernel v6.1+ commit 2df8220cc511 ("kbuild: build init/built-in.a just
|
||||
once") split init_uts_ns and linux_banner out to
|
||||
init/version-timestamp.c from init/version.c
|
||||
|
||||
Add init/version-timestamp.o to the list of object files that kpatch-cc
|
||||
won't add to its changed_objs list.
|
||||
|
||||
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
|
||||
---
|
||||
kpatch-build/kpatch-cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/kpatch-build/kpatch-cc b/kpatch-build/kpatch-cc
|
||||
index 2a3d264..17aae25 100755
|
||||
--- a/kpatch-build/kpatch-cc
|
||||
+++ b/kpatch-build/kpatch-cc
|
||||
@@ -44,6 +44,7 @@ if [[ "$TOOLCHAINCMD" =~ ^(.*-)?gcc$ || "$TOOLCHAINCMD" =~ ^(.*-)?clang$ ]] ; th
|
||||
arch/s390/kernel/vdso64/*|\
|
||||
drivers/firmware/efi/libstub/*|\
|
||||
init/version.o|\
|
||||
+ init/version-timestamp.o|\
|
||||
kernel/system_certificates.o|\
|
||||
lib/*|\
|
||||
tools/*|\
|
||||
--
|
||||
2.27.0
|
||||
|
||||
30
0066-INSTALL.md-update-OpenEuler-prereqs-formatting.patch
Normal file
30
0066-INSTALL.md-update-OpenEuler-prereqs-formatting.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 27d0a22c8abbba12e6146f3f389dd28b0fa862dd Mon Sep 17 00:00:00 2001
|
||||
From: Ryan Sullivan <rysulliv@redhat.com>
|
||||
Date: Wed, 26 Apr 2023 10:44:04 -0400
|
||||
Subject: [PATCH] INSTALL.md: update OpenEuler prereqs formatting
|
||||
|
||||
Shrink the size of the sub-section header below the OpenEuler section,
|
||||
reducing confusion as to what section that is a part of, as it is only
|
||||
necessary for OpenEuler machines.
|
||||
|
||||
Signed-off-by: Ryan Sullivan <rysulliv@redhat.com>
|
||||
---
|
||||
doc/INSTALL.md | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/doc/INSTALL.md b/doc/INSTALL.md
|
||||
index 3b2fdb7..b67a586 100644
|
||||
--- a/doc/INSTALL.md
|
||||
+++ b/doc/INSTALL.md
|
||||
@@ -203,7 +203,7 @@ Install the dependencies for compiling kpatch and running kpatch-build:
|
||||
make dependencies
|
||||
```
|
||||
|
||||
-Before running kpatch-build, two more things need to be checked:
|
||||
+#### Before running kpatch-build, two more things need to be checked:
|
||||
-------
|
||||
1. Ensure current kernel compiled with *CONFIG_LIVEPATCH_PER_TASK_CONSISTENCY* set
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
From fb22714ae934a6a9b8ab0cc635519fb3a24c2052 Mon Sep 17 00:00:00 2001
|
||||
From: Weinan Liu <wnliu@google.com>
|
||||
Date: Wed, 9 Aug 2023 22:31:21 +0000
|
||||
Subject: [PATCH] Fix undefined behavior problem when using list_foreach_entry
|
||||
|
||||
This upstream list.h offsetof implementation rely on undefined behavior implementation. Using __builtin_offsetof to fix this problem.
|
||||
---
|
||||
kpatch-build/list.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kpatch-build/list.h b/kpatch-build/list.h
|
||||
index e95593c..ad4643c 100644
|
||||
--- a/kpatch-build/list.h
|
||||
+++ b/kpatch-build/list.h
|
||||
@@ -30,7 +30,7 @@
|
||||
/**
|
||||
* Get offset of a member
|
||||
*/
|
||||
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
||||
+#define offsetof(TYPE, MEMBER) ((size_t) __builtin_offsetof(TYPE, MEMBER))
|
||||
|
||||
/**
|
||||
* Casts a member of a structure out to the containing structure
|
||||
--
|
||||
2.27.0
|
||||
|
||||
11
kpatch.spec
11
kpatch.spec
@ -1,7 +1,7 @@
|
||||
Name: kpatch
|
||||
Epoch: 1
|
||||
Version: 0.9.7
|
||||
Release: 5
|
||||
Release: 6
|
||||
Summary: A Linux dynamic kernel patching infrastructure
|
||||
|
||||
License: GPLv2
|
||||
@ -61,6 +61,9 @@ Patch0045:0045-kpatch-build-Add-find_kobj-short-circuit-for-OOT-mod.patch
|
||||
Patch0046:0048-examples-add-proc-version-kpatch-sample.patch
|
||||
Patch0047:0050-kpatch-macros-add-KPATCH_STATIC_CALL.patch
|
||||
Patch0048:0052-patch-author-guide-update-jump-label-static-call-des.patch
|
||||
Patch0049:0056-kpatch-build-ignore-init-version-timestamp.o.patch
|
||||
Patch0050:0066-INSTALL.md-update-OpenEuler-prereqs-formatting.patch
|
||||
Patch0051:0070-Fix-undefined-behavior-problem-when-using-list_forea.patch
|
||||
|
||||
BuildRequires: gcc elfutils-libelf-devel kernel-devel git
|
||||
Requires: bc make gcc patch bison flex openssl-devel
|
||||
@ -121,6 +124,12 @@ popd
|
||||
%{_mandir}/man1/*.1.gz
|
||||
|
||||
%changelog
|
||||
* Thu Nov 30 2023 Zhipeng Xie <xiezhipeng1@huawei.com> -1:0.9.7-6
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:backport upsteam patches
|
||||
|
||||
* Thu Sep 28 2023 Zhipeng Xie <xiezhipeng1@huawei.com> -1:0.9.7-5
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user