Laura Abbott a67a6ed155 of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch
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 outside the
range of phys_addr_t. Add range checks for the base and size if
phys_addr_t is smaller than u64.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-06-26 17:28:28 +01:00
..
2014-06-04 09:08:25 -07:00
2014-06-19 18:49:37 -10:00
2014-06-17 14:28:04 +02:00
2014-06-06 11:48:46 -07:00
2014-05-27 17:38:11 -07:00
2014-06-15 01:00:50 -07:00
2014-06-11 14:06:55 -07:00
2014-06-02 16:35:49 -07:00
2014-06-06 11:44:09 -07:00
2014-05-26 21:27:09 +02:00
2014-06-21 06:41:42 -10:00