Skip to content

Use Memory Protection Keys to protect the OPcache mapping - #24600

Draft
arnaud-lb wants to merge 2 commits into
php:masterfrom
arnaud-lb:opcache-shm-pkey
Draft

arnaud-lb wants to merge 2 commits into
php:masterfrom
arnaud-lb:opcache-shm-pkey

Conversation

@arnaud-lb

@arnaud-lb arnaud-lb commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Same as #20461, but OPcache-only since we can't disable execution on x86_64.

This uses pkeys to make the OPcache mapping readonly when we are not updating it, when opcache.protect_memory is on.

The should accelerate opcache.protect_memory CI builds. The overhead is small enough to be used in production, too (<1%).

See

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.

1 participant