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

Issue 5738003: Resurrect Petr's 64-bit dynamic code modification CL:... (Closed)

Created:
10 years ago by elijahtaylor (use chromium)
Modified:
9 years, 7 months ago
Reviewers:
bsy, Mark Seaborn, Karl
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Resurrect Petr's 64-bit dynamic code modification CL: http://codereview.chromium.org/3975001/ previous CL description: Dynamic code modification support for x64 NaCl modules 1) enables validation of modified code 2) enables thread-safe copying of code modification 3) added tests to exercise dynamic code modification BUG= none TEST= run_dynamic_load_test Committed: http://src.chromium.org/viewvc/native_client?view=rev&revision=4100

Patch Set 1 #

Total comments: 8

Patch Set 2 : fix first round of my own feedback #

Total comments: 20

Patch Set 3 : addressing bsy's feedback #

Patch Set 4 : added test for double-break condition #

Total comments: 4

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : add stdint header to test #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+727 lines, -98 lines) Patch
M src/trusted/service_runtime/sel_validate_image.c View 1 2 3 4 5 6 7 5 chunks +48 lines, -18 lines 0 comments Download
M src/trusted/validator_x86/nccopycode.h View 1 2 3 4 5 6 7 1 chunk +16 lines, -1 line 0 comments Download
M src/trusted/validator_x86/nccopycode.c View 1 2 3 4 5 6 7 6 chunks +87 lines, -13 lines 0 comments Download
M src/trusted/validator_x86/ncvalidate_iter.h View 1 2 3 4 5 6 7 2 chunks +37 lines, -0 lines 0 comments Download
M src/trusted/validator_x86/ncvalidate_iter.c View 1 2 3 4 5 6 7 3 chunks +205 lines, -1 line 0 comments Download
M tests/dynamic_code_loading/dynamic_load_test.c View 1 2 3 4 5 6 7 10 chunks +34 lines, -18 lines 0 comments Download
M tests/dynamic_code_loading/dynamic_modify_test.c View 1 2 3 4 5 6 7 14 chunks +79 lines, -16 lines 0 comments Download
M tests/dynamic_code_loading/nacl.scons View 1 2 3 4 5 6 7 2 chunks +15 lines, -14 lines 0 comments Download
M tests/dynamic_code_loading/templates.h View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M tests/dynamic_code_loading/templates_arm.S View 1 2 3 4 5 6 7 1 chunk +24 lines, -0 lines 0 comments Download
M tests/dynamic_code_loading/templates_x86.S View 1 2 3 4 5 6 7 3 chunks +170 lines, -17 lines 0 comments Download
M tests/inbrowser_test_runner/nacl.scons View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M tests/inbrowser_test_runner/test_runner.html View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
elijahtaylor (use chromium)
This first rev is the direct patch from http://codereview.chromium.org/3975001/, I'm taking it over to get ...
10 years ago (2010-12-10 20:01:40 UTC) #1
Karl
I will look more at the changes later, but the points you bring out are ...
10 years ago (2010-12-10 21:18:15 UTC) #2
elijahtaylor (use chromium)
Addressed all of these issues. On 2010/12/10 21:18:15, Karl wrote: > I will look more ...
10 years ago (2010-12-11 01:30:02 UTC) #3
Karl
The validator/sel_loader look good to me. However, I do not know enough about what the ...
10 years ago (2010-12-13 20:38:42 UTC) #4
bsy
some feedback. most important: please add a test that would have exposed the double break ...
10 years ago (2010-12-15 04:06:50 UTC) #5
elijahtaylor (use chromium)
Feedback addressed (one push back and one not done because of questions) I will craft ...
10 years ago (2010-12-15 21:26:37 UTC) #6
elijahtaylor (use chromium)
Added test to exercise the 'goto' code. I didn't test all cases because I wasn't ...
10 years ago (2010-12-15 22:24:40 UTC) #7
bsy
a few style/comment nits. o/w lgtm. thanx for being on top of this! http://codereview.chromium.org/5738003/diff/32001/src/trusted/service_runtime/sel_validate_image.c File ...
9 years, 11 months ago (2011-01-05 00:56:22 UTC) #8
elijahtaylor (use chromium)
9 years, 11 months ago (2011-01-10 19:27:05 UTC) #9
Just a heads up: I'm committing this today once my latest try comes back green
if I don't get any objections.  I fixed the nits from the last round, but also
fixed a couple other test-related things due to redness of the trybots.


On 2011/01/05 00:56:22, bsy wrote:
> a few style/comment nits.  o/w lgtm.  thanx for being on top of this!
> 
>
http://codereview.chromium.org/5738003/diff/32001/src/trusted/service_runtime...
> File src/trusted/service_runtime/sel_validate_image.c (right):
> 
>
http://codereview.chromium.org/5738003/diff/32001/src/trusted/service_runtime...
> src/trusted/service_runtime/sel_validate_image.c:154: if (vstate == NULL) {
> plz use NULL == vstate style in TCB code.
> 
>
http://codereview.chromium.org/5738003/diff/32001/src/trusted/validator_x86/n...
> File src/trusted/validator_x86/nccopycode.h (right):
> 
>
http://codereview.chromium.org/5738003/diff/32001/src/trusted/validator_x86/n...
> src/trusted/validator_x86/nccopycode.h:13: /* copies code from src to dest in
a
> thread safe way, returns 0 on success */
> what do non-zero values mean?
> 
>
http://codereview.chromium.org/5738003/diff/32001/src/trusted/validator_x86/n...
> src/trusted/validator_x86/nccopycode.h:18: int NaClCopyCodeIter(uint8_t *dst,
> uint8_t *src,
> plz add comment on return value convention.  this seems a little weird, in
that
> 0 is success and 1 is failure.  in the rest of the TCB, we have bool style
> functions and syscall style functions, where the former style used 0/1 for
> failure/success, and the latter style used negated errno values for (a range
of)
> failures and others indicate success.
> 
> consider switching to one of these, probably the bool style.
> 
>
http://codereview.chromium.org/5738003/diff/32001/tests/dynamic_code_loading/...
> File tests/dynamic_code_loading/dynamic_modify_test.c (right):
> 
>
http://codereview.chromium.org/5738003/diff/32001/tests/dynamic_code_loading/...
> tests/dynamic_code_loading/dynamic_modify_test.c:156: assert(first_diff>0 &&
> first_diff<=sizeof(buf));
> spaces around <= and >

Powered by Google App Engine
This is Rietveld 408576698