From: Brian Norris <briannorris@chromium.org>
To: Evan Green <evgreen@chromium.org>
Cc: Andy Gross <andy.gross@linaro.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Ben Chan <benchan@chromium.org>,
linux-arm-msm@vger.kernel.org,
David Brown <david.brown@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] soc: qcom: rmtfs-mem: Make sysfs attributes world-readable
Date: Thu, 20 Dec 2018 17:21:16 -0800 [thread overview]
Message-ID: <20181221012115.GB189656@google.com> (raw)
In-Reply-To: <20181218000834.201748-3-evgreen@chromium.org>
On Mon, Dec 17, 2018 at 04:08:34PM -0800, Evan Green wrote:
> In order to run an rmtfs daemon as an unprivileged user, that user would
> need access to the phys_addr and size sysfs attributes. Sharing these
> attributes with unprivileged users doesn't really leak anything
> sensitive, since if you have access to physical memory, the jig is
> up anyway.
>
> Make those attributes readable by all.
>
> Signed-off-by: Evan Green <evgreen@chromium.org>
> ---
Seems fine to me.
Reviewed-by: Brian Norris <briannorris@chromium.org>
>
> drivers/soc/qcom/rmtfs_mem.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/soc/qcom/rmtfs_mem.c b/drivers/soc/qcom/rmtfs_mem.c
> index 0bf800ee2a978..4eeb9f02e7889 100644
> --- a/drivers/soc/qcom/rmtfs_mem.c
> +++ b/drivers/soc/qcom/rmtfs_mem.c
> @@ -45,9 +45,9 @@ static ssize_t qcom_rmtfs_mem_show(struct device *dev,
> struct device_attribute *attr,
> char *buf);
>
> -static DEVICE_ATTR(phys_addr, 0400, qcom_rmtfs_mem_show, NULL);
> -static DEVICE_ATTR(size, 0400, qcom_rmtfs_mem_show, NULL);
> -static DEVICE_ATTR(client_id, 0400, qcom_rmtfs_mem_show, NULL);
> +static DEVICE_ATTR(phys_addr, 0444, qcom_rmtfs_mem_show, NULL);
> +static DEVICE_ATTR(size, 0444, qcom_rmtfs_mem_show, NULL);
> +static DEVICE_ATTR(client_id, 0444, qcom_rmtfs_mem_show, NULL);
>
> static ssize_t qcom_rmtfs_mem_show(struct device *dev,
> struct device_attribute *attr,
> --
> 2.18.1
>
prev parent reply other threads:[~2018-12-21 1:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 0:08 [PATCH v1 0/2] soc: qcom: rmtfs-mem: Support non-root rmtfs daemons Evan Green
2018-12-18 0:08 ` [PATCH v1 1/2] soc: qcom: rmtfs-mem: Add class to enable uevents Evan Green
2018-12-21 1:18 ` Brian Norris
2018-12-21 17:56 ` Evan Green
2018-12-18 0:08 ` [PATCH v1 2/2] soc: qcom: rmtfs-mem: Make sysfs attributes world-readable Evan Green
2018-12-21 1:21 ` Brian Norris [this message]
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=20181221012115.GB189656@google.com \
--to=briannorris@chromium.org \
--cc=andy.gross@linaro.org \
--cc=benchan@chromium.org \
--cc=bjorn.andersson@linaro.org \
--cc=david.brown@linaro.org \
--cc=evgreen@chromium.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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