If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
Reviewers, this pull request conflicts with the following ones:
#24123 (build: Pointer Authentication and Branch Target Identification for aarch64 Linux (Guix) by fanquake)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
DrahtBot added the label
Build system
on Feb 17, 2023
fanquake force-pushed
on Feb 17, 2023
fanquake
commented at 2:33 pm on February 17, 2023:
member
Changed the approach here, from using libevents own hardening option (might send some fixes upstream), and a patch, to just using FORTIFY_SOURCE directly. That gets as what we want at the moment, without other potential side effects.
theuni
commented at 3:20 pm on February 17, 2023:
member
Do you have a before/after count for hardened functions?
fanquake
commented at 3:39 pm on February 17, 2023:
member
Do you have a before/after count for hardened functions?
Using GCC 13 and glibc 2.37 (with only this branch):
0# master 1nm -C src/bitcoind | grep _chk
2 U __fprintf_chk@GLIBC_2.17
3 U __memcpy_chk@GLIBC_2.17
4 U __snprintf_chk@GLIBC_2.17
5 U __stack_chk_fail@GLIBC_2.17
6 U __stack_chk_guard@GLIBC_2.17
7 U __vsnprintf_chk@GLIBC_2.17
8objdump -d src/bitcoind | grep "_chk@plt" | wc -l
9321011# this branch12nm -C src/bitcoind | grep _chk
13 U __fdelt_chk@GLIBC_2.17
14 U __fprintf_chk@GLIBC_2.17
15 U __memcpy_chk@GLIBC_2.17
16 U __memmove_chk@GLIBC_2.17
17 U __memset_chk@GLIBC_2.17
18 U __snprintf_chk@GLIBC_2.17
19 U __stack_chk_fail@GLIBC_2.17
20 U __stack_chk_guard@GLIBC_2.17
21 U __vsnprintf_chk@GLIBC_2.17
22objdump -d src/bitcoind | grep "_chk@plt" | wc -l
2354
If I combine with our own use of FORTIFY_SOURCE=3:
0nm -C src/bitcoind | grep _chk
1 U __fdelt_chk@GLIBC_2.17
2 U __fprintf_chk@GLIBC_2.17
3 U __memcpy_chk@GLIBC_2.17
4 U __memmove_chk@GLIBC_2.17
5 U __memset_chk@GLIBC_2.17
6 U __snprintf_chk@GLIBC_2.17
7 U __stack_chk_fail@GLIBC_2.17
8 U __stack_chk_guard@GLIBC_2.17
9 U __vsnprintf_chk@GLIBC_2.17
10objdump -d src/bitcoind | grep "_chk@plt" | wc -l
1181
hebasto
commented at 5:04 pm on February 17, 2023:
member
Changed the approach here, from using libevents own hardening option
The previous 974e44c0a0e692e1e11e7c067699db94f55ce464 commit, being combined with the current 778e34e8625cc83d0e5a93493c71f01712bef81d one, should work for older compilers as well, no?
fanquake
commented at 5:22 pm on February 17, 2023:
member
should work for older compilers as well, no?
I changed the approach because I don’t want us to use the gcc-hardening option.
TheCharlatan approved
TheCharlatan
commented at 11:23 am on February 20, 2023:
contributor
ACK778e34e8625cc83d0e5a93493c71f01712bef81d
depends: use FORTIFY_SOURCE=3 with libeventff4a73aea2
fanquake force-pushed
on Feb 20, 2023
fanquake
commented at 4:37 pm on February 20, 2023:
member
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-24 06:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me