Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Issue 1521953002: [proxies] fix access issue when having proxies on the prototype-chain of global objects. (Closed)

Created:
5 years ago by Camillo Bruni
Modified:
4 years, 11 months ago
CC:
v8-mips-ports_googlegroups.com, v8-ppc-ports_googlegroups.com, v8-reviews_googlegroups.com, v8-x87-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[proxies] fix access issue when having proxies on the prototype-chain of global objects. We can no longer just walk the prototype chain without doing proper access-checks. When installing a proxy as the __proto__ of the global object we might accidentally end up invoking cross-realm code without access-checks (see proxies-cross-realm-ecxeption.js). Committed: https://crrev.com/2c75e3d2abc3eba3337a09afcd0dfa3e653ff006 Cr-Commit-Position: refs/heads/master@{#32903}

Patch Set 1 #

Patch Set 2 : merge with master #

Patch Set 3 : cleanup + file rename #

Patch Set 4 : cleanup #

Patch Set 5 : da real stuff #

Patch Set 6 : fix InstanceOfStub for other platforms #

Patch Set 7 : removing accidental changes #

Patch Set 8 : merging master #

Patch Set 9 : fixing casting issue #

Patch Set 10 : better comment #

Total comments: 3

Patch Set 11 : WIP fixing turbofan #

Patch Set 12 : trying to turbofan working #

Patch Set 13 : fixing arm arm64 and x64 lithium-codegen #

Patch Set 14 : let me fix this small turbofan method #

Patch Set 15 : removing commented code #

Patch Set 16 : fixing line length and reverting comment change #

Patch Set 17 : ppc code mess #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+377 lines, -153 lines) Patch
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 6 2 chunks +13 lines, -4 lines 0 comments Download
M src/arm64/code-stubs-arm64.cc View 1 2 3 4 5 2 chunks +13 lines, -4 lines 0 comments Download
M src/compiler/access-builder.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/access-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -0 lines 0 comments Download
M src/compiler/js-typed-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +142 lines, -113 lines 0 comments Download
M src/crankshaft/arm/lithium-codegen-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -0 lines 0 comments Download
M src/crankshaft/arm64/lithium-codegen-arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -0 lines 0 comments Download
M src/crankshaft/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M src/crankshaft/x64/lithium-codegen-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -0 lines 0 comments Download
M src/deoptimizer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 6 1 chunk +13 lines, -5 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 1 2 3 4 5 2 chunks +14 lines, -4 lines 0 comments Download
M src/mips64/code-stubs-mips64.cc View 1 2 3 4 5 2 chunks +14 lines, -4 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -5 lines 0 comments Download
M src/ppc/code-stubs-ppc.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +13 lines, -4 lines 0 comments Download
M src/prototype.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +17 lines, -0 lines 1 comment Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 2 chunks +9 lines, -4 lines 0 comments Download
M src/x87/code-stubs-x87.cc View 1 2 3 4 5 2 chunks +9 lines, -4 lines 0 comments Download
A test/mjsunit/cross-realm-global-prototype.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +22 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/proxies-cross-realm-exception.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +53 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (23 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1521953002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1521953002/100001
5 years ago (2015-12-14 17:09:09 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/11431) v8_linux64_rel on ...
5 years ago (2015-12-14 17:10:12 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1521953002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1521953002/140001
5 years ago (2015-12-14 17:17:54 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_dbg on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg/builds/12078)
5 years ago (2015-12-14 17:56:24 UTC) #10
Camillo Bruni
PTAL, bmeurer: mostly check the native code pieces :) mips/pcc team: could you check the ...
5 years ago (2015-12-14 19:01:43 UTC) #12
Benedikt Meurer
native bits LGTM. But don't we need to do the same in Crankshaft?
5 years ago (2015-12-14 19:13:09 UTC) #13
Toon Verwaest
I'd prefer having the Advance methods automatically enforce HasAccess, reaching "null" if access isn't given. ...
5 years ago (2015-12-14 19:53:05 UTC) #15
Camillo Bruni
On 2015/12/14 at 19:53:05, verwaest wrote: > I'd prefer having the Advance methods automatically enforce ...
5 years ago (2015-12-14 19:57:11 UTC) #16
Camillo Bruni
On 2015/12/14 at 19:13:09, bmeurer wrote: > native bits LGTM. But don't we need to ...
5 years ago (2015-12-14 19:58:57 UTC) #17
Camillo Bruni
https://codereview.chromium.org/1521953002/diff/180001/src/crankshaft/ia32/lithium-codegen-ia32.cc File src/crankshaft/ia32/lithium-codegen-ia32.cc (right): https://codereview.chromium.org/1521953002/diff/180001/src/crankshaft/ia32/lithium-codegen-ia32.cc#newcode2547 src/crankshaft/ia32/lithium-codegen-ia32.cc:2547: // without performing the necessary access checks first. probably ...
5 years ago (2015-12-14 19:59:21 UTC) #18
Toon Verwaest
https://codereview.chromium.org/1521953002/diff/180001/src/crankshaft/ia32/lithium-codegen-ia32.cc File src/crankshaft/ia32/lithium-codegen-ia32.cc (right): https://codereview.chromium.org/1521953002/diff/180001/src/crankshaft/ia32/lithium-codegen-ia32.cc#newcode2547 src/crankshaft/ia32/lithium-codegen-ia32.cc:2547: // without performing the necessary access checks first. On ...
5 years ago (2015-12-14 20:06:48 UTC) #19
Camillo Bruni
On 2015/12/14 at 20:06:48, verwaest wrote: > https://codereview.chromium.org/1521953002/diff/180001/src/crankshaft/ia32/lithium-codegen-ia32.cc > File src/crankshaft/ia32/lithium-codegen-ia32.cc (right): > > https://codereview.chromium.org/1521953002/diff/180001/src/crankshaft/ia32/lithium-codegen-ia32.cc#newcode2547 ...
5 years ago (2015-12-15 11:38:45 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1521953002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1521953002/220001
5 years ago (2015-12-15 11:38:57 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/11473) v8_linux64_avx2_rel on ...
5 years ago (2015-12-15 11:41:46 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1521953002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1521953002/240001
5 years ago (2015-12-15 11:56:12 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/builds/10027)
5 years ago (2015-12-15 12:10:54 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1521953002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1521953002/260001
5 years ago (2015-12-15 13:13:15 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-15 13:32:12 UTC) #32
Camillo Bruni
PTAL again: - included access check in AdvanceFollowingProxies (in the other case we behave as ...
5 years ago (2015-12-15 14:09:27 UTC) #37
paul.l...
On 2015/12/14 19:01:43, cbruni wrote: > mips/pcc team: could you check the CL and port ...
5 years ago (2015-12-16 02:14:33 UTC) #39
Toon Verwaest
lgtm
5 years ago (2015-12-16 13:31:17 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1521953002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1521953002/320001
5 years ago (2015-12-16 13:40:55 UTC) #43
commit-bot: I haz the power
Committed patchset #17 (id:320001)
5 years ago (2015-12-16 14:31:27 UTC) #44
commit-bot: I haz the power
Patchset 17 (id:??) landed as https://crrev.com/2c75e3d2abc3eba3337a09afcd0dfa3e653ff006 Cr-Commit-Position: refs/heads/master@{#32903}
5 years ago (2015-12-16 14:31:51 UTC) #46
Lei Zhang
https://codereview.chromium.org/1521953002/diff/320001/src/prototype.h File src/prototype.h (right): https://codereview.chromium.org/1521953002/diff/320001/src/prototype.h#newcode66 src/prototype.h:66: const bool HasAccess() { BTW, using V8 with PDFium, ...
4 years, 12 months ago (2015-12-23 00:25:17 UTC) #48
Jakob Kummerow
4 years, 11 months ago (2016-01-04 15:55:29 UTC) #49
Message was sent while issue was closed.
On 2015/12/23 00:25:17, Lei Zhang wrote:
> https://codereview.chromium.org/1521953002/diff/320001/src/prototype.h
> File src/prototype.h (right):
> 
>
https://codereview.chromium.org/1521953002/diff/320001/src/prototype.h#newcode66
> src/prototype.h:66: const bool HasAccess() {
> BTW, using V8 with PDFium, I get this warning:
> 
> ../../v8/src/prototype.h:70:3: warning: 'const' type qualifier on return type
> has no effect [-Wignored-qualifiers]
>   const bool HasAccess() {
>   ^~~~~~

Thanks, here's a fix: https://codereview.chromium.org/1559923002/

Powered by Google App Engine
This is Rietveld 408576698