[PATCH 12/13] dlfcn,elf: implement dlmem() [BZ #11767]
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Mar 29 14:31:39 GMT 2023
On 29/03/23 11:20, stsp via Libc-alpha wrote:
>
> 29.03.2023 19:10, Jonathon Anderson пишет:
>> Stas,
>>
>> Please do some research into the ELF file format. Neither your fdlopen implementation in the test cases nor your dlopen_with_offset implementation in the email chain implement it correctly.
>>
>> AFAICT, the first glaring issue with both of your implementations is that you have neglected the case where p_offset != p_vaddr, i.e. a segment is mmapped to a different location than its layout in the file. There are a LOT of binaries out in the wild where this is the case. Here's a quick one-liner to help you find some on your own box, I have 11712 such binaries on my Debian system:
>
> Sure as hell p_offset != p_vaddr.
> I never ever assumed it does!
> OK, if it goes that badly, then I offer you
> a deal.
> If you present the solib with p_offset!=p_vaddr
> and demonstrate that its broken with dlmem(),
> and not because some random bug of mine but
> exactly because p_offset!=p_vaddr, then I go
> away from that dlmem() proposal forever.
> If you can't, then you go away.
> Do you accept that challenge?
> Sorry for offering the silly stuff, but I simply
> don't see how to proceed if we are wasting
> the time on a things like that.
>
This should be other way around since you are the one proposing a new
interface and thus should make sure that potential raised concerns
indeed does not affect it.
Also, I would like to ask to tune down your tone. This kind of aggressive
way to present technical topics, in a manner of adding 'challengers' to
put pressure on person that raised concerns is not best way and usually
make other developers to avoid engage further in the topic.
More information about the Libc-alpha
mailing list