On 03/09/2012 10:13 AM, Peter Maydell wrote:
> On 9 March 2012 15:57, Mark Langsdorf <mark.langsd...@calxeda.com> wrote:
>> Since the ram_size field of arm_boot_info is only an int, don't set
>> that field to more than INT_MAX. Signed vs unsigned comparison
>> overruns are possible otherwise.
> 
> Can't we just make arm_boot_info.ram_size a uint32_t (propagating through
> signedness fixes as required) ?
> 
> Actually it should probably be a target_phys_addr_t, thinking ahead
> to adding LPAE support.

It really should be a size_t, per the upthread discussion with Andreas
Faerber.

I'll take a stab at the patch, but it touches a lot of code that I don't
really have a way to test so I'm a bit dubious.

--Mark Langsdorf
Calxeda, Inc.


Reply via email to