[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/18 V2]: PVH xen: create domctl_memory_mapping() function
On Thu, 21 Mar 2013 15:04:33 +0000 Tim Deegan <tim@xxxxxxx> wrote: > At 17:26 -0700 on 15 Mar (1363368383), Mukesh Rathor wrote: > > In this patch, XEN_DOMCTL_memory_mapping code is put into a > > function so it can be shared later for PVH. There is no change in > > it's functionality. > > >limit is an unsigned long, so 'int' doesn't seem right. > > > @@ -628,68 +690,13 @@ long arch_do_domctl( > > unsigned long mfn = domctl->u.memory_mapping.first_mfn; > > unsigned long nr_mfns = domctl->u.memory_mapping.nr_mfns; > > int add = domctl->u.memory_mapping.add_mapping; > > - unsigned long i; > > - > > - ret = -EINVAL; > > - if ( (mfn + nr_mfns - 1) < mfn || /* wrap? */ > > - ((mfn | (mfn + nr_mfns - 1)) >> (paddr_bits - > > PAGE_SHIFT)) || > > - (gfn + nr_mfns - 1) < gfn ) /* wrap? */ > > - break; > > > > ret = -EPERM; > > if ( !IS_PRIV(current->domain) && > > !iomem_access_permitted(current->domain, mfn, mfn + > > nr_mfns - 1) ) break; > > Why is this privilege check not being moved along with the rest of it? > Execially given that the two other IS_PRIV()s below are taken? Because, the other caller is construct_dom0, so not really needed. But I'll move it anyways. thanks, Mukesh _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |