From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] x86emul: don't allow null selector for LTR
Date: Thu, 22 Sep 2016 06:09:48 -0400 [thread overview]
Message-ID: <20160922100948.GB5975@localhost.localdomain> (raw)
In-Reply-To: <57E3987E020000780011162A@prv-mh.provo.novell.com>
On Thu, Sep 22, 2016 at 12:38:22AM -0600, Jan Beulich wrote:
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> This goes on top of
> https://lists.xenproject.org/archives/html/xen-devel/2016-09/msg02198.html
>
> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
> @@ -1207,10 +1207,17 @@ protmode_load_seg(
> /* NULL selector? */
> if ( (sel & 0xfffc) == 0 )
> {
> - if ( (seg == x86_seg_cs) ||
> - ((seg == x86_seg_ss) &&
> - (!mode_64bit() || (cpl == 3) || (cpl != sel))) )
> + switch ( seg )
> + {
> + case x86_seg_ss:
> + if ( mode_64bit() && (cpl != 3) && (cpl == sel) )
> + default:
> + break;
> + /* fall through */
> + case x86_seg_cs:
> + case x86_seg_tr:
> goto raise_exn;
> + }
> memset(sreg, 0, sizeof(*sreg));
> sreg->sel = sel;
> return X86EMUL_OKAY;
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-22 10:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 6:38 [PATCH] x86emul: don't allow null selector for LTR Jan Beulich
2016-09-22 10:09 ` Konrad Rzeszutek Wilk [this message]
2016-09-26 13:51 ` 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=20160922100948.GB5975@localhost.localdomain \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--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).