Closed
Description
Description
Intel Control Flow Enforcement Technology (CET) is enabled since gcc v8.1. Gcc emits following processor-specific program property types in .note.gnu.property section if we compile with "gcc -fcf-protection foo.c":
- Indirect Branch Tracking (IBT)
- Shadow Stack (SHSTK)
Furthermore, CET (-fcf-protection) becomes default since gcc 11.
Such properties are there before PHP-8.1.0.
$ sudo readelf -n sapi/cli/php
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0
Properties: x86 feature: IBT, SHSTK
x86 ISA needed: x86-64-baseline
However, the properties are missing since PHP-8.1.0.
$ sudo readelf -n sapi/cli/php
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA needed: x86-64-baseline
This is caused by commit c276c16 "Implement Fibers" which introduces some assembly file such as jump_x86_64_sysv_elf_gas.S and make_x86_64_sysv_elf_gas.S. The object files of such assembly miss .note.gnu.property section and thus the final output files miss it too.
I want to submit a patch to fix this.
PHP Version
PHP-8.1.0
Operating System
Ubuntu 22.04