From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF776C4361B for ; Thu, 17 Dec 2020 20:29:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A1E3023A04 for ; Thu, 17 Dec 2020 20:29:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730199AbgLQU3Y (ORCPT ); Thu, 17 Dec 2020 15:29:24 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:48552 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbgLQU3Y (ORCPT ); Thu, 17 Dec 2020 15:29:24 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1608236922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=/OWZGurwEIKUh4Re/nEiJXJEv900iYBdQSEVWwpddeA=; b=cfZ11XpQyf9mRvC+m0Kla/N3x+0WA9ZPs7vbl4Csp/fEREVi2dDLO9taynIc6Q0TAXyWwy 2ypBOWBGairecD7N0wJRdoXy+1NczkbCxCsY05ZATdFDmxF4CU5Tfc8jH7Gfdv9rUgmH+z 9Vk+yBgfSC+jB1u2MN/2QVP2qzXpCbNUjlmIykaDy9EeDHqbRtipyAWbF7f9+ZOyLzUdcE XNKYHPWM3tE5x9N+8GPi7OdHK8k9F4xOw+qjMYA/LLxeDWIUbQWNrwBcKUcgDzSgt1Mmil ChSnvDfvEAjUwFLkbHzFP3gs4q5OZHN6cotyirdE3i2tshIr9GY3GZLGx5OBhw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1608236922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=/OWZGurwEIKUh4Re/nEiJXJEv900iYBdQSEVWwpddeA=; b=6GLR9gexgkHI8aJ159G72qY79C8DKM40yvpVtTgcvMIA9Uvj4CgoYiGuweRUxif+SORRE4 CloqbEqPDnyXOpCA== To: LKML Cc: x86@kernel.org Subject: x86/entry: Annotate noinstr escape in __do_fast_syscall_32() Date: Thu, 17 Dec 2020 21:28:41 +0100 Message-ID: <87pn38qirq.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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);