Re: [PATCHv2] of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

2014-06-24 Thread Grant Likely
On Thu, 19 Jun 2014 23:33:27 -0400 (EDT), Nicolas Pitre nicolas.pi...@linaro.org wrote: On Thu, 19 Jun 2014, Laura Abbott wrote: The common early_init_dt_add_memory_arch takes the base and size of a memory region as u64 types. The function never checks if the base and size can actually

[PATCHv2] of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

2014-06-19 Thread Laura Abbott
The common early_init_dt_add_memory_arch takes the base and size of a memory region as u64 types. The function never checks if the base and size can actually fit in a phys_addr_t which may be smaller than 64-bits. This may result in incorrect memory being passed to memblock_add if the memory falls

Re: [PATCHv2] of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

2014-06-19 Thread Nicolas Pitre
On Thu, 19 Jun 2014, Laura Abbott wrote: The common early_init_dt_add_memory_arch takes the base and size of a memory region as u64 types. The function never checks if the base and size can actually fit in a phys_addr_t which may be smaller than 64-bits. This may result in incorrect memory