All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: kbuild-all@lists.01.org
Subject: [PATCH] x86/entry: Fix noinstr violation
Date: Thu, 08 Jul 2021 15:37:14 +0200	[thread overview]
Message-ID: <87a6mxorjp.ffs@nanos.tec.linutronix.de> (raw)
In-Reply-To: <202106291306.0c9aeGFw-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 976 bytes --]

The recent commit which fixed the entry/exit mismatch on failed 32-bit
syscalls got the ordering vs. instrumentation_end() wrong, which makes
objtool complain about tracer invocation in an instrumentation disabled
region.

Stick the offending local_irq_disable() into the instrumentation enabled
region so objtool stops complaining.

Fixes: 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable(a)vger.kernel.org
---
 arch/x86/entry/common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
@@ -130,8 +130,8 @@ static noinstr bool __do_fast_syscall_32
 		/* User code screwed up. */
 		regs->ax = -EFAULT;
 
-		instrumentation_end();
 		local_irq_disable();
+		instrumentation_end();
 		irqentry_exit_to_user_mode(regs);
 		return false;
 	}

  reply	other threads:[~2021-07-08 13:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29  5:05 [stable:linux-5.10.y 3202/6129] vmlinux.o: warning: objtool: __do_fast_syscall_32()+0x98: call to trace_hardirqs_off() leaves .noinstr.text section kernel test robot
2021-07-08 13:37 ` Thomas Gleixner [this message]
2021-07-08 18:37   ` [PATCH] x86/entry: Fix noinstr violation Thomas Gleixner
2021-07-08 18:37     ` Thomas Gleixner
2021-07-08 19:02     ` Greg Kroah-Hartman
2021-07-08 19:02       ` Greg Kroah-Hartman
2021-07-08 19:17       ` Thomas Gleixner
2021-07-08 19:17         ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6mxorjp.ffs@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.