From nobody Mon Nov 22 17:25:44 2021 X-Original-To: dev-commits-src-all@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 8DF2818A76D4 for ; Mon, 22 Nov 2021 17:25:52 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HyZ1D2xPJz4c67 for ; Mon, 22 Nov 2021 17:25:52 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x82c.google.com with SMTP id t11so17278042qtw.3 for ; Mon, 22 Nov 2021 09:25:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=l3Tp6AKMR0e55GDgrU79P/yJxcwdPCOmAAkhYbVICl4=; b=B7ha8e9m9rHyq8cDBNIkxmHO6cyKSODeaQ+at8/aHcf2zNoK/qCWDyMMLXl3jmGNcc OwCslhuoMFzJipRKx3V7I0NWvF/DchJFVY/1vwOGzzEA05k+KGyXWya8Qq2zRTLktWhA eIYFwt7NUeir0HFgNMdeUtF5JD/PJyskyRXAKGE4Jgw6I3xNMR3dRcxTH8fkQ4in9x7x /e3+2TFZLyWO3i/A+WoQhhffrRC7jpVobYZr1eGD8iXLdSww6xG4CyPOKebKATWB3BzC W9hFt5eUROVbnvN2+dj/AOsVnJAxp2yYv+gkVcSQZ5BaLp1zKe8Z49jaIK1vgr0z+VAK YIYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=l3Tp6AKMR0e55GDgrU79P/yJxcwdPCOmAAkhYbVICl4=; b=gUCb1yJ15c2hU92UtXX/IrYTX9B8rhdQKWJFtMBBVhuPxakoTUSlihK4tXIZCOGYxc LceRR2OG9QT2xlNB+DJSenNQj6ufWo1Yxgc79QJTGgVGVSWmMjxjLc1UrXrmT2GLh5Ar na6ilVUwfu7BqY98FpxiU1sUwuFFKB5FMH8PI6Paa9aaeyTwZf44gEGqN64Jc5Kfh6lq U1MfX2eEGE5Vf2CiKCWHOh69awxJ5djaBqpvTkBekzSQvdAUhuNOJPjX0wYul7ztqubA 9VRi7Qs6MzGbyihFHZtNuA86ELC6dNLLUN+wQwFAAjYdmDT+g1bZsLCp822DswGW+RbC 5/Ag== X-Gm-Message-State: AOAM533+os+tQUMb5hquW3E/67VsIg/9N27PdaMU9a3x+p5y0iGH4HZE 31h/MlpLjOE7L6cwDIy0lyCH6A== X-Google-Smtp-Source: ABdhPJxsI7WTEjqtd1rzl1yAfsLa1sJEZaKuX8zoofIH2fo039zlz4ukcqidChrqm0Fh8euYBncwqg== X-Received: by 2002:ac8:7d46:: with SMTP id h6mr33059613qtb.379.1637601946150; Mon, 22 Nov 2021 09:25:46 -0800 (PST) Received: from mutt-hbsd (pool-100-16-224-136.bltmmd.fios.verizon.net. [100.16.224.136]) by smtp.gmail.com with ESMTPSA id k16sm4623559qtx.92.2021.11.22.09.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 09:25:45 -0800 (PST) Date: Mon, 22 Nov 2021 12:25:44 -0500 From: Shawn Webb To: Mark Johnston Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: 68396709e73a - releng/12.3 - libctf: Improve check for duplicate SOU definitions in ctf_add_type() Message-ID: <20211122172544.a3wi636tajsnsfme@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202111221634.1AMGYoK4064366@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6n2yojvmhxmacvco" Content-Disposition: inline In-Reply-To: <202111221634.1AMGYoK4064366@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4HyZ1D2xPJz4c67 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --6n2yojvmhxmacvco Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 22, 2021 at 04:34:50PM +0000, Mark Johnston wrote: > The branch releng/12.3 has been updated by markj: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D68396709e73a4cd392ffc06fde= 6bfa44d79118a7 >=20 > commit 68396709e73a4cd392ffc06fde6bfa44d79118a7 > Author: Mark Johnston > AuthorDate: 2021-10-04 16:28:22 +0000 > Commit: Mark Johnston > CommitDate: 2021-11-22 16:32:18 +0000 >=20 > libctf: Improve check for duplicate SOU definitions in ctf_add_type() > =20 > When copying a struct or union from one CTF container to another, > ctf_add_type() checks whether it matches an existing type in the > destination container. It does so by looking for a type with the same > name and kind as the new type, and if one exists, it iterates over all > members of the source type and checks whether a member with matching > name and offset exists in the matched destination type. This can > produce false positives, for example because member types are not > compared, but this is not expected to arise in practice. If the match > fails, ctf_add_type() returns an error. > =20 > The procedure used for member comparison breaks down in the face of > anonymous struct and union members. ctf_member_iter() visits each > member in the source definition and looks up the corresponding member= in > the desination definition by name using ctf_member_info(), but this > function will descend into anonymous members and thus fail to match. > Fix the problem by introducing a custom comparison routine which does > not assume member names are unique. This should also be faster for > types with many members; in the previous scheme, membcmp() would perf= orm > a linear scan of the desination type's members to perform a lookup by > name. The new routine steps through the members of both types in a > single loop. Hey Mark, Out of curiosity, would commits to releng branches necessitate an EN? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --6n2yojvmhxmacvco Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmGb0pUACgkQ/y5nonf4 4foDzQ//X8YXxXyUOJW4tZd8G/YkAjFYeGrEKZebnhb5HWBjZMlaM62jZ4HngxQA hw7C5biyZk9AWsghnvbuccLOzFn7IXV2CHJTDFWeNKLxfZ9xdwigBOVf9omAw0kE A6Zif1OT3QysH4YmrK5I3JuOhc02MIVP4lwjCH040c/k+fwgA5WToMO8MpDULuRk k9U2UbATWkZKpvKLrWD9m36/BkmmpfwjLot+3RpQXeDy9lwLrgEiA8gOO21holAt igyxJj/aqW3qB4wOsKIazCbW+aV654EUrQB1Sr7nzXyigEwg9+z8QSztAM86s7RG bZYBkQb8EZqDyKajHF+kuBcGZI8QhFs4S5AZrMHew1UuB2wD39fwHHhcOTpcdttT eGF2jrr3hpr3L3L0zFZgRuCHuucONm5pGClmTpTi69woFe4dQn4431bPpGkVj6vb BOMO5YynK729WPX0qA5jkq0gI+Yt/4pm8Oej+NUNbmq6XjTUTXXNhppNS+LXfHwd Ws6s49xVlqv4bwv7/SUaJPcdJ1HHbco6ZFB7Yd4lJ/RhirOw+NmkF3bUflKK2lyg r5xMfnK7Y+EJcSvFBJVEVD3utEVZ+lFc3Qbp1Fjh/ko6IJezHNI4FimJJMBiiKq8 rDf8kJ6paZoIdZ4MlZgGu4JSIi832L0JSCj03worELN4NM0sBjY= =64oi -----END PGP SIGNATURE----- --6n2yojvmhxmacvco--