Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2021 12:25:44 -0500
From:      Shawn Webb <shawn.webb@hardenedbsd.org>
To:        Mark Johnston <markj@FreeBSD.org>
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>
In-Reply-To: <202111221634.1AMGYoK4064366@gitrepo.freebsd.org>
References:  <202111221634.1AMGYoK4064366@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <markj@FreeBSD.org>
> AuthorDate: 2021-10-04 16:28:22 +0000
> Commit:     Mark Johnston <markj@FreeBSD.org>
> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20211122172544.a3wi636tajsnsfme>