代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/kpatch 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f2b8a790b653d2eab5d48cbb725ec94b1655b0f2 Mon Sep 17 00:00:00 2001
From: Zhipeng Xie <xiezhipeng1@huawei.com>
Date: Mon, 2 Mar 2020 04:35:07 -0500
Subject: [PATCH 16/38] create-diff-object: add jump label support
This patch processes the __jump_table special section, and
only the jump_lable used by the changed functions will be
included in __jump_table section and solve this limitation.
(The livepatch in kernel should also be modified that processing
the tracepoint again after the dynamic relocation by livepatch.)
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
---
kpatch-build/create-diff-object.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
index 41a9c0f..e24482e 100644
--- a/kpatch-build/create-diff-object.c
+++ b/kpatch-build/create-diff-object.c
@@ -70,6 +70,7 @@ enum subsection {
enum loglevel loglevel = NORMAL;
bool KLP_ARCH;
+char *KEEP_JUMP_LABEL = NULL;
int jump_label_errors, static_call_errors;
@@ -2355,6 +2356,8 @@ static bool jump_table_group_filter(struct lookup_table *lookup,
if (tracepoint || dynamic_debug)
return false;
+ if (KEEP_JUMP_LABEL)
+ return true;
/*
* This will be upgraded to an error after all jump labels have
* been reported.
@@ -2385,6 +2388,8 @@ static bool jump_table_group_filter(struct lookup_table *lookup,
if (tracepoint || dynamic_debug)
return false;
+ if (KEEP_JUMP_LABEL)
+ return true;
/*
* This will be upgraded to an error after all jump label
* errors have been reported.
@@ -3171,8 +3176,7 @@ static void kpatch_process_special_sections(struct kpatch_elf *kelf,
* labels and enable tracepoints in a patched function.
*/
list_for_each_entry(sec, &kelf->sections, list) {
- if (strcmp(sec->name, "__jump_table") &&
- strcmp(sec->name, "__tracepoints") &&
+ if (strcmp(sec->name, "__tracepoints") &&
strcmp(sec->name, "__tracepoints_ptrs") &&
strcmp(sec->name, "__tracepoints_strings"))
continue;
@@ -4161,6 +4165,7 @@ int main(int argc, char *argv[])
char *parent_symtab, *mod_symvers, *patch_name, *output_obj;
char *no_profiling_calls = NULL;
+ KEEP_JUMP_LABEL = getenv("KEEP_JUMP_LABEL");
memset(&arguments, 0, sizeof(arguments));
argp_parse (&argp, argc, argv, 0, NULL, &arguments);
if (arguments.debug)
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。