[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1ec4cd1a-8e73-6c6f-da70-1ce01212269e@linaro.org>
Date: Wed, 29 Sep 2021 15:07:02 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Jeya R <jeyr@...eaurora.org>, linux-arm-msm@...r.kernel.org
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
fastrpc.upstream@....qualcomm.com
Subject: Re: [PATCH 3/4] misc: fastrpc: Set channel as secure
On 24/09/2021 13:19, Jeya R wrote:
> Set channel as secure based on domain ID and secure domain DT property.
> All DSP domains other than CDSP are set as secure by default and for
> CDSP domain, secure flag is set if property is added to DT file.
>
> Signed-off-by: Jeya R <jeyr@...eaurora.org>
> ---
> drivers/misc/fastrpc.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index 07c41a5..631713d 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -216,6 +216,7 @@ struct fastrpc_channel_ctx {
> struct miscdevice miscdev;
> struct miscdevice securedev;
> struct kref refcount;
> + bool secure;
> };
>
> struct fastrpc_user {
> @@ -1646,6 +1647,12 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
> if (!data)
> return -ENOMEM;
>
> + if (domain_id != CDSP_DOMAIN_ID)
> + data->secure = true;
> + else
> + data->secure = of_property_read_bool(rdev->of_node,
> + "qcom,secure-domain");
> +
This whole logic of marking domains secured based on dsp type needs some
explanation.
--srini
> data->miscdev.minor = MISC_DYNAMIC_MINOR;
> data->miscdev.name = devm_kasprintf(rdev, GFP_KERNEL, "fastrpc-%s",
> domains[domain_id]);
>
Powered by blists - more mailing lists