|
Add passes for applying SFI sandboxing at the LLVM IR level
* Replace "alloca" with using an explicit stack pointer (Emscripten style)
* Allocate addresses for global variables
* Apply SFI sandboxing to memory accesses (not safe for memcpy() yet)
Indirect calls aren't sandboxed yet.
There's no validator for the generated code, so this assumes a trusted
code generator.
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+758 lines, -2 lines) |
Patch |
|
M |
include/llvm/Transforms/NaCl.h
|
View
|
1
2
3
|
2 chunks |
+13 lines, -0 lines |
0 comments
|
Download
|
|
M |
lib/Bitcode/NaCl/Analysis/LLVMBuild.txt
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A |
lib/Transforms/NaCl/AddSFI.cpp
|
View
|
1
2
3
|
1 chunk |
+116 lines, -0 lines |
0 comments
|
Download
|
|
A |
lib/Transforms/NaCl/AllocateDataSegment.cpp
|
View
|
1
2
3
|
1 chunk |
+105 lines, -0 lines |
0 comments
|
Download
|
|
M |
lib/Transforms/NaCl/CMakeLists.txt
|
View
|
1
2
3
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
lib/Transforms/NaCl/FlattenGlobals.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
lib/Transforms/NaCl/ReplacePtrsWithInts.cpp
|
View
|
1
2
3
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
|
lib/Transforms/NaCl/SandboxIndirectCalls.cpp
|
View
|
1
2
3
|
1 chunk |
+142 lines, -0 lines |
0 comments
|
Download
|
|
A |
lib/Transforms/NaCl/SandboxMemoryAccesses.cpp
|
View
|
1
2
|
1 chunk |
+124 lines, -0 lines |
0 comments
|
Download
|
|
A |
lib/Transforms/NaCl/StripTls.cpp
|
View
|
1
2
3
|
1 chunk |
+57 lines, -0 lines |
0 comments
|
Download
|
|
M |
lib/Transforms/Scalar/LowerAtomic.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/Transforms/NaCl/allocate-data-segment.ll
|
View
|
1
2
3
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/Transforms/NaCl/allocate-data-segment-size.ll
|
View
|
1
2
3
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/Transforms/NaCl/expand-alloca.ll
|
View
|
1
2
3
|
1 chunk |
+45 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/Transforms/NaCl/flatten-globals.ll
|
View
|
1
2
3
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/Transforms/NaCl/sandbox-indirect-calls.ll
|
View
|
1
2
3
|
1 chunk |
+57 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/Transforms/NaCl/sandbox-memory-accesses.ll
|
View
|
1
2
|
1 chunk |
+39 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/Transforms/NaCl/strip-tls.ll
|
View
|
1
2
3
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
tools/opt/opt.cpp
|
View
|
1
2
3
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|