[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] arm highbank: force ramsize to INT_MAX when loa
From: |
Mark Langsdorf |
Subject: |
Re: [Qemu-devel] [PATCH] arm highbank: force ramsize to INT_MAX when loading |
Date: |
Fri, 09 Mar 2012 10:40:07 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
On 03/09/2012 10:13 AM, Peter Maydell wrote:
> On 9 March 2012 15:57, Mark Langsdorf <address@hidden> 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.
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, (continued)
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Peter Maydell, 2012/03/12
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Andreas Färber, 2012/03/12
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Andreas Färber, 2012/03/12
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Markus Armbruster, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Mark Langsdorf, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Markus Armbruster, 2012/03/09
[Qemu-devel] [PATCH v2] use an unsigned long for the max_sz parameter in load_image_targphys, Mark Langsdorf, 2012/03/09
[Qemu-devel] [PATCH] arm highbank: force ramsize to INT_MAX when loading, Mark Langsdorf, 2012/03/09
[Qemu-devel] [PATCH v3] use an uint64_t for the max_sz parameter in load_image_targphys, Mark Langsdorf, 2012/03/12
Re: [Qemu-devel] [PATCH v3] use an uint64_t for the max_sz parameter in load_image_targphys, Alexander Graf, 2012/03/12