44 Commits

Author SHA1 Message Date
HuBin95
5df73ddec7
update README doc
Signed-off-by: HuBin95 <hubin73@huawei.com>
2023-08-01 07:20:16 +00:00
Zhipeng Xie
dcbfd17440 backport upstream patches
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2023-07-29 14:57:18 +08:00
Zhipeng Xie
38ddae2610 backport upstream patches
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2023-05-29 21:29:30 +08:00
hubin
6ac6af8b27 upgrade kpatch to version 0.9.7
Signed-off-by: hubin <hubin73@huawei.com>
2023-01-30 16:21:12 +08:00
lvgenggeng
9b347bce8d make_hotpatch: add CUSTOM_BUILD_DIR env
Signed-off-by: lvgenggeng <lvgenggeng@uniontech.com>
2022-10-17 16:36:39 +08:00
hubin
b19ca18ab0 create-diff-object: add support for .return_sites section
Signed-off-by: hubin <hubin73@huawei.com>
2022-10-09 17:34:29 +08:00
hubin
1acd737392 lookup: skip finding local symbols for object with no local symbols
Signed-off-by: hubin <hubin73@huawei.com>
2022-10-09 10:50:14 +08:00
tangbin
32c1d0685e kpatch-build: Remove duplicate functions
Signed-off-by: tangbin <tangbin_yewu@cmss.chinamobile.com>
2022-09-06 12:47:29 -04:00
tangbin
1a9fa8d9b7 kpatch-build: fix loading error in aarch64
Signed-off-by: tangbin <tangbin_yewu@cmss.chinamobile.com>
2022-09-06 12:07:43 -04:00
tangbin
3459da160d livepatch-patch-hook: fix kpatch-build error which do not support ftrace
Signed-off-by: tangbin <tangbin@cmss.chinamobile.com>
2022-09-05 13:13:34 -04:00
hubin
3a830da0f3 make_hotpatch: fix some grammar error
Signed-off-by: hubin <hubin73@huawei.com>
2022-05-30 19:48:05 +08:00
hubin
d2bb38528c create-diff-object: fix some hotpatch compilation problems
Signed-off-by: hubin <hubin73@huawei.com>
2022-05-23 19:07:16 +08:00
hubin
20a53a07e0 livepatch-patch-hook: fix HAVE_SIMPLE_ENABLE
Signed-off-by: hubin <hubin73@huawei.com>
2022-05-12 13:14:47 +08:00
hubin
bd4a671d9c kpatch-build: do not copy linux scripts when building OOT module hotpatch
Signed-off-by: hubin <hubin73@huawei.com>
2022-05-10 16:55:02 +08:00
hubin
24ae780344 fix segment fault and hotpatch compilation problem
when using openEuler 22.03 LTS kernel
2022-05-10 15:37:18 +08:00
Zhipeng Xie
7ff33703a8 delete useless code
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2022-03-30 16:59:32 +08:00
Zhipeng Xie
9f6655b06e backport patch to fix kpatch-build failure
backport patch to fix following error:
"ERROR: util.o: find_local_syms: 185: found duplicate matches for util.c"

Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2022-02-06 17:24:22 +08:00
Zhipeng Xie
2cb5ae19c7 backport upstream patches
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2022-01-26 15:25:39 +08:00
Wentao Fan
6b716b2754 backport upstream patch
Signed-off-by: Wentao Fan <fanwentao@huawei.com>
2021-12-22 11:47:30 +08:00
Zhipeng Xie
4424f7bf7e rebase from upstream v0.9.5
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-11-19 12:02:33 +08:00
Bin Hu
9846d68736 backport upstream patch to enhance livepatch-patch-hook.c readability
Signed-off-by: hubin <hubin57@huawei.com>
2021-10-30 15:45:59 +08:00
Zhipeng Xie
98a26ae704 backport upstream patches
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-10-26 19:32:05 +08:00
Zhipeng Xie
78169befd0 add make_compile_env.sh
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-10-26 16:10:30 +08:00
Zhipeng Xie
79ae44b66d kpatch: fix two issues
kpatch: update sympos for duplicate symbols in vmlinux
create-diff-object: fix segment fault when sec2->rela is NULL

Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-09-28 16:54:29 +08:00
hubin
ad03b093ca kpatch: remove uname-build-check from build dependency
uname-build-check is only needed when building package in obs
environment which relys on kernel, it should not be installed
in general environment.

Signed-off-by: Bin Hu <hubin57@huawei.com>
2021-09-28 11:02:09 +08:00
Zhipeng Xie
bee047ee3f create-diff-object: error on detect new/changed ALTINSTR_ENTRY_CB
ALTINSTR_ENTRY_CB have callback which referenct to other function
in .altinstructions, currently kaptch don't support new/changed
ALTINSTR_ENTRY_CB, so error on detect this case.

Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-08-21 04:52:55 -04:00
Zhipeng Xie
e48825dd0e lookup: Add __UNIQUE_ID_ to maybe_discarded_sym list
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-07-23 00:08:18 -04:00
Xinpeng Liu
bb86e84edd compile bug
failed to access
'/root/rpmbuild/BUILDROOT/kpatch-0.9.1-12.x86_64/opt/patch_workspace/': No such
file or directory
2021-05-29 08:21:56 +08:00
Wentao Fan
3a88b42a53 support for .cold functions with no id suffix
Signed-off-by: Wentao Fan <fanwentao@huawei.com>
2021-05-29 05:49:55 -04:00
Zhipeng Xie
f8d67d64eb modify hotpatch id length limit from 20 to 32
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-02-10 02:18:07 -05:00
Zhipeng Xie
854a1bb6b2 add kpatch requires
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-01-11 07:33:22 -05:00
Zhipeng Xie
a60dd87384 only skip gcc check in cross compile environment
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2021-01-05 06:25:47 -05:00
Zhipeng Xie
8143254f9b support remove static variables using KPATCH_IGNORE_STATIC
Static variables will be removed due to compiler optimization.
And some static variables can be treated as new variables, such as
static variables in print limit macros. So add KPATCH_IGNORE_STATIC
to tell kpatch to treat the static variables as new variables.

Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-12-30 21:49:51 -05:00
Zhipeng Xie
7baf01f5b6 Fix relocation not resolved when new functions exported only
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-11-23 01:10:53 -05:00
Zhipeng Xie
a77dc2fb14 optimization for out-of-tree modules
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-11-16 21:31:06 -05:00
Zhipeng Xie
fcbd86e188 add help package Recommends
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-11-12 04:30:12 -05:00
Zhipeng Xie
385d263ae5 update Source0
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-09-25 05:08:22 -04:00
Zhipeng Xie
a8565c3adf code optimization
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-09-12 05:45:06 -04:00
pengyq
80755df152 adapt kernel source path and name 2020-08-29 17:26:14 +08:00
chengquan
a2df443dbd upgrade software to v0.9.1 2020-05-11 15:02:56 +08:00
Zhipeng Xie
db78750c1a sync code to openeuler
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-03-22 06:56:43 -04:00
Zhipeng Xie
dc117ba0b6 rebase from upstream v0.9.0
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2020-02-27 17:15:29 -05:00
openeuler-basic
c51bc6ff72 add subpackage kpatch-runtime 2020-02-17 14:53:17 +08:00
Zhipeng Xie
428b311440 sync code to openeuler
sync latest code to openeuler

Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
2019-12-30 15:59:18 +08:00