devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] nvmem: make sysfs binary file permissions more flexible.
@ 2015-08-11 11:02 Srinivas Kandagatla
  2015-08-11 11:03 ` [PATCH RFC 1/3] nvmem: make default user binary file root-access only Srinivas Kandagatla
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2015-08-11 11:02 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Andrew Lunn, wxt, linux-api, Rob Herring, sboyd, arnd,
	linux-arm-kernel, khilman, s.hauer, linux-kernel, linux-arm-msm,
	mporter, pantelis.antoniou, devicetree, Mark Brown,
	maitysanchayan, p.zabel, Srinivas Kandagatla

Hi All, 

Recent discussion raised by Andrew Lunn and others regarding default permission
set on the nvmem binary sysfs file resulted in this small fixup patchset.

By default nvmem core sets the readonly permission to everyone (S_IRUGO), this
is not desirable by many providers as they would not want everyone to view things
like passwords stored in the nvmem.

This patchset fixes this by making the default as root-only and then the
providers could supply with additional permissions if required. One of
the patch in this set also sets correct size for the binary file too,
so that the user would not even attempt to read past the size.

I have tested this on IFC6410 with qfprom.

Thanks,
srini

Srinivas Kandagatla (3):
  nvmem: make default user binary file root-access only
  nvmem: set the size for the nvmem binary file.
  nvmem: add permission flags in nvmem_config

 drivers/nvmem/core.c           | 55 +++++++++---------------------------------
 include/linux/nvmem-provider.h |  1 +
 2 files changed, 13 insertions(+), 43 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-17 12:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 11:02 [PATCH RFC 0/3] nvmem: make sysfs binary file permissions more flexible Srinivas Kandagatla
2015-08-11 11:03 ` [PATCH RFC 1/3] nvmem: make default user binary file root-access only Srinivas Kandagatla
2015-08-11 11:03 ` [PATCH RFC 2/3] nvmem: set the size for the nvmem binary file Srinivas Kandagatla
2015-08-11 11:03 ` [PATCH RFC 3/3] nvmem: add permission flags in nvmem_config Srinivas Kandagatla
     [not found]   ` <1439291024-18375-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-08-15  7:21     ` Stefan Wahren
2015-08-17 12:31       ` Srinivas Kandagatla

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).