Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2021 13:16:14 -0500
From:      Shawn Webb <shawn.webb@hardenedbsd.org>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        Mark Johnston <markj@freebsd.org>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@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:  <20211122181614.qiprd2oawy3h5ysa@mutt-hbsd>
In-Reply-To: <CACNAnaF2OYsu1OEhB5FVnrxfwL423tFWgJ7kaVcMBnWyKPjs3Q@mail.gmail.com>
References:  <202111221634.1AMGYoK4064366@gitrepo.freebsd.org> <20211122172544.a3wi636tajsnsfme@mutt-hbsd> <CACNAnaF2OYsu1OEhB5FVnrxfwL423tFWgJ7kaVcMBnWyKPjs3Q@mail.gmail.com>

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

--nvehbcspcrnalesi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 22, 2021 at 11:58:19AM -0600, Kyle Evans wrote:
> On Mon, Nov 22, 2021 at 11:25 AM Shawn Webb <shawn.webb@hardenedbsd.org> =
wrote:
> >
> > On Mon, Nov 22, 2021 at 04:34:50PM +0000, Mark Johnston wrote:
> > > The branch releng/12.3 has been updated by markj:
> > >
> > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D68396709e73a4cd392ffc0=
6fde6bfa44d79118a7
> > >
> > > 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
> > >
> > >     libctf: Improve check for duplicate SOU definitions in ctf_add_ty=
pe()
> > >
> > >     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 ove=
r all
> > >     members of the source type and checks whether a member with match=
ing
> > >     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.
> > >
> > >     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 me=
mber in
> > >     the desination definition by name using ctf_member_info(), but th=
is
> > >     function will descend into anonymous members and thus fail to mat=
ch.
> > >     Fix the problem by introducing a custom comparison routine which =
does
> > >     not assume member names are unique.  This should also be faster f=
or
> > >     types with many members; in the previous scheme, membcmp() would =
perform
> > >     a linear scan of the desination type's members to perform a looku=
p 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
> This is just the in-progress release branch, so not here, at least.

Ah. I should've paid closer attention. Thanks for the clarification.
:-)

--=20
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A=
4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc

--nvehbcspcrnalesi
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmGb3mwACgkQ/y5nonf4
4fp8OQ//ZRMSX8uWU9qOGlTlvRxuoQrv09MexQAkHCpSa26Q0oR+zu+HoNggnsuX
7L+4i7JLoU46Qi4fgCtjRKdUOgFWT9nidc4/WnnWPasFKvthpE7a+3XEzvmXu53W
cg1tviXkVSZpx7uR4SO0VQwgiJoiCpohKq5sD7hdDFmxivN+u/RPdr4/3iPKjs+C
hPHYBfO+lsAhVDnyVvgLRxRnvo8J9gHCU4dgcTODNTQtD3vjs39xlzP54b03AH/u
e5GyrPsuEGBn/Lc6osOWFvfIMENCE+/Sg3HEobu/fZfbVEkoMISKiytB/j6wNoFI
QSSukNu7p6aj8+vBwovcCxiz3Y5fJ5vGKX6+jZ4ToWI/OgqE49UBIfPXGpCXnD/l
c3vzSf5GYUA73HmKWUOqoEBKg99N+siA9EB4IhZZpZ+ol2tg4NtywH6BFKNymU66
X8FnIb0Oq0habX0SQrBt/nyOzVaGmvUZ3dxZDJJQXYWm6efmQ49SVHg8yZ7pRWm3
J+HjaKP4v9k25MOfMplttxOTfaL9Iwebxl0s4BpTYbXY11/B0Wf63LI3cXCjVUV0
DVl83hqGYc2v79nAW2IUHY7SGQAK+xde6UIrj4EGyhXLKA9jDrBQO00m+Mp9tXF3
z90CcyLnya7O3ckVdNMSqYzjnUtP+NrgH1sX/qum14744ZskQZM=
=4mFH
-----END PGP SIGNATURE-----

--nvehbcspcrnalesi--



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