mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>,
	linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	David Woodhouse <dwmw@amazon.co.uk>,
	Guenter Roeck <linux@roeck-us.net>,
	Jared White <jaredwhite@microsoft.com>
Subject: Re: [PATCH 1/2] x86/build: only align ENTRY_TEXT to PMD_SIZE if necessary
Date: Thu, 10 Jul 2025 06:14:20 -0700	[thread overview]
Message-ID: <d9e9ae3a-7637-4a0b-892d-9b7c6335c1d7@intel.com> (raw)
In-Reply-To: <1752092219-16248-1-git-send-email-hamzamahfooz@linux.microsoft.com>

On 7/9/25 13:16, Hamza Mahfooz wrote:
> 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 when PTI is enabled or SRSO is enabled.

This seems so utterly random.

I don't think I was even aware of the SRSO restriction here. Looking
over it now, I do see the vmlinux.lds.S changes and this does make sense.

But I'm really worried that we've grown more dependencies on this
alignment. Let's say, for instance, that you forgot to address SRSO in
this patch and the mitigation got broken. Would we have ever known?

I'd like to hear a lot more from you about why 2-4 MiB of RAM is
important and what the environment is where you presumably know that
there are no Meltdown or SRSO vulnerable CPUs.

  parent reply	other threads:[~2025-07-10 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09 20:16 Hamza Mahfooz
2025-07-09 20:16 ` [PATCH 2/2] x86/mm/64: free the gap between BSS_MAIN and BSS_DECRYPTED Hamza Mahfooz
2025-07-10 13:15   ` Dave Hansen
2025-07-10 13:14 ` Dave Hansen [this message]
2025-07-16 21:19   ` [PATCH 1/2] x86/build: only align ENTRY_TEXT to PMD_SIZE if necessary Hamza Mahfooz
2025-07-17  8:32   ` Nikolay Borisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d9e9ae3a-7637-4a0b-892d-9b7c6335c1d7@intel.com \
    --to=dave.hansen@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dwmw@amazon.co.uk \
    --cc=hamzamahfooz@linux.microsoft.com \
    --cc=hpa@zytor.com \
    --cc=jaredwhite@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®