From patchwork Fri Oct 20 11:37:17 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: 156020 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp990315vqb; Fri, 20 Oct 2023 04:37:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/M4hLaCmhhtPxTzPnI4YDyJoyz4LSjuuTZwxtzoqjhC7rRBUF+n+JbVilTBHQzhFtVb7B X-Received: by 2002:a05:6a00:9398:b0:68b:a137:3739 with SMTP id ka24-20020a056a00939800b0068ba1373739mr1694699pfb.4.1697801860530; Fri, 20 Oct 2023 04:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697801860; cv=none; d=google.com; s=arc-20160816; b=y58Z3/WWT7ctO4JXNSXDuqJaCtA1ChdWMJHIM/blzTbtXQeeExxAkK3mpJk62haeR4 3qkWZoAjJGFny61SzWERRoIN20+aTEABVLxip9bSeRYMGJZh+/XGDGOqOevBLZgV4PFN OQa6qabfyfeqwKwCPqJtT9YwV3OotNumULsT6sBT/wZhkNQTK8AP8l9dxHgM91FUWhye pa7hNuZNgBunVl8MBj6wY1a04TiJ4OgHR0IRJGBFf1FnJKRZhYJIBLUp2XKlAtHUcjCG jo401mOXBhtFW+g4EX/T0LhKvDsu/0g8qFsVVtftlyVwWaCxVpK86xCcOU9yYYtYVbjN 877w== 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=qp1QHW1BYAziAuE66cKDriXpe2XnJn3/biI4q/JPSMg=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=RP0vW9FQGfjPq925by95Ws9+Y73XFnQ37xS+8Er32FPlPXJuMWH2jtz09OnvMHree+ /BxG8lMQkKr3O34pCmMyS+bOWvFY2l9wK+Iwhb6abYARM1+C5dxHQgwywdW2LVKcpd1Z WmJb1aMmMPdBdKRTt2jmdDgk7rfJiVE9yWBHG8BIW50gHV9nvyG2n5DtKUTukLMvmGFb TCowT7S3a8bNFNUN1Wv5fc0bOzyLsQWrxYc8xO62ij1hQbAezqZ2rh3uLsuWXP3rrA8K TK9U5WglxGlFhOtALId1pJEFQI3lRdCzUasPZmiUpUO2VLHYQ+IQGidcLSl76mNLWNQU 5wKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lQ0fZem+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=6nXRRk1f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b11-20020aa7950b000000b006b356972c78si1596671pfp.405.2023.10.20.04.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:37:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lQ0fZem+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=6nXRRk1f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 92D8A82ECB31; Fri, 20 Oct 2023 04:37:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377220AbjJTLha (ORCPT + 25 others); Fri, 20 Oct 2023 07:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377171AbjJTLhV (ORCPT ); Fri, 20 Oct 2023 07:37:21 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC3FD52; Fri, 20 Oct 2023 04:37:19 -0700 (PDT) Date: Fri, 20 Oct 2023 11:37:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697801838; 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=qp1QHW1BYAziAuE66cKDriXpe2XnJn3/biI4q/JPSMg=; b=lQ0fZem+4eO+AjvS7ZiiB0CeoF4VtaENTCkODcCzWUsA6AIEDSgi8B6Sp+WDwO8+xl4sv2 tAJ73fzBBhSMbdvNkThdSCd+nq2E6WP2aOvT9yunYlwc/MuBkcOJU56iQsqp1xcr1nR4MO byrCZqU33ya+/8mu3eVWmobcaS6wO5oWoQKFl8rri04g0E8dtf7NtWDEfUytwQEohQni+s fQyp/r7uPy2Lf/37/q86KrsQ+NEH1gdri/ksnTlbgZB+jM7zrT9Nia6YyABOIj6QTfBPLR hgw6UeA2+lTeg8dR55a35mRrKbbKuxFYGTpaSXlFCLwG/oU5tYVRP7KMdRhPFA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697801838; 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=qp1QHW1BYAziAuE66cKDriXpe2XnJn3/biI4q/JPSMg=; b=6nXRRk1fZ0x93X3pYFldrFM+fGPUm3Gsk3y//1W9eIclUIOvV+XPZUPudVPI6JM/cs5X5u 78yW+4VXVXxq3QDw== 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: <169780183764.3135.10171760219368406494.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 20 Oct 2023 04:37:39 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777469086385015140 X-GMAIL-MSGID: 1780274283632099476 The following commit has been merged into the x86/bugs branch of tip: Commit-ID: 0a3c49178c3c3e6f29280567ccb549826dd3a3f1 Gitweb: https://git.kernel.org/tip/0a3c49178c3c3e6f29280567ccb549826dd3a3f1 Author: Josh Poimboeuf AuthorDate: Mon, 04 Sep 2023 22:05:01 -07:00 Committer: Borislav Petkov (AMD) CommitterDate: Fri, 20 Oct 2023 12:40:42 +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 Signed-off-by: Borislav Petkov (AMD) 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: