[PATCH] hppa: fix fanotify_mark decoding

Mike Frysinger vapier at gentoo.org
Thu Feb 26 19:16:13 UTC 2015


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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fanotify.c b/fanotify.c
index e421b01..63816b8 100644
--- a/fanotify.c
+++ b/fanotify.c
@@ -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)
-- 
2.3.0





More information about the Strace-devel mailing list