changes since Xen 4.6.5: mostly bug fixes, including security fixes for XSA206, XSA211 to XSA244. PKGREVISION set to 1 to account for the fact that it's not a stock Xen 4.6.6. Note that, unlike upstream, pv-linear-pt defaults to true, so that NetBSD PV guests (including dom0) will continue to boot without changes to boot.cfg
40 lines
1.4 KiB
Text
40 lines
1.4 KiB
Text
$NetBSD: patch-XSA230,v 1.1 2017/10/17 10:57:34 bouyer Exp $
|
|
|
|
From: Jan Beulich <jbeulich@suse.com>
|
|
Subject: gnttab: correct pin status fixup for copy
|
|
|
|
Regardless of copy operations only setting GNTPIN_hst*, GNTPIN_dev*
|
|
also need to be taken into account when deciding whether to clear
|
|
_GTF_{read,writ}ing. At least for consistency with code elsewhere the
|
|
read part better doesn't use any mask at all.
|
|
|
|
This is XSA-230.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
|
|
index ae34547..9c9d33c 100644
|
|
--- xen/common/grant_table.c.orig
|
|
+++ xen/common/grant_table.c
|
|
@@ -2107,10 +2107,10 @@ __release_grant_for_copy(
|
|
static void __fixup_status_for_copy_pin(const struct active_grant_entry *act,
|
|
uint16_t *status)
|
|
{
|
|
- if ( !(act->pin & GNTPIN_hstw_mask) )
|
|
+ if ( !(act->pin & (GNTPIN_hstw_mask | GNTPIN_devw_mask)) )
|
|
gnttab_clear_flag(_GTF_writing, status);
|
|
|
|
- if ( !(act->pin & GNTPIN_hstr_mask) )
|
|
+ if ( !act->pin )
|
|
gnttab_clear_flag(_GTF_reading, status);
|
|
}
|
|
|
|
@@ -2318,7 +2318,7 @@ __acquire_grant_for_copy(
|
|
|
|
unlock_out_clear:
|
|
if ( !(readonly) &&
|
|
- !(act->pin & GNTPIN_hstw_mask) )
|
|
+ !(act->pin & (GNTPIN_hstw_mask | GNTPIN_devw_mask)) )
|
|
gnttab_clear_flag(_GTF_writing, status);
|
|
|
|
if ( !act->pin )
|