Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: i386 PAE support (Patches)
On Mon, Jan 04, 2010 at 10:21:17PM +0100, Jean-Yves Migeon wrote:
> On 01/04/10 18:46, Manuel Bouyer wrote:
> >what issue with ptoa() did you see ? I understand how bad trucating to
> >vaddr_t here can be, but it's not an issue with Xen so I wonder why
> >it's needed in the native case.
> >
> >To me it looks like ptoa() is used on both physical and virtual addresses
> >or size, and in some case to compute a virtual address/size from a
> >physical one (like in uvm_init_limits() or proc0_init()).
> >A closer look is probably needd here.
>
> Yes, it is the use of ptoa() on integer values (frame number, for
> example), which could be higher than 1M with PAE.
>
> The problem is encountered in pmap, and some drivers, with ptoa() used
> on variables like physmem, with a potential overflow when physical
> memory is greater than 4GiB.
Yes, I understand this. but I don't understand why it's not a problem
with Xen (my guess is that in reality, it doesn't overflow in
that much places).
My problem with the way ptoa is fixed here is that it doesn't fix
the overflow: there are several places where the result is stored
in a 32bit integer (see the 2 functions above for example).
Here it's not ptoa() which needs to be fixed, but the code needs to
detect the overflow and use a sensible value in this case.
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index