From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: arnd@arndb.de, robh+dt@kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org,
bkumar@qti.qualcomm.com, linux-arm-msm@vger.kernel.org,
Thierry Escande <thierry.escande@linaro.org>
Subject: Re: [PATCH v6 3/5] misc: fastrpc: Add support for context Invoke method
Date: Fri, 8 Feb 2019 14:26:32 +0000 [thread overview]
Message-ID: <32aac00f-39f5-34a7-e1e3-a0eef62daa3f@linaro.org> (raw)
In-Reply-To: <20190208141120.GA9516@kroah.com>
On 08/02/2019 14:11, Greg KH wrote:
>> On 08/02/2019 13:55, Greg KH wrote:
>>>> +
>>>> + /* Make sure reserved field is set to 0 */
>>>> + if (args->reserved) {
>>>> + kfree(args);
>>>> + return -EINVAL;
>>> Am I wrong in that you are only checking the first reserved field in
>>> this array of args? Don't you have a whole bunch of them here (nscalars
>>> of them)? Don't you need to check them all and not just the first one?
>> My Bad, there should be a loop here!
>> I will fix this in next version!
> No, you don't need to loop it here, check it in the call that evaluates
> the individual args, which will catch the issue when people send
> "internal" commands.
>
Yes, that makes more sense. We can avoid a loop here and do the check in
fastrpc_get_args().
> Which reminds me, what happens if a sequence has problems half way
> through the list of args? Do you "roll back" to the beginning, or just
> abort? What happens to the internal device state then?
We should abort the invoke if this check fails.
All the arguments are passed in a single invoke call to dsp, so if the
sanity fails we should not even attempt to send it to dsp.
fastrpc_context_put in fastrpc_internal_invoke() should take care of any
mappings created half way thru this checks.
--srini
next prev parent reply other threads:[~2019-02-08 14:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 13:23 [PATCH v6 0/5] misc: Add support to Qualcomm FastRPC driver Srinivas Kandagatla
2019-02-08 13:23 ` [PATCH v6 1/5] misc: dt-bindings: Add Qualcomm Fastrpc bindings Srinivas Kandagatla
2019-02-08 13:23 ` [PATCH v6 2/5] misc: fastrpc: Add Qualcomm fastrpc basic driver model Srinivas Kandagatla
2019-02-08 13:23 ` [PATCH v6 3/5] misc: fastrpc: Add support for context Invoke method Srinivas Kandagatla
2019-02-08 13:55 ` Greg KH
2019-02-08 14:01 ` Srinivas Kandagatla
2019-02-08 14:11 ` Greg KH
2019-02-08 14:26 ` Srinivas Kandagatla [this message]
2019-02-08 13:23 ` [PATCH v6 4/5] misc: fastrpc: Add support for create remote init process Srinivas Kandagatla
2019-02-08 13:56 ` Greg KH
2019-02-08 13:23 ` [PATCH v6 5/5] misc: fastrpc: Add support for dmabuf exporter Srinivas Kandagatla
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=32aac00f-39f5-34a7-e1e3-a0eef62daa3f@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@linaro.org \
--cc=bkumar@qti.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=thierry.escande@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
all inboxes | Powered by JetHome®