]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Add compiler defenses flags
authorMateusz Grzonka <mateusz.grzonka@intel.com>
Mon, 17 Jul 2023 13:19:10 +0000 (15:19 +0200)
committerJes Sorensen <jes@trained-monkey.org>
Fri, 1 Sep 2023 16:15:39 +0000 (12:15 -0400)
commit55a1150c7438afcb7756fccd49713ede20a58e4a
tree6ba6dcfa669a46b1667bc7391bfe9a694beb9347
parent8d1114be8c0a307d251c24078833b029efabc448
Add compiler defenses flags

It is essential to avoid buffer overflows and similar bugs as much as
possible.

According to Intel rules we are obligated to verify certain
compiler flags, so it will be much easier if they are added to the
Makefile.

Add gcc flags for prevention of buffer overflows, format string vulnerabilities,
stack protection to prevent stack overwrites and aslr enablement through -fPIE.
Also make the flags configurable.

The changes were verified on gcc versions 7.5, 8.3, 9.2, 10 and 12.2.

Signed-off-by: Mateusz Grzonka <mateusz.grzonka@intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Makefile