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]
Message-Id: <20200514082428.27864-1-etienne.carriere@linaro.org>
Date:   Thu, 14 May 2020 10:24:28 +0200
From:   Etienne Carriere <etienne.carriere@...aro.org>
To:     linux-kernel@...r.kernel.org
Cc:     linux-arm-kernel@...ts.infradead.org, sudeep.holla@....com,
        etienne.carriere@...aro.org
Subject: [PATCH] firmware: arm_scmi: fix SMCCC_RET_NOT_SUPPORTED management

Fix management of argument a0 output value of arm_smccc_1_1_invoke() that
should consider only SMCCC_RET_NOT_SUPPORTED as reporting an unsupported
function ID as correctly stated in the inline comment.

Signed-off-by: Etienne Carriere <etienne.carriere@...aro.org>
---
 drivers/firmware/arm_scmi/smc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c
index 49bc4b0e8428..637ad439545f 100644
--- a/drivers/firmware/arm_scmi/smc.c
+++ b/drivers/firmware/arm_scmi/smc.c
@@ -115,7 +115,7 @@ static int smc_send_message(struct scmi_chan_info *cinfo,
 	mutex_unlock(&scmi_info->shmem_lock);
 
 	/* Only SMCCC_RET_NOT_SUPPORTED is valid error code */
-	if (res.a0)
+	if (res.a0 == SMCCC_RET_NOT_SUPPORTED)
 		return -EOPNOTSUPP;
 	return 0;
 }
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ