From patchwork Tue Sep 19 09:53:09 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: 141856 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3346496vqi; Tue, 19 Sep 2023 05:30:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJF+2cDCklOvVtAbUG5C8FpDuVHogDtruxo7cQUdhwdUUd7vynhaYkqWUT7xhpXu99g9ro X-Received: by 2002:a17:90a:9bca:b0:26b:534e:234 with SMTP id b10-20020a17090a9bca00b0026b534e0234mr9660809pjw.35.1695126616001; Tue, 19 Sep 2023 05:30:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695126615; cv=none; d=google.com; s=arc-20160816; b=ukeG5uUfmunX2ROaQe+ll0PPgRMxp1ljhIRFfm5WVcoPAsd4+y/Dr/lWO+d5cYmLeS 7N74iptVhNRT/5kIf5wYB/YbHXY1JN5fkRoQbLOIo880LqPT7yHXkMxHEnqnJnokAYy7 JpanmcjRKGOY4RiveJeFnVaTmA1z1hRXtS0zGUfw5vMSz78KI4E+8GvrXPWMzeIDDJmh tw2wTaAw91XLq5KiJSoXzbCrpU0tNNKQLyPdbpS/CaVFpL7JOrovWGI+wJufPH8CGWUG W9CzXXLf+ZIPcGuSLz0NdDyjK3lCXQ775UlRQK2ugvc9JTfsQpo8iT2jykPGdo5tBw1+ E2uQ== 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=aGVlqKFzgo65AbrTfbSUR8Y88ex0vT2Ng5LjMyGtvPM=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=aiXjGUe91sL3B49Z9ECrWGuAvTn7ykcti9xi2weRcIJ1vDc2sFDEvAqR+/Szy/WrRZ aZuvl1/enfIJ+ODBimBcuMpd3BEnMn4sglSf0y1z24n0XBTWgtQbrQAdU/YXC1kNhvzz hVNPwqDwMBwZnmAVtDSLMcnEOphIIxjLyVrqlW/+OO7iODhHO9k1p1cKx7kAal4nbKgB aOrPe1HUq3uKJ9a6fTOarroics30AdUOFhmaggwZEKIItU4zWPyLiqs4w9tuaUwjVVlD c57o82E3oVBTObUkVziuU/edOIf0WP9e/IMmKmXAZnwgofnNlR2VH/AIv0EwUclv60Nb bckQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=XHuL6qFm; dkim=neutral (no key) header.i=@linutronix.de; 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 ne9-20020a17090b374900b00274c03f8c24si5797411pjb.24.2023.09.19.05.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 05:30:15 -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=XHuL6qFm; dkim=neutral (no key) header.i=@linutronix.de; 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 2588C801DE41; Tue, 19 Sep 2023 02:53:54 -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 S231918AbjISJxo (ORCPT + 26 others); Tue, 19 Sep 2023 05:53:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231806AbjISJxS (ORCPT ); Tue, 19 Sep 2023 05:53:18 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD741AE; Tue, 19 Sep 2023 02:53:11 -0700 (PDT) Date: Tue, 19 Sep 2023 09:53:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695117190; 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=aGVlqKFzgo65AbrTfbSUR8Y88ex0vT2Ng5LjMyGtvPM=; b=XHuL6qFmlb6eRhCRhaxpJkwC6Ok2rGEFLjw5ogz6JkjfdSZl8nFKm4Wqn+jiFhRRPVCp27 Vdr0HNN2ScYcWKd4gbK/sP/bRj+Q9K3E+Y5tp7M8Zn8R+vUsVkYv+LEXzwbd+tmUIfARPQ TiT9Z6xRhhoV0qIgGWuUlKSBEI68FTtXNk6K+1qG+aU5zpl0n1bTTC5kn4VpjxqO9FcvYD sKfdWRRIQ8wl5vk/PYpxEYjkv7fZwl6eL19JaDEzuWTLZKe496dk98wG5j+UX3bB3z3MCI XG10Eb5lSJkJ+bZMf4ImKrfsM3U5kX/U1rxeiCtjmoMnUEAT1Ap3jz4VWjmzbQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695117190; 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=aGVlqKFzgo65AbrTfbSUR8Y88ex0vT2Ng5LjMyGtvPM=; b=LdBp08GW72RG8h7UHlp4OaD+M9QmOooGuRCa2IZMMg36GzavTRWWFJyEI1hXHcJ51wCLOu Rj1HKscRdIJ2cDAA== 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: <169511718956.27769.4103210416462777327.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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]); Tue, 19 Sep 2023 02:53:54 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777469086385015140 X-GMAIL-MSGID: 1777469086385015140 The following commit has been merged into the x86/bugs branch of tip: Commit-ID: ff72a720fbaef33896043fa66043772d0cc3142b Gitweb: https://git.kernel.org/tip/ff72a720fbaef33896043fa66043772d0cc3142b Author: Josh Poimboeuf AuthorDate: Mon, 04 Sep 2023 22:05:01 -07:00 Committer: Ingo Molnar CommitterDate: Tue, 19 Sep 2023 11:42:48 +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: