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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Jun 2024 11:27:58 -0700
From: Unnathi Chalicheemala via B4 Relay <devnull+quic_uchalich.quicinc.com@...nel.org>
To: Bjorn Andersson <andersson@...nel.org>, 
 Konrad Dybcio <konrad.dybcio@...aro.org>, 
 Sibi Sankar <quic_sibis@...cinc.com>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org, 
 kernel@...cinc.com, Murali Nalajala <quic_mnalajal@...cinc.com>, 
 stable@...r.kernel.org, Unnathi Chalicheemala <quic_uchalich@...cinc.com>
Subject: [PATCH] firmware: qcom_scm: Mark get_wq_ctx() as atomic call

From: Murali Nalajala <quic_mnalajal@...cinc.com>

Currently get_wq_ctx() is wrongly configured as a standard call.
Here get_wq_ctx() must be an atomic call and can't be a standard
SMC call because get_wq_ctx() should not sleep again. This
situation lead to a deadlock. Hence mark get_wq_ctx() as
atomic call.

Fixes: 6bf325992236 ("firmware: qcom: scm: Add wait-queue handling logic")
Cc: stable@...r.kernel.org
Signed-off-by: Murali Nalajala <quic_mnalajal@...cinc.com>
Signed-off-by: Unnathi Chalicheemala <quic_uchalich@...cinc.com>
---
 drivers/firmware/qcom/qcom_scm-smc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/qcom/qcom_scm-smc.c b/drivers/firmware/qcom/qcom_scm-smc.c
index 16cf88acfa8e..0a2a2c794d0e 100644
--- a/drivers/firmware/qcom/qcom_scm-smc.c
+++ b/drivers/firmware/qcom/qcom_scm-smc.c
@@ -71,7 +71,7 @@ int scm_get_wq_ctx(u32 *wq_ctx, u32 *flags, u32 *more_pending)
 	struct arm_smccc_res get_wq_res;
 	struct arm_smccc_args get_wq_ctx = {0};
 
-	get_wq_ctx.args[0] = ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL,
+	get_wq_ctx.args[0] = ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL,
 				ARM_SMCCC_SMC_64, ARM_SMCCC_OWNER_SIP,
 				SCM_SMC_FNID(QCOM_SCM_SVC_WAITQ, QCOM_SCM_WAITQ_GET_WQ_CTX));
 

---
base-commit: 83a7eefedc9b56fe7bfeff13b6c7356688ffa670
change-id: 20240611-get_wq_ctx_atomic-f5e9fdcb20c7

Best regards,
-- 
Unnathi Chalicheemala <quic_uchalich@...cinc.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ