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

Issue 2275203002: Make command buffer commands and immediate data volatile (Closed)

Created:
4 years, 4 months ago by piman
Modified:
4 years, 3 months ago
Reviewers:
no sievers
CC:
chromium-reviews, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make command buffer commands and immediate data volatile Because command buffer commands and immediate data live in shared memory that can be modified by an untrusted process, the data must be tagged as volatile to ensure that compiler does not optimize the service-side checks in a way that could cause double reads / TOCTOU issues. Additionally, this provides a good indication that pointers reference attacker-controlled memory. BUG=597625, 597636 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/a728ad1c1b56c5c81c516ad11fead19e569b046e Cr-Commit-Position: refs/heads/master@{#416646}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : fix warnings #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Total comments: 6

Patch Set 6 : std::copy->const_cast+memcpy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3081 lines, -3131 lines) Patch
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 4 chunks +12 lines, -12 lines 0 comments Download
M gpu/command_buffer/client/ring_buffer_test.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M gpu/command_buffer/common/cmd_buffer_common.h View 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 4 chunks +5 lines, -5 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils.h View 1 chunk +4 lines, -4 lines 0 comments Download
M gpu/command_buffer/common/mailbox.h View 1 chunk +6 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/cmd_parser.h View 3 chunks +5 lines, -6 lines 0 comments Download
M gpu/command_buffer/service/cmd_parser.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/common_decoder.h View 4 chunks +8 lines, -8 lines 0 comments Download
M gpu/command_buffer/service/common_decoder.cc View 8 chunks +32 lines, -30 lines 0 comments Download
M gpu/command_buffer/service/common_decoder_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.h View 1 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 161 chunks +695 lines, -516 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_autogen.h View 1 2 253 chunks +906 lines, -1054 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_mock.h View 1 2 chunks +6 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_mock.cc View 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h View 13 chunks +94 lines, -62 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc View 46 chunks +114 lines, -94 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc View 1 2 93 chunks +316 lines, -287 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc View 1 2 266 chunks +837 lines, -1012 lines 0 comments Download
M gpu/command_buffer/service/mocks.h View 3 chunks +14 lines, -14 lines 0 comments Download
M gpu/command_buffer/service/mocks.cc View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 35 (25 generated)
piman
So, I made this CL, it works, but I don't know if we want to ...
4 years, 3 months ago (2016-09-01 00:40:38 UTC) #17
no sievers
On 2016/09/01 00:40:38, piman wrote: > So, I made this CL, it works, but I ...
4 years, 3 months ago (2016-09-01 21:54:46 UTC) #18
piman
On 2016/09/01 21:54:46, sievers wrote: > On 2016/09/01 00:40:38, piman wrote: > > So, I ...
4 years, 3 months ago (2016-09-01 22:30:32 UTC) #19
no sievers
sorry for the delay, lgtm! https://codereview.chromium.org/2275203002/diff/80001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2275203002/diff/80001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode8662 gpu/command_buffer/service/gles2_cmd_decoder.cc:8662: // an extra copy? ...
4 years, 3 months ago (2016-09-02 21:17:34 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2275203002/100001
4 years, 3 months ago (2016-09-02 23:00:22 UTC) #27
piman
https://codereview.chromium.org/2275203002/diff/80001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2275203002/diff/80001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode8662 gpu/command_buffer/service/gles2_cmd_decoder.cc:8662: // an extra copy? On 2016/09/02 21:17:34, sievers_OOOtil_Sep12 wrote: ...
4 years, 3 months ago (2016-09-02 23:11:06 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/274074)
4 years, 3 months ago (2016-09-03 00:19:06 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2275203002/100001
4 years, 3 months ago (2016-09-06 15:46:13 UTC) #32
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 3 months ago (2016-09-06 16:48:25 UTC) #33
commit-bot: I haz the power
4 years, 3 months ago (2016-09-06 16:50:58 UTC) #35
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/a728ad1c1b56c5c81c516ad11fead19e569b046e
Cr-Commit-Position: refs/heads/master@{#416646}

Powered by Google App Engine
This is Rietveld 408576698