This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] out of bounds handling for get_mfn_from_gpfn()

On 26 Apr 2006, at 15:28, Jan Beulich wrote:

Okay, maybe we need to be more restrictive: 20 bits for 32b (4GB), 22
bits for 32b-pae (16GB), and some suitable large value for 64b (31
would be fine, it's good for up to 8TB).

Then perhaps the way to go would be to really check against
((RO_MPT_VIRT_END - RO_MPT_VIRT_START) / sizeof(*phys_to_machine_mapping)). This wouldn't be 31 bits for x86-64, but it seems to me that allowing 35-bit gpfn-s wouldn't be that bad an idea (and the fact that the array currently may only get populated up to 31-bit gpfn-s wouldn't seem to cause any problems). I'll prepare a

Okay, that's a reasonable way to go. Please define a macro to hide the RO_MPT arithmetic though.
Maybe NR_PHYSMACHINE_TABLE_ENTRIES or something like that...

 -- Keir

Xen-devel mailing list