From: Andrew Lunn <andrew@lunn.ch>
To: Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Chris Lew <quic_clew@quicinc.com>, Alex Elder <elder@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH v2 2/4] soc: qcom: aoss: Add debugfs interface for sending messages
Date: Fri, 11 Aug 2023 23:01:50 +0200 [thread overview]
Message-ID: <d212e5a7-e9e5-4297-85fb-030818f7c647@lunn.ch> (raw)
In-Reply-To: <20230811205839.727373-3-quic_bjorande@quicinc.com>
> +static ssize_t qmp_debugfs_write(struct file *file, const char __user *userstr,
> + size_t len, loff_t *pos)
> +{
> + struct qmp *qmp = file->private_data;
> + char buf[QMP_MSG_LEN];
> + int ret;
> +
> + if (!len || len >= QMP_MSG_LEN)
> + return -EINVAL;
> +
> + if (copy_from_user(buf, userstr, len))
> + return -EFAULT;
> + buf[len] = '\0';
> +
> + ret = qmp_send(qmp, buf);
> + if (ret < 0)
> + return ret;
Sorry, but you still appear to be sending binary blobs from userspace
to the firmware. This is not liked.
The documentation you pointed to has three commands. Please implement
three debugfs files, one per command.
Andrew
---
pw-bot: cr
next prev parent reply other threads:[~2023-08-11 21:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 20:58 [PATCH v2 0/4] soc: qcom: aoss: Introduce debugfs interface and cleanup things Bjorn Andersson
2023-08-11 20:58 ` [PATCH v2 1/4] soc: qcom: aoss: Move length requirements from caller Bjorn Andersson
2023-08-12 10:53 ` Konrad Dybcio
2023-08-11 20:58 ` [PATCH v2 2/4] soc: qcom: aoss: Add debugfs interface for sending messages Bjorn Andersson
2023-08-11 21:01 ` Andrew Lunn [this message]
2023-08-11 23:32 ` Bjorn Andersson
2023-08-12 17:11 ` Andrew Lunn
2023-08-13 1:59 ` Stephen Hemminger
2023-08-11 23:36 ` Bjorn Andersson
2023-08-11 20:58 ` [PATCH v2 3/4] soc: qcom: aoss: Format string in qmp_send() Bjorn Andersson
2023-08-11 20:58 ` [PATCH v2 4/4] soc: qcom: aoss: Tidy up qmp_send() callers Bjorn Andersson
2023-08-14 2:33 ` (subset) [PATCH v2 0/4] soc: qcom: aoss: Introduce debugfs interface and cleanup things Bjorn Andersson
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=d212e5a7-e9e5-4297-85fb-030818f7c647@lunn.ch \
--to=andrew@lunn.ch \
--cc=andersson@kernel.org \
--cc=davem@davemloft.net \
--cc=elder@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=quic_bjorande@quicinc.com \
--cc=quic_clew@quicinc.com \
/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).