Use -mbranch-protection=standard
when targetting *aarch64-*-linux*
.
Part of #24123, but this flag can already be used on a best effort basis.
Note that this flag is also already used by default, in the toolchain, on various distros (i.e Fedora).
standard branch-protection
to hardening flags for aarch64-linux
#30433
Use -mbranch-protection=standard
when targetting *aarch64-*-linux*
.
Part of #24123, but this flag can already be used on a best effort basis.
Note that this flag is also already used by default, in the toolchain, on various distros (i.e Fedora).
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For detailed information about the code coverage, see the test coverage report.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | hebasto, TheCharlatan |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
No conflicts as of last run.
860@@ -861,7 +861,11 @@ if test "$use_hardening" != "no"; then
861 esac
862
863 case $host in
864- *aarch64*)
865+ *aarch64-*-linux*)
866+ AX_CHECK_COMPILE_FLAG([-mbranch-protection=standard], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -mbranch-protection=standard"])
860@@ -861,7 +861,11 @@ if test "$use_hardening" != "no"; then
861 esac
862
863 case $host in
864- *aarch64*)
865+ *aarch64-*-linux*)
866+ AX_CHECK_COMPILE_FLAG([-mbranch-protection=standard], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -mbranch-protection=standard"])
867+ AX_CHECK_LINK_FLAG([-Wl,-z,pac-plt], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,pac-plt"], [], [$LDFLAG_WERROR])
Could this be an issue?
ACK 0bb8cdbe8cf1d634fb6555913dc9b498c95aeee1
master:
0/usr/bin/aarch64-linux-gnu-readelf --notes build/src/CMakeFiles/bitcoind.dir/init/bitcoind.cpp.o
1
2Displaying notes found in: .note.gnu.property
3 Owner Data size Description
4 GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
5 Properties: AArch64 feature: BTI
This PR:
0/usr/bin/aarch64-linux-gnu-readelf --notes build_b/src/CMakeFiles/bitcoind.dir/init/bitcoind.cpp.o
1
2Displaying notes found in: .note.gnu.property
3 Owner Data size Description
4 GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
5 Properties: AArch64 feature: BTI, PAC
Guix Build:
086d20fcaf2331084035fba29305dbcd22665a7a0f910ffbe1667541a338129ed guix-build-001b1cf01045/output/aarch64-linux-gnu/SHA256SUMS.part
106ec1b29ed2ac24733fa24083460298e4c9a2cbba8845164f849aebb50c94e91 guix-build-001b1cf01045/output/aarch64-linux-gnu/bitcoin-001b1cf01045-aarch64-linux-gnu-debug.tar.gz
216b21d25dab9222dc69774e0e788c10bac4f15783c4ccb46c11e0608d132021d guix-build-001b1cf01045/output/aarch64-linux-gnu/bitcoin-001b1cf01045-aarch64-linux-gnu.tar.gz
33cdd10a2eb9e0bdba787fbb4c7ae63f74b3d238fbfed9a94a11fc3be90fafb4f guix-build-001b1cf01045/output/arm-linux-gnueabihf/SHA256SUMS.part
43b2dc9c09e761dc75f6ae15bb8cd5fcdc4e056600e68e0c452db619a933eb24f guix-build-001b1cf01045/output/arm-linux-gnueabihf/bitcoin-001b1cf01045-arm-linux-gnueabihf-debug.tar.gz
56bb830a6bcb831cbb2ccfb68bd70c691d73661561cc4f60b224dc8d946b9bd73 guix-build-001b1cf01045/output/arm-linux-gnueabihf/bitcoin-001b1cf01045-arm-linux-gnueabihf.tar.gz
63715ca06ff1771bc35e1e4265ce939ad25c731fd94ee4266248e6658450898c3 guix-build-001b1cf01045/output/arm64-apple-darwin/SHA256SUMS.part
73f78d59c99461020ee190ad8665d9b595df3cb42c895a615887bf0a8fb4cb112 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin-unsigned.tar.gz
8ba816c0fdb632391b1528d4cb858da12a43c0a061b5aaacd077fd2901963df53 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin-unsigned.zip
93d5312341c52b4f076341102aeb46d20ece44d49a14985314d63fc2787e04d15 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin.tar.gz
10b704319015b4e670ed1e4add637d80c6d1d9cac3d8363d6f36e8e3daa157589d guix-build-001b1cf01045/output/dist-archive/bitcoin-001b1cf01045.tar.gz
11faf0f14db65a8f40afe12e6382b04d7b59d5fa6c247bb972a8624cf9c92a02eb guix-build-001b1cf01045/output/powerpc64-linux-gnu/SHA256SUMS.part
121070564b98617051a4bf1327e1d81f610ac6edf67223e803843d3e2360f40e70 guix-build-001b1cf01045/output/powerpc64-linux-gnu/bitcoin-001b1cf01045-powerpc64-linux-gnu-debug.tar.gz
139b3264c70a26c1895b7ae123d361f90935fb467b822e4a5580bdcade07f9a288 guix-build-001b1cf01045/output/powerpc64-linux-gnu/bitcoin-001b1cf01045-powerpc64-linux-gnu.tar.gz
142d1fbdc38c66a05d58c05f3391760655326e8b656dfe490627bcceaa6e29d7c1 guix-build-001b1cf01045/output/riscv64-linux-gnu/SHA256SUMS.part
156b20bedd0116c6790e9edf349a914f50efe444e4e6edcc0c46c48706b66217ae guix-build-001b1cf01045/output/riscv64-linux-gnu/bitcoin-001b1cf01045-riscv64-linux-gnu-debug.tar.gz
16490579ecf6b8a7b6d6a276d511186b7f8d762a31fae25f39d0a513928b3ae8fe guix-build-001b1cf01045/output/riscv64-linux-gnu/bitcoin-001b1cf01045-riscv64-linux-gnu.tar.gz
177941addc7669097a27d8208673c558fb269c86fa7f78d2e53c0a0cc17df47a8a guix-build-001b1cf01045/output/x86_64-apple-darwin/SHA256SUMS.part
1895b260680fdcda7674e85e29017e98671236fc00d65436a67b109fdc9bf7183d guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin-unsigned.tar.gz
190c7b959445ce1b30a509502fae56faeac03349c497ccc9aa2e24c9a1e26c5562 guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin-unsigned.zip
2051ae91ae7d1eefcc3260b2bb2876ec2c0c75bc4b9bb81e9b89f0fdabce72af28 guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin.tar.gz
21ed5773a890bf66366c5dd891e103d01964dca5ecede308c8da1dad8b69a0c369 guix-build-001b1cf01045/output/x86_64-linux-gnu/SHA256SUMS.part
224dca5d09d5781e92658713f5275cef98463a2cd1dd944c735e633369a692b03d guix-build-001b1cf01045/output/x86_64-linux-gnu/bitcoin-001b1cf01045-x86_64-linux-gnu-debug.tar.gz
23d4865bfa860a0dd3668e65b4190560cede30eb1e6ba1a67b80a7da33f8b513f5 guix-build-001b1cf01045/output/x86_64-linux-gnu/bitcoin-001b1cf01045-x86_64-linux-gnu.tar.gz
2414ec6517c4f19145285d637745dd21e57277375427633b3007b8fe81de6a9f80 guix-build-001b1cf01045/output/x86_64-w64-mingw32/SHA256SUMS.part
250030ab8c50b1c3465305464efb251bf81b880a522b4f76f6dc6cff5b0265bf87 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-debug.zip
2696f7e3905b9be0231db1bb6f6d9ae005abbab767c57be328ef6ce42915df6068 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-setup-unsigned.exe
27484f54d512af952d7f207e85f2973429edd72e7025e07b006d568dd9f63825d7 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-unsigned.tar.gz
288389a9f5915e4720b6a994f2b2447f2863b581400ef3724a6f94a99ab5e22d88 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64.zip
My Guix build:
0aarch64
186d20fcaf2331084035fba29305dbcd22665a7a0f910ffbe1667541a338129ed guix-build-001b1cf01045/output/aarch64-linux-gnu/SHA256SUMS.part
206ec1b29ed2ac24733fa24083460298e4c9a2cbba8845164f849aebb50c94e91 guix-build-001b1cf01045/output/aarch64-linux-gnu/bitcoin-001b1cf01045-aarch64-linux-gnu-debug.tar.gz
316b21d25dab9222dc69774e0e788c10bac4f15783c4ccb46c11e0608d132021d guix-build-001b1cf01045/output/aarch64-linux-gnu/bitcoin-001b1cf01045-aarch64-linux-gnu.tar.gz
43cdd10a2eb9e0bdba787fbb4c7ae63f74b3d238fbfed9a94a11fc3be90fafb4f guix-build-001b1cf01045/output/arm-linux-gnueabihf/SHA256SUMS.part
53b2dc9c09e761dc75f6ae15bb8cd5fcdc4e056600e68e0c452db619a933eb24f guix-build-001b1cf01045/output/arm-linux-gnueabihf/bitcoin-001b1cf01045-arm-linux-gnueabihf-debug.tar.gz
66bb830a6bcb831cbb2ccfb68bd70c691d73661561cc4f60b224dc8d946b9bd73 guix-build-001b1cf01045/output/arm-linux-gnueabihf/bitcoin-001b1cf01045-arm-linux-gnueabihf.tar.gz
73715ca06ff1771bc35e1e4265ce939ad25c731fd94ee4266248e6658450898c3 guix-build-001b1cf01045/output/arm64-apple-darwin/SHA256SUMS.part
83f78d59c99461020ee190ad8665d9b595df3cb42c895a615887bf0a8fb4cb112 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin-unsigned.tar.gz
9ba816c0fdb632391b1528d4cb858da12a43c0a061b5aaacd077fd2901963df53 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin-unsigned.zip
103d5312341c52b4f076341102aeb46d20ece44d49a14985314d63fc2787e04d15 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin.tar.gz
11b704319015b4e670ed1e4add637d80c6d1d9cac3d8363d6f36e8e3daa157589d guix-build-001b1cf01045/output/dist-archive/bitcoin-001b1cf01045.tar.gz
12faf0f14db65a8f40afe12e6382b04d7b59d5fa6c247bb972a8624cf9c92a02eb guix-build-001b1cf01045/output/powerpc64-linux-gnu/SHA256SUMS.part
131070564b98617051a4bf1327e1d81f610ac6edf67223e803843d3e2360f40e70 guix-build-001b1cf01045/output/powerpc64-linux-gnu/bitcoin-001b1cf01045-powerpc64-linux-gnu-debug.tar.gz
149b3264c70a26c1895b7ae123d361f90935fb467b822e4a5580bdcade07f9a288 guix-build-001b1cf01045/output/powerpc64-linux-gnu/bitcoin-001b1cf01045-powerpc64-linux-gnu.tar.gz
152d1fbdc38c66a05d58c05f3391760655326e8b656dfe490627bcceaa6e29d7c1 guix-build-001b1cf01045/output/riscv64-linux-gnu/SHA256SUMS.part
166b20bedd0116c6790e9edf349a914f50efe444e4e6edcc0c46c48706b66217ae guix-build-001b1cf01045/output/riscv64-linux-gnu/bitcoin-001b1cf01045-riscv64-linux-gnu-debug.tar.gz
17490579ecf6b8a7b6d6a276d511186b7f8d762a31fae25f39d0a513928b3ae8fe guix-build-001b1cf01045/output/riscv64-linux-gnu/bitcoin-001b1cf01045-riscv64-linux-gnu.tar.gz
187941addc7669097a27d8208673c558fb269c86fa7f78d2e53c0a0cc17df47a8a guix-build-001b1cf01045/output/x86_64-apple-darwin/SHA256SUMS.part
1995b260680fdcda7674e85e29017e98671236fc00d65436a67b109fdc9bf7183d guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin-unsigned.tar.gz
200c7b959445ce1b30a509502fae56faeac03349c497ccc9aa2e24c9a1e26c5562 guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin-unsigned.zip
2151ae91ae7d1eefcc3260b2bb2876ec2c0c75bc4b9bb81e9b89f0fdabce72af28 guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin.tar.gz
22ed5773a890bf66366c5dd891e103d01964dca5ecede308c8da1dad8b69a0c369 guix-build-001b1cf01045/output/x86_64-linux-gnu/SHA256SUMS.part
234dca5d09d5781e92658713f5275cef98463a2cd1dd944c735e633369a692b03d guix-build-001b1cf01045/output/x86_64-linux-gnu/bitcoin-001b1cf01045-x86_64-linux-gnu-debug.tar.gz
24d4865bfa860a0dd3668e65b4190560cede30eb1e6ba1a67b80a7da33f8b513f5 guix-build-001b1cf01045/output/x86_64-linux-gnu/bitcoin-001b1cf01045-x86_64-linux-gnu.tar.gz
2514ec6517c4f19145285d637745dd21e57277375427633b3007b8fe81de6a9f80 guix-build-001b1cf01045/output/x86_64-w64-mingw32/SHA256SUMS.part
260030ab8c50b1c3465305464efb251bf81b880a522b4f76f6dc6cff5b0265bf87 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-debug.zip
2796f7e3905b9be0231db1bb6f6d9ae005abbab767c57be328ef6ce42915df6068 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-setup-unsigned.exe
28484f54d512af952d7f207e85f2973429edd72e7025e07b006d568dd9f63825d7 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-unsigned.tar.gz
298389a9f5915e4720b6a994f2b2447f2863b581400ef3724a6f94a99ab5e22d88 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64.zip
Guix build (aarch64):
086d20fcaf2331084035fba29305dbcd22665a7a0f910ffbe1667541a338129ed guix-build-001b1cf01045/output/aarch64-linux-gnu/SHA256SUMS.part
106ec1b29ed2ac24733fa24083460298e4c9a2cbba8845164f849aebb50c94e91 guix-build-001b1cf01045/output/aarch64-linux-gnu/bitcoin-001b1cf01045-aarch64-linux-gnu-debug.tar.gz
216b21d25dab9222dc69774e0e788c10bac4f15783c4ccb46c11e0608d132021d guix-build-001b1cf01045/output/aarch64-linux-gnu/bitcoin-001b1cf01045-aarch64-linux-gnu.tar.gz
33cdd10a2eb9e0bdba787fbb4c7ae63f74b3d238fbfed9a94a11fc3be90fafb4f guix-build-001b1cf01045/output/arm-linux-gnueabihf/SHA256SUMS.part
43b2dc9c09e761dc75f6ae15bb8cd5fcdc4e056600e68e0c452db619a933eb24f guix-build-001b1cf01045/output/arm-linux-gnueabihf/bitcoin-001b1cf01045-arm-linux-gnueabihf-debug.tar.gz
56bb830a6bcb831cbb2ccfb68bd70c691d73661561cc4f60b224dc8d946b9bd73 guix-build-001b1cf01045/output/arm-linux-gnueabihf/bitcoin-001b1cf01045-arm-linux-gnueabihf.tar.gz
63715ca06ff1771bc35e1e4265ce939ad25c731fd94ee4266248e6658450898c3 guix-build-001b1cf01045/output/arm64-apple-darwin/SHA256SUMS.part
73f78d59c99461020ee190ad8665d9b595df3cb42c895a615887bf0a8fb4cb112 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin-unsigned.tar.gz
8ba816c0fdb632391b1528d4cb858da12a43c0a061b5aaacd077fd2901963df53 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin-unsigned.zip
93d5312341c52b4f076341102aeb46d20ece44d49a14985314d63fc2787e04d15 guix-build-001b1cf01045/output/arm64-apple-darwin/bitcoin-001b1cf01045-arm64-apple-darwin.tar.gz
10b704319015b4e670ed1e4add637d80c6d1d9cac3d8363d6f36e8e3daa157589d guix-build-001b1cf01045/output/dist-archive/bitcoin-001b1cf01045.tar.gz
11faf0f14db65a8f40afe12e6382b04d7b59d5fa6c247bb972a8624cf9c92a02eb guix-build-001b1cf01045/output/powerpc64-linux-gnu/SHA256SUMS.part
121070564b98617051a4bf1327e1d81f610ac6edf67223e803843d3e2360f40e70 guix-build-001b1cf01045/output/powerpc64-linux-gnu/bitcoin-001b1cf01045-powerpc64-linux-gnu-debug.tar.gz
139b3264c70a26c1895b7ae123d361f90935fb467b822e4a5580bdcade07f9a288 guix-build-001b1cf01045/output/powerpc64-linux-gnu/bitcoin-001b1cf01045-powerpc64-linux-gnu.tar.gz
142d1fbdc38c66a05d58c05f3391760655326e8b656dfe490627bcceaa6e29d7c1 guix-build-001b1cf01045/output/riscv64-linux-gnu/SHA256SUMS.part
156b20bedd0116c6790e9edf349a914f50efe444e4e6edcc0c46c48706b66217ae guix-build-001b1cf01045/output/riscv64-linux-gnu/bitcoin-001b1cf01045-riscv64-linux-gnu-debug.tar.gz
16490579ecf6b8a7b6d6a276d511186b7f8d762a31fae25f39d0a513928b3ae8fe guix-build-001b1cf01045/output/riscv64-linux-gnu/bitcoin-001b1cf01045-riscv64-linux-gnu.tar.gz
177941addc7669097a27d8208673c558fb269c86fa7f78d2e53c0a0cc17df47a8a guix-build-001b1cf01045/output/x86_64-apple-darwin/SHA256SUMS.part
1895b260680fdcda7674e85e29017e98671236fc00d65436a67b109fdc9bf7183d guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin-unsigned.tar.gz
190c7b959445ce1b30a509502fae56faeac03349c497ccc9aa2e24c9a1e26c5562 guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin-unsigned.zip
2051ae91ae7d1eefcc3260b2bb2876ec2c0c75bc4b9bb81e9b89f0fdabce72af28 guix-build-001b1cf01045/output/x86_64-apple-darwin/bitcoin-001b1cf01045-x86_64-apple-darwin.tar.gz
21ed5773a890bf66366c5dd891e103d01964dca5ecede308c8da1dad8b69a0c369 guix-build-001b1cf01045/output/x86_64-linux-gnu/SHA256SUMS.part
224dca5d09d5781e92658713f5275cef98463a2cd1dd944c735e633369a692b03d guix-build-001b1cf01045/output/x86_64-linux-gnu/bitcoin-001b1cf01045-x86_64-linux-gnu-debug.tar.gz
23d4865bfa860a0dd3668e65b4190560cede30eb1e6ba1a67b80a7da33f8b513f5 guix-build-001b1cf01045/output/x86_64-linux-gnu/bitcoin-001b1cf01045-x86_64-linux-gnu.tar.gz
2414ec6517c4f19145285d637745dd21e57277375427633b3007b8fe81de6a9f80 guix-build-001b1cf01045/output/x86_64-w64-mingw32/SHA256SUMS.part
250030ab8c50b1c3465305464efb251bf81b880a522b4f76f6dc6cff5b0265bf87 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-debug.zip
2696f7e3905b9be0231db1bb6f6d9ae005abbab767c57be328ef6ce42915df6068 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-setup-unsigned.exe
27484f54d512af952d7f207e85f2973429edd72e7025e07b006d568dd9f63825d7 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64-unsigned.tar.gz
288389a9f5915e4720b6a994f2b2447f2863b581400ef3724a6f94a99ab5e22d88 guix-build-001b1cf01045/output/x86_64-w64-mingw32/bitcoin-001b1cf01045-win64.zip