| OLD | NEW |
| 1 #include "sandbox_impl.h" | 1 #include "sandbox_impl.h" |
| 2 #include "syscall_table.h" | 2 #include "syscall_table.h" |
| 3 | 3 |
| 4 namespace playground { | 4 namespace playground { |
| 5 | 5 |
| 6 void Sandbox::createTrustedThread(int processFdPub, int cloneFdPub, | 6 void Sandbox::createTrustedThread(int processFdPub, int cloneFdPub, |
| 7 SecureMem::Args* secureMem) { | 7 SecureMem::Args* secureMem) { |
| 8 SecureMem::Args args = { { { { { 0 } } } } }; | 8 SecureMem::Args args = { { { { { 0 } } } } }; |
| 9 args.self = &args; | 9 args.self = &args; |
| 10 args.newSecureMem = secureMem; | 10 args.newSecureMem = secureMem; |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 ".pushsection \".rodata\"\n" | 579 ".pushsection \".rodata\"\n" |
| 580 "100:.ascii \"Sandbox violation detected, program aborted\\n\"\n" | 580 "100:.ascii \"Sandbox violation detected, program aborted\\n\"\n" |
| 581 "101:\n" | 581 "101:\n" |
| 582 ".popsection\n" | 582 ".popsection\n" |
| 583 | 583 |
| 584 "999:pop %%rbp\n" | 584 "999:pop %%rbp\n" |
| 585 "pop %%rbx\n" | 585 "pop %%rbx\n" |
| 586 : | 586 : |
| 587 : "g"(&args) | 587 : "g"(&args) |
| 588 : "rax", "rcx", "rdx", "rdi", "rsi", "r8", "r9", "r10", "r11", "r12", | 588 : "rax", "rcx", "rdx", "rdi", "rsi", "r8", "r9", "r10", "r11", "r12", |
| 589 "r13", "r14", "r15" | 589 "r13", "r14", "r15", "rsp", "memory" |
| 590 #elif defined(__i386__) | 590 #elif defined(__i386__) |
| 591 struct user_desc u; | 591 struct user_desc u; |
| 592 u.entry_number = (typeof u.entry_number)-1; | 592 u.entry_number = (typeof u.entry_number)-1; |
| 593 u.base_addr = 0; | 593 u.base_addr = 0; |
| 594 u.limit = 0xfffff; | 594 u.limit = 0xfffff; |
| 595 u.seg_32bit = 1; | 595 u.seg_32bit = 1; |
| 596 u.contents = 0; | 596 u.contents = 0; |
| 597 u.read_exec_only = 0; | 597 u.read_exec_only = 0; |
| 598 u.limit_in_pages = 1; | 598 u.limit_in_pages = 1; |
| 599 u.seg_not_present = 0; | 599 u.seg_not_present = 0; |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 | 1190 |
| 1191 ".pushsection \".rodata\"\n" | 1191 ".pushsection \".rodata\"\n" |
| 1192 "100:.ascii \"Sandbox violation detected, program aborted\\n\"\n" | 1192 "100:.ascii \"Sandbox violation detected, program aborted\\n\"\n" |
| 1193 "101:\n" | 1193 "101:\n" |
| 1194 ".popsection\n" | 1194 ".popsection\n" |
| 1195 | 1195 |
| 1196 "999:pop %%ebp\n" | 1196 "999:pop %%ebp\n" |
| 1197 "pop %%ebx\n" | 1197 "pop %%ebx\n" |
| 1198 : | 1198 : |
| 1199 : "g"(&args) | 1199 : "g"(&args) |
| 1200 : "eax", "ecx", "edx", "edi", "esi" | 1200 : "eax", "ecx", "edx", "edi", "esi", "esp", "memory" |
| 1201 #else | 1201 #else |
| 1202 #error Unsupported target platform | 1202 #error Unsupported target platform |
| 1203 #endif | 1203 #endif |
| 1204 ); | 1204 ); |
| 1205 } | 1205 } |
| 1206 | 1206 |
| 1207 } // namespace | 1207 } // namespace |
| OLD | NEW |