[PATCH] [BZ #14579] rtld: limit the self loading check to normal mode

Dmitry V. Levin ldv@altlinux.org
Fri Sep 14 23:11:00 GMT 2012


On Fri, Sep 14, 2012 at 11:16:03AM -0400, Carlos O'Donell wrote:
> On 9/13/2012 10:36 PM, Dmitry V. Levin wrote:
> > On Thu, Sep 13, 2012 at 09:50:20PM -0400, Carlos O'Donell wrote:
> >> On 9/13/2012 9:26 PM, Dmitry V. Levin wrote:
> >>> Run time dynamic linker used to allow processing itself in verify, list
> >>> and trace modes until commit glibc-2.14~10 disallowed all kinds of self
> >>> loading altogether.  This change limits the check for self loading to
> >>> normal mode so that instruments like ldd could handle rtld properly.
> >>
> >> I like where this patch is going, but you are missing some more information.
> >>
> >> (a) Why was this disabled? What has changed since then that would make
> >>     it meaningful to enable today?
> > 
> > I suppose the author of commit glibc-2.14~10 had an idea to fix a segfault
> > that used to happen when rtld was loading itself in normal mode.
> > Unfortunately, he disallowed too much, so his change not only fixed the
> > segfault but also introduced the regression reported in #14579.
> 
> Did we identify the defect and was it fixed?
> 
> Or has the defect simply stopped triggering?

What is obvious to me is that rtld used to segfault when loading itself in
normal mode, commit glibc-2.14~10 was made to avoid the segfault, and
reverting it reintroduces the segfault.

What is not obvious is why the author of that commit decided to add a
bunch of checks to avoid segfault in a case that looks very rare and quite
harmless, whether it is a workaround for a bug in rtld or it is a fix for
that bug.

Of course the right person to ask these questions is the author of that
buggy commit.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120914/3befbc09/attachment.sig>


More information about the Libc-alpha mailing list