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

Issue 1274223003: Auto-sandboxing: Switch to automatic scratch register invalidation (Closed)

Created:
5 years, 4 months ago by Derek Schuff
Modified:
5 years, 4 months ago
Reviewers:
dominickd
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Auto-sandboxing: Switch to automatic scratch register invalidation Currently scratch registers are tracked as an explicit stack. Instead, use a model where any number of scratch registers can be specified with .scratch, and they are automatically removed from the list when they are overwritten by user-written instructions. R=dominickd@google.com Committed: https://chromium.googlesource.com/native_client/pnacl-llvm/+/f9aa2db4660a545e53ac71e4020e833392e3991e

Patch Set 1 #

Total comments: 2

Patch Set 2 : add validity check for ARM scratch registers #

Patch Set 3 : rebase #

Patch Set 4 : add flag to tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -55 lines) Patch
M include/llvm/MC/MCNaClExpander.h View 1 2 2 chunks +6 lines, -4 lines 0 comments Download
M lib/MC/MCNaClExpander.cpp View 1 2 1 chunk +17 lines, -9 lines 0 comments Download
M lib/MC/MCParser/NaClAsmParser.cpp View 3 chunks +5 lines, -6 lines 0 comments Download
M lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M lib/Target/X86/MCTargetDesc/X86MCNaClExpander.h View 1 chunk +3 lines, -0 lines 0 comments Download
M lib/Target/X86/MCTargetDesc/X86MCNaClExpander.cpp View 3 chunks +11 lines, -0 lines 0 comments Download
A test/MC/ARM/nacl-autosandbox/scratch-invalid.s View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A test/MC/ARM/nacl-autosandbox/scratch-invalid-pc.s View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A test/MC/X86/nacl-autosandbox/scratch-2nd-register.s View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
A + test/MC/X86/nacl-autosandbox/scratch-clear.s View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A test/MC/X86/nacl-autosandbox/scratch-clear-2reg.s View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
A + test/MC/X86/nacl-autosandbox/scratch-clear-2x.s View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
A test/MC/X86/nacl-autosandbox/scratch-clear-bare.s View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A test/MC/X86/nacl-autosandbox/scratch-invalid-stack.s View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A test/MC/X86/nacl-autosandbox/scratch-invalidate.s View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
A test/MC/X86/nacl-autosandbox/scratch-invalidate-implicit.s View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
D test/MC/X86/nacl-autosandbox/scratch-pushpop.s View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
D test/MC/X86/nacl-autosandbox/scratch-pushpop-3x.s View 1 2 1 chunk +0 lines, -11 lines 0 comments Download
D test/MC/X86/nacl-autosandbox/unscratch-2x-fail.s View 1 2 1 chunk +0 lines, -8 lines 0 comments Download
D test/MC/X86/nacl-autosandbox/unscratch-fail.s View 1 2 1 chunk +0 lines, -7 lines 0 comments Download
M test/MC/X86/nacl-autosandbox/x86-64-stack-pushpop.s View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Derek Schuff
5 years, 4 months ago (2015-08-06 17:15:07 UTC) #1
dominickd
https://codereview.chromium.org/1274223003/diff/1/lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp File lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp (right): https://codereview.chromium.org/1274223003/diff/1/lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp#newcode34 lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp:34: Shouldn't PC or SP return false?
5 years, 4 months ago (2015-08-06 17:45:20 UTC) #2
Derek Schuff
PTAL https://codereview.chromium.org/1274223003/diff/1/lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp File lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp (right): https://codereview.chromium.org/1274223003/diff/1/lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp#newcode34 lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp:34: On 2015/08/06 17:45:20, dominickd wrote: > Shouldn't PC ...
5 years, 4 months ago (2015-08-06 20:46:01 UTC) #3
dominickd
On 2015/08/06 20:46:01, Derek Schuff wrote: > PTAL > > https://codereview.chromium.org/1274223003/diff/1/lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp > File lib/Target/ARM/MCTargetDesc/ARMMCNaClExpander.cpp (right): ...
5 years, 4 months ago (2015-08-06 20:47:34 UTC) #4
Derek Schuff
On 2015/08/06 20:47:34, dominickd wrote: > On 2015/08/06 20:46:01, Derek Schuff wrote: > > PTAL ...
5 years, 4 months ago (2015-08-06 20:56:54 UTC) #5
Derek Schuff
5 years, 4 months ago (2015-08-07 23:47:04 UTC) #6
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
f9aa2db4660a545e53ac71e4020e833392e3991e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698