[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 19/23 v2] arch/x86: check remote MMIO remap permissions



>>> On 19.09.12 at 19:23, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> wrote:

This looks good now to me, apart from minor (cosmetic) issues:

> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -754,6 +754,19 @@ get_page_from_l1e(
>              return -EINVAL;
>          }
>  
> +        if ( pg_owner != l1e_owner &&
> +             !iomem_access_permitted(l1e_owner, mfn, mfn) )
> +        {
> +            if ( mfn != (PADDR_MASK >> PAGE_SHIFT) ) /* INVALID_MFN? */
> +            {
> +                MEM_LOG("Domain %u attempted to map I/O space %08lx in 
> domain %u to domain %u",

I'd prefer each of the "[Dd]omain %u" references to be
"[Dd]om%d" instead - no need for excessively long log messages.

> +                        curr->domain->domain_id, mfn, pg_owner->domain_id,
> +                                             l1e_owner->domain_id);

Indentation wants to be fixed here.

Ack with those changes (but aiui the patch isn't really tied to be
applied in order - if that's right, i.e. I don't overlook some subtlety,
I could as well commit it right away; I would even consider this a
backporting candidate).

Jan

> +                return -EPERM;
> +            }
> +            return -EINVAL;
> +        }
> +
>          if ( !(l1f & _PAGE_RW) ||
>               !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
>              return 0;
> -- 
> 1.7.11.4




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.