mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
c08eb93626
commit
14d963d1b5
4 changed files with 14 additions and 17 deletions
|
@ -155,14 +155,7 @@ static int stm32_copro_load(struct udevice *dev, ulong addr, ulong size)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Support only ELF32 image */
|
||||
ret = rproc_elf32_sanity_check(addr, size);
|
||||
if (ret) {
|
||||
dev_err(dev, "Invalid ELF32 image (%d)\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return rproc_elf32_load_image(dev, addr);
|
||||
return rproc_elf32_load_image(dev, addr, size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue