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

Side by Side Diff: sandbox/linux/seccomp/trusted_thread.cc

Issue 320008: Add assembly constraints to disable some overly aggressive GCC optimizations (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/linux/seccomp/sandbox.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp/sandbox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698