From nobody Fri Oct 21 16:18:00 2022 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 4Mv8lM4v7Tz4g4n6 for ; Fri, 21 Oct 2022 16:18:07 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-24.consmr.mail.gq1.yahoo.com (sonic312-24.consmr.mail.gq1.yahoo.com [98.137.69.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mv8lL47xxz414X for ; Fri, 21 Oct 2022 16:18:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666369084; bh=JI5ga/S++mfttdbRIBsIzqF9vqQ0SswK0kcCWbJkZqs=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=KaaqrGN4Bapu88Y4kDdOdg9Uor6Vr+JTziPlEr3s3t+56wRmJO7fLCuOWV0sFfyL4UB2Jx6wxhxW6Amd8eD0zsjYBx1FJQrgbti1fvOrPxBWw3H5jshmq1EGx0VF9ZYHfMPvrFw2R45B2cj4kAVkB34b38B+6GbGEWQyTPr/xl/OQzzv9q9Fho91VIRKoFywy6LoNXmv1KtMj/PldchhL+MS7DsaOsKs5T2k62BHDTalaqXuG6CQGLyLBK/CSi6nyl5fY2dxrOj9EsNy8reTRdwDT85np6ryumx3+gM6asBjprmofepCgisivOrr3SKizhdgbpowisi79z29hdHKgg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666369084; bh=jBB8IAzAGrij6x5sW0UZnVa7nIUd4qm/GH6DZAUSJQc=; h=X-Sonic-MF:From:Subject:Date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SWfHLifTHZNOfEdiLK464M1uvMWa6f KkI00VgoPsgH5KoQSFyJtbUNZ3MsmwoJJIBmCJX2kRExroxnatKKH0yhhtFvK4ouWSfWXrp8qVvR lfmoF9yDo48iImHavhzBfvuwXjmBQOxqmdJmVDv.4SK4UYFuA4CMRaJI88sA9HPkZNm3GunXPa3T 4he6XCXBK4dRS69G343vqHSkH9PaddwXCE2vfDZ1eZ3B6YSeczZQrFt.JLXNwHHYk6rHyaicYJKn KgGiP_1bYhZA_eiQ7GaWchwLRpnTwrAe_6ZOozIoA0UzMCZ1ULJU9qhuchGFntn2WBOG5jo0VzQj emomA9Fvh7XqUxY39yXkF6q.G7lZhD7tqimtA9iNr_YvPI9SFtnrmYOujqOWQ.MfXCuRsZn8XOLW UsANYJbx6BimXdlLXbDwvijuyGRPgPGy85ZrZuSHpFm6Y_IUSXFiMfe.HtZK44BRRbfy0qYzWimx pjmQpPTYAjGWzWKAMnVxELnubiO28JYYahal5mYouu6nsb0bHURH5I2SXZN3FGfLbsiUgTTE6gA- - X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Fri, 21 Oct 2022 16:18:04 +0000 Received: by hermes--production-gq1-754cb59848-gq6wq (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0471df3a38e04035ab89755be7bf8ab2; Fri, 21 Oct 2022 16:18:01 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 9cabef3d146e - main - ldd: use direct exec mode unconditionally Message-Id: Date: Fri, 21 Oct 2022 09:18:00 -0700 To: Kristof Provost , dev-commits-src-main@freebsd.org, "kib@freebsd.org" X-Mailer: Apple Mail (2.3696.120.41.1.1) References: X-Rspamd-Queue-Id: 4Mv8lL47xxz414X X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=KaaqrGN4; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.205 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.205:from]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N Kristof Provost wrote on Date: Fri, 21 Oct 2022 12:18:04 UTC : > On 6 Oct 2022, at 17:50, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL:=20 > > = https://cgit.FreeBSD.org/src/commit/?id=3D9cabef3d146e9a844813b6bc8952d6cf= 2e9d45e5 > > > > commit 9cabef3d146e9a844813b6bc8952d6cf2e9d45e5 > > Author: Konstantin Belousov > > AuthorDate: 2022-09-21 13:55:44 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2022-10-06 15:50:26 +0000 > > > > ldd: use direct exec mode unconditionally > > > > Trying to exec malformed or unusual binary, for instance, a=20 > > non-FreeBSD > > ABI, or using a non-standard interpreter, might give unexpected=20= > > outcome. > > > > Reported by: The UK's National Cyber Security Centre (NCSC) > > Reviewed by: emaste, markj, philip > > Discussed with: jhb > > Sponsored by: The FreeBSD Foundation > > admbug: 991 > > PR: 127276, 175339, 231926 > > MFC after: 1 week > > Differential revision: https://reviews.freebsd.org/D36650 > > > This appears to break things for armv7 (running on aarch64). >=20 > This manifests while building pfsense (for 3100 / armv7), which we do = on=20 > an aarch64 vm (to avoid having to deal with qemu, and because it=E2=80=99= s=20 > faster). My context is a Cortex-A72 system (a HoneyComb), just via use of poudriere-devel armv7 jails (no qemu use): # poudriere jail -jmain-CA7 -i Jail name: main-CA7 Jail version: 14.0-CURRENT Jail arch: arm.armv7 Jail method: null Jail mount: /usr/obj/DESTDIRs/main-CA7-poud Jail fs: =20 Jail updated: 2021-06-27 17:58:33 Jail pkgbase: disabled where /usr/obj/DESTDIRs/main-CA7-poud has an installed armv7 world, following poudriere's requirements for such. > During that build a couple ports fail to build, including=20 > databases/sqlite3. > It fails running `/usr/bin/ldd -a=20 > = "/wrkdirs/usr/ports/databases/sqlite3/work-default/stage/usr/local/bin/sql= ite3"=20 > = "/wrkdirs/usr/ports/databases/sqlite3/work-default/stage/usr/local/lib/lib= sqlite3.so=E2=80=9D`,=20 > which produces: >=20 > ld-elf.so.1:=20 > = /wrkdirs/usr/ports/databases/sqlite3/work-default/stage/usr/local/bin/sqli= te3:=20 > mmap of entire address space failed: Cannot allocate memory > = /wrkdirs/usr/ports/databases/sqlite3/work-default/stage/usr/local/bin/sqli= te3:=20 > exit status 1 Same here. So far, my ports update also got such for attempting to build devel/gobject-introspection : ld-elf.so.1: = /wrkdirs/usr/ports/devel/gobject-introspection/work/gobject-introspection-= 1.74.0/_build/tmp-introspectjq90y07h/GLib-2.0: mmap of entire address = space failed: Cannot allocate memory = /wrkdirs/usr/ports/devel/gobject-introspection/work/gobject-introspection-= 1.74.0/_build/tmp-introspectjq90y07h/GLib-2.0: exit status 1 . . . subprocess.CalledProcessError: Command '['ldd', = '/wrkdirs/usr/ports/devel/gobject-introspection/work/gobject-introspection= -1.74.0/_build/tmp-introspectjq90y07h/GLib-2.0']' returned non-zero exit = status 1. > That fails doing the `mapbase =3D mmap(base_addr, mapsize, PROT_NONE,=20= > base_flags, -1, 0);` call in rtld-elf=E2=80=99s map_object():217. That = call=20 > does `mmap(0x10000, 0x1dc000, PROT_NONE, 0x6010, -1, 0) =3D> = 0xffffffff`. >=20 > With this patch reverted we can build successfully. For reference (long output line split for readability): # uname -apKU FreeBSD CA72_16Gp_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #63 main-n258610-ba7319e9091b-dirty: Fri Oct 14 14:29:14 PDT 2022 = root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400072 1400072 /usr/obj/DESTDIRs/main-CA7-poud has the same FreeBSD vintage, but for armv7. (poudriere is still running.) =3D=3D=3D Mark Millard marklmi at yahoo.com