Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1727914rwd; Fri, 9 Jun 2023 00:58:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6iiI1g8F0G69y8dc9Ba9jsQGMtkJcPPnd9jQIHgGBxcqUXg+Jn6pNt62tnQXoqu4hJ7v1l X-Received: by 2002:a17:90a:51:b0:255:949b:b50d with SMTP id 17-20020a17090a005100b00255949bb50dmr458184pjb.4.1686297537943; Fri, 09 Jun 2023 00:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686297537; cv=none; d=google.com; s=arc-20160816; b=NL4YpAylcY9GzBk5oxvv/NtBmmXa+vIU9STFJh9VHeDuDALoXzRN+uif17P2xKp6Nn N+OruyhZPwnL4COBB1dDLZuINkgT7uC267wfJQNyNtCQ7LZI/Tbi+m6rCgGx+C0Hk3oR Yov+J4MdPI9ECISbbn+kHTzvu8nZvoik+kUaxnqbRnEUEyS9YVcYeUscnC0h5EWRgyYx PVZFDF07hhMW1VA5Bp4eK6hjbCBmYUwHGsPiiLjN0jCIrJqO+si8WT2O4A4eiqxoSpqp a84DslTk0Pc33+M+SS3eKI5SMFxbYOSGnlcY38W9K1yZhaGW/WgdXX5MGJFoW9tA/1bw zS/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=lqRQz1OjzzpGQ4iiY57BC9yGXPvO2QKKws/Tybsfw8I=; b=PboXy22gGfS7BmkSFteqXYz7H2u+dpz26OnwxRxvjic8JD6NyF03XR4JDOGRv/gGgt RzV4tuZY7V2eaUzJgYlDtKW8wOSc2j0qubpM9xT8oiX5N2pzO+/aSLqzGlIXR7HeJVVt fRyhH3gkIgG1qETwGtRbM36eijLf2iDgv473F+I5n9bWMU0j5bBjk6AStPDWTNrQ101b n8CnICXm/R/T7xJdiATKnGwExo+jU2FyAWBOQrrGUBCHI1+n0wxB3jESAikmiEONU7x3 ft8Pf2Yrr3M32EHrCdkKQLFeeBa3ky0hsAquj15eFGpH/T4hQcNzTIaL/XCxMucu1Nro Y/8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v2fuNeHL; dkim=neutral (no key) header.i=@linutronix.de header.b=ZgN+BxIz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020a17090a588100b002500dd30da9si2343672pji.6.2023.06.09.00.58.46; Fri, 09 Jun 2023 00:58:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v2fuNeHL; dkim=neutral (no key) header.i=@linutronix.de header.b=ZgN+BxIz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239282AbjFIHta (ORCPT + 99 others); Fri, 9 Jun 2023 03:49:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239126AbjFIHrr (ORCPT ); Fri, 9 Jun 2023 03:47:47 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF1912139; Fri, 9 Jun 2023 00:47:43 -0700 (PDT) Date: Fri, 09 Jun 2023 07:47:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686296861; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lqRQz1OjzzpGQ4iiY57BC9yGXPvO2QKKws/Tybsfw8I=; b=v2fuNeHLUbSTOOAsx0dKhALq3wbgSNpaMjLUxp93MDWh0LMLtrHk+8YsxJgvRh1rkc03pD eOexA1DgrkkRSJDtTHqS1E2XxUgcUqBLau7ka3dhCMdpTgyISjVqYD8hjbU9V/cXDAF++7 4q2XZskxqNIbm9zLMUZBuGee+7idVtHh0J1Ym+RCP59k87FiMo2i7X+IdIyQQvrVO0/0WW TUJYAoe1s/0U2LfnnGaV1UNd5cWYZBf2cye5a9mwLCyT8v8zkYCNCU9ZRxnQw++5a+MT3s oikTB+lOoQanSeb5X6phyE55IQZCQCq0edbCV3CflFDM7S2cHfKJDyCGjwESuw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686296861; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lqRQz1OjzzpGQ4iiY57BC9yGXPvO2QKKws/Tybsfw8I=; b=ZgN+BxIz14x96iS5pjCMddFITiE5G/mnz+7SJIo5DvzEumjYsIuDWQRy98iAHGG9Z+DE/Q rMxaSFNpYjWQ2WBg== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] x86/entry: Move thunk restore code into thunk functions Cc: kernel test robot , Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <46aa8aeb716f302e22e1673ae15ee6fe050b41f4.1685488050.git.jpoimboe@kernel.org> References: <46aa8aeb716f302e22e1673ae15ee6fe050b41f4.1685488050.git.jpoimboe@kernel.org> MIME-Version: 1.0 Message-ID: <168629686115.404.13695695960788796083.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the objtool/core branch of tip: Commit-ID: ac27ecf68a1ada240bb71531dc2d30cde04ad70a Gitweb: https://git.kernel.org/tip/ac27ecf68a1ada240bb71531dc2d30cde04ad70a Author: Josh Poimboeuf AuthorDate: Tue, 30 May 2023 16:07:41 -07:00 Committer: Josh Poimboeuf CommitterDate: Wed, 07 Jun 2023 09:54:45 -07:00 x86/entry: Move thunk restore code into thunk functions There's no need for both thunk functions to jump to the same shared thunk restore code which lives outside the thunk function boundaries. It disrupts i-cache locality and confuses objtool. Keep it simple by keeping each thunk's restore code self-contained within the function. Fixes a bunch of false positive "missing __noreturn" warnings like: vmlinux.o: warning: objtool: do_arch_prctl_common+0xf4: preempt_schedule_thunk() is missing a __noreturn annotation Fixes: fedb724c3db5 ("objtool: Detect missing __noreturn annotations") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305281037.3PaI3tW4-lkp@intel.com/ Link: https://lore.kernel.org/r/46aa8aeb716f302e22e1673ae15ee6fe050b41f4.1685488050.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf --- arch/x86/entry/thunk_64.S | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/x86/entry/thunk_64.S b/arch/x86/entry/thunk_64.S index 5e37f41..27b5da2 100644 --- a/arch/x86/entry/thunk_64.S +++ b/arch/x86/entry/thunk_64.S @@ -26,17 +26,7 @@ SYM_FUNC_START(\name) pushq %r11 call \func - jmp __thunk_restore -SYM_FUNC_END(\name) - _ASM_NOKPROBE(\name) - .endm - - THUNK preempt_schedule_thunk, preempt_schedule - THUNK preempt_schedule_notrace_thunk, preempt_schedule_notrace - EXPORT_SYMBOL(preempt_schedule_thunk) - EXPORT_SYMBOL(preempt_schedule_notrace_thunk) -SYM_CODE_START_LOCAL(__thunk_restore) popq %r11 popq %r10 popq %r9 @@ -48,5 +38,11 @@ SYM_CODE_START_LOCAL(__thunk_restore) popq %rdi popq %rbp RET - _ASM_NOKPROBE(__thunk_restore) -SYM_CODE_END(__thunk_restore) +SYM_FUNC_END(\name) + _ASM_NOKPROBE(\name) + .endm + +THUNK preempt_schedule_thunk, preempt_schedule +THUNK preempt_schedule_notrace_thunk, preempt_schedule_notrace +EXPORT_SYMBOL(preempt_schedule_thunk) +EXPORT_SYMBOL(preempt_schedule_notrace_thunk)