From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>,
Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: jma14 <jma14@rice.edu>, Carlos O'Donell <carlos@redhat.com>,
John Mellor-Crummey <johnmc@rice.edu>
Subject: Re: [PATCH v10 1/4] elf: Add la_activity during application exit
Date: Tue, 18 Jan 2022 10:10:40 -0300 [thread overview]
Message-ID: <f8e0a92a-c52f-36d7-a568-d4894a92a27c@linaro.org> (raw)
In-Reply-To: <87v8yhjn97.fsf@oldenburg.str.redhat.com>
On 18/01/2022 08:29, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
>
>> diff --git a/elf/dl-fini.c b/elf/dl-fini.c
>> index de8eb1b3c9..2705a15c88 100644
>> --- a/elf/dl-fini.c
>> +++ b/elf/dl-fini.c
>> @@ -64,6 +64,11 @@ _dl_fini (void)
>> __rtld_lock_unlock_recursive (GL(dl_load_lock));
>> else
>> {
>> +#ifdef SHARED
>> + /* Auditing checkpoint: we will start deleting objects. */
>> + _dl_audit_activity_nsid (ns, LA_ACT_DELETE);
>> +#endif
>> +
>> /* Now we can allocate an array to hold all the pointers and
>> copy the pointers in. */
>> struct link_map *maps[nloaded];
>> @@ -153,6 +158,11 @@ _dl_fini (void)
>> /* Correct the previous increment. */
>> --l->l_direct_opencount;
>> }
>> +
>> +#ifdef SHARED
>> + /* Auditing checkpoint: we will start deleting objects. */
>> + _dl_audit_activity_nsid (ns, LA_ACT_CONSISTENT);
>> +#endif
>> }
>> }
>
> The tense in the second comment seems wrong.
Ack, in fact I think both comments do not add much (it is pretty obvious
from the function call). I will remove them.
>
>>
>> diff --git a/elf/tst-audit23.c b/elf/tst-audit23.c
>> new file mode 100644
>> index 0000000000..9a7e69c1e1
>> --- /dev/null
>> +++ b/elf/tst-audit23.c
>
>> + FILE *out = fmemopen (result.err.buffer, result.err.length, "r");
>> + TEST_VERIFY (out != NULL);
>> + char *buffer = NULL;
>> + size_t buffer_length = 0;
>> + while (xgetline (&buffer, &buffer_length, out))
>> + {
>> + if (startswith (buffer, "la_activity: "))
>
> It may be simpler (or easier to maintain going forward) to have the
> expected output (without varying pointers) and compare against that
> verbatim. This is what I implemented for some of the DNS tests.
The main issue is to handle the vDSO (is_vdso) and match the cookies
and address with the subsequent la_activities/la_objclose. So it
would require to keep track with some internal state anyway.
And checking on resolve/tst-ns_name.c I don't think it would be
simpler to use such scheme (specially the required handling it would
require to parse a possible input to handle line with multiple options
and different outputs).
next prev parent reply other threads:[~2022-01-18 13:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 21:31 [PATCH v10 0/4] Multiple rtld-audit fixes Adhemerval Zanella
2022-01-17 21:31 ` [PATCH v10 1/4] elf: Add la_activity during application exit Adhemerval Zanella
2022-01-18 11:29 ` Florian Weimer
2022-01-18 13:10 ` Adhemerval Zanella [this message]
2022-01-21 10:50 ` Florian Weimer
2022-01-21 10:50 ` Florian Weimer
2022-01-24 12:53 ` Adhemerval Zanella
2022-01-17 21:31 ` [PATCH v10 2/4] elf: Fix initial-exec TLS access on audit modules (BZ #28096) Adhemerval Zanella
2022-01-18 11:33 ` Florian Weimer
2022-01-18 12:58 ` Adhemerval Zanella
2022-01-18 13:02 ` Florian Weimer
2022-01-18 13:26 ` Adhemerval Zanella
2022-01-18 13:29 ` Florian Weimer
2022-01-18 13:33 ` Adhemerval Zanella
2022-01-18 13:46 ` Adhemerval Zanella
2022-01-18 13:47 ` Adhemerval Zanella
2022-01-17 21:31 ` [PATCH v10 3/4] elf: Issue la_symbind for bind-now (BZ #23734) Adhemerval Zanella
2022-01-21 11:18 ` Florian Weimer
2022-01-17 21:31 ` [PATCH v10 4/4] elf: Fix runtime linker auditing on aarch64 (BZ #26643) Adhemerval Zanella
2022-01-18 13:36 ` Szabolcs Nagy
2022-01-21 11:19 ` Florian Weimer
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=f8e0a92a-c52f-36d7-a568-d4894a92a27c@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=jma14@rice.edu \
--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).