[PATCH] sys_semtimedop(): fix timeval argument index in wrapped call

Dmitry V. Levin ldv at altlinux.org
Fri Dec 7 21:12:58 UTC 2012

On Fri, Dec 07, 2012 at 09:30:51PM +0100, Stanislav Brabec wrote:
> Looking at the implementation of wrapped semtimedop() call inside glibc
> and kernel, I started to believe, that timeval should be located in
> tcp->u_arg[4] and not tcp->u_arg[5].

Yes, in indirect_ipccall non-s390 case its canonical location is

> For unknown reason, tcp->u_arg[5] works correctly as well.

The reason is decode_ipc_subcall() that makes
tcp->u_arg[tcp->u_nargs-1] == tcp->u_arg[tcp->u_nargs].

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20121208/a6952fd2/attachment.bin>

More information about the Strace-devel mailing list