Re: [PATCH v2 4/4] soc: qcom: geni-se: Fix write to read-only firmware buffer

Viken Dadhaniya <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kernel.vger.linux-arm-msm,org.kernel.vger.stable
Message-ID <[email protected]>

On 8/20/2026 8:17 PM, Konrad Dybcio wrote:
> On 8/20/26 4:31 PM, Viken Dadhaniya wrote:
>> geni_find_protocol_fw() casts fw->data to a non-const struct se_fw_hdr
>> pointer and writes back the rounded-up fw_size value:
>>
>>         sefw->fw_size_in_items = cpu_to_le16(fw_size);
>>
>> The firmware subsystem maps the firmware blob read-only. Writing through
>> the cast pointer causes a level-3 permission fault on AArch64 and
>> crashes the kernel during driver probe.
>>
>> The write-back is no longer necessary: the previous commit propagates
> 
> "the previous commit" is discouraged because it's not guaranteed they
> land together
> 

Updated in v3.

>> the rounded size to the caller via fw_size_out. Remove the write-back
>> and make sefw (and the hdr pointer in the caller) const-correct.
>>
>> Fixes: d4bf06592ad6 ("soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem")
>> Cc: [email protected]
>> Signed-off-by: Viken Dadhaniya <[email protected]>
>> ---
> 
> apart from that:
> 
> Reviewed-by: Konrad Dybcio <[email protected]>
> 
> Konrad
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.