]> xenbits.xensource.com Git - xen.git/commitdiff
ARM: disable grant table v2
authorStefano Stabellini <sstabellini@kernel.org>
Mon, 13 Aug 2018 16:25:51 +0000 (17:25 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Aug 2018 15:56:46 +0000 (16:56 +0100)
It was never expected to work, the implementation is incomplete.

As a side effect, it also prevents guests from triggering a
"BUG_ON(page_get_owner(pg) != d)" in gnttab_unpopulate_status_frames().

This is XSA-268.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
docs/misc/xen-command-line.markdown
xen/common/grant_table.c
xen/include/asm-arm/grant_table.h

index 65b47544184dbc50994d61f0fc8064a321f6e75b..941e76f7619d671165b918a415fe50722dfaf249 100644 (file)
@@ -938,6 +938,8 @@ version are 1 and 2.
 use of grant table v2 without transitive grants is an ABI breakage from the
 guests point of view.
 
+The usage of gnttab v2 is not security supported on ARM platforms.
+
 ### gnttab\_max\_frames
 > `= <integer>`
 
index 8b843b13b48f1bb2c5a8b3f3a3f61557148abfe5..ad55cfa0ec1c107d197d4f1262a4d9fda47b33ef 100644 (file)
@@ -88,7 +88,11 @@ integer_runtime_param("gnttab_max_frames", opt_max_grant_frames);
 unsigned int __read_mostly opt_max_maptrack_frames = 1024;
 integer_runtime_param("gnttab_max_maptrack_frames", opt_max_maptrack_frames);
 
-static unsigned int __read_mostly opt_gnttab_max_version = 2;
+#ifndef GNTTAB_MAX_VERSION
+#define GNTTAB_MAX_VERSION 2
+#endif
+
+static unsigned int __read_mostly opt_gnttab_max_version = GNTTAB_MAX_VERSION;
 static bool __read_mostly opt_transitive_grants = true;
 
 static int __init parse_gnttab(const char *s)
index 9c2c8155264b2c74d6554465293a59d6ce1e0067..756c6be2d67bd91ae233d2e017031266ecd775a1 100644 (file)
@@ -7,6 +7,7 @@
 #include <xen/sched.h>
 
 #define INITIAL_NR_GRANT_FRAMES 1U
+#define GNTTAB_MAX_VERSION 1
 
 struct grant_table_arch {
     gfn_t *shared_gfn;