fs, elf: get rid of MAP_FIXED from the loader
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 20 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | fs, elf: drop MAP_FIXED usage from elf_mapfs/ | +26 | 11 replies | |
| 2/2 | fs, elf: drop MAP_FIXED from initial ET_DYN segmentfs/ | +0 | 9 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] fs, elf: get rid of MAP_FIXED from the loader
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.