Re: [PATCH v3 26/28] userfaultfd: wp: declare _UFFDIO_WRITEPROTECT conditionally

2019-03-22 Thread Mike Rapoport
On Wed, Mar 20, 2019 at 10:06:40AM +0800, Peter Xu wrote: > Only declare _UFFDIO_WRITEPROTECT if the user specified > UFFDIO_REGISTER_MODE_WP and if all the checks passed. Then when the > user registers regions with shmem/hugetlbfs we won't expose the new > ioctl to them. Even with complete anony

[PATCH v3 26/28] userfaultfd: wp: declare _UFFDIO_WRITEPROTECT conditionally

2019-03-19 Thread Peter Xu
Only declare _UFFDIO_WRITEPROTECT if the user specified UFFDIO_REGISTER_MODE_WP and if all the checks passed. Then when the user registers regions with shmem/hugetlbfs we won't expose the new ioctl to them. Even with complete anonymous memory range, we'll only expose the new WP ioctl bit if the r