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

Issue 165393003: gpu: Generate mailboxes on client side (Closed)

Created:
6 years, 10 months ago by piman
Modified:
6 years, 10 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, viettrungluu+watch_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, Aaron Boodman, darin-cc_chromium.org, kalyank, darin (slow to review), piman+watch_chromium.org, cc-bugs_chromium.org, abarth-chromium, ben+mojo_chromium.org, danakj+watch_chromium.org
Visibility:
Public.

Description

gpu: Generate mailboxes on client side Because mailboxes are now just a random number, we don't need to round-trip to the gpu process to generate them, which lets us get rid of IPCs, layers, etc. It also means generating a mailbox can't fail any more (even on a lost context), so, removing some code paths and associated tests. I'm adding a debug-only verification to ensure the mailboxes are generated from the crypto-random function (in debug, we burn a byte to compute a mini XOR-check as a sentinel for "we went through the Generate function"). It's not a secure check, but should hit incorrect/unsafe usage. BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251570

Patch Set 1 #

Patch Set 2 : meant to remove crypto/random.cc #

Total comments: 1

Patch Set 3 : nits #

Total comments: 1

Patch Set 4 : rebase, remove crypto bits #

Patch Set 5 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -351 lines) Patch
M cc/output/gl_renderer.cc View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M cc/resources/video_resource_updater.cc View 1 chunk +5 lines, -10 lines 0 comments Download
M cc/resources/video_resource_updater_unittest.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.h View 2 chunks +0 lines, -4 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.cc View 2 chunks +0 lines, -13 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.h View 2 chunks +0 lines, -3 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M content/common/gpu/client/gl_helper.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M content/common/gpu/client/gpu_channel_host.h View 4 chunks +0 lines, -25 lines 0 comments Download
M content/common/gpu/client/gpu_channel_host.cc View 5 chunks +10 lines, -82 lines 0 comments Download
M content/common/gpu/gpu_channel.cc View 1 2 3 chunks +3 lines, -27 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 1 chunk +0 lines, -13 lines 0 comments Download
M content/common/gpu/texture_image_transport_surface.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_context_3d.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 4 chunks +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/client_test_helper.h View 1 chunk +0 lines, -2 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 chunk +28 lines, -6 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_impl_autogen.h View 1 chunk +0 lines, -18 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 chunk +25 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest_autogen.h View 1 chunk +0 lines, -32 lines 0 comments Download
M gpu/command_buffer/common/gpu_control.h View 1 chunk +0 lines, -5 lines 0 comments Download
M gpu/command_buffer/common/mailbox.h View 1 chunk +9 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/mailbox.cc View 1 2 3 2 chunks +25 lines, -0 lines 1 comment Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 3 chunks +15 lines, -12 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M gpu/command_buffer/service/gpu_control_service.h View 1 chunk +0 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/gpu_control_service.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.h View 1 chunk +0 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/in_process_command_buffer.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager.h View 1 chunk +0 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager_unittest.cc View 5 chunks +6 lines, -12 lines 0 comments Download
M gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/gles2/command_buffer_client_impl.h View 1 chunk +0 lines, -2 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ppapi/proxy/ppapi_command_buffer_proxy.cc View 1 chunk +0 lines, -9 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
piman
jamesr: please review (also OWNER for mojo) jschuh: gpu_messages.h agl: crypto/ OWNER.
6 years, 10 months ago (2014-02-14 05:36:53 UTC) #1
piman
(note: this is on top of https://codereview.chromium.org/138763009/)
6 years, 10 months ago (2014-02-14 05:38:59 UTC) #2
jschuh
I'm just going to rubberstamp lgtm this from the security side. The IPC message changes ...
6 years, 10 months ago (2014-02-14 15:44:27 UTC) #3
agl
https://codereview.chromium.org/165393003/diff/40001/crypto/random.h File crypto/random.h (right): https://codereview.chromium.org/165393003/diff/40001/crypto/random.h#newcode21 crypto/random.h:21: base::RandBytes(bytes, length); I think this makes the compile-time people ...
6 years, 10 months ago (2014-02-14 15:52:48 UTC) #4
danakj
cc LGTM
6 years, 10 months ago (2014-02-14 16:55:09 UTC) #5
piman
On 2014/02/14 15:52:48, agl wrote: > https://codereview.chromium.org/165393003/diff/40001/crypto/random.h > File crypto/random.h (right): > > https://codereview.chromium.org/165393003/diff/40001/crypto/random.h#newcode21 > ...
6 years, 10 months ago (2014-02-14 19:28:47 UTC) #6
agl
LGTM with qualifications. If Justin is happy with calling base::RandBytes directly, I think that's better. ...
6 years, 10 months ago (2014-02-14 22:15:38 UTC) #7
jschuh
On 2014/02/14 22:15:38, agl wrote: > LGTM with qualifications. > > If Justin is happy ...
6 years, 10 months ago (2014-02-14 22:26:25 UTC) #8
jamesr
lgtm
6 years, 10 months ago (2014-02-14 22:29:57 UTC) #9
piman
+rsleevi ^^^
6 years, 10 months ago (2014-02-14 22:49:50 UTC) #10
Ryan Sleevi
On 2014/02/14 22:49:50, piman wrote: > +rsleevi ^^^ I'm fine with calling base::RandBytes directly from ...
6 years, 10 months ago (2014-02-14 23:20:00 UTC) #11
Ryan Sleevi
https://codereview.chromium.org/165393003/diff/160001/crypto/random.h File crypto/random.h (right): https://codereview.chromium.org/165393003/diff/160001/crypto/random.h#newcode21 crypto/random.h:21: base::RandBytes(bytes, length); Oh, missed this change. Don't do this.
6 years, 10 months ago (2014-02-14 23:20:49 UTC) #12
piman
crypto/ bits gone in latest PS.
6 years, 10 months ago (2014-02-14 23:36:35 UTC) #13
piman
The CQ bit was checked by piman@chromium.org
6 years, 10 months ago (2014-02-15 00:57:52 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/165393003/240001
6 years, 10 months ago (2014-02-15 01:14:00 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-15 02:17:44 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel
6 years, 10 months ago (2014-02-15 02:17:44 UTC) #17
piman
The CQ bit was checked by piman@chromium.org
6 years, 10 months ago (2014-02-15 05:56:24 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/165393003/240001
6 years, 10 months ago (2014-02-15 05:56:30 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-15 05:56:53 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel
6 years, 10 months ago (2014-02-15 05:56:53 UTC) #21
piman
The CQ bit was checked by piman@chromium.org
6 years, 10 months ago (2014-02-15 10:08:50 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/165393003/240001
6 years, 10 months ago (2014-02-15 10:08:58 UTC) #23
commit-bot: I haz the power
Change committed as 251570
6 years, 10 months ago (2014-02-15 14:22:42 UTC) #24
awong
drive-by nit...technially, we're using the wrong API for RandBytes(). Also, mdempsky points out that this ...
6 years, 10 months ago (2014-02-26 19:19:21 UTC) #25
Ryan Sleevi
6 years, 10 months ago (2014-02-26 19:24:40 UTC) #26
Message was sent while issue was closed.
On 2014/02/26 19:19:21, awong wrote:
> drive-by nit...technially, we're using the wrong API for RandBytes().
> 
> Also, mdempsky points out that this should just be a "using base::RandBytes"
> inside the crypto namespace.
> 
>
https://codereview.chromium.org/165393003/diff/240001/gpu/command_buffer/comm...
> File gpu/command_buffer/common/mailbox.cc (right):
> 
>
https://codereview.chromium.org/165393003/diff/240001/gpu/command_buffer/comm...
> gpu/command_buffer/common/mailbox.cc:38: base::RandBytes(result.name,
> sizeof(result.name));
> Use crypto::RandBytes() instead?

No. See my comments #11/#12.

Powered by Google App Engine
This is Rietveld 408576698