[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 09/10] xen/arm: mm: Handle permission flags when adding a new mapping
On Mon, 9 Oct 2017, Julien Grall wrote: > Currently, all the new mappings will be read-write non-executable. Allow the > caller to use other permissions. > > Signed-off-by: Julien Grall <julien.grall@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > --- > Changes in v2: > - Switch the runtime check to a BUG_ON() > --- > xen/arch/arm/mm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c > index c1dad61a20..2329ccee83 100644 > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -1022,6 +1022,9 @@ static int create_xen_entries(enum xenmap_operation op, > if ( op == RESERVE ) > break; > pte = mfn_to_xen_entry(mfn, PAGE_AI_MASK(flags)); > + pte.pt.ro = PAGE_RO_MASK(flags); > + pte.pt.xn = PAGE_XN_MASK(flags); > + BUG_ON(!pte.pt.ro && !pte.pt.xn); > pte.pt.table = 1; > write_pte(entry, pte); > break; > -- > 2.11.0 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |