remoteproc: elf_loader: Always check the validity of the image before loading
authorLokesh Vutla <lokeshvutla@ti.com>
Wed, 4 Sep 2019 10:31:28 +0000 (16:01 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 11 Oct 2019 14:07:34 +0000 (10:07 -0400)
commit14d963d1b51fc7a57b8d561588f163d7cae8ed81
treedefff9e9b73fe3343a136bb7d2e62b7e9738a5c6
parentc08eb936263c67312cb55c354277f9dc3433b194
remoteproc: elf_loader: Always check the validity of the image before loading

rproc_elf32_load_image() rely on user to send a valid address for elf loading.
Instead do a sanity check on the address passed by user. This will help
all rproc elf users to not call sanity_check explicitly before calling
elf_loading.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
drivers/remoteproc/rproc-elf-loader.c
drivers/remoteproc/stm32_copro.c
include/remoteproc.h
test/dm/remoteproc.c