Skip to contentSkip to conversation

remoteproc: mediatek: Check the SCP image format

PATCH In review Tinghan Shen 4 participants 4 messages Feb 10, 2023 – Feb 12, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: mediatek: Check the SCP image format

Do a sanity check on the SCP image before loading it to avoid driver crashes.

---
 drivers/remoteproc/mtk_scp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/remoteproc/mtk_scp.c +1 -0
index d421a2ccaa1e..0861b76f185f 100644
@@ -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,
 };
 
 /**
Signature · 1 line
2.18.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Tinghan Shen

Do a sanity check on the SCP image before loading it to avoid driver crashes.

Quoted 16 lines
---
  drivers/remoteproc/mtk_scp.c | 1 +
  1 file changed, 1 insertion(+)
drivers/remoteproc/mtk_scp.c +1 -0
index d421a2ccaa1e..0861b76f185f 100644
@@ -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,
  };
 
  /**
maintainer
#3 lore raw
In reply to Tinghan Shen
Quoted 8 lines · Tinghan Shen

Do a sanity check on the SCP image before loading it to avoid driver crashes.

---
 drivers/remoteproc/mtk_scp.c | 1 +
 1 file changed, 1 insertion(+)

I have applied this patch.

Thanks,
Mathieu

Quoted 15 lines
drivers/remoteproc/mtk_scp.c +1 -0
index d421a2ccaa1e..0861b76f185f 100644
@@ -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,
 };
 
 /**
Signature · 1 line
2.18.0