Source-Changes-D archive

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

Re: CVS commit: src/usr.bin/ldd



On 22.06.2018 15:38, matthew green wrote:
> "Kamil Rytarowski" writes:
>> Module Name:	src
>> Committed By:	kamil
>> Date:		Thu Jun 21 10:41:46 UTC 2018
>>
>> Modified Files:
>> 	src/usr.bin/ldd/build: Makefile
>> 	src/usr.bin/ldd/elf32: Makefile
>> 	src/usr.bin/ldd/elf32_compat: Makefile
>> 	src/usr.bin/ldd/elf64: Makefile
>>
>> Log Message:
>> Disable SANITIZER for ldd(1)
>>
>> These utilities (elf32, elf32_compat, elf64, liblldb) share code with the
>> ELF dynamic loader that is not being sanitized and its symbols are
>> installed into sanitized programs (in particular __tls_get_addr()).
>>
>> Additionally libldd is used in rescue that is not expected to be sanitized
>> as of today.
> 
> i'm not sure i understand.  ldd itself should be able to be
> sanitized.  even with shared code with ld.elf_so, this copy
> shouldn't be doing anything but reading data and outputting
> the various linkages found, but never executing anything not
> in ldd binary itself.  (this is unlike traditional ldd(1)
> in most implementations, which often makes the dynamic
> linker do the real work of ldd.)
> 
> what's the specific issue?  perhaps we can fix it..
> 

The first conflict is with __tls_get_addr(). This symbol could be renamed.

I'm in the process of designing a macro to rename conflicting symbols,
dedicated for programs in external/ and those reusing source code from
non-stanitized libraries like libc.

The current list of manual renames is specified here:
http://netbsd.org/~kamil/patch-00055-rename-symbols-clash-with-sanitizers.txt

Once I will get an installable release image under ASan, I will present
the macro and we can reevaluate ldd(1).

My current progress is being on the installboot(8) stage:

http://netbsd.org/~kamil/mksanitizer-reports/0020-installboot-ffsv2.txt

> 
> .mrg.
> 


Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index