[PATCH OLK-5.10] x86/paravirt: Fix build due to __text_gen_insn() backport

From: "Borislav Petkov (AMD)" <bp@alien8.de> stable inclusion from stable-v5.10.214 commit cc6ddd6fa93eb59ac6f63158a6466e45ad0ca94c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID1J7D CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=l... -------------------------------- The Link tag has all the details but basically due to missing upstream commits, the header which contains __text_gen_insn() is not in the includes in paravirt.c, leading to: arch/x86/kernel/paravirt.c: In function 'paravirt_patch_call': arch/x86/kernel/paravirt.c:65:9: error: implicit declaration of function '__text_gen_insn' \ [-Werror=implicit-function-declaration] 65 | __text_gen_insn(insn_buff, CALL_INSN_OPCODE, | ^~~~~~~~~~~~~~~ Add the missing include. Reported-by: Omar Sandoval <osandov@osandov.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/ZeYXvd1-rVkPGvvW@telecaster Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Bowen You <youbowen2@huawei.com> --- arch/x86/kernel/paravirt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index a32e73f83f49..2da5c225bf04 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -31,6 +31,7 @@ #include <asm/special_insns.h> #include <asm/tlb.h> #include <asm/io_bitmap.h> +#include <asm/text-patching.h> /* * nop stub, which must not clobber anything *including the stack* to -- 2.34.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/18335 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/B3T... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/18335 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/B3T...
participants (2)
-
Bowen You
-
patchwork bot