From nobody Sun Jul 26 01:48:06 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 D80D13CDBD7; Fri, 10 Jul 2026 09:30:13 +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=1783675815; cv=none; b=uZ40DJDnHoJYoClbpwk6hPYKSwrinGeVonpUzxOcf5GaLZKZmxaOJCNHpJ/JGnUNqqE22wpuL2AUa26w2Xz8EIxM0YZ13uNkpYhQhRVByCFg+4KYdpphq0KEqZRu6VvtkOKxdv2m5ugErhI1XPXNscpLpQ0pTNefV+O9Ueafu5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783675815; c=relaxed/simple; bh=2iqhbdmnDrf1KZZYMWND1EjBPgW92lknqxt0xgLw21A=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Lawtiok8kAJn9KyzpFPJanXQ2meNluhC/h05au+0KOrIjXZAq1ra6uNtgB/3BokuV1Tc9vnxuKoVkXy1GatFLOBlgRxXPuBOIfebnrq4K5Ud7APBH6oQw1MWTG3eIDboi8lwIg4t6LkdFu+YS+T2lSChoyhJgm/kWQbST2H04e4= 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=yrflv4zl; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=awMnNKrr; 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="yrflv4zl"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="awMnNKrr" Date: Fri, 10 Jul 2026 09:30:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783675811; 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=tlY5e9lY0Z+plfkaLA13N/YtAYBkgH1z/gNrme9D1QM=; b=yrflv4zlveY9WyA0pfTlU4NCb5UJRVCfAU++xB7Pf7mEsh27WcHfJiDia0bPJCzOibOnpI RmCppxBPHDbUXDwxb524PEdXCRA1fdS31+D6OveobkT25FLa4bY+hKrB5M7nMaevbTO9lN +f0fRoK+mqFt2FtcSpzwFgx4dElJQkd7FJWa274fIGegRkrWKyqDhbhCY2tAwJwhlF/Kyb fUveVcSkpBbJWaqkqW9efj3keNlIyf/L7OTVaWn9zGmP+46KU2gQQqDqNDYEiPHp867qK+ 2yNm1AWojjvfGNJswkKlXQ07OnnQnoYwMsAwOqB02eHYbY+lFba2fEFV2g8kHQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783675811; 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=tlY5e9lY0Z+plfkaLA13N/YtAYBkgH1z/gNrme9D1QM=; b=awMnNKrracVrJLBEbK6QIT9+Bfdfi0ZFCmQ6r0+Tf4vMQILHQAL4OIUghmYNx8maIxtH5l LAIQiHMh2JId6KCQ== From: "tip-bot2 for Hamza Mahfooz" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/build] x86/build: Only align ENTRY_TEXT to PMD_SIZE if necessary Cc: Jared White , Hamza Mahfooz , "Borislav Petkov (AMD)" , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260623152430.1473481-1-hamzamahfooz@linux.microsoft.com> References: <20260623152430.1473481-1-hamzamahfooz@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178367580996.744054.14765868468067968799.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/build branch of tip: Commit-ID: f6cff820877ff34839920ff9de9b912359cfb607 Gitweb: https://git.kernel.org/tip/f6cff820877ff34839920ff9de9b91235= 9cfb607 Author: Hamza Mahfooz AuthorDate: Tue, 23 Jun 2026 11:24:29 -04:00 Committer: Ingo Molnar CommitterDate: Fri, 10 Jul 2026 11:21:17 +02:00 x86/build: Only align ENTRY_TEXT to PMD_SIZE if necessary PTI requires the begin and end of ENTRY_TEXT be aligned to PMD_SIZE. SRSO requires srso_alias_untrain_ret to be 2M aligned. This costs between 2-4 MiB of RAM (depending on the size of the preceding section). So, only align wh= en either of the two are enabled. Co-developed-by: Jared White Signed-off-by: Jared White Signed-off-by: Hamza Mahfooz Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Link: https://patch.msgid.link/20260623152430.1473481-1-hamzamahfooz@linux.= microsoft.com --- arch/x86/kernel/vmlinux.lds.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 74e336d..10caf92 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -65,9 +65,15 @@ const_cpu_current_top_of_stack =3D cpu_current_top_of_st= ack; __end_rodata_hpage_align =3D .; \ __end_rodata_aligned =3D .; =20 +#if defined(CONFIG_MITIGATION_PAGE_TABLE_ISOLATION) || defined(CONFIG_MITI= GATION_SRSO) #define ALIGN_ENTRY_TEXT_BEGIN . =3D ALIGN(PMD_SIZE); #define ALIGN_ENTRY_TEXT_END . =3D ALIGN(PMD_SIZE); #else +#define ALIGN_ENTRY_TEXT_BEGIN +#define ALIGN_ENTRY_TEXT_END +#endif + +#else =20 #define X86_ALIGN_RODATA_BEGIN #define X86_ALIGN_RODATA_END \