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

Re: [Xen-devel] pagetable RO

> Date: Fri, 11 Oct 2013 08:15:43 +0100
> From: JBeulich@xxxxxxxx
> To: zhangzhi2022@xxxxxxxxxxx
> CC: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] pagetable RO
> >>> On 11.10.13 at 08:30, 张智<zhangzhi2022@xxxxxxxxxxx> wrote:
> > Say, the sub-op: MMU_NORMAL_PT_UPDATE,
> > if the page that ptr of struct mmu_update points to is PGT_l2_page_table,
> > then
> > the address part of val of struct mmu_update points
> > to a page, which is PGT_l1_page_table.
> > However, I couldn't find the protections for this PGT_l1_page_table
> > page in the do_mmu_update, is it already set as read-only
> > before launching MMU_UPDATE hypercall?

> Of course - a page can't be PGT_l1_page_table when there still is
> some writable mapping around.
Thanks, but when will the page be set as read-only before the MMU_UPDATE hypercall ? is there any hint?

> So for an L2 entry update it is sufficient to verify that all contained L1 entries point to R/O
> pages (and transition them to PGT_l1_page_table if they aren't
> already).

Besides, in the function do_mmu_update for an L2 entry update, the new PGT_l1_page_table page, containing all L1 entries,  does not have the process of checking whether they are pointing to the pages of page table type. Instead, R/W flag is removed from the L1 entry only because the page that the entry points to is non-sharable or is a I/O page. What's the reason?

> Jan

Xen-devel mailing list



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