[patch] PFN_PHYS PAE overflow (fixes bug 242)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] PFN_PHYS PAE overflow (fixes bug 242)

Scott Parish
machine_specific_memory_setup() makes the following call to setup e820:

    add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);

Since max_pfn is (rightly) an unsigned long, we overflow for the current
definition of PFN_PHYS. Attached is my preferred solution as it will
hopefully avoid similar situations that may come up in the future.

sRp

--
Scott Parish
Signed-off-by: [hidden email]

_______________________________________________
Xen-devel mailing list
[hidden email]
http://lists.xensource.com/xen-devel

pfn_phys_overflow.diff (670 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: [patch] PFN_PHYS PAE overflow (fixes bug 242)

Ian Pratt
 
> machine_specific_memory_setup() makes the following call to
> setup e820:
>
>     add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
>
> Since max_pfn is (rightly) an unsigned long, we overflow for
> the current definition of PFN_PHYS. Attached is my preferred
> solution as it will hopefully avoid similar situations that
> may come up in the future.

Good catch!

Ian

_______________________________________________
Xen-devel mailing list
[hidden email]
http://lists.xensource.com/xen-devel