From caca5ffa120edb102927184b0b20ea2abce9630e Mon Sep 17 00:00:00 2001 From: John Reiser Date: Mon, 9 Jul 2001 18:22:08 +0000 Subject: [PATCH] keep zeroed stack as clean as possible (Sebastian ) l_lx_sep86.asm fold_elf86.asm committer: jreiser 994702928 +0000 --- src/stub/fold_elf86.asm | 3 +-- src/stub/l_lx_sep86.asm | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/stub/fold_elf86.asm b/src/stub/fold_elf86.asm index e28d5d31..303a4431 100644 --- a/src/stub/fold_elf86.asm +++ b/src/stub/fold_elf86.asm @@ -101,8 +101,7 @@ EXTERN make_hatch mov ch, PAGE_SIZE>>8 ; 0x1000 add ecx, [p_memsz + szElf32_Ehdr + ebx] ; length to unmap mov bh, 0 ; from 0x401000 to 0x400000 - push byte __NR_munmap - pop eax + mov eax, __NR_munmap ; do not dirty the stack with push byte + pop jmp edx ; unmap ourselves via escape hatch, then goto entry do_auxv: ; entry: %esi=src = &argc; %edi=dst. exit: %edi= &AT_NULL diff --git a/src/stub/l_lx_sep86.asm b/src/stub/l_lx_sep86.asm index 70548e69..f8ed7dfc 100644 --- a/src/stub/l_lx_sep86.asm +++ b/src/stub/l_lx_sep86.asm @@ -196,8 +196,7 @@ EXTERN make_hatch mov ebx, ebp and ebx, ecx ; round down to page boundary neg ecx ; PAGE_SIZE (this stub fits in it) - push byte __NR_munmap - pop eax + mov eax, __NR_munmap ; do not dirty the stack with push byte + pop jmp edx ; unmap ourselves, then goto entry do_auxv: ; entry: %esi=src = &argc; %edi=dst. exit: %edi= &AT_NULL