Re: [PATCH] of: Use proper types for checking memory overflow

2014-07-10 Thread Grant Likely
On Tue, 8 Jul 2014 09:24:08 +0200 (CEST), Nicolas Pitre wrote: > On Mon, 7 Jul 2014, Laura Abbott wrote: > > > Commit a67a6ed15513541579d38bcbd127e7be170710e5 > > (of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch) > > corrected early_init_dt_add_memory_arch to account for ove

Re: [PATCH] of: Use proper types for checking memory overflow

2014-07-08 Thread Nicolas Pitre
On Mon, 7 Jul 2014, Laura Abbott wrote: > Commit a67a6ed15513541579d38bcbd127e7be170710e5 > (of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch) > corrected early_init_dt_add_memory_arch to account for overflows > but did so in an unclean way using ULONG_MAX. There is no > guaran

Re: [PATCH] of: Use proper types for checking memory overflow

2014-07-08 Thread Geert Uytterhoeven
On Tue, Jul 8, 2014 at 2:45 AM, Laura Abbott wrote: > Commit a67a6ed15513541579d38bcbd127e7be170710e5 > (of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch) > corrected early_init_dt_add_memory_arch to account for overflows > but did so in an unclean way using ULONG_MAX. There is

[PATCH] of: Use proper types for checking memory overflow

2014-07-07 Thread Laura Abbott
Commit a67a6ed15513541579d38bcbd127e7be170710e5 (of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch) corrected early_init_dt_add_memory_arch to account for overflows but did so in an unclean way using ULONG_MAX. There is no guarantee that sizeof(unsigned long) == sizeof(phys_addr_