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

Unified Diff: src/trusted/service_runtime/arch/x86_32/springboard.S

Issue 10829110: Fix two register leaks in the trusted->untrusted context switch (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix comment Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/trusted/service_runtime/arch/x86_32/springboard.S
diff --git a/src/trusted/service_runtime/arch/x86_32/springboard.S b/src/trusted/service_runtime/arch/x86_32/springboard.S
index 03eb0dd259611b53fa9992a9a15aca145b6fb04e..c88199dabba4b1f8164a1f3dd5890391824b697d 100644
--- a/src/trusted/service_runtime/arch/x86_32/springboard.S
+++ b/src/trusted/service_runtime/arch/x86_32/springboard.S
@@ -29,6 +29,8 @@ DEFINE_GLOBAL_HIDDEN_IDENTIFIER(NaCl_springboard):
mov NACL_THREAD_CONTEXT_OFFSET_SYSRET(%ecx), %eax
lss NACL_THREAD_CONTEXT_OFFSET_STACK_PTR(%ecx), %esp
movw NACL_THREAD_CONTEXT_OFFSET_DS(%ecx), %ds
+ /* Set %ecx to zero to avoid leaking the NaClThreadContext address */
+ xorl %ecx, %ecx
jmp *%edx
DEFINE_GLOBAL_HIDDEN_IDENTIFIER(NaCl_springboard_end):
« no previous file with comments | « src/trusted/service_runtime/arch/arm/nacl_switch.S ('k') | src/trusted/service_runtime/arch/x86_64/nacl_switch_64.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698