linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] nvmem: make sysfs binary file permissions more flexible.
@ 2015-10-07 10:58 Srinivas Kandagatla
  2015-10-07 11:00 ` [PATCH v2 1/3] nvmem: core: make default user binary file root-access only Srinivas Kandagatla
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Srinivas Kandagatla @ 2015-10-07 10:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Greg, 

If its not too late for v4.4, can you please consider this patchset for v4.4.

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

Changes since RFC (https://lkml.org/lkml/2015/8/11/319)
- Renamed perm to mode flag as suggested by Stefan Wahren

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

 drivers/nvmem/core.c           | 54 ++++++++++--------------------------------
 include/linux/nvmem-provider.h |  1 +
 2 files changed, 14 insertions(+), 41 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2015-10-07 16:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 10:58 [PATCH v2 0/3] nvmem: make sysfs binary file permissions more flexible Srinivas Kandagatla
2015-10-07 11:00 ` [PATCH v2 1/3] nvmem: core: make default user binary file root-access only Srinivas Kandagatla
2015-10-07 11:33   ` Russell King - ARM Linux
2015-10-07 13:46     ` Srinivas Kandagatla
2015-10-07 16:23       ` Russell King - ARM Linux
2015-10-07 12:55   ` Greg KH
2015-10-07 13:18     ` Srinivas Kandagatla
2015-10-07 16:12       ` Greg KH
2015-10-07 11:00 ` [PATCH v2 2/3] nvmem: core: set the size for the nvmem binary file Srinivas Kandagatla
2015-10-07 12:56   ` Greg KH
2015-10-07 13:21     ` Srinivas Kandagatla
2015-10-07 11:01 ` [PATCH v2 3/3] nvmem: core: add sysfs file mode flag in nvmem_config Srinivas Kandagatla
2015-10-07 12:56   ` Greg KH

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