From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Andrii Tseglytskyi <andrii.tseglytskyi@globallogic.com>,
Jan Beulich <JBeulich@suse.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Keir Fraser <keir@xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH v2] domctl: tighten XEN_DOMCTL_*_permission
Date: Fri, 15 Aug 2014 11:36:42 +0100 [thread overview]
Message-ID: <53EDE2BA.7020307@citrix.com> (raw)
In-Reply-To: <CAH_mUMM7g05dvSQVU+C7SS-Le-r5C_R_7qRFu45O9Qid6NmB_g@mail.gmail.com>
On 15/08/14 11:00, Andrii Tseglytskyi wrote:
> Hi,
>
> I see possible issue with this patch. Can someone clarify - did I get
> everything correctly?
>
> On Tue, May 6, 2014 at 4:08 PM, Jan Beulich <JBeulich@suse.com> wrote:
>> @@ -790,7 +790,8 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xe
>>
>> if ( pirq >= d->nr_pirqs )
>> ret = -EINVAL;
>> - else if ( xsm_irq_permission(XSM_HOOK, d, pirq, allow) )
>> + else if ( !pirq_access_permitted(current->domain, pirq) ||
> pirq_access_permitted() checks a range. Range can be added only with
> pirq_permit_access() function call. The only place where
> pirq_permit_access() is called - is following
> *else if* branch. But it will be never called -
> pirq_access_permitted() will return 0 if range does not exist. As
> result - it is impossible to add irq, even if XSM allows this.
> The same is true for iomem_access_permitted() function call.
I questioned the same issue when this patch went in.
The argument is that, even with XSM, a domain may only permit access to
pirqs for which it also has permissions.
This prevents a buggy domain builder accidentally conferring pirq access
for a dom0 resource, without dom0 first having conferred access to the
domain builder.
~Andrew
next prev parent reply other threads:[~2014-08-15 10:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 13:08 [PATCH v2] domctl: tighten XEN_DOMCTL_*_permission Jan Beulich
2014-05-08 11:20 ` Tim Deegan
2014-08-15 10:00 ` Andrii Tseglytskyi
2014-08-15 10:36 ` Andrew Cooper [this message]
2014-08-15 11:02 ` Andrii Tseglytskyi
2014-08-15 12:02 ` Andrew Cooper
2014-08-15 12:22 ` Andrii Tseglytskyi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53EDE2BA.7020307@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrii.tseglytskyi@globallogic.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).