This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/2] Multiarch hooks for memcpy variants


On 14/08/17 14:28, Siddhesh Poyarekar wrote:
> On Monday 14 August 2017 06:50 PM, Szabolcs Nagy wrote:
>> does anyone know how commonly distros build
>> with _FORTIFY_SOURCE?
> 
> Fedora does it by default:
> 
> -14: __global_compiler_flags	-O2 -g -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
> --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags}
> 

it seems the firefox on my system is compiled with
_FORTIFY_SOURCE, so i checked libxul.so:

memcpy calls: 2570 (95.5%)
__memcpy_chk calls: 122 (4.5%)

it seems it's rare that the destination is an array
with known size, so _chk is rarely used, to me it
makes more sense to add static inline __memcpy_chk
to string.h than fiddle with asm and ifunc.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]