linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	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: Sat, 12 Aug 2023 18:59:48 -0700	[thread overview]
Message-ID: <20230812185948.29f1d53b@hermes.local> (raw)
In-Reply-To: <20230811233228.GT1428172@hu-bjorande-lv.qualcomm.com>

On Fri, 11 Aug 2023 16:32:28 -0700
Bjorn Andersson <quic_bjorande@quicinc.com> wrote:

> On Fri, Aug 11, 2023 at 11:01:50PM +0200, Andrew Lunn wrote:
> > > +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.
> >   
> 
> As mentioned in the cover letter, I do recognize your concern here. I
> don't see it as a realistic way to work around the kernel for reasons of
> being proprietary - given that we don't have debugfs mounted in the vast
> majority of product.

Anyone who cares about security, and has things like kernel lockdown turned on
is going to be scared by this. If you allow API to tell firmware to do any arbitrary thing
it means you could be telling firmware "please read this area of kernel memory for me"

  parent reply	other threads:[~2023-08-13  1:59 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
2023-08-11 23:32     ` Bjorn Andersson
2023-08-12 17:11       ` Andrew Lunn
2023-08-13  1:59       ` Stephen Hemminger [this message]
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=20230812185948.29f1d53b@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=andersson@kernel.org \
    --cc=andrew@lunn.ch \
    --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).