History log of /PHP-8.2/ext/opcache/shared_alloc_mmap.c (Results 1 – 25 of 41)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# acf758d2 23-Jul-2024 Arnaud Le Blanc

Fix build on platforms without JIT support (#15069)


# 929536b6 03-Jul-2024 Arnaud Le Blanc

Hint the opcache shm mapping location only when JIT is enabled

Closes GH-14793
Fixes GH-13775


# a924e1c7 23-May-2023 LoongT4o <109949122+LoongT4o@users.noreply.github.com>

Fix the JIT buffer relocation failure at the corner case (#11266)

Avoid missing possible candidates due to the large address range of the free segment.
Eg, 

48000000-49400000 r-

Fix the JIT buffer relocation failure at the corner case (#11266)

Avoid missing possible candidates due to the large address range of the free segment.
Eg, 

48000000-49400000 r-xs 08000000 00:0f 39322841               segment1
7ffff2ec8000-7ffff2f49000 rw-p 00000000 00:00 0              segment2
7ffff6fae000-7ffff735c000 r-xp 00200000 08:02 11538515       /usr/local/sbin/php-fpm

original code will miss the opportunity between [7ffff2ec** - 7ffff2ec8000].

Fix issue #11265.

Signed-off-by: Long, Tao <tao.long@intel.com>
Signed-off-by: Dmitry Stogov <dmitrystogov@gmail.com>

show more ...


# 6fb8b9d7 18-Mar-2024 Bob Weinand

Fix possible segfault with 0x0 shared opcache base

Moving the minimum base of the shared opcache memory to the second huge page to avoid a possible 0x0 base, which may cause all sorts of seg

Fix possible segfault with 0x0 shared opcache base

Moving the minimum base of the shared opcache memory to the second huge page to avoid a possible 0x0 base, which may cause all sorts of segfaults.
This is not a problem on most systems which have a mmap_min_addr which is non-zero, but e.g. WSL1 doesn't have a minimum mapping address.

show more ...


# 00f9c5ee 08-Mar-2024 Ilija Tovilo

Remove MAP_JIT flag

This flag is supposed to go on the flags parameter, rather than prot. Moreover,
this flag is no longer needed because the JIT does not set RWX without ZTS, and
JI

Remove MAP_JIT flag

This flag is supposed to go on the flags parameter, rather than prot. Moreover,
this flag is no longer needed because the JIT does not set RWX without ZTS, and
JIT+ZTS has been disabled on macOS with Apple Silicon.

Closes GH-13638

show more ...


# a2af8ac3 23-May-2023 LoongT4o <109949122+LoongT4o@users.noreply.github.com>

Fix the JIT buffer relocation failure at the corner case (#11266)

Avoid missing possible candidates due to the large address range of the free segment.
Eg, 

48000000-49400000 r-

Fix the JIT buffer relocation failure at the corner case (#11266)

Avoid missing possible candidates due to the large address range of the free segment.
Eg, 

48000000-49400000 r-xs 08000000 00:0f 39322841               segment1
7ffff2ec8000-7ffff2f49000 rw-p 00000000 00:00 0              segment2
7ffff6fae000-7ffff735c000 r-xp 00200000 08:02 11538515       /usr/local/sbin/php-fpm

original code will miss the opportunity between [7ffff2ec** - 7ffff2ec8000].

Fix issue #11265.

Signed-off-by: Long, Tao <tao.long@intel.com>
Signed-off-by: Dmitry Stogov <dmitrystogov@gmail.com>

show more ...


# 263b22f3 21-Feb-2023 Max Kellermann

Make lots of string pointers `const` (#10646)

This allows using string literals without implicitly casting away the
`const`.


# d3facbe2 23-Jan-2023 Max Kellermann

Mark globals as const (#10303)

This moves them from ``.data`` to ``.rodata`` and allows more compiler optimizations.

* ext/opcache/zend_accelerator_hash: make prime_numbers const

Mark globals as const (#10303)

This moves them from ``.data`` to ``.rodata`` and allows more compiler optimizations.

* ext/opcache/zend_accelerator_hash: make prime_numbers const

* Zend/zend_signal: make zend_sigs const

* ext/dba: make dba_handler pointers const

* ext/exif: make php_tiff_bytes_per_format and other globals const

* ext/intl/grapheme: make grapheme_extract_iters const

* ext/mstring: make rare_codepoint_bitvec const

* ext/snmp: make objid_mib const

* ext/opcache: make all zend_shared_memory_handlers const

show more ...


# 3660bc31 05-Nov-2022 David CARLIER

opcache fixing w/x pages creation on freebsd 13.1 and above.

By default, the system allows these but admin can disable them system wide.
However the procctl api permits to control it per

opcache fixing w/x pages creation on freebsd 13.1 and above.

By default, the system allows these but admin can disable them system wide.
However the procctl api permits to control it per process.

Closes GH-9896.

show more ...


# 7cf1a2ad 12-Dec-2023 Ilija Tovilo

Fix SELinux mprotect execheap error due to mem adjacent to heap

It seems SELinux has a bug where memory directly adjacent to the heap is
interpreted as heap memory. Dodge this issue by l

Fix SELinux mprotect execheap error due to mem adjacent to heap

It seems SELinux has a bug where memory directly adjacent to the heap is
interpreted as heap memory. Dodge this issue by leaving some space between the
heap and memory suggested by find_prefered_mmap_base.

See GH-12932
See https://bugzilla.kernel.org/show_bug.cgi?id=218258
Closes GH-12942

show more ...


# 53909896 07-Dec-2023 Ilija Tovilo

Fix asan shadow memory and shared_alloc_mmap clash

The memory region found by find_prefered_mmap_base may clash with memory regions
reserved by asan for tracking memory. The symptom of t

Fix asan shadow memory and shared_alloc_mmap clash

The memory region found by find_prefered_mmap_base may clash with memory regions
reserved by asan for tracking memory. The symptom of this is that mprotect for
JIT fails adding the PROT_EXEC flag to the shared memory region.

Closes GH-12890

show more ...


# e787d9a0 18-Aug-2022 David CARLIER

GH-9370: Fix opcache jit protection bits.

Allow mprotect to occur, pthread_jit_write_np are just to allow mprotect
flags to be used.

Closes #9371.


# 1977ef92 02-Jul-2022 David CARLIER

opcache find best candidate near .text segment for large maps on FreeBSD.
Follow up on #8890 using similar workflow, we go through the php binary mapping per address boundaries.

Closes #

opcache find best candidate near .text segment for large maps on FreeBSD.
Follow up on #8890 using similar workflow, we go through the php binary mapping per address boundaries.

Closes #8908.

show more ...


# 14ced88c 30-Jun-2022 Javier Eguiluz

[ci skip] Fix typo (anough → enough)

Closes GH-8901.


# 17aa81a5 30-Jun-2022 Dmitry Stogov

Allocate JIT bufer close to PHP .text segment to allow using direct IP-relative calls and jumps (#8890)

This implementation is based on https://github.com/php/php-src/pull/8618 developed by

Allocate JIT bufer close to PHP .text segment to allow using direct IP-relative calls and jumps (#8890)

This implementation is based on https://github.com/php/php-src/pull/8618 developed by Su Tao, Wang Xue, Chen Hu and Lizhen Lizhen.

show more ...


# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs


# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...


# ae23852e 27-Feb-2021 David Carlier

Add supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be applied in addition.

Closes GH-6738.


# 559fc46b 30-Jan-2021 David CARLIER

Fix ubsan warning on macos

Closes GH-6652.


# 4414fd93 20-Jan-2021 David CARLIER

Distinguishing opcache SHM on stats tools for Mac

Closes GH-6628.


# 36219416 03-Aug-2020 David Carlier

Fix opcache JIT on NetBSD with PaX

When PaX mprotect active, opcache JIT test fail as it needs
the PROT_MPROTECT macro to be able to allow further permission
promotion with mprotect.

Fix opcache JIT on NetBSD with PaX

When PaX mprotect active, opcache JIT test fail as it needs
the PROT_MPROTECT macro to be able to allow further permission
promotion with mprotect.

Closes GH-5929.

show more ...


Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2
# ff8002fc 12-Jun-2019 Nikita Popov

Mark label as potentially unused


Revision tags: php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28
# 9a068760 01-Apr-2019 Dmitry Stogov

Added JIT compiler for x86 and x86_64


Revision tags: php-7.3.4RC1, php-7.2.17RC1, php-7.1.27, php-7.3.3, php-7.2.16, php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2
# da919a8b 05-Feb-2019 Dmitry Stogov

Remove copyright years.


Revision tags: php-7.2.15RC1, php-7.3.2RC1, php-5.6.40, php-7.1.26, php-7.3.1, php-7.2.14, php-7.2.14RC1, php-7.3.1RC1, php-5.6.39, php-7.1.25, php-7.2.13, php-7.0.33, php-7.3.0
# 6a8260a0 28-Nov-2018 David Carlier

opcache/FreeBSD huge code page pragma support

Sort of following up on super pages support earlier, here
we also detect page mappings possibly eligible to go to
super pages.


12