libcareplus/0000-gensrc-skip-vector-instruction-in-str_do_gotpcrel.patch
yezengruan eda47481b9 update libcareplus to version 1.0.0-12
kpatch_process: fix possible double free.
ptrace: fix NULL pointer access problem
fix patched process crashing when acccess the global var
fix probably restore cc symbol link fail when kill patch building uncourteous
optimize: Remove unnecessary comparison code

Signed-off-by: yezengruan <yezengruan@huawei.com>
(cherry picked from commit f3d59711105eb667fa2f920958fcbdbb7068afd2)
2022-07-21 15:47:45 +08:00

32 lines
1022 B
Diff

From ca5e000a30eae58e84c98fef9c511ef61ec00fbe Mon Sep 17 00:00:00 2001
From: Chuan Zheng <zhengchuan@huawei.com>
Date: Mon, 26 Apr 2021 14:48:34 +0800
Subject: [PATCH] gensrc: skip vector instruction in str_do_gotpcrel
We might have "move (%rip) %0xmm0" in qemu hotpatch, which causes
gensrc failure in str_do_gotpcrel.
Fix it by skipping it because we do not need anything for vector command.
---
src/kpatch_gensrc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/kpatch_gensrc.c b/src/kpatch_gensrc.c
index a16b652..4f978f8 100644
--- a/src/kpatch_gensrc.c
+++ b/src/kpatch_gensrc.c
@@ -291,6 +291,11 @@ void str_do_gotpcrel(struct kp_file *f, char *dst, char *src)
goto out;
}
+ if (strstr(movdst.s, "%xmm") != NULL) {
+ /* Is SSE (%xmm0, etc), bail out */
+ goto out;
+ }
+
/* Use full 64-bit counterpart of the destination register
* as the auxiliary register */
get_full_reg(&movdst, auxreg);
--
2.27.0