From 764012376a096a45bced88ee2ec1a6c17c6c22c7 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Thu, 18 Apr 2013 17:01:45 +0200 Subject: x86: remove IS_PRIV access check bypasses Several domctl functions dealing with rangesets contain a short-circuit bypass if the domain is privileged. Since the construction of domain 0 permits access to all I/O ranges, the call to irq_access_permitted will normally return true even without the IS_PRIV check, and the presence of the IS_PRIV check prevents the creation of a privileged domain without access to specific devices or IO memory ranges. Signed-off-by: Daniel De Graaf --- xen/arch/x86/irq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xen/arch/x86/irq.c') diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index bbf413089d..b0b0c655bd 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1891,8 +1891,7 @@ int map_domain_pirq( ASSERT(spin_is_locked(&d->event_lock)); - if ( !IS_PRIV(current->domain) && - !irq_access_permitted(current->domain, irq)) + if ( !irq_access_permitted(current->domain, irq)) return -EPERM; if ( pirq < 0 || pirq >= d->nr_pirqs || irq < 0 || irq >= nr_irqs ) -- cgit v1.2.3