I know that you can trap a system call by using ptrace. But what I wanna do is to ignore a system call. So is that possible for ptrace to trap a system call, see its number and if the number is of a system call that has to be ignored, the ptrace stops the system call from proceeding or have the system call return immediately.
The point is that we should have the effect of having the application ignore particular system calls by using ptrace.
You can try
PTRACE_GETREGSandPTRACE_SETREGS.If you change
eipto be after the system call, andeaxto make the return value valid, the call may be skipped.But I didn't try it, and wouldn't be surprised if it didn't work.