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

Re: [PATCH 1/8] x86/boot: Drop incorrect mapping at l2_xenmap[0]



On 30/11/2021 10:33, Jan Beulich wrote:
> On 30.11.2021 11:04, Andrew Cooper wrote:
>> It has been 4 years since the default load address changed from 1M to 2M, and
>> _stext ceased residing in l2_xenmap[0].  We should not be inserting an unused
>> mapping.
>>
>> To ensure we don't create mappings accidentally, loop from 0 and obey
>> _PAGE_PRESENT on all entries.
>>
>> Fixes: 7ed93f3a0dff ("x86: change default load address from 1 MiB to 2 MiB")
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> I guess this may be worth backporting despite not having any immediate
> adverse effect.

I'd say so, yes.  I too can't see an adverse effect right now, but I'm
definitely wary of stray executable mappings lying around.


In principle, it would be nice to reclaim the 2M of space (which only
exists for the MB1 path IIRC), but then we're getting into a position
where xen_phys_start isn't really that any more.

A different alternative could be to use it for early memory allocations
in Xen and treat it like .data, similar to Linux's early BRK().  This
might simplify some of the relocation hoops we currently jump through.

~Andrew



 


Rackspace

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