]> xenbits.xensource.com Git - people/dwmw2/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 16:01:28 +0000 (17:01 +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>
(cherry picked from commit 9a5c16a3e75778c8a094ca87784d93b74676f46c)

docs/misc/xen-command-line.markdown
xen/common/grant_table.c
xen/include/asm-arm/grant_table.h

index 3b710b71fb107a647d5a53fa0e72e83fadee0df8..e5e7fdc405720a1e2d2acc41d956a73fba066135 100644 (file)
@@ -936,6 +936,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 c757b7f6f520e352e6e65ef3aed8d254eafb7338..231ecf509a74d76e7b85d730b78805ff7f714e43 100644 (file)
@@ -97,7 +97,11 @@ static unsigned int __read_mostly max_maptrack_frames =
                                                DEFAULT_MAX_MAPTRACK_FRAMES;
 integer_runtime_param("gnttab_max_maptrack_frames", 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 e52936c79fc2b7b6ba15d7318a1d865623d6e387..24958e4670c5ec2dea121a49db31adeec084d472 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;