[PATCH v6 3/4] misc: fastrpc: Cleanup the domain names
Ling Xu
quic_lxu5 at quicinc.com
Fri Jul 11 02:32:26 UTC 2025
在 7/10/2025 3:25 AM, Konrad Dybcio 写道:
> On 7/9/25 7:47 AM, Ling Xu wrote:
>> Currently the domain ids are added for each instance of domains, this is
>> totally not scalable approach. Clean this mess and create domain ids for
>> only domains not its instances.
>>
>> Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
>> Signed-off-by: Ling Xu <quic_lxu5 at quicinc.com>
>> ---
>
> [...]
>
>> @@ -2330,21 +2323,20 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>> case ADSP_DOMAIN_ID:
>> case MDSP_DOMAIN_ID:
>> case SDSP_DOMAIN_ID:
>> - /* Unsigned PD offloading is only supported on CDSP and CDSP1 */
>> + /* Unsigned PD offloading is only supported on CDSP */
>> data->unsigned_support = false;
>> - err = fastrpc_device_register(rdev, data, secure_dsp, domains[domain_id]);
>> + err = fastrpc_device_register(rdev, data, secure_dsp, domain);
>> if (err)
>> goto err_free_data;
>> break;
>> case CDSP_DOMAIN_ID:
>> - case CDSP1_DOMAIN_ID:
>> data->unsigned_support = true;
>> /* Create both device nodes so that we can allow both Signed and Unsigned PD */
>> - err = fastrpc_device_register(rdev, data, true, domains[domain_id]);
>> + err = fastrpc_device_register(rdev, data, true, domain);
>> if (err)
>> goto err_free_data;
>>
>> - err = fastrpc_device_register(rdev, data, false, domains[domain_id]);
>> + err = fastrpc_device_register(rdev, data, false, domain);
>> if (err)
>> goto err_deregister_fdev;
>> break;
>
> Taking a step back, do we realistically need these checks at all?
> I would assume that there is a layer of security on the DSP side
> that would disallow running code in unsigned PDs on e.g. the ADSP.
>
> What happens if one skips them and attempts doing just that?
>
do you mean comment data->unsigned_support lines?
On qcs9100, it works normal, test will fail on unsigned PD if it's not supported.
but we cannot comment what would happen on old DSPs.
I think it will be safer to keep this.
> Konrad
--
Thx and BRs,
Ling Xu
More information about the dri-devel
mailing list