[PATCH 0/2] fs, elf: get rid of MAP_FIXED from the loader

From: Michal Hocko
Date: Mon Oct 16 2017 - 09:45:00 EST


Hi,
the previous discussion didn't really show any hard requirement for
MAP_FIXED usage for the elf segments mapping. I have spent some more
time studying the code (thanks to Qualys for their insight) and
concluded that the current MAP_FIXED usage is rather fragile and not
really needed. The first patch replaces it by a hint mmaping and failing
rather than silently corrupt an existing memory and the second patch
removes MAP_FIXED for the initial segment mapping because this shouldn't
be really needed either, I would even call it wrong.
Anyway, more details are in the changelog of patches. I will really
appreciate any feedback.

This has passed some testing with PIE/PIC binaries running in the loop
without any negative side effects detected.