mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: x86@kernel.org
Subject: x86/entry: Annotate noinstr escape in __do_fast_syscall_32()
Date: Thu, 17 Dec 2020 21:28:41 +0100	[thread overview]
Message-ID: <87pn38qirq.fsf@nanos.tec.linutronix.de> (raw)

The recent change to unbreak the 32bit fast syscall introduced a new
noinstr escape. While harmless because state is already established at
this point it makes objtool complain.

Add the missing annotation and fix the 'case' typo in the comment while
at it.

Fixes: 4facb95b7ada ("x86/entry: Unbreak 32bit fast syscall")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/entry/common.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
@@ -130,8 +130,10 @@ static noinstr bool __do_fast_syscall_32
 		return false;
 	}
 
-	/* The case truncates any ptrace induced syscall nr > 2^32 -1 */
+	instrumentation_begin();
+	/* The cast truncates any ptrace induced syscall nr > 2^32 -1 */
 	nr = (unsigned int)syscall_enter_from_user_mode_work(regs, nr);
+	instrumentation_end();
 
 	/* Now this is just like a normal syscall. */
 	do_syscall_32_irqs_on(regs, nr);

                 reply	other threads:[~2020-12-17 20:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87pn38qirq.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®