From: Jeff Dike <jdike@ad...> - 2005-10-31 18:05:27
I just saw another case where the stubs are being badly assembled. This cases
involves the address of from being referred relative to ebp. After the
call to syscall6, ebp is trash because, even though we carefully push and
pop it, we pop it from a brand new page.
This interaction between mmap and syscall6 suggests that this is the
wrong interface. It looks more like we should have stub_remap_stack
instead of stub_syscall6, and similar things for the others. Even so,
it's not clear to me how to deal with this. We are out of registers,
so we could possibly store ebp in esp, restore it after the mmap, and
set esp to a fixed value.