All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com
Subject: Re: [PATCH v2 3/5] tmem: By default to join an shared pool it must be authorized.
Date: Wed, 5 Apr 2017 09:40:44 -0400	[thread overview]
Message-ID: <20170405134044.GE4329@char.us.oracle.com> (raw)
In-Reply-To: <58E4D6D3020000780014D1FE@prv-mh.provo.novell.com>

On Wed, Apr 05, 2017 at 03:36:51AM -0600, Jan Beulich wrote:
> >>> On 04.04.17 at 21:10, <konrad.wilk@oracle.com> wrote:
> > @@ -1530,7 +1529,8 @@ int do_tmem_new_pool(domid_t this_cli_id,
> >              pool->shared = 0;
> >              goto out;
> >          }
> > -        if ( client->shared_auth_required && !tmem_global.shared_auth )
> > +        /* By default only join domains that are authorized by admin. */
> > +        if ( !tmem_global.shared_auth )
> 
> Why "by default"? Is this comment really useful here? Other than

Took the comment out.
> that the patch looks okay, but I won't claim to understand enough
> of tmem to know this is sufficiently backwards compatible, so I
> won't claim to have reviewed it in full.

The old clients that used shared pools work just fine. That is as long
as the system admin invokes:
        xl tmem-shared-auth  -u 00000000-0000-0000-0000-0000deadbeef -A 1 <domain>

before hand (this is for UUID 0:deadbeef).
[And to be honest the API is a bit weird - if you can't join a shared
pool then you still get to join a private pool without any errors?!]


Before this change you didn't have to invoke this tmem-shared-auth
and any guest could join a shared pool, even malicious ones.
From that perspective I did break backwards compatibility, but fixed
a security hole.

But as said - the guest won't notice - if the system admin didn't invoke
the tmem-shared-auth - the hypervisor will gladly create another pool
for them, it just that it won't be shared.

> 
> Jan
> 

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

  reply	other threads:[~2017-04-05 13:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04 19:10 [PATCH v2] Tmem fixes for v4.9 Konrad Rzeszutek Wilk
2017-04-04 19:10 ` [PATCH v2 1/5] xen/libcx/tmem: Replace TMEM_RESTORE_NEW with XEN_SYSCTL_TMEM_OP_SET_POOLS Konrad Rzeszutek Wilk
2017-04-05  9:28   ` Jan Beulich
2017-04-04 19:10 ` [PATCH v2 2/5] xen/libxc: Move TMEM_AUTH to XEN_SYSCTL_TMEM_OP_SET_AUTH Konrad Rzeszutek Wilk
2017-04-05  9:30   ` Jan Beulich
2017-04-05 10:02   ` Wei Liu
2017-04-04 19:10 ` [PATCH v2 3/5] tmem: By default to join an shared pool it must be authorized Konrad Rzeszutek Wilk
2017-04-05  9:36   ` Jan Beulich
2017-04-05 13:40     ` Konrad Rzeszutek Wilk [this message]
2017-04-05 13:46       ` Jan Beulich
2017-04-04 19:10 ` [PATCH v2 4/5] tmem: Fix tmem-shared-auth 'auth' values Konrad Rzeszutek Wilk
2017-04-04 19:10 ` [PATCH v2 5/5] tmem: Parse UUIDs correctly Konrad Rzeszutek Wilk

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=20170405134044.GE4329@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=wei.liu2@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 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.