[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240701115237.371020-1-quic_ekangupt@quicinc.com>
Date: Mon, 1 Jul 2024 17:22:37 +0530
From: Ekansh Gupta <quic_ekangupt@...cinc.com>
To: <srinivas.kandagatla@...aro.org>, <linux-arm-msm@...r.kernel.org>
CC: <gregkh@...uxfoundation.org>, <quic_bkumar@...cinc.com>,
<linux-kernel@...r.kernel.org>, <quic_chennak@...cinc.com>,
<dri-devel@...ts.freedesktop.org>, <arnd@...db.de>,
stable
<stable@...nel.org>
Subject: [PATCH v3] misc: fastrpc: Increase max user PD initmem size
For user PD initialization, initmem is allocated and sent to DSP for
initial memory requirements like shell loading. This size is passed
by user space and is checked against a max size. For unsigned PD
offloading requirement, more than 2MB size could be passed by user
which would result in PD initialization failure. Increase the maximum
size that can be passed py user for user PD initmem allocation. Any
additional memory sent to DSP during PD init is used as the PD heap.
Fixes: 7f1f481263c3 ("misc: fastrpc: check before loading process to the DSP")
Cc: stable <stable@...nel.org>
Signed-off-by: Ekansh Gupta <quic_ekangupt@...cinc.com>
---
Changes in v2:
- Modified commit text.
- Removed size check instead of updating max file size.
Changes in v3:
- Added bound check again with a higher max size definition.
- Modified commit text accordingly.
drivers/misc/fastrpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 5204fda51da3..11a230af0b10 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -38,7 +38,7 @@
#define FASTRPC_INIT_HANDLE 1
#define FASTRPC_DSP_UTILITIES_HANDLE 2
#define FASTRPC_CTXID_MASK (0xFF0)
-#define INIT_FILELEN_MAX (2 * 1024 * 1024)
+#define INIT_FILELEN_MAX (5 * 1024 * 1024)
#define INIT_FILE_NAMELEN_MAX (128)
#define FASTRPC_DEVICE_NAME "fastrpc"
--
2.34.1
Powered by blists - more mailing lists