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

Re: [Xen-devel] [PATCH] xen: arm: zero EL2 pagetable pages before use

>>> On 11.03.16 at 13:56, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 11/03/16 11:29, Jan Beulich wrote:
>>>>> On 10.03.16 at 23:00, <shankerd@xxxxxxxxxxxxxx> wrote:
>>> @@ -771,6 +772,7 @@ void __init setup_frametable_mappings(paddr_t ps, 
>>> paddr_t pe)
>>>      nr_second = frametable_size >> SECOND_SHIFT;
>>>      second_base = alloc_boot_pages(nr_second, 1);
>>>      second = mfn_to_virt(second_base);
>>> +    memset(second, 0, nr_second * PAGE_SIZE);
>>>      for ( i = 0; i < nr_second; i++ )
>>>      {
>>>          pte = mfn_to_xen_entry(second_base + i, WRITEALLOC);
>> Along those lines here - use clear_page(), presumably by moving it
>> into the loop.
> This need only initialise the entries which are not filled by the loop,
> which will only be the rounding size up to the next 2M or 32M boundary.
> Most of the content of 'second' is explicitly initialised, so zeroing it
> all first is redundant.

Well, I certainly don't know all the details of how this works on
ARM, but the way I remember the original problem description
(sent a few days ago) the problem was with bogus translations
to be visible transiently. Of course all depends on whether the
page tables that are being modified here are live ones, which
I simply don't know.


Xen-devel mailing list



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