]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
libnvdimm, namespace: make 'resource' attribute only readable by root
authorDan Williams <dan.j.williams@intel.com>
Tue, 26 Sep 2017 18:21:24 +0000 (11:21 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 28 Sep 2017 16:13:06 +0000 (09:13 -0700)
commitc1fb3542074fd0c4d901d778bd52455111e4eb6f
tree1271745a621c28817bced029c293dae3cf6cffe1
parentb8ff981f88df03c72a4de2f6eaa9ce447a10ac03
libnvdimm, namespace: 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
namespace devices only readable by root. Otherwise we disclose physical
address information.

Fixes: bf9bccc14c05 ("libnvdimm: pmem label sets and namespace instantiation")
Cc: <stable@vger.kernel.org>
Reported-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/namespace_devs.c