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:   Wed, 28 Sep 2016 16:12:28 +0530
From:   Sricharan R <sricharan@...eaurora.org>
To:     patches@...aro.org, linux-arm-msm@...r.kernel.org,
        will.deacon@....com, stanimir.varbanov@...aro.org,
        linux-kernel@...r.kernel.org, srinivas.kandagatla@...aro.org,
        catalin.marinas@....com, andy.gross@...aro.org,
        bjorn.andersson@...aro.org, sboyd@...eaurora.org
Cc:     sricharan@...eaurora.org
Subject: [PATCH] firmware: qcom: scm: Fix interrupted SCM calls fully

Patch [1] fixes the issues with interrupted SCM64 calls
by returning the register r6 (Session ID) on the next try, but register
r0 also needs to be preserved for the retry. r0 contains the
result of the previous try. Without this i see that the SCM calls
hang when retried.

[1] https://patchwork.kernel.org/patch/9291589/

Signed-off-by: Sricharan R <sricharan@...eaurora.org>
---
 drivers/firmware/qcom_scm-64.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c
index 7ecd0e7..28b604e 100755
--- a/drivers/firmware/qcom_scm-64.c
+++ b/drivers/firmware/qcom_scm-64.c
@@ -134,6 +134,9 @@ static int qcom_scm_call(struct device *dev, u32 svc_id, u32 cmd_id,
 		res->a6 = 0;
 
 		do {
+			if (res->a0 == QCOM_SCM_INTERRUPTED)
+				cmd = res->a0;
+
 			arm_smccc_smc(cmd, desc->arginfo, desc->args[0],
 				      desc->args[1], desc->args[2], x5, res->a6, 0,
 				      res);
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ