WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
184280
Don't do index masking or poisoning for DirectArguments
https://bugs.webkit.org/show_bug.cgi?id=184280
Summary
Don't do index masking or poisoning for DirectArguments
Filip Pizlo
Reported
2018-04-03 15:57:27 PDT
Patch forthcoming.
Attachments
the patch
(74.05 KB, patch)
2018-04-03 16:27 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(69.53 KB, patch)
2018-04-03 16:28 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(67.74 KB, patch)
2018-04-03 16:58 PDT
,
Filip Pizlo
saam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2018-04-03 16:27:39 PDT
Created
attachment 337126
[details]
the patch
Filip Pizlo
Comment 2
2018-04-03 16:28:10 PDT
Comment on
attachment 337126
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=337126&action=review
> Source/JavaScriptCore/ChangeLog:-2936 > -2018-03-09 Filip Pizlo <
fpizlo@apple.com
> > - > - Split DirectArguments into JSValueOOB and JSValueStrict parts > -
https://bugs.webkit.org/show_bug.cgi?id=183458
> - > - Reviewed by Yusuke Suzuki. > - > - Our Spectre plan for JSValue objects is to allow inline JSValue stores and loads guarded by > - unmitigated structure checks. This works because objects reachable from JSValues (i.e. JSValue > - objects, like String, Symbol, and any descendant of JSObject) will only contain fields that it's OK > - to read and write within a Spectre mitigation window. Writes are important, because within the > - window, a write could appear to be made speculatively and rolled out later. This means that: > - > - - JSValue objects cannot have lengths, masks, or anything else inline. > - > - - JSValue objects cannot have an inline type that is used as part of a Spectre mitigation for a type > - check, unless that type is in the form of a poison key. > - > - This means that the dynamic poisoning that I previously landed for DirectArguments is wrong. It also > - means that it's wrong for DirectArguments to have an inline length. > - > - This changes DirectArguments to use poisoning according to the universal formula: > - > - - The random accessed portions are out-of-line, pointed to by a poisoned pointer. > - > - - No inline length. > - > - Surprisingly, this is perf-neutral. It's probably perf-neutral because our compiler optimizations > - amortize whatever cost there was. > -
I'll revert this.
Filip Pizlo
Comment 3
2018-04-03 16:28:52 PDT
Created
attachment 337128
[details]
the patch
EWS Watchlist
Comment 4
2018-04-03 16:33:49 PDT
Attachment 337128
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/DirectArguments.h:123: Please replace ASSERT_WITH_SECURITY_IMPLICATION() with RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(). [security/assertion] [5] Total errors found: 1 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 5
2018-04-03 16:58:57 PDT
Created
attachment 337132
[details]
the patch
EWS Watchlist
Comment 6
2018-04-03 17:01:12 PDT
Attachment 337132
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/DirectArguments.h:123: Please replace ASSERT_WITH_SECURITY_IMPLICATION() with RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(). [security/assertion] [5] Total errors found: 1 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Saam Barati
Comment 7
2018-04-04 10:44:02 PDT
Comment on
attachment 337132
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=337132&action=review
rs=me
> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:15570 > + LValue dynamicPoison(LValue value, LValue poison)
Do we still need these?
Filip Pizlo
Comment 8
2018-04-04 10:59:00 PDT
Landed in
https://trac.webkit.org/changeset/230266/webkit
Radar WebKit Bug Importer
Comment 9
2018-04-04 10:59:16 PDT
<
rdar://problem/39180055
>
Filip Pizlo
Comment 10
2018-04-04 11:00:07 PDT
(In reply to Saam Barati from
comment #7
)
> Comment on
attachment 337132
[details]
> the patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=337132&action=review
> > rs=me > > > Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:15570 > > + LValue dynamicPoison(LValue value, LValue poison) > > Do we still need these?
Probably not. We might still use them for scoped arguments poisoning or something. I'll kill them once I'm done killing other things.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug