[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b56f7a00-f5e0-4cc7-ad04-33b4981e14b7@linaro.org>
Date: Fri, 24 Nov 2023 13:26:31 +0000
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Ekansh Gupta <quic_ekangupt@...cinc.com>,
linux-arm-msm@...r.kernel.org
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 5/5] misc: fastrpc: Add support to allocate shared
context bank
On 21/11/2023 09:48, Ekansh Gupta wrote:
> static int fastrpc_multimode_invoke(struct fastrpc_user *fl, char __user *argp)
> {
> struct fastrpc_enhanced_invoke einv;
> struct fastrpc_invoke_args *args = NULL;
> struct fastrpc_ioctl_multimode_invoke invoke;
> + struct fastrpc_internal_control cp = {0};
> u32 nscalars;
> u64 *perf_kernel;
> int err, i;
> @@ -1938,6 +1975,12 @@ static int fastrpc_multimode_invoke(struct fastrpc_user *fl, char __user *argp)
> err = fastrpc_internal_invoke(fl, false, &einv);
> kfree(args);
> break;
> + case FASTRPC_INVOKE_CONTROL:
> + if (copy_from_user(&cp, (void __user *)(uintptr_t)invoke.invparam, sizeof(cp)))
> + return -EFAULT;
wow, this struct is not even exposed in a uapi header, how come
userspace knows about this struct?
Every struct that userspace fills in needs to be part of the UAPI headers.
--srini
> +
> + err = fastrpc_internal_control(fl, &cp);
> + break;
> default:
> err = -ENOTTY;
> break;
> @@ -2440,6 +2483,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
> if (sessions > 0) {
> struct fastrpc_session_ctx *dup_sess;
>
> + sess->sharedcb = true;
> for (i = 1; i < sessions; i++) {
Powered by blists - more mailing lists