From nobody Sun Feb 8 09:27:14 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F00125E474; Wed, 9 Apr 2025 11:44:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744199069; cv=none; b=bQeshuEjo+UJMwObFYMkfML9wz6OTKavOB7jFBn9EwrmHypBxUQP4BHESxuBdWjV1tCiJW6Ks9SFaC6AxyPqeLK2WiDHRasFlqx9h6iNGHPgsGh5jxeNf5L+OUMuzk7924Vjd0a93KshldXxJvxsocjNmxlnZ7a50RYaENL9kkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744199069; c=relaxed/simple; bh=DCJhSV9luWiVVXn+zitm4es6HN9LClcLvSbf6r2kNyI=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=nNrZ6Ldd+BTRi4tk0XQr41tOuDevhtlRHRuBR2ycOYfJp5C+dJ1SXBoEqZVOw6tk3Go0rfqXoLObYbB2iJujaP9JDiX3AdVcpcEgo1ovEPVN6iI12xZRCerX7cPRIJ+CVWDB399OWNKTyuSlse3tZ+bkZHKLBv6hD2UyW8LGQdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=06GJB62Q; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LnoJB+lV; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="06GJB62Q"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LnoJB+lV" Date: Wed, 09 Apr 2025 11:44:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1744199066; 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=OaNQ//RioA9tEezXEgj3i3LPXW9ebuuCC9jfO2Z68Rk=; b=06GJB62Q3vsAGkQMVW8V5fpQavWoYKvHmc+QrlPWWvDhPPmWKVccxHNdT3/HS53iQLR59n bs0+jra4WVJ0AEos6zVNm3iM0a1QRSWS8+Q/HgGpubExrmO+ZtxIlFnCGs4jClCd/AUaUF ALMQxEDbIQt0HtK+TFwnh5xNnUw3f7SFfR9V4HZpxG3U4ROq+zjNkPLz3vxKyjl8u+C7nE oelViusnBTFSml1a2GhrFNe+NaG95ZMtkSgtlhP+k5tRHCsIpz3YfYt8gRK/lhSFYZWz/C vc3EOS5OoOl2l50o2c1CvztOQvBqJg2MINHuan6cMj8qgukNo7UhJ5knOHzpjA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1744199066; 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=OaNQ//RioA9tEezXEgj3i3LPXW9ebuuCC9jfO2Z68Rk=; b=LnoJB+lVAZGYco3aSpH4dLYnfTbMRtqrQH66xoIH0BR6I7imCJ7Ziq3Vn4TfEzJvmaRGKh MdTVezuxtJ5OBgDw== 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/urgent] x86/bugs: Use SBPB in write_ibpb() if applicable Cc: Josh Poimboeuf , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <17c5dcd14b29199b75199d67ff7758de9d9a4928.1744148254.git.jpoimboe@kernel.org> References: <17c5dcd14b29199b75199d67ff7758de9d9a4928.1744148254.git.jpoimboe@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <174419906525.31282.18273479175080824059.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/urgent branch of tip: Commit-ID: fc9fd3f98423367c79e0bd85a9515df26dc1b3cc Gitweb: https://git.kernel.org/tip/fc9fd3f98423367c79e0bd85a9515df26= dc1b3cc Author: Josh Poimboeuf AuthorDate: Tue, 08 Apr 2025 14:47:31 -07:00 Committer: Ingo Molnar CommitterDate: Wed, 09 Apr 2025 12:41:30 +02:00 x86/bugs: Use SBPB in write_ibpb() if applicable write_ibpb() does IBPB, which (among other things) flushes branch type predictions on AMD. If the CPU has SRSO_NO, or if the SRSO mitigation has been disabled, branch type flushing isn't needed, in which case the lighter-weight SBPB can be used. The 'x86_pred_cmd' variable already keeps track of whether IBPB or SBPB should be used. Use that instead of hardcoding IBPB. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/17c5dcd14b29199b75199d67ff7758de9d9a4928.17= 44148254.git.jpoimboe@kernel.org --- arch/x86/entry/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/entry.S b/arch/x86/entry/entry.S index cabe65a..175958b 100644 --- a/arch/x86/entry/entry.S +++ b/arch/x86/entry/entry.S @@ -21,7 +21,7 @@ SYM_FUNC_START(write_ibpb) ANNOTATE_NOENDBR movl $MSR_IA32_PRED_CMD, %ecx - movl $PRED_CMD_IBPB, %eax + movl _ASM_RIP(x86_pred_cmd), %eax xorl %edx, %edx wrmsr