[PATCH v2 1/2] string: _FORTIFY_SOURCE=3 using __builtin_dynamic_object_size

Florian Weimer fweimer@redhat.com
Mon Dec 14 14:54:11 GMT 2020


* Siddhesh Poyarekar via Libc-alpha:

> diff --git a/NEWS b/NEWS
> index 0820984547..4167f34c13 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -28,6 +28,11 @@ Major new features:
>    The 32-bit RISC-V port requires at least Linux 5.4, GCC 7.1 and binutils
>    2.28.
>  
> +* A new fortification level _FORTIFY_SOURCE=3 is available.  At this level,
> +  glibc may use additional checks that may be computationally expensive.  At
> +  present these checks are available only on LLVM 9 and later.  The latest GCC
> +  available at this time (10.2) does not support this level of fortification.

I think it's still a fixed overhead per call (i.e., not proportional to
buffer size or stack depth).  So the performance warning is perhaps a
bit too strong (likewise in the manual).

Rest of the patch looks okay to me.  Debian Code Search doesn't show any
users of __objsize0 reference, so the macro name should be safe,
although it does not have a __glibc_ prefix.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill



More information about the Libc-alpha mailing list