From: Roland McGrath Date: Tue, 5 Jul 2005 09:50:18 +0000 (+0000) Subject: 2005-07-05 Roland McGrath X-Git-Tag: v4.5.18~348 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=520e21f01e73a9998726bf93d7c279c702eca07c;p=strace 2005-07-05 Roland McGrath * mem.c [LINUX] (sys_old_mmap) [X86_64]: Extract 32-bit values if child is 32-bit. Fixes RH#162467. --- diff --git a/mem.c b/mem.c index 636644eb..618212a3 100644 --- a/mem.c +++ b/mem.c @@ -245,6 +245,18 @@ struct tcb *tcp; for (i=0; i<6; i++) u_arg[i] = tcp->u_arg[i]; #else +# if defined(X86_64) + if (current_personality == 1) { + int i; + for (i = 0; i < 6; ++i) { + unsigned int val; + if (umove(tcp, tcp->u_arg[0] + i * 4, &val) == -1) + return 0; + u_arg[i] = val; + } + } + else +# endif if (umoven(tcp, tcp->u_arg[0], sizeof u_arg, (char *) u_arg) == -1) return 0; #endif // defined(IA64)