summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/nd-core.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2020-07-20 15:08:07 -0700
committerVishal Verma <vishal.l.verma@intel.com>2020-07-25 19:34:48 -0600
commit60d360acddc54344409a710af07c561e025f13f5 (patch)
treea4ba85bde164669418fb2efffe504bb42ae8bb47 /drivers/nvdimm/nd-core.h
parent916566ae78462636fe4de59b3f59a4a0c8f70205 (diff)
downloadlinux-60d360acddc54344409a710af07c561e025f13f5.tar.bz2
driver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW}
A common pattern for using plain DEVICE_ATTR() instead of DEVICE_ATTR_RO() and DEVICE_ATTR_RW() is for attributes that want to limit read to only root. I.e. many users of DEVICE_ATTR() are specifying 0400 or 0600 for permissions. Given the expectation that CAP_SYS_ADMIN is needed to access these sensitive attributes add an explicit helper with the _ADMIN_ identifier for DEVICE_ATTR_ADMIN_{RO,RW}. Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Diffstat (limited to 'drivers/nvdimm/nd-core.h')
0 files changed, 0 insertions, 0 deletions