Contributed by tj on from the fireF^X dept.
CVSROOT: /cvs Module name: ports Changes by: email@example.com 2015/10/19 02:09:23 Modified files: www/mozilla-firefox: Makefile Added files: www/mozilla-firefox/patches: patch-js_src_jit_ExecutableAllocator_cpp Log message: Enable option to mark JIT pages as non-writable. We're enabling this now so people can test and eventual regressions can be catched and reported upstream. There's a bug opened on Bugzilla@Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1215479 OK landry@, sthen@ deraadt@ also agrees
Due to Apple's iOS requiring JIT pages to be non-writable, most of the upstream code was already in place. The patch itself is very simple, only altering the conditional check in the build to include OpenBSD as well:
$OpenBSD: patch-js_src_jit_ExecutableAllocator_cpp,v 1.1 2015/10/19 08:09:23 dcoppa Exp $ Mark JIT pages as non-writable https://bugzilla.mozilla.org/show_bug.cgi?id=1215479 --- js/src/jit/ExecutableAllocator.cpp.orig Tue Sep 29 23:44:56 2015 +++ js/src/jit/ExecutableAllocator.cpp Fri Oct 16 17:02:15 2015 @@ -88,7 +88,7 @@ ExecutableAllocator::addSizeOfCode(JS::CodeSizes* size } } -#if TARGET_OS_IPHONE +#if defined(__OpenBSD__) || TARGET_OS_IPHONE bool ExecutableAllocator::nonWritableJitCode = true; #else bool ExecutableAllocator::nonWritableJitCode = false;
If you're a desktop user running snapshots, now's the time to help test. Initial testing shows a very minimal performance hit, but everyday users also need to give it a try and share their findings. If no issues are discovered, the patch will likely be merged upstream. Further discussion and status updates can be found in the Mozilla bug report and on the ports@ mailing list.
(Comments are closed)