HomeFreeBSD

Add ZFS specific mmap() checks

Description

Add ZFS specific mmap() checks

Under Linux the VFS handles virtually all of the mmap() access
checks. Filesystem specific checks are left to be handled in
the .mmap() hook and normally there arn't any.

However, ZFS provides a few attributes which can influence the
mmap behavior and should be honored. Note, currently the code
to modify these attributes has not been implemented under Linux.

  • ZFS_IMMUTABLE | ZFS_READONLY | ZFS_APPENDONLY: when any of these attributes are set a file may not be mmaped with write access.
  • ZFS_AV_QUARANTINED: when set a file file may not be mmaped with read or exec access.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jul 1 2011, 6:25 PM
Parents
rGf0b2486034f6: Remove unused MMAP functions
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGe2e7aa2df887: Add ZFS specific mmap() checks (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jul 1 2011, 7:23 PM