Re: [PATCH v2 4/4] soc: qcom: geni-se: Fix write to read-only firmware buffer
From: Konrad Dybcio
Date: Thu Aug 20 2026 - 10:48:17 EST
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
> 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: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@xxxxxxxxxxxxxxxx>
> ---
apart from that:
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad