Bug 1435266 - Enable Spectre index masking by default. r=luke
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 07 Feb 2018 17:56:34 +0100
changeset 402787 f9def4d47aa3174afcd5b8fdd61ac04bf4419def
parent 402786 d24c555a59d87a3bc676332cf9120ece787e3b05
child 402788 6d6ca4e646c04daf19c014bf1591f3b2bc3d1b96
push id33402
push useraciure@mozilla.com
push dateWed, 07 Feb 2018 22:06:27 +0000
treeherdermozilla-central@8cc2427a322c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1435266
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1435266 - Enable Spectre index masking by default. r=luke
js/src/jit/JitOptions.cpp
modules/libpref/init/all.js
--- a/js/src/jit/JitOptions.cpp
+++ b/js/src/jit/JitOptions.cpp
@@ -227,17 +227,17 @@ DefaultJitOptions::DefaultJitOptions()
     // pass decide.
     const char* forcedRegisterAllocatorEnv = "JIT_OPTION_forcedRegisterAllocator";
     if (const char* env = getenv(forcedRegisterAllocatorEnv)) {
         forcedRegisterAllocator = LookupRegisterAllocator(env);
         if (!forcedRegisterAllocator.isSome())
             Warn(forcedRegisterAllocatorEnv, env);
     }
 
-    SET_DEFAULT(spectreIndexMasking, false);
+    SET_DEFAULT(spectreIndexMasking, true);
 
     // Toggles whether unboxed plain objects can be created by the VM.
     SET_DEFAULT(disableUnboxedObjects, false);
 
     // Test whether Atomics are allowed in asm.js code.
     SET_DEFAULT(asmJSAtomicsEnable, false);
 
     // Toggles the optimization whereby offsets are folded into loads and not
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1544,17 +1544,17 @@ pref("javascript.options.mem.gc_max_empt
 pref("javascript.options.showInConsole", false);
 
 pref("javascript.options.shared_memory", false);
 
 pref("javascript.options.throw_on_debuggee_would_run", false);
 pref("javascript.options.dump_stack_on_debuggee_would_run", false);
 
 // Spectre security vulnerability mitigations.
-pref("javascript.options.spectre.index_masking", false);
+pref("javascript.options.spectre.index_masking", true);
 
 // Streams API
 pref("javascript.options.streams", false);
 
 // advanced prefs
 pref("advanced.mailftp",                    false);
 pref("image.animation_mode",                "normal");