From: Thomas Gleixner Date: Wed, 8 Jul 2020 19:28:06 +0000 (+0200) Subject: x86/entry: Mark check_user_regs() noinstr X-Git-Tag: v5.8-rc6~2^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=006e1ced516d2bfd9db63a32b5dba3c2abf43b04;p=thirdparty%2Fkernel%2Flinux.git x86/entry: Mark check_user_regs() noinstr It's called from the non-instrumentable section. Fixes: c9c26150e61d ("x86/entry: Assert that syscalls are on the right stack") Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Link: https://lkml.kernel.org/r/20200708192934.191497962@linutronix.de --- diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index e83b3f14897cc..ea7b515e3bc28 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -46,7 +46,7 @@ #include /* Check that the stack and regs on entry from user mode are sane. */ -static void check_user_regs(struct pt_regs *regs) +static noinstr void check_user_regs(struct pt_regs *regs) { if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) { /*