- Revision
- 265179
- Author
- [email protected]
- Date
- 2020-08-01 14:48:25 -0700 (Sat, 01 Aug 2020)
Log Message
Unreviewed, reverting r265097, r265113, and r265122.
https://bugs.webkit.org/show_bug.cgi?id=215065
Broke AppleSilicon Big Sur
Reverted changesets:
"Strip pointers instead of authing for byteOffset to not allow
for a possible way to guess data pac"
https://bugs.webkit.org/show_bug.cgi?id=214952
https://trac.webkit.org/changeset/265097
"Compute number of PAC bits from what the OS says its address
space is"
https://bugs.webkit.org/show_bug.cgi?id=214986
https://trac.webkit.org/changeset/265113
"Remove UB from nonPACBitsMask computation"
https://bugs.webkit.org/show_bug.cgi?id=214996
https://trac.webkit.org/changeset/265122
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (265178 => 265179)
--- trunk/Source/_javascript_Core/ChangeLog 2020-08-01 17:54:44 UTC (rev 265178)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-08-01 21:48:25 UTC (rev 265179)
@@ -1,3 +1,26 @@
+2020-08-01 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r265097, r265113, and r265122.
+ https://bugs.webkit.org/show_bug.cgi?id=215065
+
+ Broke AppleSilicon Big Sur
+
+ Reverted changesets:
+
+ "Strip pointers instead of authing for byteOffset to not allow
+ for a possible way to guess data pac"
+ https://bugs.webkit.org/show_bug.cgi?id=214952
+ https://trac.webkit.org/changeset/265097
+
+ "Compute number of PAC bits from what the OS says its address
+ space is"
+ https://bugs.webkit.org/show_bug.cgi?id=214986
+ https://trac.webkit.org/changeset/265113
+
+ "Remove UB from nonPACBitsMask computation"
+ https://bugs.webkit.org/show_bug.cgi?id=214996
+ https://trac.webkit.org/changeset/265122
+
2020-07-31 Keith Miller <[email protected]>
Move Options setter to where we allow access to the Options object
Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerARM64E.h (265178 => 265179)
--- trunk/Source/_javascript_Core/assembler/MacroAssemblerARM64E.h 2020-08-01 17:54:44 UTC (rev 265178)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerARM64E.h 2020-08-01 21:48:25 UTC (rev 265179)
@@ -39,8 +39,8 @@
class MacroAssemblerARM64E : public MacroAssemblerARM64 {
public:
- static constexpr unsigned numberOfPACBits = WTF::maximumNumberOfPointerAuthenticationBits;
- static constexpr uintptr_t nonPACBitsMask = static_cast<uintptr_t>(-1) >> numberOfPACBits;
+ static constexpr unsigned numberOfPACBits = 25;
+ static constexpr uintptr_t nonPACBitsMask = (1ull << (64 - numberOfPACBits)) - 1;
ALWAYS_INLINE void tagReturnAddress()
{
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (265178 => 265179)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2020-08-01 17:54:44 UTC (rev 265178)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2020-08-01 21:48:25 UTC (rev 265179)
@@ -7327,13 +7327,17 @@
TrustedImm32(WastefulTypedArray));
m_jit.loadPtr(MacroAssembler::Address(baseGPR, JSArrayBufferView::offsetOfVector()), vectorGPR);
-#if CPU(ARM64E)
- m_jit.removeArrayPtrTag(vectorGPR);
-#endif
+ JITCompiler::Jump nullVector = m_jit.branchPtr(JITCompiler::Equal, vectorGPR, TrustedImmPtr(JSArrayBufferView::nullVectorPtr()));
+
m_jit.loadPtr(MacroAssembler::Address(baseGPR, JSObject::butterflyOffset()), dataGPR);
m_jit.cageWithoutUntagging(Gigacage::JSValue, dataGPR);
+
+ cageTypedArrayStorage(baseGPR, vectorGPR);
+
m_jit.loadPtr(MacroAssembler::Address(dataGPR, Butterfly::offsetOfArrayBuffer()), arrayBufferGPR);
+ // FIXME: This needs caging.
+ // https://bugs.webkit.org/show_bug.cgi?id=175515
m_jit.loadPtr(MacroAssembler::Address(arrayBufferGPR, ArrayBuffer::offsetOfData()), dataGPR);
#if CPU(ARM64E)
m_jit.removeArrayPtrTag(dataGPR);
@@ -7343,10 +7347,17 @@
JITCompiler::Jump done = m_jit.jump();
+#if CPU(ARM64E)
+ nullVector.link(&m_jit);
+#endif
emptyByteOffset.link(&m_jit);
m_jit.move(TrustedImmPtr(nullptr), vectorGPR);
done.link(&m_jit);
+#if !CPU(ARM64E)
+ ASSERT(!JSArrayBufferView::nullVectorPtr());
+ nullVector.link(&m_jit);
+#endif
strictInt32Result(vectorGPR, node);
}
Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (265178 => 265179)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2020-08-01 17:54:44 UTC (rev 265178)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2020-08-01 21:48:25 UTC (rev 265179)
@@ -4361,9 +4361,10 @@
LValue basePtr = lowCell(m_node->child1());
LBasicBlock wastefulCase = m_out.newBlock();
+ LBasicBlock notNull = m_out.newBlock();
LBasicBlock continuation = m_out.newBlock();
- ValueFromBlock nonWastefulResult = m_out.anchor(m_out.constIntPtr(0));
+ ValueFromBlock nullVectorOut = m_out.anchor(m_out.constIntPtr(0));
LValue mode = m_out.load32(basePtr, m_heaps.JSArrayBufferView_mode);
m_out.branch(
@@ -4370,14 +4371,21 @@
m_out.notEqual(mode, m_out.constInt32(WastefulTypedArray)),
unsure(continuation), unsure(wastefulCase));
- LBasicBlock lastNext = m_out.appendTo(wastefulCase, continuation);
+ LBasicBlock lastNext = m_out.appendTo(wastefulCase, notNull);
- LValue vectorPtr = m_out.loadPtr(basePtr, m_heaps.JSArrayBufferView_vector);
- vectorPtr = removeArrayPtrTag(vectorPtr);
+ LValue vector = m_out.loadPtr(basePtr, m_heaps.JSArrayBufferView_vector);
+ m_out.branch(m_out.equal(vector, m_out.constIntPtr(JSArrayBufferView::nullVectorPtr())),
+ unsure(continuation), unsure(notNull));
+ m_out.appendTo(notNull, continuation);
+
LValue butterflyPtr = caged(Gigacage::JSValue, m_out.loadPtr(basePtr, m_heaps.JSObject_butterfly), basePtr);
LValue arrayBufferPtr = m_out.loadPtr(butterflyPtr, m_heaps.Butterfly_arrayBuffer);
+ LValue vectorPtr = caged(Gigacage::Primitive, vector, basePtr);
+
+ // FIXME: This needs caging.
+ // https://bugs.webkit.org/show_bug.cgi?id=175515
LValue dataPtr = m_out.loadPtr(arrayBufferPtr, m_heaps.ArrayBuffer_data);
dataPtr = removeArrayPtrTag(dataPtr);
@@ -4386,7 +4394,7 @@
m_out.jump(continuation);
m_out.appendTo(continuation, lastNext);
- setInt32(m_out.castToInt32(m_out.phi(pointerType(), nonWastefulResult, wastefulOut)));
+ setInt32(m_out.castToInt32(m_out.phi(pointerType(), nullVectorOut, wastefulOut)));
}
void compileGetPrototypeOf()
Modified: trunk/Source/WTF/ChangeLog (265178 => 265179)
--- trunk/Source/WTF/ChangeLog 2020-08-01 17:54:44 UTC (rev 265178)
+++ trunk/Source/WTF/ChangeLog 2020-08-01 21:48:25 UTC (rev 265179)
@@ -1,3 +1,26 @@
+2020-08-01 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r265097, r265113, and r265122.
+ https://bugs.webkit.org/show_bug.cgi?id=215065
+
+ Broke AppleSilicon Big Sur
+
+ Reverted changesets:
+
+ "Strip pointers instead of authing for byteOffset to not allow
+ for a possible way to guess data pac"
+ https://bugs.webkit.org/show_bug.cgi?id=214952
+ https://trac.webkit.org/changeset/265097
+
+ "Compute number of PAC bits from what the OS says its address
+ space is"
+ https://bugs.webkit.org/show_bug.cgi?id=214986
+ https://trac.webkit.org/changeset/265113
+
+ "Remove UB from nonPACBitsMask computation"
+ https://bugs.webkit.org/show_bug.cgi?id=214996
+ https://trac.webkit.org/changeset/265122
+
2020-07-30 Simon Fraser <[email protected]>
Have TimingScope track the max event duration
Modified: trunk/Source/WTF/wtf/CagedPtr.h (265178 => 265179)
--- trunk/Source/WTF/wtf/CagedPtr.h 2020-08-01 17:54:44 UTC (rev 265178)
+++ trunk/Source/WTF/wtf/CagedPtr.h 2020-08-01 21:48:25 UTC (rev 265179)
@@ -39,8 +39,8 @@
class CagedPtr {
public:
static constexpr Gigacage::Kind kind = passedKind;
- static constexpr unsigned numberOfPACBits = maximumNumberOfPointerAuthenticationBits;
- static constexpr uintptr_t nonPACBitsMask = static_cast<uintptr_t>(-1) >> numberOfPACBits;
+ static constexpr unsigned numberOfPACBits = 25;
+ static constexpr uintptr_t nonPACBitsMask = (1ull << ((sizeof(T*) * CHAR_BIT) - numberOfPACBits)) - 1;
CagedPtr() : CagedPtr(nullptr) { }
CagedPtr(std::nullptr_t)
Modified: trunk/Source/WTF/wtf/PtrTag.h (265178 => 265179)
--- trunk/Source/WTF/wtf/PtrTag.h 2020-08-01 17:54:44 UTC (rev 265178)
+++ trunk/Source/WTF/wtf/PtrTag.h 2020-08-01 21:48:25 UTC (rev 265179)
@@ -27,17 +27,9 @@
#include <wtf/Assertions.h>
#include <wtf/DataLog.h>
-#include <wtf/MathExtras.h>
namespace WTF {
-#if CPU(ARM64E)
-constexpr unsigned maximumNumberOfPointerAuthenticationBits = 64 - OS_CONSTANT(EFFECTIVE_ADDRESS_WIDTH);
-#else // CPU(ARM64E)
-constexpr unsigned maximumNumberOfPointerAuthenticationBits = 0;
-#endif // CPU(ARM64E)
-
-
#define FOR_EACH_BASE_WTF_PTRTAG(v) \
v(NoPtrTag) \
v(CFunctionPtrTag) \