From: Greg Kroah-Hartman Date: Mon, 27 May 2019 10:43:30 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v5.1.6~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe23b4b2746a63a352de16c465f35f1fa05bf14c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: x86-hide-the-int3_emulate_call-jmp-functions-from-uml.patch --- diff --git a/queue-4.19/x86-hide-the-int3_emulate_call-jmp-functions-from-uml.patch b/queue-4.19/x86-hide-the-int3_emulate_call-jmp-functions-from-uml.patch new file mode 100644 index 00000000000..24adb52bee8 --- /dev/null +++ b/queue-4.19/x86-hide-the-int3_emulate_call-jmp-functions-from-uml.patch @@ -0,0 +1,41 @@ +From 693713cbdb3a4bda5a8a678c31f06560bbb14657 Mon Sep 17 00:00:00 2001 +From: "Steven Rostedt (VMware)" +Date: Sat, 11 May 2019 08:32:40 -0400 +Subject: x86: Hide the int3_emulate_call/jmp functions from UML + +From: Steven Rostedt (VMware) + +commit 693713cbdb3a4bda5a8a678c31f06560bbb14657 upstream. + +User Mode Linux does not have access to the ip or sp fields of the pt_regs, +and accessing them causes UML to fail to build. Hide the int3_emulate_jmp() +and int3_emulate_call() instructions from UML, as it doesn't need them +anyway. + +Reported-by: kbuild test robot +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/text-patching.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/arch/x86/include/asm/text-patching.h ++++ b/arch/x86/include/asm/text-patching.h +@@ -39,6 +39,7 @@ extern int poke_int3_handler(struct pt_r + extern void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler); + extern int after_bootmem; + ++#ifndef CONFIG_UML_X86 + static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip) + { + regs->ip = ip; +@@ -65,6 +66,7 @@ static inline void int3_emulate_call(str + int3_emulate_push(regs, regs->ip - INT3_INSN_SIZE + CALL_INSN_SIZE); + int3_emulate_jmp(regs, func); + } +-#endif ++#endif /* CONFIG_X86_64 */ ++#endif /* !CONFIG_UML_X86 */ + + #endif /* _ASM_X86_TEXT_PATCHING_H */