linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment
@ 2021-08-24  9:41 Shawn Guo
  2021-08-24 15:18 ` Marijn Suijten
  0 siblings, 1 reply; 17+ messages in thread
From: Shawn Guo @ 2021-08-24  9:41 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, Shawn Guo

From: Shawn Guo <shawn.guo@linaro.org>

It's been observed on Sony Xperia M4 Aqua phone, that wcnss firmware has
the type of the second segment holding hashes just be PT_LOAD.  So drop
the check on phdrs[1].p_type to get it go on that phone.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/soc/qcom/mdt_loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/mdt_loader.c b/drivers/soc/qcom/mdt_loader.c
index eba7f76f9d61..6034cd8992b0 100644
--- a/drivers/soc/qcom/mdt_loader.c
+++ b/drivers/soc/qcom/mdt_loader.c
@@ -98,7 +98,7 @@ void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len)
 	if (ehdr->e_phnum < 2)
 		return ERR_PTR(-EINVAL);
 
-	if (phdrs[0].p_type == PT_LOAD || phdrs[1].p_type == PT_LOAD)
+	if (phdrs[0].p_type == PT_LOAD)
 		return ERR_PTR(-EINVAL);
 
 	if ((phdrs[1].p_flags & QCOM_MDT_TYPE_MASK) != QCOM_MDT_TYPE_HASH)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-08-28  8:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  9:41 [PATCH] soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment Shawn Guo
2021-08-24 15:18 ` Marijn Suijten
2021-08-24 15:34   ` Marijn Suijten
2021-08-26 14:18   ` Shawn Guo
2021-08-26 20:52     ` Marijn Suijten
2021-08-27  6:24       ` Shawn Guo
2021-08-27  8:29         ` Marijn Suijten
2021-08-27  9:57           ` Shawn Guo
2021-08-27 10:46             ` Marijn Suijten
2021-08-27 14:12               ` Shawn Guo
2021-08-27 15:13                 ` Marijn Suijten
2021-08-28  6:03                   ` Shawn Guo
2021-08-28  8:58                     ` Marijn Suijten
2021-08-27 16:07             ` Bjorn Andersson
2021-08-27 17:40               ` Marijn Suijten
2021-08-27 21:25                 ` Bjorn Andersson
2021-08-27 23:42                   ` Marijn Suijten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).