Skip to content

use pcre.jit only if enabled - #6647

Closed
remicollet wants to merge 1 commit into
php:PHP-7.4from
remicollet:issue-opcache-jit
Closed

remicollet wants to merge 1 commit into
php:PHP-7.4from
remicollet:issue-opcache-jit

Conversation

@remicollet

Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@nikic nikic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks reasonable.

@nikic

nikic commented Jan 28, 2021

Copy link
Copy Markdown
Member

@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
Copy Markdown
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

cmb69 commented Jan 28, 2021

Copy link
Copy Markdown
Member

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

kwizart commented Jan 28, 2021

Copy link
Copy Markdown

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