Issue #2854 has been updated by shamaz.

File pie2.patch added

I send a new patch with a bit more explanation in comments.

> can you explain why ET_DYN_LOAD_ADDR existed before

I don't know. It's just a hardcoded virtual address to be used instead of 
p_vaddr field of the first PT_LOAD program header, if the latter is 0. I think, 
it could be, say, 0x400000 as well as 0x1021000. The old code was brought there 
from FreeBSD which does not have ASLR, so hardcoded non-random value can be OK 
for it.

----------------------------------------
Submit #2854: Support for place independent executables
http://bugs.dragonflybsd.org/issues/2854#change-12755

* Author: shamaz
* Status: New
* Priority: Normal
* Assignee: 
* Category: Kernel
* Target version: 
----------------------------------------
Hello. If you launch a PIE, the loader will map it in memory to a fixed
position (ET_DYN_LOAD_ADDR). This patch changes this behaviour and makes
the loader respect vm.randomize_map sysctl.

---Files--------------------------------
pie.patch (1.98 KB)
pie2.patch (2.18 KB)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://bugs.dragonflybsd.org/my/account

Reply via email to