[PATCH v7 02/16] elf: Add _dl_audit_activity_map and _dl_audit_activity_nsid
Adhemerval Zanella
adhemerval.zanella@linaro.org
Mon Dec 27 12:10:05 GMT 2021
On 24/12/2021 08:58, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> diff --git a/elf/dl-audit.c b/elf/dl-audit.c
>> index 4066dfe851..b44ecde135 100644
>> --- a/elf/dl-audit.c
>> +++ b/elf/dl-audit.c
>> @@ -18,6 +18,36 @@
>
>> +void
>> +_dl_audit_activity_nsid (Lmid_t nsid, int action)
>> +{
>> + /* Auditing checkpoint: we have deleted all objects. If head is NULL, the
>> + namespace has become empty, and the audit interface does not give us a
>> + way to signal LA_ACT_CONSISTENT for it because the first loaded module
>> + is used to identify the namespace.
>> +
>> + Furthermore, do not notify auditors of the cleanup of a failed audit
>> + module loading attempt. */
>> + struct link_map *head = GL(dl_ns)[nsid]._ns_loaded;
>> + if (__glibc_likely (GLRO(dl_naudit) == 0)
>> + || head == NULL || head->l_auditing)
>> + return;
>> +
>> + _dl_audit_activity_map (head, action);
>> +}
>
> I think it's probably best to split this comment and keep the “Auditing
> checkpoint: we have deleted all objects.” in elf/dl-close.c. Likewise
> the failed loading attempt (although I don't quite see how this
> applies).
Ack, I will move it back to dl-close.c.
>
>> +/* Call the la_activity() from the audit modules from the link map L
>> + and issues the ACTION argument. */
>> +void _dl_audit_activity_map (struct link_map *l, int action)
>> + attribute_hidden;
>> +
>> +/* Call the la_activity() from the audit modules from the link map
>> + from the namespace NSID and issues the ACTION argument. */
>> +void _dl_audit_activity_nsid (Lmid_t nsid, int action)
>> + attribute_hidden;
>
> () is still there …
Ack, I will remove them.
>
> Rest looks okay.
>
> Reviewed-by: Florian Weimer <fweimer@redhat.com>
>
> Thanks,
> Florian
>
More information about the Libc-alpha
mailing list