Re: [PATCH] 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, Rob Herring wrote: > On Thu, Jun 19, 2014 at 12:04 AM, 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

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

2014-06-19 Thread Rob Herring
On Thu, Jun 19, 2014 at 12:04 AM, 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

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

2014-06-19 Thread Geert Uytterhoeven
Fixed Rob's and devicetree's addresses On Thu, Jun 19, 2014 at 7:04 AM, 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

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

2014-06-19 Thread Geert Uytterhoeven
Fixed Rob's and devicetree's addresses On Thu, Jun 19, 2014 at 9:31 AM, Geert Uytterhoeven wrote: > Hi Laura, > > On Thu, Jun 19, 2014 at 7:04 AM, 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

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

2014-06-19 Thread Geert Uytterhoeven
Hi Laura, On Thu, Jun 19, 2014 at 7:04 AM, 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

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

2014-06-19 Thread Geert Uytterhoeven
Hi Laura, On Thu, Jun 19, 2014 at 7:04 AM, Laura Abbott lau...@codeaurora.org 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

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

2014-06-19 Thread Geert Uytterhoeven
Fixed Rob's and devicetree's addresses On Thu, Jun 19, 2014 at 7:04 AM, Laura Abbott lau...@codeaurora.org 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

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

2014-06-19 Thread Geert Uytterhoeven
Fixed Rob's and devicetree's addresses On Thu, Jun 19, 2014 at 9:31 AM, Geert Uytterhoeven ge...@linux-m68k.org wrote: Hi Laura, On Thu, Jun 19, 2014 at 7:04 AM, Laura Abbott lau...@codeaurora.org wrote: The common early_init_dt_add_memory_arch takes the base and size of a memory region as

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

2014-06-19 Thread Rob Herring
On Thu, Jun 19, 2014 at 12:04 AM, Laura Abbott lau...@codeaurora.org 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

Re: [PATCH] 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, Rob Herring wrote: On Thu, Jun 19, 2014 at 12:04 AM, Laura Abbott lau...@codeaurora.org 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

[PATCH] of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

2014-06-18 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

[PATCH] of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

2014-06-18 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