Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp770362rdb; Tue, 19 Sep 2023 09:35:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3ocS2nvBD463n1ftaONsjKMnyKgNxsAIPz1GdkJc0TA3edlZn8iJDi1l+VI8vQaYc78h0 X-Received: by 2002:a05:6a20:d401:b0:152:efa4:228 with SMTP id il1-20020a056a20d40100b00152efa40228mr50571pzb.20.1695141326563; Tue, 19 Sep 2023 09:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695141326; cv=none; d=google.com; s=arc-20160816; b=XDTBei7YCzyOUCbRDKN7G+64DeqbjXBIbdny94Q3W19ifBcco59onQqLTbGjJ2vgxS WTLLB8bunb26xPcdc+r948Ktgh539xCd6tS8t0OOZFqVaLVqi60unIRSrcPc2w+j1CHv p12cGYV3wW2D7PLcjsTBGKvDWemyQ1vJVblZRt65BAIq2+ScaMQb+AAnGKQ+6nJph1Ak gWseGqIb3QjiHuU1NWE3rYEMyLy7u9Y+fzlyVE2JdG7mjHJmxvX6zMS7wqM0AwST3eIr zrm5Ap9FSqFyA1Jy2Zz01APb79cry5jceNSHWZ0Xqmgh8LfUh9TNyvOaLnx7aHQktefi 7cSw== 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=AciVSB1c/O8v/KJdkdF318d6t4wpRj6CKrTHEVii/8k=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=o/1S48hVJsoyIHm1wrIP/+Mu0pcosabDZwqcbOhairpAJZEjFPf6hiwJYJ59g57qEt bXE3SErN7Mvew+4mJVay+kkavGR+cZmiK0h8ddentUIJdBR68U66bwwLRfrTaEtZoI+c HtU2jHAtVdQohzYMJ4IW30+jfwe+WquBiPQlE0tghPCnLK16uOjcvPjCALSds7fAWTud MoOz7X2Nv0nzBJ2Hp+CjcoJPpIYZSguY/efkq//Xij+96gnfVGa+DZApmwFfFO7NtsUT jRhHz41q/uKCPPnsRNh2FMy6fC1pTJ5vjc+gxestTm6xCRfZla1x0PgGmMEArm/zyPAk dx2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nsVmhmZ9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l69-20020a633e48000000b00573ffd278a0si1196127pga.148.2023.09.19.09.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 09:35:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nsVmhmZ9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 43E2F829BD79; Tue, 19 Sep 2023 02:54:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231969AbjISJyI (ORCPT + 99 others); Tue, 19 Sep 2023 05:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231835AbjISJxV (ORCPT ); Tue, 19 Sep 2023 05:53:21 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCAE8CCE; Tue, 19 Sep 2023 02:53:14 -0700 (PDT) Date: Tue, 19 Sep 2023 09:53:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695117193; 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=AciVSB1c/O8v/KJdkdF318d6t4wpRj6CKrTHEVii/8k=; b=nsVmhmZ9suJXlNQ3ed4Kut1ddYFesNtcxwAcjMbBQSi9WKKIWUuxfsuzQofN5TM9ys1OsO t+czCswW9BRwZTtkREcj5i1IWn6qJ6aL6YPEZYKj9poVx13d6HcTLfHL7GXXJI8Lgg5IEc I6XKq4X8a33I1oADlnr7D+1TP7PCTLSLXzti+qOdJFMN5+frkHwzl4ZgwwH0F5JAIRasHa q9VARiiMWp2tU91z4a31+aYtZuv2K35WElFvJaDyCL/R33TtyCAOswZ82eNQBeHkwi1poq KLBGSQ8qKw77Zgy4/79HkPVSQgMM6t476qGnGhBKL/QfcIWkbE2qpiP6OHiy6A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695117193; 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=AciVSB1c/O8v/KJdkdF318d6t4wpRj6CKrTHEVii/8k=; b=6YcfN5GS541EUyhV8yj9PIkL9f6bl105ZQagVhlR93PhqUTpREM1Dw8L/A1OaxXUh40Jej VCRw/BDWRkorMTDQ== 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: Improve i-cache locality for alias mitigation Cc: Josh Poimboeuf , Ingo Molnar , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <169511719256.27769.1212265500162415596.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 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 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 02:54:18 -0700 (PDT) The following commit has been merged into the x86/bugs branch of tip: Commit-ID: da3bd8872ee00f23b58c7f62dfd403dcc83e074b Gitweb: https://git.kernel.org/tip/da3bd8872ee00f23b58c7f62dfd403dcc83e074b Author: Josh Poimboeuf AuthorDate: Mon, 04 Sep 2023 22:04:55 -07:00 Committer: Ingo Molnar CommitterDate: Tue, 19 Sep 2023 11:42:47 +02:00 x86/srso: Improve i-cache locality for alias mitigation Move srso_alias_return_thunk() to the same section as srso_alias_safe_ret() so they can share a cache line. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/eadaf5530b46a7ae8b936522da45ae555d2b3393.1693889988.git.jpoimboe@kernel.org --- arch/x86/lib/retpoline.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S index cd86aeb..9ab634f 100644 --- a/arch/x86/lib/retpoline.S +++ b/arch/x86/lib/retpoline.S @@ -177,15 +177,14 @@ SYM_START(srso_alias_safe_ret, SYM_L_GLOBAL, SYM_A_NONE) int3 SYM_FUNC_END(srso_alias_safe_ret) - .section .text..__x86.return_thunk - -SYM_CODE_START(srso_alias_return_thunk) +SYM_CODE_START_NOALIGN(srso_alias_return_thunk) UNWIND_HINT_FUNC ANNOTATE_NOENDBR call srso_alias_safe_ret ud2 SYM_CODE_END(srso_alias_return_thunk) + .section .text..__x86.return_thunk /* * Some generic notes on the untraining sequences: *