Searched hist:d87d5ede5708e02183c7468420184f21de627172 (Results 1 – 2 of 2) sorted by relevance
| /optee_os/core/kernel/ |
| H A D | tee_misc.c | d87d5ede5708e02183c7468420184f21de627172 Mon Jun 15 02:21:14 UTC 2015 Peng Fan <van.freenix@gmail.com> core: mm: fix adding integer overflow issue
On ARMv7 platform, it is easy that "base + size" wraps down to 0. For example, base is 0xfc100000, size is 0x3f00000, then base + size is 0. We should use the "end" address to do the comparation, but not "end + 1".
This patch also can be used for ARMv8.
Signed-off-by: Peng Fan <van.freenix@gmail.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64-bit)
|
| /optee_os/core/arch/arm/mm/ |
| H A D | core_mmu.c | d87d5ede5708e02183c7468420184f21de627172 Mon Jun 15 02:21:14 UTC 2015 Peng Fan <van.freenix@gmail.com> core: mm: fix adding integer overflow issue
On ARMv7 platform, it is easy that "base + size" wraps down to 0. For example, base is 0xfc100000, size is 0x3f00000, then base + size is 0. We should use the "end" address to do the comparation, but not "end + 1".
This patch also can be used for ARMv8.
Signed-off-by: Peng Fan <van.freenix@gmail.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64-bit)
|