(ptrace) regs->orig_ax == -1 upon (rt_)sigreturn syscall exit
From: Robert ÅwiÄcki
Date: Thu Apr 28 2011 - 14:01:25 EST
Hi, while ptrace()'ing a process which performs (rt_)sigreturn the
regs->orig_ax field upon syscall exit is set to -1 in
restore_sigcontext() (both in 32 and 64bit modes) with the following
comment:
regs->orig_ax = -1; /* disable syscall checks */
As far as I understand this field (regs->orig_ax) should be a copy of
regs->ax from before syscall enter, and basically should display a
syscall number (even upon syscall exit). Therefore I was wondering if
the current behavior isn't too hackish and in order to achieve some
goals it is breaking the intended behavior. I guess I could prepare a
patch which "fixes" this unless there are any strong reasons to leave
it as is.
--
Robert ÅwiÄcki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/