mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
x86: Hide the int3_emulate_call/jmp functions from UML
commit 693713cbdb 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 <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3f7c1cab1a
commit
c607bd3963
@@ -39,6 +39,7 @@ extern int poke_int3_handler(struct pt_regs *regs);
|
|||||||
extern void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler);
|
extern void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler);
|
||||||
extern int after_bootmem;
|
extern int after_bootmem;
|
||||||
|
|
||||||
|
#ifndef CONFIG_UML_X86
|
||||||
static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip)
|
static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip)
|
||||||
{
|
{
|
||||||
regs->ip = ip;
|
regs->ip = ip;
|
||||||
@@ -65,6 +66,7 @@ static inline void int3_emulate_call(struct pt_regs *regs, unsigned long func)
|
|||||||
int3_emulate_push(regs, regs->ip - INT3_INSN_SIZE + CALL_INSN_SIZE);
|
int3_emulate_push(regs, regs->ip - INT3_INSN_SIZE + CALL_INSN_SIZE);
|
||||||
int3_emulate_jmp(regs, func);
|
int3_emulate_jmp(regs, func);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_X86_64 */
|
||||||
|
#endif /* !CONFIG_UML_X86 */
|
||||||
|
|
||||||
#endif /* _ASM_X86_TEXT_PATCHING_H */
|
#endif /* _ASM_X86_TEXT_PATCHING_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user