xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"Andy Lutomirski" <luto@kernel.org>
Subject: Re: [PATCH 2/3] x86/pv: Don't clobber NT on return-to-guest
Date: Thu, 24 Sep 2020 15:57:06 +0200	[thread overview]
Message-ID: <339f0abd-65ad-7be0-a3f0-149fcac9a0a3@suse.com> (raw)
In-Reply-To: <20200923101848.29049-3-andrew.cooper3@citrix.com>

On 23.09.2020 12:18, Andrew Cooper wrote:
> A 64bit IRET can restore NT - the faulting case is when NT is set in the live
> flags.  This change had an unintended consequence of causing the NT flag to
> spontaneously disappear from guest context whenever a interrupt/exception
> occurred.
> 
> In combination with a SYSENTER which sets both TF and NT, Xen's handling of
> the #DB exceptions clears NT before it is even recorded suitably in the guest
> kernel's view of what userspace was doing.
> 
> Reported-by: Andy Lutomirski <luto@kernel.org>
> Fixes: 0e47f92b0 ("x86: force EFLAGS.IF on when exiting to PV guests")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>


  reply	other threads:[~2020-09-24 13:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 10:18 [PATCH 0/3] x86/pv: Multiple fixes to SYSCALL/SYSENTER handling (XSA-339 followup) Andrew Cooper
2020-09-23 10:18 ` [PATCH 1/3] x86/pv: Don't deliver #GP for a SYSENTER with NT set Andrew Cooper
2020-09-24 13:55   ` Jan Beulich
2020-09-23 10:18 ` [PATCH 2/3] x86/pv: Don't clobber NT on return-to-guest Andrew Cooper
2020-09-24 13:57   ` Jan Beulich [this message]
2020-09-23 10:18 ` [PATCH 3/3] x86/pv: Inject #UD for missing SYSCALL callbacks Andrew Cooper
2020-09-24 14:56   ` Jan Beulich
2020-09-28 13:05     ` Andrew Cooper
2020-09-28 15:35       ` Jan Beulich
2020-10-09 11:53   ` [PATCH v2] " Andrew Cooper
2020-10-09 12:40     ` Manuel Bouyer
2020-10-09 12:50       ` Andrew Cooper
2020-10-14 14:16     ` Roger Pau Monné
2020-10-14 14:20       ` Manuel Bouyer
2020-10-14 14:26         ` Andrew Cooper
2020-10-14 15:17       ` Andrew Cooper
2020-10-14 16:28     ` Roger Pau Monné
2020-10-14 17:41       ` Andrew Cooper

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=339f0abd-65ad-7be0-a3f0-149fcac9a0a3@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=luto@kernel.org \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).