All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@surriel.com>
To: Dave Hansen <dave.hansen@intel.com>, Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	 x86@kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, Dave Hansen	 <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>, Xin Li	 <xin@zytor.com>
Subject: Re: [PATCH] x86/entry: Read CR2 in asm entry stub to redcue NMI clobbering window
Date: Wed, 13 May 2026 12:43:34 -0400	[thread overview]
Message-ID: <1a39356971b5ba2c363ee47a80759595c8a69ecd.camel@surriel.com> (raw)
In-Reply-To: <ac9af1cf-c123-4959-afed-2a8297b473c9@intel.com>

On Wed, 2026-05-13 at 09:31 -0700, Dave Hansen wrote:
> On 5/13/26 09:12, Rik van Riel wrote:
> > This reduces the NMI/RC2 race window by 90% -- from hundreds of C
> > instructions deep in the handler down to ~30 asm instructions in
> > error_entry.
> 
> I'm all for using the FRED data. That's a no-brainer.
> 
> But I'm not sure the assembly and plumbing is worth it just to
> _reduce_
> but not eliminate a race for non-FRED systems.
> 
> What's the actual end-user-visible fallout from the race? Don't we
> just
> see the KASAN fault, skip it, IRET from the #PF and repeat the #PF?

That's a good question.

I have only "seen" this in syzkaller, so I don't know
what the symptoms would look like if a regular system
hit this race window.

I would not be surprised if we occasionally hit this
in production, but given that I don't know what the
symptoms would look like, I have no idea how often.


-- 
All Rights Reversed.

  reply	other threads:[~2026-05-13 16:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 16:12 [PATCH] x86/entry: Read CR2 in asm entry stub to redcue NMI clobbering window Rik van Riel
2026-05-13 16:31 ` Dave Hansen
2026-05-13 16:43   ` Rik van Riel [this message]
2026-05-13 17:12     ` Dave Hansen
2026-05-14 19:49       ` Andrew Cooper
2026-05-14 19:55         ` Dave Hansen
2026-05-14 18:09 ` kernel test robot
2026-05-14 22:54 ` kernel test robot

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=1a39356971b5ba2c363ee47a80759595c8a69ecd.camel@surriel.com \
    --to=riel@surriel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.