Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

trap as much syscall into tracee's memory space as possible #44

Open
wangbj opened this issue May 15, 2019 · 0 comments
Open

trap as much syscall into tracee's memory space as possible #44

wangbj opened this issue May 15, 2019 · 0 comments

Comments

@wangbj
Copy link
Collaborator

wangbj commented May 15, 2019

It's kind of lame some syscalls cannot be patched ends up handling by the tracer (regardless early syscalls before LD_PRELOAD), it forces us to write two different versions of the same logic, hence it would be necessary to force syscall to be trapped by the tracee instead. This can be done by:

  • install another RET_TRAP seccomp filter in LD_PRELOAD;
  • replace syscall instruction with predefined reserved x86 instructions, and handle it in tracee's signal handler

Both methods can trap the syscalls we cannot handle at this moment, even they wouldn't be as fast as patched syscalls, they wouldn't be any slower than handle syscalls in tracer either.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant