All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Anthony Liguori" <aliguori@amzn.com>,
	"Wei Liu" <wei.liu2@citrix.com>,
	"Jan Beulich" <JBeulich@suse.com>,
	"KarimAllah Ahmed" <karahmed@amazon.de>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Jan H. Schönherr" <jschoenh@amazon.de>,
	"Anthony Liguori" <aliguori@amazon.com>,
	"Matt Wilson" <msw@amazon.com>,
	security@xen.org, xen-devel <xen-devel@lists.xenproject.org>,
	"Ian Jackson" <Ian.Jackson@eu.citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH 00/22] Vixen: A PV-in-HVM shim
Date: Mon, 8 Jan 2018 16:30:42 +0000	[thread overview]
Message-ID: <20180108163042.toflejze5yfyyh3p@citrix.com> (raw)
In-Reply-To: <CA+aC4kv-w9h4HHX-Y9_fTJFMDuF+VZuEG0b5d_hX8a8KrJG9FQ@mail.gmail.com>

On Mon, Jan 08, 2018 at 08:02:07AM -0800, Anthony Liguori wrote:
> On Mon, Jan 8, 2018 at 4:11 AM, Roger Pau Monné <roger.pau@citrix.com> wrote:
> > On Mon, Jan 08, 2018 at 11:54:57AM +0000, Wei Liu wrote:
> >> Hi Anthony
> >>
> >> On Sat, Jan 06, 2018 at 02:54:15PM -0800, Anthony Liguori wrote:
> >> > From: Anthony Liguori <aliguori@amazon.com>
> >> >
> >> > CVE-2017-5754 is problematic for paravirtualized x86 domUs because it
> >> > appears to be very difficult to isolate the hypervisor's page tables
> >> > from PV domUs while maintaining ABI compatibility.  Instead of trying
> >> > to make a KPTI-like approach work for Xen PV, it seems reasonable to
> >> > run a copy of Xen within an HVM (or PVH) domU to provide backwards
> >> > compatibility with guests as mentioned in XSA-254 [1].
> >> >
> >> > This patch series adds a new mode to Xen called Vixen (Virtualized
> >> > Xen) which provides a PV-compatible interface while gaining
> >> > CVE-2017-5754 protection for the host provided by hardware
> >> > virtualization.  Vixen supports running a single unprivileged PV
> >> > domain (a dom1) that is constructed by the dom0 domain builder.
> >> >
> >> > Please note the Xen page table configuration fundamental to the
> >> > current PV ABI makes it impossible for an operating system to mitigate
> >> > CVE-2017-5754 through mechanisms like Kernel Page Table Isolation
> >> > (KPTI).  In order for an operating system to mitigate CVE-2017-5754 it
> >> > must run directly in a HVM or PVH domU.
> >> >
> >> > This series is very similar to the PVH series posted by Wei and we
> >> > have been discussing how to merge efforts.  We were hoping to have
> >> > more time to work this out.  I am posting this because I'm fairly
> >> > confident that this series is complete (all PV instances in EC2 are
> >> > using this) and others might find it useful.  I also wanted to have
> >> > more of a discussion about the best way to merge and some of the
> >> > differences in designs.
> >> >
> >> > This series is also available at:
> >> >
> >> >  git clone https://github.com/aliguori/xen.git vixen-upstream-v1
> >>
> >> I do want to make the shim be able to run in both pvh and hvm mode
> >> (which doesn't seem to be too hard in practice).
> >
> > AFAIK the pv-shim code will already work in HVM mode. It's just that
> > booting the pv-shim in HVM mode requires that you install the shim
> > inside of the guest and then boot it using grub or a similar loader
> > that can do multiboot.
> 
> I'm happy to work on either approach.  I just want to get something
> merged to have
> an upstream solution to this issue.  I think this particular CVE for
> Xen PV is the worst
> of this batch of issues so I'm super eager on getting a solution
> straightened out.  I'd
> really like to hear from others on what the right approach should be
> and I'll work on
> whatever the consensus is.
> 
> I think PVH is a good long term solution but I think it's a poor short
> term solution.
> PVH isn't widely deployed so it's asking people to upgrade their
> infrastructure to a
> very new version of Xen.  It also requires tools changes which means
> that even if
> you are on a newer version of Xen, you still have to upgrade.  The
> patch series is
> also pretty big which means I suspect people will need to wait to 4.11 at best.
> 
> OTOH, the HVM version of the series requires no tools changes and works on Xen
> versions going back to 3.4 (at least).  What this means practically
> speaking is that
> if it were merged, we can tell people that they can solve this problem
> by building the
> HVM shim and modifying their launch config to boot from an ISO or
> something similar.
> 

This is fair enough. And it is the major reason why I want to make the
shim works for both hvm and pvh in the first place.

I'm more than happy to work with you to make PV-in-HVM work.

> This gives people an immediate solution that does not require major
> changes to their
> underlying infrastructure.
> 

What is your assessment of the completeness of this series? I think
listing what works or what doesn't will have upstream make the decision
better. For example, does migration work? It doesn't mean everything
needs to be complete before we can start merging it but we do want
upstream users to under what would be broken.

> The series now is also reasonably contained and small enough that
> IMHO, it could go
> into the stable tree.  That means that once merged, we could cut a
> stable release giving
> people an official release that could be used for this purpose.
> 
> If it was entirely my call, I would work on merging HVM shim first,
> get a 4.10 stable release
> cut with it, and then focus on getting PVH shim in place for the 4.11
> release.  I think
> this is the right balance of addressing the short term needs while
> also having the best long
> term solution.

Not my call either. I will wait for security team member and stable tree
maintainers to weight in.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-01-08 16:31 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 22:54 [PATCH 00/22] Vixen: A PV-in-HVM shim Anthony Liguori
2018-01-06 22:54 ` [PATCH 01/22] ---- x86/Kconfig: Options for Xen and PVH support Anthony Liguori
2018-01-06 22:54 ` [PATCH 02/22] x86/entry: Probe for Xen early during boot Anthony Liguori
2018-01-06 22:54 ` [PATCH 03/22] x86/guest: Hypercall support Anthony Liguori
2018-01-06 22:54 ` [PATCH 04/22] x86: Don't use potentially incorrect CPUID values for topology information Anthony Liguori
2018-01-06 22:54 ` [PATCH 05/22] char: optionally redirect {, g}printk output to QEMU debug log Anthony Liguori
2018-01-07  0:18   ` Anthony Liguori
2018-01-07  0:35     ` Matt Wilson
2018-01-06 22:54 ` [PATCH 06/22] console: do not print banner if below info log threshold Anthony Liguori
2018-01-06 22:54 ` [PATCH 07/22] vixen: introduce is_vixen() to allow altering behavior Anthony Liguori
2018-01-07  0:06   ` Matt Wilson
2018-01-07  0:26     ` Anthony Liguori
2018-01-06 22:54 ` [PATCH 08/22] vixen: allow dom0 to be created with a domid != 0 Anthony Liguori
2018-01-06 22:54 ` [PATCH 09/22] vixen: modify the e820 table to advertise HVM special pages as RAM Anthony Liguori
2018-01-07  8:16   ` Roger Pau Monné
2018-01-07 15:27     ` Anthony Liguori
2018-01-08  9:51       ` Roger Pau Monné
2018-01-08  9:54         ` Andrew Cooper
2018-01-08 10:23           ` Roger Pau Monné
2018-01-06 22:54 ` [PATCH 10/22] vixen: do not permit access to physical IRQs if in Vixen mode Anthony Liguori
2018-01-07  8:18   ` Roger Pau Monné
2018-01-07 15:28     ` Anthony Liguori
2018-01-06 22:54 ` [PATCH 11/22] vixen: early initialization of Vixen including shared_info mapping Anthony Liguori
2018-01-07  8:23   ` Roger Pau Monné
2018-01-07 15:33     ` Anthony Liguori
2018-01-08  9:55       ` Roger Pau Monné
2018-01-06 22:54 ` [PATCH 12/22] vixen: paravirtualization TSC frequency calculation Anthony Liguori
2018-01-06 22:54 ` [PATCH 13/22] vixen: Use SCHEDOP_shutdown to shutdown the machine Anthony Liguori
2018-01-07  8:27   ` Roger Pau Monné
2018-01-07 15:35     ` Anthony Liguori
2018-01-06 22:54 ` [PATCH 14/22] vixen: forward VCPUOP_register_runstate_memory_area to outer Xen Anthony Liguori
2018-01-06 22:54 ` [PATCH 15/22] vixen: pass through version hypercalls to parent Xen Anthony Liguori
2018-01-07  8:31   ` Roger Pau Monné
2018-01-07 15:40     ` Anthony Liguori
2018-01-07 15:55       ` Andrew Cooper
2018-01-08  9:36       ` Jan Beulich
2018-01-06 22:54 ` [PATCH 16/22] vixen: pass grant table operations through to the outer Xen Anthony Liguori
2018-01-07  8:36   ` Roger Pau Monné
2018-01-07 15:42     ` Anthony Liguori
2018-01-07 16:45       ` Andrew Cooper
2018-01-07 17:09         ` Anthony Liguori
2018-01-07 18:45           ` Anthony Liguori
2018-01-08 10:12         ` Roger Pau Monné
2018-01-08 10:05       ` Roger Pau Monné
2018-01-06 22:54 ` [PATCH 17/22] vixen: setup infrastructure to receive event channel notifications Anthony Liguori
2018-01-07  8:42   ` Roger Pau Monné
2018-01-07 15:45     ` Anthony Liguori
2018-01-06 22:54 ` [PATCH 18/22] vixen: Introduce ECS_PROXY for event channel proxying Anthony Liguori
2018-01-07  8:44   ` Roger Pau Monné
2018-01-07 15:46     ` Anthony Liguori
2018-01-08 10:04       ` Jan H. Schönherr
2018-01-06 22:54 ` [PATCH 19/22] vixen: Fix Vixen adaptation of send_global_virq() Anthony Liguori
2018-01-06 22:54 ` [PATCH 20/22] vixen: event channel passthrough support Anthony Liguori
2018-01-06 22:54 ` [PATCH 21/22] vixen: provide Xencons implementation Anthony Liguori
2018-01-06 22:54 ` [PATCH 22/22] vixen: dom0 builder support Anthony Liguori
2018-01-07  0:24   ` Matt Wilson
2018-01-07  9:02   ` Roger Pau Monné
2018-01-07 15:52     ` Anthony Liguori
2018-01-08 10:03       ` Roger Pau Monné
2018-01-08 18:22   ` Konrad Rzeszutek Wilk
2018-01-08 18:26     ` Anthony Liguori
2018-01-06 23:29 ` [PATCH 00/22] Vixen: A PV-in-HVM shim Anthony Liguori
2018-01-06 23:50 ` Andrew Cooper
2018-01-06 23:59   ` Matt Wilson
2018-01-07  0:05   ` Anthony Liguori
2018-01-07 20:29     ` Anthony Liguori
2018-01-08 11:54 ` Wei Liu
2018-01-08 12:11   ` Roger Pau Monné
2018-01-08 12:14     ` Wei Liu
2018-01-08 16:02     ` Anthony Liguori
2018-01-08 16:28       ` George Dunlap
     [not found]         ` <CA+aC4kt5zbymFbHqCMV-oB80cw2dXWTcTztpa4EnqOKELKs7qg@mail.gmail.com>
     [not found]           ` <CA+aC4ku_0MB34=Y=yF3XwADyXttYd8t3Dw7XcOhOr+8aS9nONA@mail.gmail.com>
     [not found]             ` <CA+aC4kvsVXDFTHrcRK76868zmqCVuKtrjpSLJk=dYNdxL0PSCw@mail.gmail.com>
     [not found]               ` <CA+aC4kujGxWQzSfWP=8qP2SWd0G+qBod8HCLuosPg9SzS-22Vw@mail.gmail.com>
2018-01-08 16:41                 ` Anthony Liguori
2018-01-08 16:30       ` Wei Liu [this message]
2018-01-08 16:39         ` Ian Jackson
2018-01-08 17:03           ` Anthony Liguori
2018-01-08 17:34             ` Wei Liu
2018-01-08 17:47               ` Anthony Liguori
2018-01-08 17:53                 ` Ian Jackson
2018-01-08 17:11         ` Anthony Liguori
2018-01-08 16:38       ` Roger Pau Monné

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=20180108163042.toflejze5yfyyh3p@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=aliguori@amazon.com \
    --cc=aliguori@amzn.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony@codemonkey.ws \
    --cc=jschoenh@amazon.de \
    --cc=karahmed@amazon.de \
    --cc=msw@amazon.com \
    --cc=roger.pau@citrix.com \
    --cc=security@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 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.