diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-06-26 02:11:37 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-07-03 13:52:11 +0200 |
commit | 7abafc25f97897fd61762c45f8729fa952aa822c (patch) | |
tree | a7c802acf7a649c51e109ab64f83e54c7362478b /procfs | |
parent | c3b3053b9e8ac3c9f70cbe12f884ab8ca69dd991 (diff) | |
download | hurd-7abafc25f97897fd61762c45f8729fa952aa822c.tar.gz hurd-7abafc25f97897fd61762c45f8729fa952aa822c.tar.bz2 hurd-7abafc25f97897fd61762c45f8729fa952aa822c.zip |
exec: Properly preallocate address space
The existing code mapped the first PT_LOAD segment using anywhere=1,
letting Mach pick an arbitrary location, and then uses anywhere=0 for
all the remaining segments to place them next to the first one, as
expected by the program.
This, however, runs into many issues, primarily because of conflicts
between interpreter and executable mappings. Some of those the existing
code tried to work around. Instead, do it the way it's implemented in
glibc: calculate upfront how much space the overall mapping will need,
and ask Mach to preallocate this much address space. Then we deallocate
it back, and instead map the program segments onto this very same place.
Message-Id: <20230625231137.403096-4-bugaevc@gmail.com>
Diffstat (limited to 'procfs')
0 files changed, 0 insertions, 0 deletions