From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Ekansh Gupta <quic_ekangupt@quicinc.com>,
srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org
Cc: ekangupt@qti.qualcomm.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, fastrpc.upstream@qti.qualcomm.com,
agross@kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
devicetree@vger.kernel.org
Subject: Re: [RESEND PATCH v1 2/2] misc: fastrpc: detect privileged processes based on group ID
Date: Thu, 8 Jun 2023 13:36:53 +0200 [thread overview]
Message-ID: <077e08c8-f2f7-2fef-9e2c-bc865bc611a6@linaro.org> (raw)
In-Reply-To: <4c27849d-cd34-77ed-7d45-6f366f9fa86a@quicinc.com>
On 08/06/2023 12:44, Ekansh Gupta wrote:
>
>
> On 6/8/2023 12:17 AM, Krzysztof Kozlowski wrote:
>> On 07/06/2023 18:30, Ekansh Gupta wrote:
>>> Get the information on privileged group IDs during rpmsg probing based
>>> on DT property. Check if the process requesting an offload to remote
>>> subsystem is privileged by comparing it's group ID with privileged
>>> group ID. Initialization process attributes are updated for a
>>> privileged process which is sent to remote process for resource
>>> management.
>>>
>>
>>
>>
>>> +
>>> static const struct file_operations fastrpc_fops = {
>>> .open = fastrpc_device_open,
>>> .release = fastrpc_device_release,
>>> @@ -2277,6 +2396,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>>> if (!data)
>>> return -ENOMEM;
>>>
>>> + err = fastrpc_init_privileged_gids(rdev, "qcom,fastrpc-gids", &data->gidlist);
>>> + if (err)
>>> + dev_err(rdev, "Privileged gids init failed.\n");
>>> +
>>
>> What about error paths? No need for cleanup?
>>
> All the necessary clean-up is added as part of
> fastrpc_init_privileged_gids error path. There is no requirement to have
Where? How that code is called after fastrpc_device_register() failure?
Or after of_platform_populate() failure?
Please show me the code flow.
> any additional handling in error path other that error log. Also there
> is no intention to fail the probe in case gid information is not
> properly read.
This is not related. I don't talk about fastrpc_init_privileged_gids()
failures. Look where did I leave my comment.
Review comments are placed in proper places, not in unrelated parts of
code. The placement of review comment is important as this is the
context of bug in your patch.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-06-08 11:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 16:30 [RESEND PATCH v1 0/2] Privileged process support on remote subsystem Ekansh Gupta
2023-06-07 16:30 ` [RESEND PATCH v1 1/2] dt-bindings: misc: fastrpc: add fastrpc group IDs property Ekansh Gupta
2023-06-07 17:21 ` Rob Herring
2023-06-08 9:43 ` Ekansh Gupta
2023-06-07 18:44 ` Krzysztof Kozlowski
2023-06-08 10:36 ` Ekansh Gupta
2023-06-08 11:33 ` Krzysztof Kozlowski
2023-06-07 16:30 ` [RESEND PATCH v1 2/2] misc: fastrpc: detect privileged processes based on group ID Ekansh Gupta
2023-06-07 18:47 ` Krzysztof Kozlowski
2023-06-08 10:44 ` Ekansh Gupta
2023-06-08 11:36 ` Krzysztof Kozlowski [this message]
2023-06-07 18:47 ` [RESEND PATCH v1 0/2] Privileged process support on remote subsystem Greg KH
2023-06-08 9:53 ` Ekansh Gupta
2023-06-08 10:16 ` Greg KH
2023-06-08 10:51 ` Ekansh Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=077e08c8-f2f7-2fef-9e2c-bc865bc611a6@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ekangupt@qti.qualcomm.com \
--cc=fastrpc.upstream@qti.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_ekangupt@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).