[PATCH v6 19/20] elf: Fix runtime linker auditing on aarch64 (BZ #26643)

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Dec 21 14:33:52 GMT 2021



On 20/12/2021 18:32, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> diff --git a/elf/rtld.c b/elf/rtld.c
>> index 29a37f51d3..1a13ae6314 100644
>> --- a/elf/rtld.c
>> +++ b/elf/rtld.c
>> @@ -990,10 +990,10 @@ file=%s [%lu]; audit interface function la_version returned zero; ignored.\n",
>>        return;
>>      }
>>  
>> -  if (lav > LAV_CURRENT)
>> +  if (lav != LAV_CURRENT)
>>      {
>>        _dl_debug_printf ("\
>> -ERROR: audit interface '%s' requires version %d (maximum supported version %d); ignored.\n",
>> +ERROR: audit interface '%s' requires version %d (current supported version %d); ignored.\n",
>>  			name, lav, LAV_CURRENT);
>>        unload_audit_module (dlmargs.map, original_tls_idx);
>>        return;
> 
> Sorry, this is not what I had in mind.  I'd like to increase LAV_CURRENT
> and pretend that the old and new versions have the same behavior, at
> least as far as aarch64 is concerned.  We need not write the
> compatibility code for the old <link.h> at this time, only if there
> actual users out there that demand it.

Do you mean to only check if lav >= LAV_CURRENT and allow old audit modules
as well? 

At least for aarch64 old audit modules are error-prone and potentially adds
more subtle issues since they do not save/restore some return register that
I don't see any real gain to keep supporting them.

> 
> (However, for the symbind change, I think we should look at the audit
> module version.  It is also much easier to implement both behaviors
> there, I hope.)

For symbind it does make sense, although I am very convinced that users
will really care about it.

> 
> Thanks,
> Florian
> 


More information about the Libc-alpha mailing list