From: Eugene Syromyatnikov Date: Mon, 29 Aug 2016 20:56:24 +0000 (+0300) Subject: futex: fix FUTEX_WAKE_OP compare function mask X-Git-Tag: v4.14~154 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfa22a596fc6ae7f706b0d1321210021af8bcbab;p=strace futex: fix FUTEX_WAKE_OP compare function mask According to the initial and current (v4.7) kernel implementations, in FUTEX_WAKE_OP case the compare function does not have FUTEX_OP_OPARG_SHIFT flag and occupies 4 bits starting with bit 24. * futex.c (SYS_FUNC(futex)): Do not print FUTEX_OP_OPARG_SHIFT for 27th bit of val3 in FUTEX_WAKE_OP case. --- diff --git a/futex.c b/futex.c index 7090c7d0..92682168 100644 --- a/futex.c +++ b/futex.c @@ -92,9 +92,7 @@ SYS_FUNC(futex) tprints("FUTEX_OP_OPARG_SHIFT|"); printxval(futexwakeops, (val3 >> 28) & 0x7, "FUTEX_OP_???"); tprintf(", %u, ", (val3 >> 12) & 0xfff); - if ((val3 >> 24) & 8) - tprints("FUTEX_OP_OPARG_SHIFT|"); - printxval(futexwakecmps, (val3 >> 24) & 0x7, "FUTEX_OP_CMP_???"); + printxval(futexwakecmps, (val3 >> 24) & 0xf, "FUTEX_OP_CMP_???"); tprintf(", %u}", val3 & 0xfff); break; case FUTEX_WAIT_REQUEUE_PI: