From: Tinghan Shen Date: Fri, 10 Feb 2023 03:13:54 +0000 (+0800) Subject: remoteproc: mediatek: Check the SCP image format X-Git-Tag: v6.3-rc1~68^2~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=640587182066f75d3e8b62522685041f00ffbbbb;p=linux-block.git 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 Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230210031354.1335-1-tinghan.shen@mediatek.com Signed-off-by: Mathieu Poirier --- 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, }; /**