All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>, Matthew Daley <mattjd@gmail.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: fix domain unlocking in some xsm error paths
Date: Wed, 06 Mar 2013 15:34:27 +0000	[thread overview]
Message-ID: <CD5D1283.5D8DE%keir@xen.org> (raw)
In-Reply-To: <512F285102000078000C1CE1@nat28.tlf.novell.com>

On 28/02/2013 08:50, "Jan Beulich" <JBeulich@suse.com> wrote:

>>>> On 28.02.13 at 03:05, Matthew Daley <mattjd@gmail.com> wrote:
>> A couple of xsm error/access-denied code paths in hypercalls neglect to
>> unlock a previously locked domain. Fix by ensuring the domains are
>> unlocked correctly.
>> 
>> Signed-off-by: Matthew Daley <mattjd@gmail.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Keir Fraser <keir@xen.org>

>> --- a/xen/arch/x86/physdev.c
>> +++ b/xen/arch/x86/physdev.c
>> @@ -111,7 +111,7 @@ int physdev_map_pirq(domid_t domid, int type, int *index,
>> int *pirq_p,
>>  
>>      ret = xsm_map_domain_pirq(XSM_TARGET, d);
>>      if ( ret )
>> -        return ret;
>> +        goto free_domain;
>>  
>>      /* Verify or get irq. */
>>      switch ( type )
> 
> So it looks like this is a regression from Daniel's recent XSM rework.
> 
>> --- a/xen/common/grant_table.c
>> +++ b/xen/common/grant_table.c
>> @@ -2283,7 +2283,7 @@
>> gnttab_get_status_frames(XEN_GUEST_HANDLE_PARAM(gnttab_get_status_frames_t)
>> uop,
>>      rc = xsm_grant_setup(XSM_TARGET, current->domain, d);
>>      if ( rc ) {
>>          op.status = GNTST_permission_denied;
>> -        goto out1;
>> +        goto out2;
>>      }
>>  
>>      gt = d->grant_table;
> 
> Whereas this is something that is broken already in 4.2 (but not in
> 4.1). I'll try to remember to pick this up for 4.2 once it got applied
> and came out of staging.
> 
> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

      reply	other threads:[~2013-03-06 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28  2:05 [PATCH] xen: fix domain unlocking in some xsm error paths Matthew Daley
2013-02-28  8:50 ` Jan Beulich
2013-03-06 15:34   ` Keir Fraser [this message]

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=CD5D1283.5D8DE%keir@xen.org \
    --to=keir@xen.org \
    --cc=JBeulich@suse.com \
    --cc=mattjd@gmail.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.