WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
patch193885 (text/plain), 27.37 KB, created by
Robin Morisset
on 2020-01-23 18:50:08 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Robin Morisset
Created:
2020-01-23 18:50:08 PST
Size:
27.37 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index b0577faa899..a5dd5ac1c25 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,35 @@ >+2020-01-23 Robin Morisset <rmorisset@apple.com> >+ >+ Remove Options::enableSpectreMitigations >+ https://bugs.webkit.org/show_bug.cgi?id=193885 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ From what I remember we decided to remove the spectre-specific mitigations we had tried (in favor of things like process-per-origin). >+ I don't think anyone is using the SpectreGadget we had added for experiments either. >+ So this patch removes the following three options, and all the code that depended on them: >+ - enableSpectreMitigations (was true, only used in one place) >+ - enableSpectreGadgets (was false) >+ - zeroStackFrame (was false, and was an experiment about Spectre variant 4 if I remember correctly) >+ >+ * b3/air/AirCode.cpp: >+ (JSC::B3::Air::defaultPrologueGenerator): >+ * dfg/DFGJITCompiler.cpp: >+ (JSC::DFG::JITCompiler::compile): >+ (JSC::DFG::JITCompiler::compileFunction): >+ * dfg/DFGSpeculativeJIT.cpp: >+ (JSC::DFG::SpeculativeJIT::compileCurrentBlock): >+ * ftl/FTLLowerDFGToB3.cpp: >+ (JSC::FTL::DFG::LowerDFGToB3::lower): >+ * jit/AssemblyHelpers.h: >+ * jit/JIT.cpp: >+ (JSC::JIT::compileWithoutLinking): >+ * runtime/OptionsList.h: >+ * wasm/WasmB3IRGenerator.cpp: >+ (JSC::Wasm::B3IRGenerator::addCallIndirect): >+ * yarr/YarrJIT.cpp: >+ (JSC::Yarr::YarrGenerator::initCallFrame): >+ > 2020-01-23 Robin Morisset <rmorisset@apple.com> > > Don't include BytecodeStructs.h in CommonSlowPaths.h >diff --git a/Source/JavaScriptCore/b3/air/AirCode.cpp b/Source/JavaScriptCore/b3/air/AirCode.cpp >index d5d69c30a59..bb7b78fd463 100644 >--- a/Source/JavaScriptCore/b3/air/AirCode.cpp >+++ b/Source/JavaScriptCore/b3/air/AirCode.cpp >@@ -46,8 +46,6 @@ static void defaultPrologueGenerator(CCallHelpers& jit, Code& code) > if (code.frameSize()) { > AllowMacroScratchRegisterUsageIf allowScratch(jit, isARM64()); > jit.addPtr(MacroAssembler::TrustedImm32(-code.frameSize()), MacroAssembler::framePointerRegister, MacroAssembler::stackPointerRegister); >- if (Options::zeroStackFrame()) >- jit.clearStackFrame(MacroAssembler::framePointerRegister, MacroAssembler::stackPointerRegister, GPRInfo::nonArgGPR0, code.frameSize()); > } > > jit.emitSave(code.calleeSaveRegisterAtOffsetList()); >diff --git a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >index c5544bbc5c9..4f61cc1a93b 100644 >--- a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >+++ b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >@@ -353,8 +353,6 @@ void JITCompiler::compile() > emitStackOverflowCheck(*this, stackOverflow); > > addPtr(TrustedImm32(-(m_graph.frameRegisterCount() * sizeof(Register))), GPRInfo::callFrameRegister, stackPointerRegister); >- if (Options::zeroStackFrame()) >- clearStackFrame(GPRInfo::callFrameRegister, stackPointerRegister, GPRInfo::regT0, m_graph.frameRegisterCount() * sizeof(Register)); > checkStackPointerAlignment(); > compileSetupRegistersForEntry(); > compileEntryExecutionFlag(); >@@ -422,8 +420,6 @@ void JITCompiler::compileFunction() > > // Move the stack pointer down to accommodate locals > addPtr(TrustedImm32(-(m_graph.frameRegisterCount() * sizeof(Register))), GPRInfo::callFrameRegister, stackPointerRegister); >- if (Options::zeroStackFrame()) >- clearStackFrame(GPRInfo::callFrameRegister, stackPointerRegister, GPRInfo::regT0, m_graph.frameRegisterCount() * sizeof(Register)); > checkStackPointerAlignment(); > > compileSetupRegistersForEntry(); >diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp >index 7a07b8a826e..642b16356f9 100644 >--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp >+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp >@@ -1848,8 +1848,6 @@ void SpeculativeJIT::compileCurrentBlock() > > if (m_block->isCatchEntrypoint) { > m_jit.addPtr(CCallHelpers::TrustedImm32(-(m_jit.graph().frameRegisterCount() * sizeof(Register))), GPRInfo::callFrameRegister, CCallHelpers::stackPointerRegister); >- if (Options::zeroStackFrame()) >- m_jit.clearStackFrame(GPRInfo::callFrameRegister, CCallHelpers::stackPointerRegister, GPRInfo::regT0, m_jit.graph().frameRegisterCount() * sizeof(Register)); > m_jit.emitSaveCalleeSaves(); > m_jit.emitMaterializeTagCheckRegisters(); > m_jit.emitPutToCallFrameHeader(m_jit.codeBlock(), CallFrameSlot::codeBlock); >diff --git a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp b/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp >index 0fe88d67c71..4d3427bc82e 100644 >--- a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp >+++ b/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp >@@ -205,8 +205,6 @@ public: > [codeBlock] (CCallHelpers& jit, B3::Air::Code& code) { > AllowMacroScratchRegisterUsage allowScratch(jit); > jit.addPtr(CCallHelpers::TrustedImm32(-code.frameSize()), GPRInfo::callFrameRegister, CCallHelpers::stackPointerRegister); >- if (Options::zeroStackFrame()) >- jit.clearStackFrame(GPRInfo::callFrameRegister, CCallHelpers::stackPointerRegister, GPRInfo::regT0, code.frameSize()); > > jit.emitSave(code.calleeSaveRegisterAtOffsetList()); > jit.emitPutToCallFrameHeader(codeBlock, VirtualRegister(CallFrameSlot::codeBlock)); >diff --git a/Source/JavaScriptCore/jit/AssemblyHelpers.h b/Source/JavaScriptCore/jit/AssemblyHelpers.h >index 69342defafe..729f584637d 100644 >--- a/Source/JavaScriptCore/jit/AssemblyHelpers.h >+++ b/Source/JavaScriptCore/jit/AssemblyHelpers.h >@@ -502,30 +502,6 @@ public: > #endif > } > >- void clearStackFrame(GPRReg currentTop, GPRReg newTop, GPRReg temp, unsigned frameSize) >- { >- ASSERT(frameSize % stackAlignmentBytes() == 0); >- if (frameSize <= 128) { >- for (unsigned offset = 0; offset < frameSize; offset += sizeof(CPURegister)) >- storePtr(TrustedImm32(0), Address(currentTop, -8 - offset)); >- } else { >- constexpr unsigned storeBytesPerIteration = stackAlignmentBytes(); >- constexpr unsigned storesPerIteration = storeBytesPerIteration / sizeof(CPURegister); >- >- move(currentTop, temp); >- Label zeroLoop = label(); >- subPtr(TrustedImm32(storeBytesPerIteration), temp); >-#if CPU(ARM64) >- static_assert(storesPerIteration == 2, "clearStackFrame() for ARM64 assumes stack is 16 byte aligned"); >- storePair64(ARM64Registers::zr, ARM64Registers::zr, temp); >-#else >- for (unsigned i = storesPerIteration; i-- != 0;) >- storePtr(TrustedImm32(0), Address(temp, sizeof(CPURegister) * i)); >-#endif >- branchPtr(NotEqual, temp, newTop).linkTo(zeroLoop, this); >- } >- } >- > #if CPU(X86_64) > static constexpr size_t prologueStackPointerDelta() > { >diff --git a/Source/JavaScriptCore/jit/JIT.cpp b/Source/JavaScriptCore/jit/JIT.cpp >index e4248f2223a..fc997986581 100644 >--- a/Source/JavaScriptCore/jit/JIT.cpp >+++ b/Source/JavaScriptCore/jit/JIT.cpp >@@ -708,8 +708,6 @@ void JIT::compileWithoutLinking(JITCompilationEffort effort) > > move(regT1, stackPointerRegister); > checkStackPointerAlignment(); >- if (Options::zeroStackFrame()) >- clearStackFrame(callFrameRegister, stackPointerRegister, regT0, maxFrameSize); > > emitSaveCalleeSaves(); > emitMaterializeTagCheckRegisters(); >diff --git a/Source/JavaScriptCore/runtime/OptionsList.h b/Source/JavaScriptCore/runtime/OptionsList.h >index bc568f84122..abda4d7c9a5 100644 >--- a/Source/JavaScriptCore/runtime/OptionsList.h >+++ b/Source/JavaScriptCore/runtime/OptionsList.h >@@ -444,10 +444,6 @@ constexpr bool enableWebAssemblyStreamingApi = false; > \ > v(Bool, useWebAssembly, true, Normal, "Expose the WebAssembly global object.") \ > \ >- v(Bool, enableSpectreMitigations, true, Restricted, "Enable Spectre mitigations.") \ >- v(Bool, enableSpectreGadgets, false, Restricted, "enable gadgets to test Spectre mitigations.") \ >- v(Bool, zeroStackFrame, false, Normal, "Zero stack frame on entry to a function.") \ >- \ > v(Bool, failToCompileWebAssemblyCode, false, Normal, "If true, no Wasm::Plan will sucessfully compile a function.") \ > v(Size, webAssemblyPartialCompileLimit, 5000, Normal, "Limit on the number of bytes a Wasm::Plan::compile should attempt before checking for other work.") \ > v(Unsigned, webAssemblyBBQAirOptimizationLevel, 0, Normal, "Air Optimization level for BBQ Web Assembly module compilations.") \ >diff --git a/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp b/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp >index c79f498f94f..e04c46607c2 100644 >--- a/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp >+++ b/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp >@@ -1754,7 +1754,6 @@ auto B3IRGenerator::addCallIndirect(unsigned tableIndex, const Signature& signat > ExpressionType callableFunctionBuffer; > ExpressionType instancesBuffer; > ExpressionType callableFunctionBufferLength; >- ExpressionType mask; > { > ExpressionType table = m_currentBlock->appendNew<MemoryValue>(m_proc, Load, pointerType(), origin(), > instanceValue(), safeCast<int32_t>(Instance::offsetOfTablePtr(m_numImportFunctions, tableIndex))); >@@ -1764,9 +1763,6 @@ auto B3IRGenerator::addCallIndirect(unsigned tableIndex, const Signature& signat > table, safeCast<int32_t>(FuncRefTable::offsetOfInstances())); > callableFunctionBufferLength = m_currentBlock->appendNew<MemoryValue>(m_proc, Load, Int32, origin(), > table, safeCast<int32_t>(Table::offsetOfLength())); >- mask = m_currentBlock->appendNew<Value>(m_proc, ZExt32, origin(), >- m_currentBlock->appendNew<MemoryValue>(m_proc, Load, Int32, origin(), >- table, safeCast<int32_t>(Table::offsetOfMask()))); > } > > // Check the index we are looking for is valid. >@@ -1781,9 +1777,6 @@ auto B3IRGenerator::addCallIndirect(unsigned tableIndex, const Signature& signat > > calleeIndex = m_currentBlock->appendNew<Value>(m_proc, ZExt32, origin(), calleeIndex); > >- if (Options::enableSpectreMitigations()) >- calleeIndex = m_currentBlock->appendNew<Value>(m_proc, BitAnd, origin(), mask, calleeIndex); >- > ExpressionType callableFunction; > { > // Compute the offset in the table index space we are looking for. >diff --git a/Source/JavaScriptCore/yarr/YarrJIT.cpp b/Source/JavaScriptCore/yarr/YarrJIT.cpp >index d2f0e8e2b64..629bbe4f72f 100644 >--- a/Source/JavaScriptCore/yarr/YarrJIT.cpp >+++ b/Source/JavaScriptCore/yarr/YarrJIT.cpp >@@ -638,31 +638,8 @@ class YarrGenerator : public YarrJITInfo, private MacroAssembler { > void initCallFrame() > { > unsigned callFrameSizeInBytes = alignCallFrameSizeInBytes(m_pattern.m_body->m_callFrameSize); >- if (callFrameSizeInBytes) { >-#if CPU(X86_64) || CPU(ARM64) >- if (Options::zeroStackFrame()) { >- // We need to start from the stack pointer, because we could have spilled callee saves >- move(stackPointerRegister, regT0); >- subPtr(Imm32(callFrameSizeInBytes), stackPointerRegister); >- if (callFrameSizeInBytes <= 128) { >- for (unsigned offset = 0; offset < callFrameSizeInBytes; offset += sizeof(intptr_t)) >- storePtr(TrustedImm32(0), Address(regT0, -8 - offset)); >- } else { >- Label zeroLoop = label(); >- subPtr(TrustedImm32(sizeof(intptr_t) * 2), regT0); >-#if CPU(ARM64) >- storePair64(ARM64Registers::zr, ARM64Registers::zr, regT0); >-#else >- storePtr(TrustedImm32(0), Address(regT0)); >- storePtr(TrustedImm32(0), Address(regT0, sizeof(intptr_t))); >-#endif >- branchPtr(NotEqual, regT0, stackPointerRegister).linkTo(zeroLoop, this); >- } >- } else >-#endif >- subPtr(Imm32(callFrameSizeInBytes), stackPointerRegister); >- >- } >+ if (callFrameSizeInBytes) >+ subPtr(Imm32(callFrameSizeInBytes), stackPointerRegister); > } > void removeCallFrame() > { >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index bf2bc56d65d..065dcd3b098 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2020-01-23 Robin Morisset <rmorisset@apple.com> >+ >+ Remove Options::enableSpectreMitigations >+ https://bugs.webkit.org/show_bug.cgi?id=193885 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ From what I remember we decided to remove the spectre-specific mitigations we had tried (in favor of things like process-per-origin). >+ I don't think anyone is using the SpectreGadget we had added for experiments either. >+ So this patch removes the following three options, and all the code that depended on them: >+ - enableSpectreMitigations (was true, only used in one place) >+ - enableSpectreGadgets (was false) >+ - zeroStackFrame (was false, and was an experiment about Spectre variant 4 if I remember correctly) >+ >+ No new tests as there is no new behaviour added. >+ >+ * DerivedSources.make: >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * bindings/js/WebCoreBuiltinNames.h: >+ * dom/SpectreGadget.cpp: Removed. >+ * dom/SpectreGadget.h: Removed. >+ * dom/SpectreGadget.idl: Removed. >+ * page/RuntimeEnabledFeatures.cpp: >+ * page/RuntimeEnabledFeatures.h: >+ > 2020-01-23 David Kilzer <ddkilzer@apple.com> > > Enable -Wconditional-uninitialized in WebCore project >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index 21fb1adb7af..a6f4a761bd7 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -662,7 +662,6 @@ JS_BINDING_IDLS = \ > $(WebCore)/dom/ShadowRoot.idl \ > $(WebCore)/dom/ShadowRootMode.idl \ > $(WebCore)/dom/Slotable.idl \ >- $(WebCore)/dom/SpectreGadget.idl \ > $(WebCore)/dom/StaticRange.idl \ > $(WebCore)/dom/StringCallback.idl \ > $(WebCore)/dom/Text.idl \ >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index efb3aeee54d..b9aaa944125 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -961,7 +961,6 @@ dom/ShadowRoot.cpp > dom/SimulatedClick.cpp > dom/SlotAssignment.cpp > dom/SpaceSplitString.cpp >-dom/SpectreGadget.cpp > dom/StaticNodeList.cpp > dom/StaticRange.cpp > dom/StringCallback.cpp >@@ -3422,7 +3421,6 @@ JSShadowRootMode.cpp > JSSlotable.cpp > JSSourceBuffer.cpp > JSSourceBufferList.cpp >-JSSpectreGadget.cpp > JSSpeechSynthesis.cpp > JSSpeechSynthesisEvent.cpp > JSSpeechSynthesisUtterance.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 672f1cf7cdc..38598f43bd8 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -1981,7 +1981,6 @@ > 656D373F0ADBA5DE00A4554D /* ResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D37270ADBA5DE00A4554D /* ResourceLoader.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 656D37430ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D372B0ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 656D37480ADBA5DE00A4554D /* SubresourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D37300ADBA5DE00A4554D /* SubresourceLoader.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 657AFAFC20047A2900509464 /* SpectreGadget.h in Headers */ = {isa = PBXBuildFile; fileRef = 657AFAF82004789900509464 /* SpectreGadget.h */; }; > 658436860AE01B7400E53753 /* FrameLoadRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 658436850AE01B7400E53753 /* FrameLoadRequest.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 659A7D130B6DB4D9001155B3 /* SubstituteData.h in Headers */ = {isa = PBXBuildFile; fileRef = 659A7D120B6DB4D9001155B3 /* SubstituteData.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 659DDC8309E198BA001BF3C6 /* JSDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 659DDC8109E198BA001BF3C6 /* JSDocument.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -9213,9 +9212,6 @@ > 656D37270ADBA5DE00A4554D /* ResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceLoader.h; sourceTree = "<group>"; }; > 656D372B0ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NetscapePlugInStreamLoader.h; sourceTree = "<group>"; }; > 656D37300ADBA5DE00A4554D /* SubresourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SubresourceLoader.h; sourceTree = "<group>"; }; >- 657AFAF82004789900509464 /* SpectreGadget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectreGadget.h; sourceTree = "<group>"; }; >- 657AFAFA2004789A00509464 /* SpectreGadget.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SpectreGadget.idl; sourceTree = "<group>"; }; >- 657AFAFB2004789A00509464 /* SpectreGadget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpectreGadget.cpp; sourceTree = "<group>"; }; > 658436850AE01B7400E53753 /* FrameLoadRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FrameLoadRequest.h; sourceTree = "<group>"; }; > 6593923909AE435C002C531F /* URLMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = URLMac.mm; sourceTree = "<group>"; }; > 659A7D120B6DB4D9001155B3 /* SubstituteData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SubstituteData.h; sourceTree = "<group>"; }; >@@ -28473,9 +28469,6 @@ > 9B532EA21BA928570038A827 /* SlotAssignment.h */, > D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */, > D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */, >- 657AFAFB2004789A00509464 /* SpectreGadget.cpp */, >- 657AFAF82004789900509464 /* SpectreGadget.h */, >- 657AFAFA2004789A00509464 /* SpectreGadget.idl */, > BC7FA62C0D1F0EFF00DB22A9 /* StaticNodeList.cpp */, > BC7FA62B0D1F0EFF00DB22A9 /* StaticNodeList.h */, > F44EBBDA1DB5DD9D00277334 /* StaticRange.cpp */, >@@ -32452,7 +32445,6 @@ > 84A81F420FC7E02700955300 /* SourceGraphic.h in Headers */, > D01A27AE10C9BFD800026A42 /* SpaceSplitString.h in Headers */, > 626CDE0F1140424C001E5A68 /* SpatialNavigation.h in Headers */, >- 657AFAFC20047A2900509464 /* SpectreGadget.h in Headers */, > AA2A5AD416A4861100975A25 /* SpeechSynthesis.h in Headers */, > C14938072234551A000CD707 /* SpeechSynthesisClient.h in Headers */, > AA2A5AD216A4860A00975A25 /* SpeechSynthesisEvent.h in Headers */, >diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >index 228c8e91717..54e61cdae6b 100644 >--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >@@ -215,7 +215,6 @@ namespace WebCore { > macro(ServiceWorkerGlobalScope) \ > macro(ServiceWorkerRegistration) \ > macro(ShadowRoot) \ >- macro(SpectreGadget) \ > macro(StaticRange) \ > macro(StylePropertyMapReadOnly) \ > macro(StylePropertyMap) \ >diff --git a/Source/WebCore/dom/SpectreGadget.cpp b/Source/WebCore/dom/SpectreGadget.cpp >deleted file mode 100644 >index 6d95bdd0fa4..00000000000 >--- a/Source/WebCore/dom/SpectreGadget.cpp >+++ /dev/null >@@ -1,80 +0,0 @@ >-/* >-* Copyright (C) 2018 Apple Inc. All rights reserved. >-* >-* Redistribution and use in source and binary forms, with or without >-* modification, are permitted provided that the following conditions >-* are met: >-* 1. Redistributions of source code must retain the above copyright >-* notice, this list of conditions and the following disclaimer. >-* 2. Redistributions in binary form must reproduce the above copyright >-* notice, this list of conditions and the following disclaimer in the >-* documentation and/or other materials provided with the distribution. >-* >-* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >-* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >-* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >-* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >-* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >-* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >-* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >-* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >-*/ >- >-#include "config.h" >-#include "SpectreGadget.h" >- >-#include "RuntimeEnabledFeatures.h" >-#include <wtf/text/WTFString.h> >- >-namespace WebCore { >- >-inline SpectreGadget::SpectreGadget(const String& text) >-{ >- if (RuntimeEnabledFeatures::sharedFeatures().spectreGadgetsEnabled()) { >- m_data.resize(text.length()); >- setReadLength(text.length()); >- m_data.fill(0); >- m_dataPtr = m_data.data(); >- >- for (size_t i = 0; i < m_readLength; i++) >- m_data[i] = text.characterAt(i); >- } else { >- setReadLength(0); >- m_dataPtr = nullptr; >- } >-} >- >-Ref<SpectreGadget> SpectreGadget::create(const String& text) >-{ >- return adoptRef(*new SpectreGadget(text)); >-} >- >-void SpectreGadget::setReadLength(size_t readLength) >-{ >- m_readLength = std::min(readLength, m_data.size()); >-} >- >-unsigned SpectreGadget::charCodeAt(size_t index) >-{ >- if (index < m_readLength) >- return m_dataPtr[index]; >- >- return 0; >-} >- >-void SpectreGadget::clflushReadLength() >-{ >-#if CPU(X86_64) && !OS(WINDOWS) >- auto clflush = [] (void* ptr) { >- char* ptrToFlush = static_cast<char*>(ptr); >- asm volatile ("clflush %0" :: "m"(*ptrToFlush) : "memory"); >- }; >- >- clflush(&m_readLength); >-#endif >-} >- >-} // namespace WebCore >diff --git a/Source/WebCore/dom/SpectreGadget.h b/Source/WebCore/dom/SpectreGadget.h >deleted file mode 100644 >index 1e38c6c50a4..00000000000 >--- a/Source/WebCore/dom/SpectreGadget.h >+++ /dev/null >@@ -1,51 +0,0 @@ >-/* >-* Copyright (C) 2018 Apple Inc. All rights reserved. >-* >-* Redistribution and use in source and binary forms, with or without >-* modification, are permitted provided that the following conditions >-* are met: >-* 1. Redistributions of source code must retain the above copyright >-* notice, this list of conditions and the following disclaimer. >-* 2. Redistributions in binary form must reproduce the above copyright >-* notice, this list of conditions and the following disclaimer in the >-* documentation and/or other materials provided with the distribution. >-* >-* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >-* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >-* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >-* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >-* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >-* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >-* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >-* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >-*/ >- >-#pragma once >- >-#include <unicode/uchar.h> >-#include <wtf/RefCounted.h> >-#include <wtf/Vector.h> >- >-namespace WebCore { >- >-class SpectreGadget final : public RefCounted<SpectreGadget> { >-public: >- static Ref<SpectreGadget> create(const String&); >- >- void setReadLength(size_t); >- unsigned charCodeAt(size_t); >- void clflushReadLength(); >- >-private: >- SpectreGadget(const String&); >- >- size_t m_readLength; >- Vector<UChar> m_data; >- UChar* m_dataPtr; >-}; >- >-} // namespace WebCore >- >diff --git a/Source/WebCore/dom/SpectreGadget.idl b/Source/WebCore/dom/SpectreGadget.idl >deleted file mode 100644 >index adf4bd84c36..00000000000 >--- a/Source/WebCore/dom/SpectreGadget.idl >+++ /dev/null >@@ -1,36 +0,0 @@ >-/* >-* Copyright (C) 2018 Apple Inc. All rights reserved. >-* >-* Redistribution and use in source and binary forms, with or without >-* modification, are permitted provided that the following conditions >-* are met: >-* 1. Redistributions of source code must retain the above copyright >-* notice, this list of conditions and the following disclaimer. >-* 2. Redistributions in binary form must reproduce the above copyright >-* notice, this list of conditions and the following disclaimer in the >-* documentation and/or other materials provided with the distribution. >-* >-* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >-* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >-* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >-* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >-* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >-* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >-* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >-* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >-*/ >- >-[ >- Exposed=Window, >- EnabledAtRuntime=SpectreGadgets, >- Constructor(DOMString data), >- ImplementationLacksVTable >- ] interface SpectreGadget { >- void setReadLength(unsigned long readLength); >- unsigned long charCodeAt(unsigned long index); >- void clflushReadLength(); >-}; >- >diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.cpp b/Source/WebCore/page/RuntimeEnabledFeatures.cpp >index e09b20ef54e..64b51f65f86 100644 >--- a/Source/WebCore/page/RuntimeEnabledFeatures.cpp >+++ b/Source/WebCore/page/RuntimeEnabledFeatures.cpp >@@ -59,11 +59,6 @@ RuntimeEnabledFeatures& RuntimeEnabledFeatures::sharedFeatures() > return runtimeEnabledFeatures; > } > >-bool RuntimeEnabledFeatures::spectreGadgetsEnabled() const >-{ >- return JSC::Options::enableSpectreGadgets(); >-} >- > #if ENABLE(TOUCH_EVENTS) > bool RuntimeEnabledFeatures::touchEventsEnabled() const > { >diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.h b/Source/WebCore/page/RuntimeEnabledFeatures.h >index 621210aa053..58e06a88585 100644 >--- a/Source/WebCore/page/RuntimeEnabledFeatures.h >+++ b/Source/WebCore/page/RuntimeEnabledFeatures.h >@@ -132,8 +132,6 @@ public: > bool fetchAPIKeepAliveEnabled() const { return m_fetchAPIKeepAliveEnabled; } > void setFetchAPIKeepAliveEnabled(bool isEnabled) { m_fetchAPIKeepAliveEnabled = isEnabled; } > >- bool spectreGadgetsEnabled() const; >- > void setInspectorAdditionsEnabled(bool isEnabled) { m_inspectorAdditionsEnabled = isEnabled; } > bool inspectorAdditionsEnabled() const { return m_inspectorAdditionsEnabled; } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193885
:
380460
|
388639
|
388939