2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00
linux-next/drivers/dax
Dan Williams 325896ffdf device-dax: fix private mapping restriction, permit read-only
Hugh notes in response to commit 4cb19355ea "device-dax: fail all
private mapping attempts":

  "I think that is more restrictive than you intended: haven't tried, but I
  believe it rejects a PROT_READ, MAP_SHARED, O_RDONLY fd mmap, leaving no
  way to mmap /dev/dax without write permission to it."

Indeed it does restrict read-only mappings, switch to checking
VM_MAYSHARE, not VM_SHARED.

Cc: <stable@vger.kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Pawel Lebioda <pawel.lebioda@intel.com>
Fixes: 4cb19355ea ("device-dax: fail all private mapping attempts")
Reported-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2016-12-06 17:42:37 -08:00
..
dax.c device-dax: fix private mapping restriction, permit read-only 2016-12-06 17:42:37 -08:00
dax.h dax: convert devm_create_dax_dev to PTR_ERR 2016-10-07 16:45:59 -07:00
Kconfig nvdimm: make CONFIG_NVDIMM_DAX 'bool' 2016-10-27 16:16:21 -07:00
Makefile /dev/dax, pmem: direct access to persistent memory 2016-05-20 22:02:53 -07:00
pmem.c device-dax: check devm_nsio_enable() return value 2016-10-28 14:35:25 -07:00