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

Re: [Xen-devel] [PATCH]: Fix Xen domU boot with batched mprotect



>>> Jeremy Fitzhardinge <jeremy@xxxxxxxx> 16.10.08 18:10 >>>
>The current x86-64 implementation is:
>
>bool __virt_addr_valid(unsigned long x)
>{
>       if (x >= __START_KERNEL_map) {
>               x -= __START_KERNEL_map;
>               if (x >= KERNEL_IMAGE_SIZE)
>                       return false;

This, imo, is still broken (i.e. the name of the function still isn't matched
by the implementation): KERNEL_IMAGE_SIZE is a constant and doesn't
account for the fact that only the real kernel image can be relied upon
to be mapped.

>and 32-bit is similar (but simpler, since it doesn't need to worry about a 
>separate kernel mapping).

This continues to be broken, but not as badly as it used to be - while it
now covers user space and the vmalloc area (I'm unclear why this is
excluded only after booting completed, though), hypervisor space
continues to not be considered here.

But as mentioned before - excluding the vmalloc area seems bogus wrt
the name of the function, but as I take it the confusion here is intended.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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