fn patch_syscall_with_hook_x86ish(
    _patcher: &MonkeyPatcher,
    _t: &RecordTask,
    _hook: syscall_patch_hook,
) -> bool {
    unimplemented!()
}
/// Some functions make system calls while storing local variables in memory
/// below the stack pointer. We need to decrement the stack pointer by
/// some "safety zone" amount to get clear of those variables before we make
/// a call instruction. So, we allocate a stub per patched callsite, and jump
/// from the callsite to the stub. The stub decrements the stack pointer,
/// calls the appropriate syscall hook function, reincrements the stack pointer,
/// and jumps back to immediately after the patched callsite.
///
/// It's important that gdb stack traces work while a thread is stopped in the
/// syscallbuf code. To ensure that the above manipulations don't foil gdb's
/// stack walking code, we add CFI data to all the stubs. To ease that, the
/// stubs are written in assembly and linked into the preload library.
///
/// On x86-64 with ASLR, we need to be able to patch a call to a stub from
/// sites more than 2^31 bytes away. We only have space for a 5-byte jump
/// instruction. So, we allocate "extender pages" --- pages of memory within
/// 2GB of the patch site, that contain the stub code. We don't really need this
/// on x86, but we do it there too for consistency.
Some functions make system calls while storing local variables in memory
below the stack pointer. We need to decrement the stack pointer by
some "safety zone" amount to get clear of those variables before we make
a call instruction. So, we allocate a stub per patched callsite, and jump
from the callsite to the stub. The stub decrements the stack pointer,
calls the appropriate syscall hook function, reincrements the stack pointer,
and jumps back to immediately after the patched callsite.

It's important that gdb stack traces work while a thread is stopped in the
syscallbuf code. To ensure that the above manipulations don't foil gdb's
stack walking code, we add CFI data to all the stubs. To ease that, the
stubs are written in assembly and linked into the preload library.

On x86-64 with ASLR, we need to be able to patch a call to a stub from
sites more than 2^31 bytes away. We only have space for a 5-byte jump
instruction. So, we allocate "extender pages" --- pages of memory within
2GB of the patch site, that contain the stub code. We don't really need this
on x86, but we do it there too for consistency.
Some functions make system calls while storing local variables in memory below the stack pointer . We need to decrement the stack pointer by some " safety zone " amount to get clear of those variables before we make a call instruction . So we allocate a stub per patched callsite and jump from the callsite to the stub . The stub decrements the stack pointer calls the appropriate syscall hook function reincrements the stack pointer and jumps back to immediately after the patched callsite . It ' s important that gdb stack traces work while a thread is stopped in the syscallbuf code . To ensure that the above manipulations don ' t foil gdb ' s stack walking code we add CFI data to all the stubs . To ease that the stubs are written in assembly and linked into the preload library . On x86 - 64 with ASLR we need to be able to patch a call to a stub from sites more than 2^31 bytes away . We only have space for a 5 - byte jump instruction . So we allocate " extender pages " --- pages of memory within 2GB of the patch site that contain the stub code . We don ' t really need this on x86 but we do it there too for consistency .
fn patch_syscall_with_hook_x86ish(
    _patcher: &MonkeyPatcher,
    _t: &RecordTask,
    _hook: syscall_patch_hook,
) -> bool {
    unimplemented!()
}
fn patch_syscall_with_hook_x86ish ( _patcher : & MonkeyPatcher , _t : & RecordTask , _hook : syscall_patch_hook , ) -> bool { unimplemented ! ( ) }
Some functions make system calls while storing local variables in memory
below the stack pointer.
Some functions make system calls while storing local variables in memory below the stack pointer .
_patcher
&MonkeyPatcher
_t
&RecordTask
_hook
syscall_patch_hook