All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] misc: fastrpc: Remove user PD initmem size check
@ 2024-06-27  6:05 Ekansh Gupta
  2024-06-27 11:13 ` Dmitry Baryshkov
  2024-06-27 11:20 ` Greg KH
  0 siblings, 2 replies; 14+ messages in thread
From: Ekansh Gupta @ 2024-06-27  6:05 UTC (permalink / raw)
  To: srinivas.kandagatla, linux-arm-msm
  Cc: gregkh, quic_bkumar, linux-kernel, quic_chennak, dri-devel, arnd,
	stable

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, more than 2MB size could be passed by user which would
result in PD initialization failure. Remove the user PD initmem size
check and allow buffer allocation for user passed size. 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@kernel.org>
Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
---
Changes in v2:
  - Modified commit text.
  - Removed size check instead of updating max file size.

 drivers/misc/fastrpc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 5204fda51da3..9d064deeac89 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -1389,11 +1389,6 @@ static int fastrpc_init_create_process(struct fastrpc_user *fl,
 		goto err;
 	}
 
-	if (init.filelen > INIT_FILELEN_MAX) {
-		err = -EINVAL;
-		goto err;
-	}
-
 	inbuf.pgid = fl->tgid;
 	inbuf.namelen = strlen(current->comm) + 1;
 	inbuf.filelen = init.filelen;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-07-03  9:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27  6:05 [PATCH v2] misc: fastrpc: Remove user PD initmem size check Ekansh Gupta
2024-06-27 11:13 ` Dmitry Baryshkov
2024-06-28 10:29   ` Ekansh Gupta
2024-06-28 10:42     ` Ekansh Gupta
2024-06-28 14:21       ` Greg KH
2024-07-01  5:20         ` Ekansh Gupta
2024-07-01 17:11           ` Dmitry Baryshkov
2024-07-02  7:07             ` Ekansh Gupta
2024-07-02  9:40               ` Dmitry Baryshkov
2024-07-03  6:44                 ` Ekansh Gupta
2024-07-03  9:34                   ` Dmitry Baryshkov
2024-06-27 11:20 ` Greg KH
2024-06-27 11:21   ` Greg KH
2024-06-28 10:37   ` Ekansh Gupta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.