]> granicus.if.org Git - strace/commitdiff
hppa: fix fanotify_mark decoding
authorMike Frysinger <vapier@gentoo.org>
Thu, 26 Feb 2015 19:16:13 +0000 (14:16 -0500)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 26 Feb 2015 20:02:03 +0000 (20:02 +0000)
The parisc kernel has some legacy baggage here and decodes the 64bit
field in the reverse order.  Handle it in strace too.

* fanotify.c [HPPA] (sys_fanotify_mark): Reverse the mask bits.

fanotify.c

index e421b01e23ef572c7bafcedc4bb9f4a0782ce635..63816b8d3e9a5b15fd09e468b87f73d91f7c223f 100644 (file)
@@ -52,6 +52,10 @@ sys_fanotify_mark(struct tcb *tcp)
         * but kernel uses the lower 32 bits only.
         */
        argn = getllval(tcp, &mask, 2);
+#ifdef HPPA
+       /* Parsic is weird.  See arch/parisc/kernel/sys_parisc32.c.  */
+       mask = (mask << 32) | (mask >> 32);
+#endif
        printflags(fan_event_flags, mask, "FAN_???");
        tprints(", ");
        if ((int) tcp->u_arg[argn] == FAN_NOFD)