Skip to content

sapi/phpdbg: Update of userfaultfd workflow. #13955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

devnexen
Copy link
Member

unpriviliged_userfaultfd is set to 0 by default. Since Linux 5.11 handling memory ranges from the user-space is allowed with the UFFD_USER_MODE_ONLY fd open mode flag.

@devnexen
Copy link
Member Author

@nielsdos do you know well enough here ? :)

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems right, we don't need to catch kernel faults. I only have a wording nit.

PHPDBG_G(watch_userfaultfd) = syscall(SYS_userfaultfd, O_CLOEXEC);
int flags = O_CLOEXEC;
#ifdef UFFD_USER_MODE_ONLY
// unpriviliged userfaultfd being disabled by default,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// unpriviliged userfaultfd being disabled by default,
// unpriviliged userfaultfd are disabled by default,

unpriviliged_userfaultfd is set to 0 by default. Since Linux 5.11
handling memory ranges from the user-space is allowed with the
`UFFD_USER_MODE_ONLY` fd open mode flag.
@devnexen devnexen force-pushed the phpdbg_userfaultfd_update branch from 4bf9c1f to 7a3cc28 Compare April 30, 2024 18:02
@devnexen devnexen merged commit 8d67f23 into php:master Apr 30, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants