On amd64 and i386, tell the compiler to refrain from generating SSE,
3DNow, MMX and floating point instructions in rtld-elf. Otherwise, _rtld_bind() (and whatever it calls) could possibly clobber function arguments that are passed in SSE/3DNow/MMX/FP registers, usually floating point values. This can happen, for example, when clang generates SSE code for memset() or memcpy() calls. One symptom of this is sshd dying early on amd64 with "PRNG not seeded", which is ultimately caused by libcrypto.so.6 calling RAND_add() with a double parameter. That parameter is passed via %xmm0, which gets wiped out by an SSE memset() in _rtld_bind(). Reviewed by: kib, kan
This commit is contained in:
parent
7606ddab28
commit
e172464728
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216977
@ -1,5 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
CFLAGS+= -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float
|
||||
# Uncomment this to build the dynamic linker as an executable instead
|
||||
# of a shared library:
|
||||
#LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x
|
||||
|
@ -1,5 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
CFLAGS+= -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float
|
||||
# Uncomment this to build the dynamic linker as an executable instead
|
||||
# of a shared library:
|
||||
#LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x
|
||||
|
Loading…
Reference in New Issue
Block a user