Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2016 16:35:16 +0100
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Ravi Pokala <rpokala@mac.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r304011 - head/libexec/rtld-elf
Message-ID:  <a1f9f98d-8ca4-593d-cb07-0004e11841ab@FreeBSD.org>
In-Reply-To: <457F4AE9-A909-44C9-A38B-CD8C28E3068F@panasas.com>
References:  <201608121829.u7CITCIu059447@repo.freebsd.org> <35B0B56E-A536-4A07-B397-7E5ABAB4CB34@gmail.com> <a2ebc6e1-7285-94cc-571a-b84de07d2c6e@FreeBSD.org> <457F4AE9-A909-44C9-A38B-CD8C28E3068F@panasas.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--EN5vBwOgnMHS8Hfm0mdDPF5U8AjCk0TPt
Content-Type: multipart/mixed; boundary="5Ccw6cSeC65aD447LNviEajGxCPnrV1gH"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Ravi Pokala <rpokala@mac.com>
Cc: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Message-ID: <a1f9f98d-8ca4-593d-cb07-0004e11841ab@FreeBSD.org>
Subject: Re: svn commit: r304011 - head/libexec/rtld-elf
References: <201608121829.u7CITCIu059447@repo.freebsd.org>
 <35B0B56E-A536-4A07-B397-7E5ABAB4CB34@gmail.com>
 <a2ebc6e1-7285-94cc-571a-b84de07d2c6e@FreeBSD.org>
 <457F4AE9-A909-44C9-A38B-CD8C28E3068F@panasas.com>
In-Reply-To: <457F4AE9-A909-44C9-A38B-CD8C28E3068F@panasas.com>

--5Ccw6cSeC65aD447LNviEajGxCPnrV1gH
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 8/16/16 4:32 PM, Ravi Pokala wrote:
> -----Original Message-----
> From: <owner-src-committers@freebsd.org> on behalf of Bryan Drewery <bd=
rewery@FreeBSD.org>
> Organization: FreeBSD
> Date: 2016-08-16, Tuesday at 03:30
> To: Ngie Cooper <yaneurabeya@gmail.com>, Konstantin Belousov <kib@FreeB=
SD.org>
> Cc: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-h=
ead@freebsd.org>
> Subject: Re: svn commit: r304011 - head/libexec/rtld-elf
>=20
>> On 8/12/16 7:34 PM, Ngie Cooper wrote:
>>>
>>> ...
>>>
>>>> Log:
>>>>  Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf.
>>>
>>> Why?
>>>
>>
>> It's a somewhat error-prone and dangerous macro. See r302908.
>=20
> I'll grant you "error-prone", but why do you consider it "dangerous"? I=
t's inefficient to walk the whole list when passing NULL as the starting =
pointer, but I'm not sure what the danger is.
>=20

I don't mean "dangerous" here as in security, but as in "doing the right
thing" or "doing what is expected", which it did not as seen in r302908.
 Granted, the original commit for _FROM noted this problem, but it is
very much not obvious.

> And, if it really *is* dangerous, perhaps we should purge the TAILQ_FOR=
EACH_FROM APIs entirely? It looks like rtld-elf was the last (in-tree) us=
er:
>=20

I'm not a fan of having it with this behavior, but I understand why it
was designed like this.

>     [freebsd/base/head] rpokala% grep -rl TAILQ_FOREACH_FROM .
>     ./share/man/man3/Makefile
>     ./share/man/man3/queue.3
>     ./sys/sys/queue.h
>=20
> I confirmed that queue.h just defines the (S)TAILQ_FOREACH_FROM(_SAFE) =
macros, but doesn't use them internally to define anything else.
>=20
> -Ravi (rpokala@)
>=20
>> --=20
>> Regards,
>> Bryan Drewery=20
>=20
>=20
>=20


--=20
Regards,
Bryan Drewery


--5Ccw6cSeC65aD447LNviEajGxCPnrV1gH--

--EN5vBwOgnMHS8Hfm0mdDPF5U8AjCk0TPt
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJXszK0AAoJEDXXcbtuRpfPOeAH/0KMfBjmKxdRGDTm0IjZAkcc
7uvBZ3o4EqFnS85Pjzgqq9uOcB8p745fMAGj/pacwWKUlPwTBRSr7uPrXMYe9tEU
DeG/xLQ2F9mIclqFbS0PGR9gQDVChhR4tlpbNzC863zWnUF6XM8oOOhw1fRNP9Zo
F6ludxdCBsVLvvq6Ofhg0tM/HCeay/hBSjh+rRb3WPG/5IvBPNPuh8e7fDaWa5tY
ur2BjYzLuEh2wHy/NJgyRn9QMxclDa0xgFJzycmf0Z3W5mEHvZTN1Yl2P2gIZLjh
pexwhwlqg+R1IZP1YwjjsMq70yLM3CUtbEaubh73wzXRhopEd1K/gs8eglCJ01Q=
=qTZe
-----END PGP SIGNATURE-----

--EN5vBwOgnMHS8Hfm0mdDPF5U8AjCk0TPt--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a1f9f98d-8ca4-593d-cb07-0004e11841ab>