HomeFreeBSD

Add stricter checking of some mmap() arguments:

Description

Add stricter checking of some mmap() arguments:

  • Fail with EINVAL if an invalid protection mask is passed to mmap().
  • Fail with EINVAL if an unknown flag is passed to mmap().
  • Fail with EINVAL if both MAP_PRIVATE and MAP_SHARED are passed to mmap().
  • Require one of either MAP_PRIVATE or MAP_SHARED for non-anonymous mappings.

Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D698

Details

Provenance
jhbAuthored on
Differential Revision
D698: Add stricter checking of mmap() arguments.
Parents
rS271634: Three improvements to vnode_pager_generic_getpages():
Branches
Unknown
Tags
Unknown

Event Timeline