Enforce that vdso does not consume too much from the shared page

Reviewed by:	emaste
Discussed with:	jrtc27
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D32960
This commit is contained in:
Konstantin Belousov 2021-11-18 03:20:08 +02:00
parent 8a4bd7f818
commit b0e0b4e7b3
2 changed files with 12 additions and 0 deletions

View File

@ -40,6 +40,12 @@ ${LD} --shared -Bsymbolic -soname="elf-vdso32.so.1" \
--hash-style=sysv --fatal-warnings --strip-all \
-o elf-vdso32.so.1 ia32_sigtramp.pico
if [ "$(wc -c elf-vdso32.so.1 | ${AWK} '{print $1}')" -gt 2048 ]
then
echo "elf-vdso32.so.1 too large" 1>&2
exit 1
fi
${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
-o elf-vdso32.so.o -I. -I"${S}" -include opt_global.h \
-DVDSO_NAME=elf_vdso32_so_1 -DVDSO_FILE=elf-vdso32.so.1 \

View File

@ -49,6 +49,12 @@ ${LD} --shared -Bsymbolic -soname="elf-vdso.so.1" \
--hash-style=sysv --fatal-warnings --strip-all \
-o elf-vdso.so.1 sigtramp.pico
if [ "$(wc -c elf-vdso.so.1 | ${AWK} '{print $1}')" -gt 2048 ]
then
echo "elf-vdso.so.1 too large" 1>&2
exit 1
fi
${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
-o elf-vdso.so.o -I. -I"${S}" -include opt_global.h \
-DVDSO_NAME=elf_vdso_so_1 -DVDSO_FILE=elf-vdso.so.1 \