and what syscall_fixup() is expected to do. Comments only, no code changes.
#define TCB_FOLLOWFORK 00400 /* Process should have forks followed */
#define TCB_REPRINT 01000 /* We should reprint this syscall on exit */
#ifdef LINUX
+/* x86 does not need TCB_WAITEXECVE.
+ * It can detect execve's SIGTRAP by looking at eax/rax.
+ * See "stray syscall exit: eax = " message in syscall_fixup().
+ */
# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) || defined(MIPS) || defined(BFIN)
# define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */
# endif
return scno;
}
+/* Called in trace_syscall() at each syscall entry and exit.
+ * Returns:
+ * 0: "ignore this syscall", bail out of trace_syscall() silently.
+ * 1: ok, continue in trace_syscall().
+ * other: error, trace_syscall() should print error indicator
+ * ("????" etc) and bail out.
+ */
static int
syscall_fixup(tcp)
struct tcb *tcp;