mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	Robert Gill <rtgill82@gmail.com>,
	Jari Ruusu <jariruusu@protonmail.com>,
	Brian Gerst <brgerst@gmail.com>,
	"Linux regression tracking (Thorsten Leemhuis)"
	<regressions@leemhuis.info>,
	antonio.gomez.iglesias@linux.intel.com,
	daniel.sneddon@linux.intel.com
Subject: Re: [PATCH v6 1/3] x86/entry_32: Do not clobber user EFLAGS.ZF
Date: Thu, 12 Sep 2024 10:45:23 -0700	[thread overview]
Message-ID: <cd2897c7-2479-4358-bd5e-b55ec84db2ce@intel.com> (raw)
In-Reply-To: <20240905-fix-dosemu-vm86-v6-1-7aff8e53cbbf@linux.intel.com>

On 9/5/24 09:00, Pawan Gupta wrote:
> Opportunistic SYSEXIT executes VERW to clear CPU buffers after user EFLAGS
> are restored. This can clobber user EFLAGS.ZF.
> 
> Move CLEAR_CPU_BUFFERS before the user EFLAGS are restored. This ensures
> that the user EFLAGS.ZF is not clobbered.

Just to be clear, the new (later) location is also safe for RFDS because
it only exposes the contents of EFLAGS (not sensitive) and RAX.

RAX might leak the old or new values of CR3, which do not seem super
valuable to me.

Acked-by: Dave Hansen <dave.hansen@linux.intel.com>

  reply	other threads:[~2024-09-12 17:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 16:00 [PATCH v6 0/3] Fix dosemu vm86() fault Pawan Gupta
2024-09-05 16:00 ` [PATCH v6 1/3] x86/entry_32: Do not clobber user EFLAGS.ZF Pawan Gupta
2024-09-12 17:45   ` Dave Hansen [this message]
2024-09-13 19:10     ` Pawan Gupta
2024-09-05 16:00 ` [PATCH v6 2/3] x86/entry_32: Clear CPU buffers after register restore in NMI return Pawan Gupta
2024-09-12 17:39   ` Dave Hansen
2024-09-05 16:00 ` [PATCH v6 3/3] x86/bugs: Use stack segment selector for VERW operand Pawan Gupta
2024-09-25 21:11   ` Pawan Gupta

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=cd2897c7-2479-4358-bd5e-b55ec84db2ce@intel.com \
    --to=dave.hansen@intel.com \
    --cc=antonio.gomez.iglesias@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=daniel.sneddon@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=jariruusu@protonmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=regressions@leemhuis.info \
    --cc=rtgill82@gmail.com \
    --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®