lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e061e56c-1b06-48d6-b118-1cc698337df7@oss.qualcomm.com>
Date: Wed, 21 May 2025 16:24:21 -0700
From: Unnathi Chalicheemala <unnathi.chalicheemala@....qualcomm.com>
To: Pavan Kondeti <pavan.kondeti@....qualcomm.com>
Cc: Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel@....qualcomm.com,
        Prasad Sodagudi <prasad.sodagudi@....qualcomm.com>,
        Satya Durga Srinivasu Prabhala <quic_satyap@...cinc.com>,
        Trilok Soni <quic_tsoni@...cinc.com>
Subject: Re: [PATCH v6 2/3] firmware: qcom_scm: Support multiple waitq
 contexts

On 5/9/2025 2:48 AM, Pavan Kondeti wrote:
> On Fri, Apr 25, 2025 at 04:48:02PM -0700, Unnathi Chalicheemala wrote:
>>  
>> +static int qcom_scm_query_waitq_count(struct qcom_scm *scm)
>> +{
>> +	int ret;
>> +	struct qcom_scm_desc desc = {
>> +		.svc = QCOM_SCM_SVC_WAITQ,
>> +		.cmd = QCOM_SCM_WAITQ_GET_INFO,
>> +		.owner = ARM_SMCCC_OWNER_SIP
>> +	};
>> +	struct qcom_scm_res res;
>> +
>> +	if (!__qcom_scm_is_call_available(scm->dev, QCOM_SCM_SVC_WAITQ, QCOM_SCM_WAITQ_GET_INFO)) {
>> +		dev_info(scm->dev, "Multi-waitqueue support unavailable\n");
>> +		return 1;
>> +	}
> 
> I am testing this patch on SM8750 and found that we are returning from
> here, do you know why it is happening? The first patch in this series
> does not check if scm call is available or not and I see scm returns the
> hwirq properly. I have commented out this block and able to see waitq
> count as 2, which is inline with what would be overlayed in the device
> tree.
> 

Thanks for testing it on SM8750, Pavan.

Initially, I wanted to check whether the SCM call was available before invoking it, so we could
distinguish between a failed SCM call and a failure due to the call being unavailable.

However, after some internal discussions, we found that qcom_scm_is_call_available() is handled in TZ,
which doesn’t implement WAITQ_GET_INFO, and therefore always returns 0.

Given this, I’ll be removing the qcom_scm_is_call_available() check and will treat both scenarios -
SCM call failure and call not implemented on the target - as a single case.

>> +
>> +	ret = qcom_scm_call_atomic(scm->dev, &desc, &res);
>> +	if (ret)
>> +		return ret;
>> +
>> +	return res.result[0] & GENMASK(7, 0);
>> +}
>> +
> 
> Thanks,
> Pavan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ