Skip to content

use pcre.jit only if enabled #6647

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

Closed
wants to merge 1 commit into from

Conversation

remicollet
Copy link
Member

We have a buildtime option HAVE_PCRE_JIT_SUPPORT and a runtime option for pcre2 jit usage PCRE_G(jit)

This fix check for both in opcache.

Bug: when selinux, jit doesn't work, but even with pcre.jit=0, when opcache is enabled, a AVC is raised

type=AVC msg=audit(1611840254.138:10844): avc: denied { execmem } for pid=328163 comm="php-fpm" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=1

@remicollet remicollet changed the base branch from master to PHP-7.4 January 28, 2021 13:39
@remicollet
Copy link
Member Author

@cmb69 as you are the pcre2 change owner ;)
@nikic as this is a trivial fix

Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

@nikic
Copy link
Member

nikic commented Jan 28, 2021

@cmb69 Unrelated to the PR, looks like Windows build is borked?

libzip_a.lib(zip_algorithm_xz.obj) : error LNK2001: unresolved external symbol lzma_code
libzip_a.lib(zip_algorithm_xz.obj) : error LNK2001: unresolved external symbol lzma_end
libzip_a.lib(zip_algorithm_xz.obj) : error LNK2001: unresolved external symbol lzma_lzma_preset
libzip_a.lib(zip_algorithm_xz.obj) : error LNK2001: unresolved external symbol lzma_stream_encoder
libzip_a.lib(zip_algorithm_xz.obj) : error LNK2001: unresolved external symbol lzma_alone_encoder
libzip_a.lib(zip_algorithm_xz.obj) : error LNK2001: unresolved external symbol lzma_stream_decoder
libzip_a.lib(zip_algorithm_xz.obj) : error LNK2001: unresolved external symbol lzma_alone_decoder
C:\obj\Release\php7.dll : fatal error LNK1120: 7 unresolved externals

@remicollet
Copy link
Member Author

Fixed in 7.4+ by 067f7e4 and aeb4f21

@remicollet remicollet closed this Jan 28, 2021
@remicollet remicollet deleted the issue-opcache-jit branch January 28, 2021 15:28
@cmb69
Copy link
Member

cmb69 commented Jan 28, 2021

Unrelated to the PR, looks like Windows build is borked?

It's because Remi had changed the branch in GH UI, but likely hadn't rebased. AppVeyor gets confused by that.

@kwizart
Copy link

kwizart commented Jan 28, 2021

Tested, this fixes the reported issue with execmem with SELinux enforced

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.

4 participants