mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Kaplan, David" <David.Kaplan@amd.com>
Cc: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"H . Peter Anvin" <hpa@zytor.com>,
	Klaus Kusche <klaus.kusche@computerix.info>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/bugs: Qualify RETBLEED_INTEL_MSG
Date: Sun, 2 Nov 2025 21:11:15 +0100	[thread overview]
Message-ID: <20251102200902.GDaQe6Xo0plI8glTbE@fat_crate.local> (raw)
In-Reply-To: <20251009231437.GCaOhB3aeJlTCu_OkQ@fat_crate.local>

On Fri, Oct 10, 2025 at 01:14:37AM +0200, Borislav Petkov wrote:
> On Thu, Oct 09, 2025 at 06:13:20PM +0000, Kaplan, David wrote:
> > If we really want to optimize a CONFIG_CPU_MITIGATIONS=n kernel, why not
> > also look at alternatives that will never be enabled?
> > 
> > All the extra NOPs I think can affect performance in various ways and if
> > there was a way at compile time to know that the alternative would never be
> > enabled (because the feature is completely dependent on a cpu mitigation)
> > you could eliminate the NOPs...
> 
> I don't see why not. That mitigations gunk should be just like any other
> CONFIG_-controllable item and not simply "leak" into the build because, oh
> well, we've done it this way from the very beginning and no one should touch
> it.
> 
> So yeah, eventually we should try this. I've been experimenting with
> untangling bugs.c today, will check how much it actually saves us when
> I finish beating the stinking pile into submission.

So I can't say that it is insignificant:

   text    data     bss     dec     hex filename
30787172        11613226        7863812 50264210        2fef892 vmlinux.with
30210273        11598338        6061260 47869871        2da6faf vmlinux.without

that's ~500K code on my tailored config, meaning I haven't even enabled all
mitigations. So I'm thinking we should do this, but slowly, piecemeal, until
we have settled on the layout.

I'll send some patches soon to gather opinions...

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  parent reply	other threads:[~2025-11-02 20:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 17:19 David Kaplan
2025-10-06 13:11 ` Borislav Petkov
2025-10-06 13:58   ` Kaplan, David
2025-10-06 14:04     ` Borislav Petkov
2025-10-07 18:22       ` Pawan Gupta
2025-10-07 22:12         ` Borislav Petkov
2025-10-07 23:08           ` Pawan Gupta
2025-10-08  0:14             ` Josh Poimboeuf
2025-10-08 10:21               ` Borislav Petkov
2025-10-09  1:07                 ` Josh Poimboeuf
2025-10-09 10:19                   ` Borislav Petkov
2025-10-09  6:04                 ` Pawan Gupta
2025-10-09 10:15                   ` Borislav Petkov
2025-10-09 17:13                     ` Pawan Gupta
2025-10-09 18:13                       ` Kaplan, David
2025-10-09 23:14                         ` Borislav Petkov
2025-10-14 10:50                           ` David Laight
2025-11-02 20:11                           ` Borislav Petkov [this message]
2025-10-09  5:33               ` Pawan Gupta
2025-10-10  1:10                 ` Josh Poimboeuf
2025-10-10 18:47                   ` Pawan Gupta
2025-10-10 19:19                     ` Josh Poimboeuf
2025-10-10 19:24                       ` Pawan Gupta
2025-10-10 19:27                       ` Kaplan, David
2025-10-10 20:47                         ` Josh Poimboeuf
2025-10-10 21:13                           ` Kaplan, David
2025-10-11  1:20                             ` Josh Poimboeuf
2025-10-21 10:35 ` [tip: x86/urgent] " tip-bot2 for David Kaplan

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=20251102200902.GDaQe6Xo0plI8glTbE@fat_crate.local \
    --to=bp@alien8.de \
    --cc=David.Kaplan@amd.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@kernel.org \
    --cc=klaus.kusche@computerix.info \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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®