From nobody Tue Feb 10 05:26:57 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 586DFCCF9AC for ; Tue, 5 Sep 2023 16:18:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240220AbjIEQIt (ORCPT ); Tue, 5 Sep 2023 12:08:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354197AbjIEKJl (ORCPT ); Tue, 5 Sep 2023 06:09:41 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC9D51B7; Tue, 5 Sep 2023 03:09:37 -0700 (PDT) Date: Tue, 05 Sep 2023 10:09:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1693908576; 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=4SpGGQxHEMgk18I56r46647a/jxZFGS0K9p1AllQ6Gk=; b=KxzGZm4jMHgFrn03C1ReU4bHizYRpsonqU32UGDl7bFKiW4pOwngB9iJoR6fyvtQfSa7i3 XpwHwlIkuN62x8u74SOEVlMBPf3IwGk0BUyyhgzXqdlNRN/VThh7Tsi+NIhINvsUTNgPWc iOdRO4gT8X9yQoSVl3G1VfEKvjsaOX207ldh+jm1qNctnkxqZbZqDoaBWuFEZI3uHn9OAf MttRBLNmctAnPIitl0ox9KzgVkYbGVzUbWt9vRSrIMtFUdj2VW1+OqEInsy1wmVw0CTEDB 84vcdcEzQRpZ8gqJ5ytRJmrGPFsf2P8GQoqodP2528R+zuk12cVlxbigIhkj5g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1693908576; 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=4SpGGQxHEMgk18I56r46647a/jxZFGS0K9p1AllQ6Gk=; b=aYuaqctYD3IHGOT/GZivpKKz+LxK841tuMkE8rYW4/dWuuWxQ9cHAbUQb/PrHPP3yQSUCZ yyTveAgwrrMyhKDA== 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/srso: Unexport untraining functions Cc: Josh Poimboeuf , Ingo Molnar , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1ae080f95ce7266c82cba6d2adde82349b832654.1693889988.git.jpoimboe@kernel.org> References: <1ae080f95ce7266c82cba6d2adde82349b832654.1693889988.git.jpoimboe@kernel.org> MIME-Version: 1.0 Message-ID: <169390857600.27769.9434905038030669762.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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/bugs branch of tip: Commit-ID: 253553c3364c20d4ff8f61ae53456a7429c5261b Gitweb: https://git.kernel.org/tip/253553c3364c20d4ff8f61ae53456a742= 9c5261b Author: Josh Poimboeuf AuthorDate: Mon, 04 Sep 2023 22:04:56 -07:00 Committer: Ingo Molnar CommitterDate: Tue, 05 Sep 2023 12:05:07 +02:00 x86/srso: Unexport untraining functions These functions aren't called outside of retpoline.S. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/1ae080f95ce7266c82cba6d2adde82349b832654.16= 93889988.git.jpoimboe@kernel.org --- arch/x86/include/asm/nospec-branch.h | 4 ---- arch/x86/lib/retpoline.S | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/no= spec-branch.h index 197ff4f..6c14fd1 100644 --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -352,10 +352,6 @@ extern void retbleed_return_thunk(void); extern void srso_return_thunk(void); extern void srso_alias_return_thunk(void); =20 -extern void retbleed_untrain_ret(void); -extern void srso_untrain_ret(void); -extern void srso_alias_untrain_ret(void); - extern void entry_untrain_ret(void); extern void entry_ibpb(void); =20 diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S index 9ab634f..a40ba18 100644 --- a/arch/x86/lib/retpoline.S +++ b/arch/x86/lib/retpoline.S @@ -157,7 +157,6 @@ SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_N= ONE) lfence jmp srso_alias_return_thunk SYM_FUNC_END(srso_alias_untrain_ret) -__EXPORT_THUNK(srso_alias_untrain_ret) =20 .section .text..__x86.rethunk_safe #else @@ -215,7 +214,7 @@ SYM_CODE_END(srso_alias_return_thunk) */ .align 64 .skip 64 - (retbleed_return_thunk - retbleed_untrain_ret), 0xcc -SYM_START(retbleed_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE) +SYM_START(retbleed_untrain_ret, SYM_L_LOCAL, SYM_A_NONE) ANNOTATE_NOENDBR /* * As executed from retbleed_untrain_ret, this is: @@ -263,7 +262,6 @@ SYM_CODE_END(retbleed_return_thunk) jmp retbleed_return_thunk int3 SYM_FUNC_END(retbleed_untrain_ret) -__EXPORT_THUNK(retbleed_untrain_ret) =20 /* * SRSO untraining sequence for Zen1/2, similar to retbleed_untrain_ret() @@ -277,7 +275,7 @@ __EXPORT_THUNK(retbleed_untrain_ret) */ .align 64 .skip 64 - (srso_safe_ret - srso_untrain_ret), 0xcc -SYM_START(srso_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE) +SYM_START(srso_untrain_ret, SYM_L_LOCAL, SYM_A_NONE) ANNOTATE_NOENDBR .byte 0x48, 0xb8 =20 @@ -298,7 +296,6 @@ SYM_INNER_LABEL(srso_safe_ret, SYM_L_GLOBAL) ud2 SYM_CODE_END(srso_safe_ret) SYM_FUNC_END(srso_untrain_ret) -__EXPORT_THUNK(srso_untrain_ret) =20 SYM_CODE_START(srso_return_thunk) UNWIND_HINT_FUNC