[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200225221305.496864179@linutronix.de>
Date: Tue, 25 Feb 2020 23:08:04 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: x86@...nel.org, Steven Rostedt <rostedt@...dmis.org>,
Brian Gerst <brgerst@...il.com>,
Juergen Gross <jgross@...e.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Arnd Bergmann <arnd@...db.de>
Subject: [patch 3/8] x86/entry/common: Mark syscall entry points notrace/nokprobe
Anything before enter_from_user_mode() is not safe to be traced or probed.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
arch/x86/entry/common.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
@@ -314,11 +314,12 @@ void do_syscall_64_irqs_on(unsigned long
syscall_return_slowpath(regs);
}
-__visible void do_syscall_64(unsigned long nr, struct pt_regs *regs)
+__visible notrace void do_syscall_64(unsigned long nr, struct pt_regs *regs)
{
syscall_entry_fixups();
do_syscall_64_irqs_on(nr, regs);
}
+NOKPROBE_SYMBOL(do_syscall_64);
#endif
#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
@@ -369,11 +370,12 @@ static __always_inline void do_syscall_3
}
/* Handles int $0x80 */
-__visible void do_int80_syscall_32(struct pt_regs *regs)
+__visible notrace void do_int80_syscall_32(struct pt_regs *regs)
{
syscall_entry_fixups();
do_syscall_32_irqs_on(regs);
}
+NOKPROBE_SYMBOL(do_int80_syscall_32);
/* Fast syscall 32bit variant */
static __always_inline long do_fast_syscall_32_irqs_on(struct pt_regs *regs)
@@ -449,10 +451,11 @@ static __always_inline long do_fast_sysc
}
/* Returns 0 to return using IRET or 1 to return using SYSEXIT/SYSRETL. */
-__visible long do_fast_syscall_32(struct pt_regs *regs)
+__visible notrace long do_fast_syscall_32(struct pt_regs *regs)
{
syscall_entry_fixups();
return do_fast_syscall_32_irqs_on(regs);
}
+NOKPROBE_SYMBOL(do_fast_syscall_32);
#endif /* CONFIG_X86_32 || CONFIG_IA32_EMULATION */
Powered by blists - more mailing lists