From nobody Fri Dec 19 14:24:18 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 592DA2E1C6B for ; Sat, 6 Dec 2025 21:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765057327; cv=none; b=osLhYf3vDDgZKbPx1lil8QLlxjoXl3t9O2Nsc4a/XkZaJp+VQ5LHfUWRAJecniXFdCYUEiH6ghLEH4Hc/yiPP9YcYMqHZFWhRoVTsZwpcCGYH2R5OvsznugHCrBsPwIvJtCqVyiI3RUXZQvU6xKKywJvoY6vrN/Swz62PP+3lQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765057327; c=relaxed/simple; bh=eHziHNSIZwiBrOR54sdUBESMVhX+uNYi7eeeOFGuka0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NhzO4qDfCEgs10g6peicwjof4vt5uCRLlawSGSAmFeqR9uyvLBIOb6Bl65yO/r1lQuUXwW4XmelfUem2cTuvmpSG/PG3zMVjDDPqWsKYXYlnpQPyNGXcbpnn09JzQNqwGgupUXNYk46fBKbTheVzPT9TIpFVknj/OXwAXxf/eX0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lK18WlA9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lK18WlA9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A48D1C116D0; Sat, 6 Dec 2025 21:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765057326; bh=eHziHNSIZwiBrOR54sdUBESMVhX+uNYi7eeeOFGuka0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lK18WlA9AkgRS//sUpI4YY/ggSAFmz1WsiwB+Oj7iK+YFqhXUIjKDF0pfxXfBvyaz 7tccrbMxyfVj8m88BuzEMSbRIYbnHhktlpg/5XfQMoG4kzBxVbiZBYNj4uNY0vPqn9 q5+cEJcI7Q1nG2XP6rnAQQ/KXKEFBCCIdx9ePyEIetXsP9obaFsdEAZn9NEWvdMmfd b6T32LZiPMqKb9ZK2L8aibDvlH3Zw7RZ8nmJs4VVGGxjDeyW2/SEphv/EZ2ck/NWls Z4GKt3AHNfVADbbwwAyTWeygb8zSIiSgmLhfTDZicGTEkpQgmW3oXmeZAnfO1y89H1 AEPqPAWBv3Ohw== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Peter Zijlstra , Borislav Petkov , Thomas Gleixner Subject: [PATCH 6/8] x86/asm: Use unique code labels in __FILL_RETURN_BUFFER Date: Sat, 6 Dec 2025 13:41:13 -0800 Message-ID: X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In preparation for unifying the C and asm alternative implementations, change the code labels in __FILL_RETURN_BUFFER to be unique. The 771 and 772 labels are used by the C alternative implementation, which will soon be extended for asm. Signed-off-by: Josh Poimboeuf --- arch/x86/include/asm/nospec-branch.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/no= spec-branch.h index a5d41d8cd70a..334c6058a1ec 100644 --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -126,9 +126,9 @@ */ #define __FILL_RETURN_SLOT \ ANNOTATE_INTRA_FUNCTION_CALL; \ - call 772f; \ + call 872f; \ int3; \ -772: +872: =20 /* * Stuff the entire RSB. @@ -140,12 +140,12 @@ #ifdef CONFIG_X86_64 #define __FILL_RETURN_BUFFER(reg, nr) \ mov $(nr/2), reg; \ -771: \ +871: \ __FILL_RETURN_SLOT \ __FILL_RETURN_SLOT \ add $(BITS_PER_LONG/8) * 2, %_ASM_SP; \ dec reg; \ - jnz 771b; \ + jnz 871b; \ /* barrier for jnz misprediction */ \ lfence; \ CREDIT_CALL_DEPTH \ --=20 2.52.0