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>] [day] [month] [year] [list]
Message-Id: <20260113143445.889031-1-xjdeng@buaa.edu.cn>
Date: Tue, 13 Jan 2026 22:34:45 +0800
From: Xingjing Deng <micro6947@...il.com>
To: srini@...nel.org,
	amahesh@....qualcomm.com,
	arnd@...db.de,
	gregkh@...uxfoundation.org
Cc: dri-devel@...ts.freedesktop.org,
	linux-arm-msm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Xingjing Deng <xjdeng@...a.edu.cn>,
	stable@...r.kernel.org
Subject: [PATCH v4] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe

In the SDSP probe path, qcom_scm_assign_mem() is used to assign the
reserved memory to the configured VMIDs, but its return value was not
checked.

Fail the probe if the SCM call fails to avoid continuing with an
unexpected/incorrect memory permission configuration

Fixes: c3c0363bc72d4 ("misc: fastrpc: support complete DMA pool access to the DSP")
Cc: stable@...r.kernel.org # 6.11-rc1
Signed-off-by: Xingjing Deng <xjdeng@...a.edu.cn>

---

v4:
- Format the indentation
- Link to v3: https://lore.kernel.org/linux-arm-msm/20260113084352.72itrloj5w7qb5o3@hu-mojha-hyd.qualcomm.com/T/#t

v3:
- Add missing linux-kernel@...r.kernel.org to cc list.
- Standarlize changelog placement/format.
- Link to v2: https://lore.kernel.org/linux-arm-msm/20260113063618.e2ke47gy3hnfi67e@hu-mojha-hyd.qualcomm.com/T/#t

v2:
- Add Fixes: and Cc: stable tags.
- Link to v1: https://lore.kernel.org/linux-arm-msm/20260113022550.4029635-1-xjdeng@buaa.edu.cn/T/#u

Signed-off-by: Xingjing Deng <xjdeng@...a.edu.cn>
---
 drivers/misc/fastrpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index cbb12db110b3..9c41b51d80ee 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -2339,10 +2339,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
 			src_perms = BIT(QCOM_SCM_VMID_HLOS);
 
 			err = qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms,
-				    data->vmperms, data->vmcount);
+				    				data->vmperms, data->vmcount);
 			if (err) {
 				dev_err(rdev, "Failed to assign memory phys 0x%llx size 0x%llx err %d",
-					res.start, resource_size(&res), err);
+						res.start, resource_size(&res), err);
 				goto err_free_data;
 			}
 		}
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ