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

Re: [Xen-devel] pagetable RO



Yes, I see that.
Thanks a lot, Jan.

Henry

> Date: Mon, 14 Oct 2013 07:32:06 +0100
> From: JBeulich@xxxxxxxx
> To: zhangzhi2022@xxxxxxxxxxx
> CC: xen-devel@xxxxxxxxxxxxx
> Subject: RE: [Xen-devel] pagetable RO
>
> >>> On 11.10.13 at 19:27, 张智<zhangzhi2022@xxxxxxxxxxx> wrote:
> > I've read the source code of do_mmu_update and could only find that macro:
> > define_get_linear_pagetable(l2) checks whether its entry is read-only.
> > However, this function does execute only when
> > get_page_and_type_from_pagenr(mfn, PGT_l1_page_table, ...) returns an invalid
> > value. Is this the point or somewhere else about checking whether the new
> > PGT_l1_page_table as read-only ? I did not find the check points in the
> > function: get_page_and_type_from_pagenr(mfn, PGT_l1_page_table, ...) as well
> > as its sub-branch functions.
>
> That's not how it works. A page is read-only if it's of one of the types
> that require it to be and has non-zero type reference count, or if it's
> of no particular type (i.e. its type reference count is zero). Any
> mapping with _PAGE_RW set would cause the page to have a non-
> zero type reference count and be of type PGT_writable, and hence
> it couldn't be transitioned to any of the other (read-only) types. The
> core function here is __get_page_type().
>
> Jan
_______________________________________________
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®.