From nobody Mon Dec 6 18:48:28 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1576518B5E84; Mon, 6 Dec 2021 18:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J7CB64fd3z4SZc; Mon, 6 Dec 2021 18:48:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07D3F11177; Mon, 6 Dec 2021 18:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B6ImSuu065334; Mon, 6 Dec 2021 18:48:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6ImSYJ065333; Mon, 6 Dec 2021 18:48:28 GMT (envelope-from git) Date: Mon, 6 Dec 2021 18:48:28 GMT Message-Id: <202112061848.1B6ImSYJ065333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b0e0b4e7b379 - main - Enforce that vdso does not consume too much from the shared page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0e0b4e7b3795e9beb0cddcfd75261cc9327b5b0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638816511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pf6It5wFxN3Q+W+ZRp7iRNT6YB4We1sXtITiz1iDfD8=; b=bRRPJ5/Y+HgJDVjOTxlUCO8hV67+ewFjOgo1KRJ+2et4v/HdEk33s6mAVpM3NKGVHkewMV 6jLzK10j8FwzPjFchSylsjfv+BqGS8Myhkp4zmmt5NruPpwiLaeIiDxGrU50LOUx9zv/gv gYDJUGOclxx8euA5q4sjo52R/77fGeO1WoKFEpUmXYDIK+hDo2uIEmL0Ir/XLnuDue7XqN BEQ/AUA7TsUepsH/WReT8Cp3MLiU06IKpdtqAnMxzNbxs5ct4oZqQACiTVyGVU6WQiUJYO KRCKmxlh+6MuOub5A0wRRWKiK5kqEI1/cH115igVthGUgFkOznL2Yo6ygS54WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638816511; a=rsa-sha256; cv=none; b=nwFbiRutq0mn0uaNO2siJTI8DMBJunn4QEwkIt5Q3UVWW7DBh64NeO6G1LUg2arcyYuVdo MO0LmQhPJV9mYbNbRrQqVSqFDnLKFA71hXf4ADcaFznaEWJBgBALo0gl/qO8wbTZhB/OWH g6j/HA3QxYDOr6iinx+QeWqz0hPlpXxoRcDx7XrNnpAUotyVdU73VrKd2f/qCCp9btBJvS jLYdB/SuGzgHPSMYLh54GKlImdO5zJAj39kYZWxVr0Gzy2BPnDEF7LXJs25upiZOykufvB IIllE+2NsunanLjmnRHAd3XKJsD+C88RHUyw+MjHm0ZMT47kgHARwH7hQCucsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b0e0b4e7b3795e9beb0cddcfd75261cc9327b5b0 commit b0e0b4e7b3795e9beb0cddcfd75261cc9327b5b0 Author: Konstantin Belousov AuthorDate: 2021-11-18 01:20:08 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-06 18:47:30 +0000 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 --- sys/tools/amd64_ia32_vdso.sh | 6 ++++++ sys/tools/amd64_vdso.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/sys/tools/amd64_ia32_vdso.sh b/sys/tools/amd64_ia32_vdso.sh index 15ad866b4471..7ef630dbaac5 100644 --- a/sys/tools/amd64_ia32_vdso.sh +++ b/sys/tools/amd64_ia32_vdso.sh @@ -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 \ diff --git a/sys/tools/amd64_vdso.sh b/sys/tools/amd64_vdso.sh index 6a4111ffabc8..0bb351192407 100644 --- a/sys/tools/amd64_vdso.sh +++ b/sys/tools/amd64_vdso.sh @@ -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 \