public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] feature_test_macros.7: document -D_FORTIFY_SOURCE=3
@ 2022-10-13 18:31 Sam James
  2022-10-13 18:50 ` Alejandro Colomar
  0 siblings, 1 reply; 5+ messages in thread
From: Sam James @ 2022-10-13 18:31 UTC (permalink / raw)
  To: Alejandro Colomar, Michael Kerrisk; +Cc: linux-man, Sam James

Reference: https://developers.redhat.com/blog/2021/04/16/broadening-compiler-checks-for-buffer-overflows-in-_fortify_source
Reference: https://developers.redhat.com/articles/2022/09/17/gccs-new-fortification-level
Signed-off-by: Sam James <sam@gentoo.org>
---
 man7/feature_test_macros.7 | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/man7/feature_test_macros.7 b/man7/feature_test_macros.7
index d33041001..e62185745 100644
--- a/man7/feature_test_macros.7
+++ b/man7/feature_test_macros.7
@@ -643,9 +643,20 @@ and result in compiler warnings;
 other checks take place at run time,
 and result in a run-time error if the check fails.
 .IP
+With
+.B _FORTIFY_SOURCE
+set to 3, additional checking is added to capture some function
+calls used with an argument of variable size.
+.IP
 Use of this macro requires compiler support, available with
 .BR gcc (1)
 since version 4.0.
+.IP
+For use of
+.B _FORTIFY_SOURCE
+set to 3, then
+.BR gcc (1)
+version 12.0 or later is required.
 .SS Default definitions, implicit definitions, and combining definitions
 If no feature test macros are explicitly defined,
 then the following feature test macros are defined by default:
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-13 21:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-13 18:31 [PATCH] feature_test_macros.7: document -D_FORTIFY_SOURCE=3 Sam James
2022-10-13 18:50 ` Alejandro Colomar
2022-10-13 18:57   ` Sam James
2022-10-13 19:12     ` Alejandro Colomar
2022-10-13 21:06       ` Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox