[PATCH] D15728: [cfi] Support for dlopen and dlclose
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 16:35:40 PST 2016
pcc added inline comments.
================
Comment at: lib/cfi/cfi.cc:17
@@ -16,3 +16,3 @@
// FIXME: Harden:
// * mprotect shadow, use mremap for updates
// * something else equally important
----------------
This is done now, right?
================
Comment at: lib/cfi/cfi.cc:132
@@ +131,3 @@
+ if (main_shadow) {
+ // Update.
+ MprotectReadOnly(shadow_, __cfi_shadow_size);
----------------
Thanks. Is it possible to construct a test case that makes sure we get the memory protection right? I was thinking that the test case would try to write to the shadow at various points (e.g. start of main, after dlopen, after dlclose), and use `%expect_crash` to test that the write fails.
Repository:
rL LLVM
http://reviews.llvm.org/D15728
More information about the llvm-commits
mailing list