public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Generic System V Application Binary Interface
	<generic-abi@googlegroups.com>,
	gnu-gabi@sourceware.org
Subject: Re: RFC: Audit external function called indirectly via GOT
Date: Mon, 01 Jan 2018 00:00:00 -0000	[thread overview]
Message-ID: <ac8df850-3f0e-18dd-655d-fba9d3ef975b@redhat.com> (raw)
In-Reply-To: <CAMe9rOo4_5mFCnELLd=NWVe9dr_Nexkd3DyU4ehhYoVh4jMhJA@mail.gmail.com>

On 03/28/2018 08:41 PM, H.J. Lu wrote:

>> I don't see why it would need JUMP_SLOT relocations if it simply
>> auto-generates PLT stub equivalents and installs them in GLOB_DAT
>> relocations.
> 
> My understanding is that LD_AUDIT is based on JUMP_SLOT relocations.

The current implementation on x86, yes, to avoid the need for run-time 
code  generation.  But that doesn't mean it's the best way forward. 
Certainly not if the toolchain no longer generates JUMP_SLOT relocations 
(like it did at some point in the past).

>> Anyway, going back to the larger question what we need here.
>>
>> I used  this as a test case for audit support with BIND_NOW:
>>
>> latrace /bin/true --help
>>
>> Most of Fedora is compiled with BIND_NOW.  Fedora 26 does not print latrace
>> messages (the problem I mentioned earlier), Fedora 27 works (yay), Fedora 28
>> crashes (meh).
>>
>> So depending on which side Fedora 28+ falls, I think your approach might be
>> viable.  I expect that a future binutils version would do this by default,
>> and beyond the additional dynamic section tags, new PLT stubs would only be
>> created for no-plt functions because current binutils is supposed to
>> generate PLT entries again (after they went missing for -z now binaries for
>> some time).

> -fno-plt is a compiler option, not a linker option.  Linker generates PLT for
> PLT32 relocations to external functions.

That doesn't change the point—if future binutils versions elide 
JUMP_SLOT relocations, then your proposal is not going to solve our 
issue.  As I wrote, I cannot verify the current state because the 
toolchain regressed again.

Thanks,
Florian

      reply	other threads:[~2018-03-29  9:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-01  0:00 H.J. Lu
2018-01-01  0:00 ` Cary Coutant
2018-01-01  0:00   ` Carlos O'Donell
2018-01-01  0:00     ` Cary Coutant
2018-01-01  0:00       ` H.J. Lu
2018-01-01  0:00         ` Cary Coutant
2018-01-01  0:00           ` Cary Coutant
2018-01-01  0:00           ` H.J. Lu
2018-01-01  0:00       ` Alan Modra
2018-01-01  0:00         ` H.J. Lu
2018-01-01  0:00           ` Alan Modra
2018-01-01  0:00             ` H.J. Lu
2018-01-01  0:00 ` Florian Weimer
2018-01-01  0:00   ` H.J. Lu
2018-01-01  0:00     ` Florian Weimer
2018-01-01  0:00       ` Carlos O'Donell
2018-01-01  0:00         ` Florian Weimer
2018-01-01  0:00           ` Carlos O'Donell
2018-01-01  0:00             ` Florian Weimer
2018-01-01  0:00               ` H.J. Lu
2018-01-01  0:00                 ` Florian Weimer
2018-01-01  0:00                   ` H.J. Lu
2018-01-01  0:00             ` H.J. Lu
2018-01-01  0:00               ` Carlos O'Donell
2018-01-01  0:00             ` Cary Coutant
2018-01-01  0:00               ` H.J. Lu
2018-01-01  0:00                 ` Cary Coutant
2018-01-01  0:00                   ` H.J. Lu
2018-01-01  0:00                     ` Cary Coutant
2018-01-01  0:00           ` H.J. Lu
2018-01-01  0:00     ` Florian Weimer
2018-01-01  0:00       ` H.J. Lu
2018-01-01  0:00         ` Florian Weimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac8df850-3f0e-18dd-655d-fba9d3ef975b@redhat.com \
    --to=fweimer@redhat.com \
    --cc=generic-abi@googlegroups.com \
    --cc=gnu-gabi@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).