From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: libc-alpha@sourceware.org,
Alexander Monakov <amonakov@ispras.dot.ru>,
John Mellor-Crummey <johnmc@rice.edu>
Subject: Re: [PATCH v2 2/6] elf: Avoid unnecessary slowdown from profiling with audit (BZ#15533)
Date: Tue, 20 Jul 2021 15:37:05 -0300 [thread overview]
Message-ID: <a6ef5448-d5d6-f265-c7ce-1dc36134b727@linaro.org> (raw)
In-Reply-To: <alpine.LNX.2.20.13.2107201121130.1900@monopod.intra.ispras.ru>
On 20/07/2021 05:31, Alexander Monakov wrote:
> On Mon, 19 Jul 2021, Adhemerval Zanella via Libc-alpha wrote:
>
>> The rtld-audit interfaces introduces a slowdown due to enabling profiling
>
> "interface" (my original message had "using the audit interfaces introduces").
>
>> instrumentation (as if LD_AUDIT implied LD_PROFILE). However, instrumenting
>> is only necessary if one of audit libraries provides PLT (la_plt{enter,exit}
>> symbols). Otherwise, the slowdown can be avoided.
>>
>> The following patch adjusts the logic that enables profiling to iterate
>> over all audit modules and check if any of those provides a PLT hook.
>>
>> Co-authored-by: Alexander Monakov <amonakov@ispras.dot.ru>
>
> Please use my correct email here and in the Cc list (it's ispras.ru, not
> ispras.dot.ru).
Ack, I used the one on previous submission. I will update with the correct
one
>
>> ---
>> NEWS | 4 ++++
>> elf/Makefile | 6 +++++-
>> elf/dl-reloc.c | 12 +++++++++++-
>> elf/rtld.c | 8 +-------
>> elf/tst-audit18.c | 39 +++++++++++++++++++++++++++++++++++++++
>> elf/tst-auditmod18.c | 24 ++++++++++++++++++++++++
>> include/link.h | 2 ++
>> 7 files changed, 86 insertions(+), 9 deletions(-)
>> create mode 100644 elf/tst-audit18.c
>> create mode 100644 elf/tst-auditmod18.c
>>
>> diff --git a/NEWS b/NEWS
>> index 13ffe627da..8fde312ec6 100644
>> --- a/NEWS
>> +++ b/NEWS
>> @@ -76,6 +76,10 @@ Major new features:
>> equal to a giver integer. This function is a GNU extension, although
>> Solaris also provides a similar function.
>>
>> +* The audit libraries will avoid unnecessary slowdown if it is not required
>
> "required for" or "... by"?
>
>> + either PLT tracking or symbol binding profiling (enabled with LA_FLG_BINDFROM
>> + or LA_FLG_BINDTO from la_objopen() callback).
>
> It seems the part about binding needs to be updated, because the commit message
> and the patch itself does not change anything for binding hooks? My
> understanding always was that no change is necessary w.r.t la_symbind
> callbacks: the loader invokes them when doing symbol resolution, and presence
> of PLT does not matter.
The NEWS entry needs update indeed. For 'la_symbind', I was trying to handle a
different issue which in turn made this very change ineffective (issue la_symbind
for bind-now). My plan is to address it in a different patch.
next prev parent reply other threads:[~2021-07-20 18:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 14:33 [PATCH v2 0/6] Some rtld-audit fixes Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 1/6] elf: Fix audit regression Adhemerval Zanella
2021-07-27 16:36 ` Florian Weimer
2021-07-19 14:33 ` [PATCH v2 2/6] elf: Avoid unnecessary slowdown from profiling with audit (BZ#15533) Adhemerval Zanella
2021-07-20 8:31 ` Alexander Monakov
2021-07-20 18:37 ` Adhemerval Zanella [this message]
2021-07-27 16:12 ` Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 3/6] elf: Add audit tests for modules with TLSDESC Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 4/6] elf: Do not fail for failed dlopem on audit modules (BZ #28061) Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 5/6] elf: Suppress audit calls when a (new) namespace is empty (BZ #28062) Adhemerval Zanella
2021-07-19 14:33 ` [PATCH v2 6/6] elf: Fix initial-exec TLS access on audit modules (BZ #28096) Adhemerval Zanella
2021-07-20 22:09 ` [PATCH v2 0/6] Some rtld-audit fixes Michael Hudson-Doyle
2021-07-20 22:11 ` Michael Hudson-Doyle
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=a6ef5448-d5d6-f265-c7ce-1dc36134b727@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=amonakov@ispras.dot.ru \
--cc=amonakov@ispras.ru \
--cc=johnmc@rice.edu \
--cc=libc-alpha@sourceware.org \
/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).