On 02/09/2026 17:01, Linlin Zhang wrote:
>>>>> + ret = qcom_scm_derive_sw_secret(eph_key, eph_key_size,
>>>>> +                                 sw_secret, BLK_CRYPTO_SW_SECRET_SIZE);
>>>>> + if (ret == -EIO || ret == -EINVAL)
>>>>> +         ret = -EBADMSG; /* probably invalid key */
>>>>> +
>>>>> + if (ret)
>>>>> +         pr_err("%s: ret=%d\n", __func__, ret);
>>>>> +
>>>>> + return ret;
>>>>> +}
>>>>> +
>>>>> +static struct virtblk_crypto_variant_ops virtblk_crypto_qcom_vops = {
>>>>
>>>> Why is a crypto-handling code in drivers/soc/?
>>>>
>>>
>>> This driver is a Qualcomm vendor-specific driver, plays the similar role in 
>>> the
>>
>> Not really, there is nothing vendor specific here. Look at this code.
>>
> 
> crypto_virt_program_key calls the interface from qcom_scm driver. Similar to
> crypto_virt_invalidate_key and crypto_virt_derive_sw_secret_key.

Indeed I missed that. And it does include scm header and depends on it,
fine then.

Best regards,
Krzysztof

Reply via email to