Page MenuHomePhabricator

devtools: Add security check for separate_code
ClosedPublic

Authored by PiRK on Apr 5 2023, 12:52.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6a2e72e179e9: devtools: Add security check for separate_code
Summary

Check that sections are appropriately separated in virtual memory,
based on their (expected) permissions. This checks for missing
-Wl,-z,separate-code and potentially other problems.

Co-authored-by: fanquake <fanquake@gmail.com>

This is a partial backport of core#19525 and core#20346
https://github.com/bitcoin/bitcoin/pull/19525/commits/65d0f1a53354fb25c8152ee5b430cf57e6508594

Depends on D13575

Test Plan
cd contrib/devtools/
./test-security-check.py

Some of the tests may fail for unrelated reasons, but check that test_ELF passes.

Run also gitian builds on CI.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable