From patchwork Sat Sep 23 12:20:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 143885 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp145397vqu; Sat, 23 Sep 2023 05:24:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbTI9nW8tj2JU7YdhWN9lpSQ7BWrKzE9m2UQklz/2AVU0nujtPlTKcyWr6HwpVsvHXlA28 X-Received: by 2002:a05:6a00:2387:b0:690:4362:7012 with SMTP id f7-20020a056a00238700b0069043627012mr1878455pfc.28.1695471881458; Sat, 23 Sep 2023 05:24:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695471881; cv=none; d=google.com; s=arc-20160816; b=rmcI8xgEyaMrkEqi/HcRrUM9YSo99N6uEgdOG3od5HMCFSvyZ5fJUh4C1yJUAFDGlg f2WuomYxNcG256mWgadDoSVIH9zJX1kokDub5GOFMGmJVQ9UMkRvlCnB7JbP7U7eKHlv Rimdt45lZeWVEzkCWe4j1idKRxZvtJvamPhbt5mejGjJs0ahX5s0tMcvN0GdQmi4IKkx 772Pla+rQ4LovXgDHSfyuzjjutmejnU0CSJTotOO19KPIbL3lyNUpfMc/Hz/wCG0qFat 5niJg1FmVMBvXqvh7w+X2Ef15DZNAkw1ikYNdN2qMxrJ2v4I4YX77GJc6i0kMqDUt1HP wShw== 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=W4KOo5678RUGcG2mMjzfsxYdb1Fezpwa6MV8kyb4iDQ=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=yv7qATVBGwlPfm1znJRnf8v9Bs8B/hUeax9eA3q2OZH1kRtTahULpXL+sOtXR+IVAb 3u/gBetOoKyv5YHyR9hgSeq24UQzDf/ZcVZ2ii7qLjZqVzNZUpB4S7/ek3Tugrm7930V aQS8EGKe3LhRmerRbKH8BbqT/YoH6U/6xWcMd58CpnUsbNvJXvCScsKFJwme3CjQ5Jbq 2XuLswVUIYh0pt5NZVhsRxYrm6xcRaLVpn3Sl9nZQMCtPSWgBMGFu75seQoTlRLtNl8k Hs8S0kBZIEyF5m8w7mTi2kjg2DuDQB+2rgCTZGw1y26ObF82aTDyXfjMlM8me0pGaBc0 uNHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iGaKZ8go; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=jgmO5t7V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id 14-20020a63184e000000b0056964623c4csi4151996pgy.20.2023.09.23.05.24.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 05:24:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iGaKZ8go; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=jgmO5t7V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 79D288080E21; Sat, 23 Sep 2023 05:21:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231675AbjIWMU0 (ORCPT + 29 others); Sat, 23 Sep 2023 08:20:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231604AbjIWMUQ (ORCPT ); Sat, 23 Sep 2023 08:20:16 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DAF51A6; Sat, 23 Sep 2023 05:20:09 -0700 (PDT) Date: Sat, 23 Sep 2023 12:20:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695471607; 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=W4KOo5678RUGcG2mMjzfsxYdb1Fezpwa6MV8kyb4iDQ=; b=iGaKZ8goQMQrTWsknifMzOMVr/W25ZPCxbSfl50l1VvfCO2JDv6POaxUmzpG30anL89di3 GrkD+QQU0naJXqjsc+Qjf0zPKqAKQ1vtss53tdXXDBPyympskUAp4WDa/Pio9cTaIDOBI8 DwltSvwviCisiL+C05zhwiS8AnjZEAHvxeAvr3k7NI3asC3eyzqplwsDjil/9pnQhqTF5z GDhY9j3z2LFEEi//uoLtoiB6BU2ehA1e2MYNJUB3Bk334Jv0LSA2hfNYI+8t8o9Ga+MnVe XnITKy3zDk+oF3tADzF+g6EtrnYWos9vlOyVZ0KeWQLmSJzlPnTyrZ6fQjZ0cg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695471607; 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=W4KOo5678RUGcG2mMjzfsxYdb1Fezpwa6MV8kyb4iDQ=; b=jgmO5t7VfRto41Xq0ke514a2C8gN+I3CVOc0KtNb3KteDN2+UL7HlYAav+P7lYv/EKn2oE pomM0LBrYkNzMdAg== 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: x86/bugs] x86/rethunk: Use SYM_CODE_START[_LOCAL]_NOALIGN macros Cc: Josh Poimboeuf , Ingo Molnar , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <26d461bd509cc840af24c94586561c06d39812b2.1693889988.git.jpoimboe@kernel.org> References: <26d461bd509cc840af24c94586561c06d39812b2.1693889988.git.jpoimboe@kernel.org> MIME-Version: 1.0 Message-ID: <169547160713.27769.266107179227635882.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 23 Sep 2023 05:21:07 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777469086385015140 X-GMAIL-MSGID: 1777831123323717783 The following commit has been merged into the x86/bugs branch of tip: Commit-ID: 642ff448c87d176aaf923597a70cb55baf2706ef Gitweb: https://git.kernel.org/tip/642ff448c87d176aaf923597a70cb55baf2706ef Author: Josh Poimboeuf AuthorDate: Mon, 04 Sep 2023 22:05:01 -07:00 Committer: Ingo Molnar CommitterDate: Sat, 23 Sep 2023 14:13:03 +02:00 x86/rethunk: Use SYM_CODE_START[_LOCAL]_NOALIGN macros Macros already exist for unaligned code block symbols. Use them. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/26d461bd509cc840af24c94586561c06d39812b2.1693889988.git.jpoimboe@kernel.org --- arch/x86/lib/retpoline.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S index 8ba79d2..415521d 100644 --- a/arch/x86/lib/retpoline.S +++ b/arch/x86/lib/retpoline.S @@ -149,7 +149,7 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array) * As a result, srso_alias_safe_ret() becomes a safe return. */ .pushsection .text..__x86.rethunk_untrain -SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE) +SYM_CODE_START_NOALIGN(srso_alias_untrain_ret) UNWIND_HINT_FUNC ANNOTATE_NOENDBR ASM_NOP2 @@ -159,7 +159,7 @@ SYM_FUNC_END(srso_alias_untrain_ret) .popsection .pushsection .text..__x86.rethunk_safe -SYM_START(srso_alias_safe_ret, SYM_L_GLOBAL, SYM_A_NONE) +SYM_CODE_START_NOALIGN(srso_alias_safe_ret) lea 8(%_ASM_SP), %_ASM_SP UNWIND_HINT_FUNC ANNOTATE_UNRET_SAFE @@ -187,7 +187,7 @@ SYM_CODE_END(srso_alias_return_thunk) */ .align 64 .skip 64 - (srso_safe_ret - srso_untrain_ret), 0xcc -SYM_START(srso_untrain_ret, SYM_L_LOCAL, SYM_A_NONE) +SYM_CODE_START_LOCAL_NOALIGN(srso_untrain_ret) ANNOTATE_NOENDBR .byte 0x48, 0xb8 @@ -255,7 +255,7 @@ SYM_CODE_END(srso_return_thunk) */ .align 64 .skip 64 - (retbleed_return_thunk - retbleed_untrain_ret), 0xcc -SYM_START(retbleed_untrain_ret, SYM_L_LOCAL, SYM_A_NONE) +SYM_CODE_START_LOCAL_NOALIGN(retbleed_untrain_ret) ANNOTATE_NOENDBR /* * As executed from retbleed_untrain_ret, this is: