|
|
Created:
3 years, 11 months ago by Mircea Trofin Modified:
3 years, 11 months ago CC:
v8-reviews_googlegroups.com, Toon Verwaest, vogelheim Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[wasm] Enable content policy for wasm compilation.
Make wasm code generation (including deserialization) aware of
allow_codegen_callback - if one were set by the host - akin to what we
do for `eval`.
This allows web pages that opt out of unsafe-eval to also opt out of
wasm scenarios.
BUG=v8:5869
Review-Url: https://codereview.chromium.org/2646713002
Cr-Commit-Position: refs/heads/master@{#42519}
Committed: https://chromium.googlesource.com/v8/v8/+/5e44cc79d54194267197fbe42e9a8b5e2b4d0249
Patch Set 1 #Patch Set 2 : RuntimeError->TypeError #Patch Set 3 : CompileError #
Messages
Total messages: 35 (23 generated)
The CQ bit was checked by mtrofin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [wasm] Enable content policy for wasm compilation. BUG= ========== to ========== [wasm] Enable content policy for wasm compilation. BUG= ==========
mtrofin@chromium.org changed reviewers: + bradnelson@chromium.org, jochen@chromium.org
Description was changed from ========== [wasm] Enable content policy for wasm compilation. BUG= ========== to ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of the host set allow_codegen_callback - if one were set - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. Andreas, would throwing RuntimeError make sense in this case? BUG= ==========
mtrofin@chromium.org changed reviewers: + rossberg@chromium.org
Description was changed from ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of the host set allow_codegen_callback - if one were set - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. Andreas, would throwing RuntimeError make sense in this case? BUG= ========== to ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of the host set allow_codegen_callback - if one were set - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG= ==========
Description was changed from ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of the host set allow_codegen_callback - if one were set - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG= ========== to ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of the host-set allow_codegen_callback - if one were set - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG= ==========
Description was changed from ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of the host-set allow_codegen_callback - if one were set - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG= ========== to ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of allow_codegen_callback - if one were set by the host - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG= ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Andreas - does throwing RuntimeError make sense in the case when the host disables code generation? For context, this is part of the wasm ship unblocker described by Seth. The change is conservatively extending the new semantics applied for compile ("CSP awareness") to also encompass deserialization, under the argument that deserializing is a form of code generation. While that feature (deserialization, via structured cloning) is currently disabled in Chrome, I want to avoid a bypass of the CSP directives through deserialization, when we reenable it. Adding more folks from the snapshot owners list for the change there.
Description was changed from ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of allow_codegen_callback - if one were set by the host - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG= ========== to ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of allow_codegen_callback - if one were set by the host - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG=v8:5869 ==========
yangguo@chromium.org changed reviewers: + yangguo@chromium.org
src/snapshot lgtm
> Andreas - does throwing RuntimeError make sense in the case when the host > disables code generation? RuntimeError is meant to correspond to a Wasm trap, so it doesn't fit here. If a Wasm exception at all, CompileError probably is more adequate, although that is meant to indicate a decoding/validation error. The problem is outside Wasm itself, so a plain JS error might be best, e.g., TypeError.
The CQ bit was checked by mtrofin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
RuntimeError -> TypeError
On 2017/01/19 16:41:38, Mircea Trofin wrote: > RuntimeError -> TypeError jfyi in the eval case we got an EvalError
On 2017/01/19 16:43:05, Yang wrote: > On 2017/01/19 16:41:38, Mircea Trofin wrote: > > RuntimeError -> TypeError > > jfyi in the eval case we got an EvalError Yeah, on second thought, CompileError seems clearer. Arguably, it is in the same class as hitting an implementation limit when compiling a module, just that the limit is, like, zero. Sorry for the churn.
On 2017/01/19 16:43:05, Yang wrote: > On 2017/01/19 16:41:38, Mircea Trofin wrote: > > RuntimeError -> TypeError > > jfyi in the eval case we got an EvalError Thanks. The hope is to have a separate CSP-like directive for wasm, than the one for plain JS, so long-term, EvalError may not be as representative.
The CQ bit was checked by mtrofin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
*Error -> CompileError
Wasm part lgtm
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by mtrofin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yangguo@chromium.org Link to the patchset: https://codereview.chromium.org/2646713002/#ps40001 (title: "CompileError")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1484846901855300, "parent_rev": "26c4a9cc898c38de608757816f625166f95e66eb", "commit_rev": "5e44cc79d54194267197fbe42e9a8b5e2b4d0249"}
Message was sent while issue was closed.
Description was changed from ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of allow_codegen_callback - if one were set by the host - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG=v8:5869 ========== to ========== [wasm] Enable content policy for wasm compilation. Make wasm code generation (including deserialization) aware of allow_codegen_callback - if one were set by the host - akin to what we do for `eval`. This allows web pages that opt out of unsafe-eval to also opt out of wasm scenarios. BUG=v8:5869 Review-Url: https://codereview.chromium.org/2646713002 Cr-Commit-Position: refs/heads/master@{#42519} Committed: https://chromium.googlesource.com/v8/v8/+/5e44cc79d54194267197fbe42e9a8b5e2b4... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/v8/v8/+/5e44cc79d54194267197fbe42e9a8b5e2b4... |