Bug 1435266 - Enable Spectre index masking by default. r=luke a=RyanVM
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 07 Feb 2018 17:56:34 +0100
changeset 454740 aa1153f2621f4e896b92796f572f6d9bd42413a6
parent 454739 41310e95042844c74c58adc4650770540c6cc06c
child 454741 73ef186ad51ac2c4fc27b1f149fcc94355fe7dc6
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke, RyanVM
bugs1435266
milestone59.0
Bug 1435266 - Enable Spectre index masking by default. r=luke a=RyanVM
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
@@ -1529,17 +1529,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");