Skip to content

Fix missing UFFDIO_WRITEPROTECT ioctl for write protecting#1

Open
AKKamath wants to merge 1 commit into
tstamler:masterfrom
AKKamath:master
Open

Fix missing UFFDIO_WRITEPROTECT ioctl for write protecting#1
AKKamath wants to merge 1 commit into
tstamler:masterfrom
AKKamath:master

Conversation

@AKKamath
Copy link
Copy Markdown

@AKKamath AKKamath commented Mar 31, 2024

As per documentation of userfaultfd (https://man7.org/linux/man-pages/man2/userfaultfd.2.html):

   After the UFFDIO_REGISTER ioctl completed with
   UFFDIO_REGISTER_MODE_WP mode set, the user can write-protect any
   existing memory within the range using the ioctl
   UFFDIO_WRITEPROTECT where uffdio_writeprotect.mode should be set
   to UFFDIO_WRITEPROTECT_MODE_WP.

zIO is currently missing the UFFDIO_WRITEPROTECT call after registering source buffers, causing writes to source buffers not to fault. By adding this call, the writes correctly generate faults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant