perf: Fix missing CET property notes on x86 with -fcf-protection
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | perf build: Preserve EXTRA_CFLAGS when building in-tree libbpftools/ | +1 | 0 replies | |
| 2/3 | perf build: Apply EXTRA_CXXFLAGS to C++ buildstools/ | +1 | 0 replies | |
| 3/3 | perf x86: Add .note.gnu.property to assembly linked into perftools/ tools/ tools/ | +72 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] perf: Fix missing CET property notes on x86 with -fcf-protection
When perf is built with -fcf-protection, the x86 binary can lack CET (IBT/SHSTK) in .note.gnu.property because perf links several static archives whole-archive: if any input object lacks matching property notes, the linker drops CET from the final binary.
Fix libbpf EXTRA_CFLAGS handling, C++ flag propagation, and missing .note.gnu.property sections in x86 assembly (like .note.GNU-stack). All three are needed for CET to survive the link.
Trevor Allison (3):
perf build: Preserve EXTRA_CFLAGS when building in-tree libbpf perf build: Apply EXTRA_CXXFLAGS to C++ builds
perf x86: Add .note.gnu.property to assembly linked into perf
tools/perf/Makefile.config | 1 + tools/perf/Makefile.perf | 2 +- tools/perf/arch/x86/tests/regs_load.S | 24 ++++++++++++++++++++++++ tools/perf/bench/mem-memcpy-x86-64-asm.S | 24 ++++++++++++++++++++++++ tools/perf/bench/mem-memset-x86-64-asm.S | 24 ++++++++++++++++++++++++ 5 files changed, 74 insertions(+), 1 deletion(-)
Signature · 1 line
2.50.1 (Apple Git-155)