]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tmem: By default to join an shared pool it must be authorized.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sat, 18 Mar 2017 00:51:52 +0000 (20:51 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 5 Apr 2017 13:39:46 +0000 (09:39 -0400)
Having an off by default option allowing guests to join
_any_ shared pool is not very secure.

Lets eliminate tmem_shared_auth bootup option (which
was disabled by default) and have the code force this by default.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
docs/misc/tmem-internals.html
docs/misc/xen-command-line.markdown
xen/common/tmem.c
xen/common/tmem_xen.c
xen/include/xen/tmem_xen.h

index 2d8635d64d4314a6d98c5e6a21b0dfb9d578e5c5..9b7e70e65046c3c8da238b11e1044e5bb9fa9d35 100644 (file)
@@ -715,11 +715,9 @@ Ocfs2 has only very limited security; it is assumed that anyone who can
 access the filesystem bits on the shared disk can mount the filesystem and use
 it.  But in a virtualized data center,
 higher isolation requirements may apply.
-As a result, a Xen boot option -- &quot;tmem_shared_auth&quot; -- was
-added.  The option defaults to disabled,
-but when it is enabled, management tools must explicitly authenticate (or may
+As a result, management tools must explicitly authenticate (or may
 explicitly deny) shared pool access to any client.
-On Xen, this is done with the &quot;xm
+On Xen, this is done with the &quot;xl
 tmem-shared-auth&quot; command.
 <P>
 <b><i>32-bit implementation</i>.</b>
index 9eb85d68b59b1c0f330e8296117dcc9433d2c216..9690512b6d7f2084b6a6b31742ba01acc616e183 100644 (file)
@@ -1539,9 +1539,6 @@ pages) must also be specified via the tbuf\_size parameter.
 ### tmem\_compress
 > `= <boolean>`
 
-### tmem\_shared\_auth
-> `= <boolean>`
-
 ### tsc
 > `= unstable | skewed | stable:socket`
 
index 158d6604687700eb2f5a2fe9e57da1afc9bdb3a3..306dda60d57624764e00c974ec0ea67d5d1d86bc 100644 (file)
@@ -846,7 +846,6 @@ struct client *client_create(domid_t cli_id)
     client->info.version = TMEM_SPEC_VERSION;
     client->info.maxpools = MAX_POOLS_PER_DOMAIN;
     client->info.flags.u.compress = tmem_compression_enabled();
-    client->shared_auth_required = tmem_shared_auth();
     for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++)
         client->shared_auth_uuid[i][0] =
             client->shared_auth_uuid[i][1] = -1L;
@@ -1530,7 +1529,7 @@ int do_tmem_new_pool(domid_t this_cli_id,
             pool->shared = 0;
             goto out;
         }
-        if ( client->shared_auth_required && !tmem_global.shared_auth )
+        if ( !tmem_global.shared_auth )
         {
             for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++)
                 if ( (client->shared_auth_uuid[i][0] == uuid_lo) &&
index 7d60b7129e2353a39758628be0480aff4a09fd07..06ce3ef1290687ff875b2c9611d325f6c49c6d82 100644 (file)
@@ -20,9 +20,6 @@ boolean_param("tmem", opt_tmem);
 bool_t __read_mostly opt_tmem_compress = 0;
 boolean_param("tmem_compress", opt_tmem_compress);
 
-bool_t __read_mostly opt_tmem_shared_auth = 0;
-boolean_param("tmem_shared_auth", opt_tmem_shared_auth);
-
 atomic_t freeable_page_count = ATOMIC_INIT(0);
 
 /* these are a concurrency bottleneck, could be percpu and dynamically
index 70cc108ae3d44ade79137df7e72a1e15176d6f4d..dc5888c9c3d63d5b13d50b6c21305dcbf1c271e0 100644 (file)
@@ -41,12 +41,6 @@ static inline bool_t tmem_compression_enabled(void)
     return opt_tmem_compress;
 }
 
-extern bool_t opt_tmem_shared_auth;
-static inline bool_t tmem_shared_auth(void)
-{
-    return opt_tmem_shared_auth;
-}
-
 #ifdef CONFIG_TMEM
 extern bool_t opt_tmem;
 static inline bool_t tmem_enabled(void)
@@ -291,7 +285,6 @@ struct client {
     long eph_count, eph_count_max;
     domid_t cli_id;
     xen_tmem_client_t info;
-    bool_t shared_auth_required;
     /* For save/restore/migration. */
     bool_t was_frozen;
     struct list_head persistent_invalidated_list;