-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set
mmap
permission flags only the first time we mmap
a segment
Previously, for simplicity, the ELF loader would initially `mmap` all segments with RWX permissions only to then let `elf_load_ptprotect` apply proper mappings. However, this turned out to be unnecessarily suboptimal as this would make `lib/ukvmem` unmap, unlink and free the previously mentioned VMA in favor of creating and adding a new VMA that is equivalent to the deleted one except for the permissions. Thus, avoid this and use proper permissions the first time we `mmap` an ELF segment and no longer execute `elf_load_ptprotect` afterwards if `CONFIG_LIBPOSIX_MMAP` is enabled. Signed-off-by: Sergiu Moga <sergiu@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Reviewed-by: Michalis Pappas <michalis@unikraft.io> GitHub-Closes: #64
- Loading branch information
1 parent
e4c6aa7
commit 37530a3
Showing
1 changed file
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters