diff options
author | Anthony Green <green@moxielogic.com> | 2022-09-06 21:15:58 -0400 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2022-09-06 21:15:58 -0400 |
commit | da905276850342df0f9dfe2c775f6c649d4eed6b (patch) | |
tree | 9a76c2401ec5d5bf7645e7ebe269ce46763b8961 /configure.ac | |
parent | b86c3dc0950ad5d8991e3970d56daeb409650d60 (diff) | |
download | libffi-da905276850342df0f9dfe2c775f6c649d4eed6b.tar.gz |
dlmmap fix and always check for PaX MPROTECT on linux
Also make EMUTRAMP experimental
From Stefan Bühler
https://github.com/libffi/libffi/pull/282
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 05181c4..8edb7b6 100644 --- a/configure.ac +++ b/configure.ac @@ -220,12 +220,17 @@ if test "x$libffi_cv_as_ptrauth" = xyes; then [Define if your compiler supports pointer authentication.]) fi -# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC. +# On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC; +# if EMUTRAMP is active too ffi could try mapping without PROT_EXEC, +# but the kernel needs to recognize the trampoline generated by ffi. +# Otherwise fallback to double mmap trick. AC_ARG_ENABLE(pax_emutramp, - [ --enable-pax_emutramp enable pax emulated trampolines, for we can't use PROT_EXEC], + [ --enable-pax_emutramp enable pax emulated trampolines (experimental)], if test "$enable_pax_emutramp" = "yes"; then + AC_MSG_WARN([EMUTRAMP is experimental only. Use --enable-pax_emutramp=experimental to enforce.]) + elif test "$enable_pax_emutramp" = "experimental"; then AC_DEFINE(FFI_MMAP_EXEC_EMUTRAMP_PAX, 1, - [Define this if you want to enable pax emulated trampolines]) + [Define this if you want to enable pax emulated trampolines (experimental)]) fi) LT_SYS_SYMBOL_USCORE |