diff options
author | Tinghan Shen <tinghan.shen@mediatek.com> | 2023-02-10 06:13:54 +0300 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2023-02-12 23:18:32 +0300 |
commit | 640587182066f75d3e8b62522685041f00ffbbbb (patch) | |
tree | d99fc41938068780883e29a42a77b7d4542ff083 /drivers/remoteproc | |
parent | 57f72170a2b2a362c35bb9407fc844eac5afdec1 (diff) | |
download | linux-640587182066f75d3e8b62522685041f00ffbbbb.tar.xz |
remoteproc: mediatek: Check the SCP image format
Do a sanity check on the SCP image before loading it to avoid
driver crashes.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230210031354.1335-1-tinghan.shen@mediatek.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/mtk_scp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index d421a2ccaa1e..0861b76f185f 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -649,6 +649,7 @@ static const struct rproc_ops scp_ops = { .load = scp_load, .da_to_va = scp_da_to_va, .parse_fw = scp_parse_fw, + .sanity_check = rproc_elf_sanity_check, }; /** |