]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm, region : make 'resource' attribute only readable by root
authorDan Williams <dan.j.williams@intel.com>
Tue, 26 Sep 2017 18:17:52 +0000 (11:17 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 28 Sep 2017 16:13:06 +0000 (09:13 -0700)
commitfbf06795e7ce97ae11d5de3b0a9f6ba2809ad9d7
treea579c2ee08e7a64aa872a19dae3507a74a9b4471
parent8295507925088cf48a30c2919003da84446049ac
libnvdimm, region : make 'resource' attribute only readable by root

For the same reason that /proc/iomem returns 0's for non-root readers
and acpi tables are root-only, make the 'resource' attribute for region
devices only readable by root. Otherwise we disclose physical address
information.

Fixes: de55843ed843 ("libnvdimm: Add 'resource' sysfs attribute to regions")
Cc: <stable@vger.kernel.org>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Reported-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/region_devs.c