[llvm] [llvm][Support][Memory] Add memfd based fallback for strict W^X Linux systems (PR #98538)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 13:22:02 PDT 2024
minipli-oss wrote:
Quite some changes, but most important ones are:
- made `execProtectionChangeNeedsNewMapping()` a protected static method of `llvm::sys::Memory` and moved its implementation back to `.../Memory.inc` and providing a stub implementation for Windows
- made `execProtectionChangeNeedsNewMapping()` look much more like C++ by using `MemoryBuffer` and `StringRef` to do `/proc/self/status` parsing
- changed `raw_fd_ostream` to allow skipping `lseek()` and `fstat()` syscalls as these would only cause unnecessary overhead for memfds
- use these lightweight `raw_fd_ostream`s to replace the home-made `FDWrapper` class
Commit fc3e57711e9d should maybe be its own PR and not squashed into this one?
https://github.com/llvm/llvm-project/pull/98538
More information about the llvm-commits
mailing list