On Mon, Jan 24, 2011 at 17:24, Stefano Bonifazi wrote:
>> how can the ldso possibly prevent clashes ?  it has no idea what
>> addresses an app will ask for at runtime.
>>
>> plus, if the kernel is employing ASLR (which isnt uncommon nowadays),
>> the load addresses could be anywhere.
>
> Well not alone, in my mind ld.so asks the memory manager through calling
> mmap where it can map the shared modules inside the process address space..
> the memory manager should know what addresses are free and which are taken
> .. then when the process code requires dynamic memory allocation, it does it
> again through the memory manager (i.e. malloc) avoiding of allocating memory
> where shared modules have been loaded into..
> Again with ASLR I think the mmu should be aware of all used memory slots,
> avoiding conflicts..

i'm not saying conflicts arent noticed.  i'm saying that there is no
way for the surrounding system (ldso/linux mm/...) to know ahead of
time what the app is going to request with MAP_FIXED and thus prevent
possible future conflicts.
-mike

Reply via email to