[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: Audit external function called indirectly via GOT

On Thu, Mar 22, 2018 at 9:10 AM, Cary Coutant <ccoutant@gmail.com> wrote:
>> Today we have to admit that -fno-plt is not compatible with auditing.
>> I would like to change that to ensure that in future releases we are
>> able to let users use -fno-plt *and* auditing.
> The security features are all about locking down the GOT and the
> PLTGOT at program startup. The auditing features take advantage of the
> lazy binding mechanism and want to fiddle with those tables
> dynamically. I don't see how you're going to make the two compatible.

That is exactly what my proposal does:

1.  Provide both GOT and PLTGOT without lazy binding.
2. PLTGOT is unused without LD_AUDIT.
3. With LD_AUDIT, ld.so redirects GLOB_DAT relocation against GOT to
JUMP_SLOT relocation against PLTGOT.  This is not the same as lazy
binding since it happens every time when a function is called, not just
the first time.