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

Unified Diff: src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c

Issue 11368024: [MIPS] Restore the trusted stack in NaClSyscallSeg. (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Update Copyright headers. Remote presubmit complained about it. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c
diff --git a/src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c b/src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c
index 5aabbedc1ccbf070514acf6eedd55613eddeaf56..a5cb67dd6d7eb514788b3f7e43615ad6a433d3fa 100644
--- a/src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c
+++ b/src/trusted/service_runtime/arch/mips/nacl_switch_to_app_mips.c
@@ -26,7 +26,7 @@ NORETURN void NaClStartThreadInApp(struct NaClAppThread *natp,
uint32_t new_prog_ctr) {
struct NaClThreadContext *context;
- natp->user.trusted_stack_ptr = (NaClGetStackPtr() & ~0xf) + 4;
+ natp->user.trusted_stack_ptr = NaClGetStackPtr() & ~NACL_STACK_ALIGN_MASK;
context = &natp->user;
context->new_prog_ctr = new_prog_ctr;
@@ -41,11 +41,6 @@ NORETURN void NaClStartThreadInApp(struct NaClAppThread *natp,
context->sysret = context->stack_ptr;
/*
- * Just to be sure that app does not spoil gp
- */
- context->global_ptr = NaClGetGlobalPtr();
-
- /*
* context stored in $a0
*/
NaClSwitch(context);
« no previous file with comments | « src/trusted/service_runtime/arch/mips/nacl_switch.S ('k') | src/trusted/service_runtime/arch/mips/nacl_syscall.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698