From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>,
linux-remoteproc@vger.kernel.org, agross@kernel.org,
andersson@kernel.org, lgirdwood@gmail.com, broonie@kernel.org,
robh+dt@kernel.org, quic_plai@quicinc.com, bgoswami@quicinc.com,
perex@perex.cz, tiwai@suse.com, srinivas.kandagatla@linaro.org,
quic_rohkumar@quicinc.com, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, judyhsiao@chromium.org,
devicetree@vger.kernel.org, krzysztof.kozlowski@linaro.org,
mathieu.poirier@linaro.org, corbet@lwn.net,
Stephen Boyd <swboyd@chromium.org>
Subject: Re: [PATCH v2 1/2] remoteproc: elf_loader: Update resource table name check
Date: Thu, 15 Dec 2022 08:06:16 +0100 [thread overview]
Message-ID: <fe761bbe-96f9-75ae-b4be-e94b718abac3@linaro.org> (raw)
In-Reply-To: <1670924929-26507-2-git-send-email-quic_srivasam@quicinc.com>
On 13/12/22 10:48, Srinivasa Rao Mandadapu wrote:
> Update the way of checking resource table name with prefix
> substring search instead of complete string search.
> In general Qualcomm DSP binary is prepared by combining different elfs,
Maybe 'ELFs'? (twice).
> hence section header name (e.g. .resource_table), appended with elf name
> to differentiate with same section of different elfs.
Please include here the section info parsed by readelf as an example,
as suggested by Stephen in your v1:
https://lore.kernel.org/linux-remoteproc/CAE-0n52cNite8-4HDoQcsZ+UvZFkJU8c5oUjxPB5ag5WP6E9=g@mail.gmail.com/
> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
> ---
> Changes since v1:
> -- Update the commit message.
> -- Use strstarts instead of strstr.
>
> drivers/remoteproc/remoteproc_elf_loader.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c
> index 5a412d7..77330d6 100644
> --- a/drivers/remoteproc/remoteproc_elf_loader.c
> +++ b/drivers/remoteproc/remoteproc_elf_loader.c
> @@ -272,7 +272,7 @@ find_table(struct device *dev, const struct firmware *fw)
> u64 offset = elf_shdr_get_sh_offset(class, shdr);
> u32 name = elf_shdr_get_sh_name(class, shdr);
>
> - if (strcmp(name_table + name, ".resource_table"))
> + if (!strstarts(name_table + name, ".resource_table"))
> continue;
>
> table = (struct resource_table *)(elf_data + offset);
next prev parent reply other threads:[~2022-12-15 7:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 9:48 [PATCH v2 0/2] Update section header name check Srinivasa Rao Mandadapu
2022-12-13 9:48 ` [PATCH v2 1/2] remoteproc: elf_loader: Update resource table " Srinivasa Rao Mandadapu
2022-12-15 7:06 ` Philippe Mathieu-Daudé [this message]
2022-12-20 7:32 ` Srinivasa Rao Mandadapu
2022-12-13 9:48 ` [PATCH v2 2/2] docs: remoteproc: Update section header name requirement Srinivasa Rao Mandadapu
2022-12-15 7:25 ` Philippe Mathieu-Daudé
2022-12-20 7:27 ` Srinivasa Rao Mandadapu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe761bbe-96f9-75ae-b4be-e94b718abac3@linaro.org \
--to=philmd@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=judyhsiao@chromium.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=perex@perex.cz \
--cc=quic_plai@quicinc.com \
--cc=quic_rohkumar@quicinc.com \
--cc=quic_srivasam@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=swboyd@chromium.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).