From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Mukesh Ojha <quic_mojha@quicinc.com>,
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, swboyd@chromium.org,
judyhsiao@chromium.org, devicetree@vger.kernel.org,
krzysztof.kozlowski@linaro.org, mathieu.poirier@linaro.org,
corbet@lwn.net
Subject: Re: [PATCH v3 1/2] remoteproc: elf_loader: Update resource table name check
Date: Tue, 20 Dec 2022 23:27:17 +0100 [thread overview]
Message-ID: <7549c8a8-bad0-7f7b-b07a-4a80d44d1ec3@linaro.org> (raw)
In-Reply-To: <0d683526-5707-d5b4-e96d-b2d982d4b5da@quicinc.com>
On 20/12/22 13:50, Mukesh Ojha wrote:
> Hi,
>
> On 12/20/2022 1:31 PM, 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',
>> hence section header name (e.g. .resource_table), appended with ELF name
>> to differentiate with same section(e.g. resource_table.ac_bin_process) of
>> different ELFs'.
>> Example readelf output of DSP binary:
>> [60] .start.ac_bin_process PROGBITS
>> [61] .resource_table.ac_bin_process PROGBITS
>> [62] .comment.ac_bin_process PROGBITS
>>
>
> Could we rephrase above like below ?
FWIW I agree :) I assumed Srinivasa was using a broken email client
that strips newlines and packs everything.
> It could be also taken why applying
> the patch.
>
> 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
> ELF's. Hence, section header name (e.g. .resource_table), appended
> with ELF name to differentiate with same section(e.g.
> resource_table.ac_bin_process) of different ELFs'.
>
> Example readelf output of DSP binary:
> [60] .start.ac_bin_process PROGBITS
> [61] .resource_table.ac_bin_process PROGBITS
> [62] .comment.ac_bin_process PROGBITS
>
>
> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
>
> Otherwise, LGTM.
> Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
>
> -Mukesh
>> ---
>> 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-20 22:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 8:01 [PATCH v3 0/2] Update section header name check Srinivasa Rao Mandadapu
2022-12-20 8:01 ` [PATCH v3 1/2] remoteproc: elf_loader: Update resource table " Srinivasa Rao Mandadapu
2022-12-20 12:50 ` Mukesh Ojha
2022-12-20 22:27 ` Philippe Mathieu-Daudé [this message]
2022-12-21 5:46 ` Mukesh Ojha
2022-12-21 5:54 ` Srinivasa Rao Mandadapu
2022-12-20 8:01 ` [PATCH v3 2/2] docs: remoteproc: Update section header name requirement Srinivasa Rao Mandadapu
2022-12-20 12:51 ` Mukesh Ojha
2022-12-20 11:44 ` [PATCH v3 0/2] Update section header name check Philippe Mathieu-Daudé
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=7549c8a8-bad0-7f7b-b07a-4a80d44d1ec3@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_mojha@quicinc.com \
--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