Skip to content

sapi/phpdbg: Update of userfaultfd workflow.#13955

Merged
devnexen merged 1 commit intophp:masterfrom
devnexen:phpdbg_userfaultfd_update
Apr 30, 2024
Merged

sapi/phpdbg: Update of userfaultfd workflow.#13955
devnexen merged 1 commit intophp:masterfrom
devnexen:phpdbg_userfaultfd_update

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

@ndossche ndossche 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
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