[PATCH] hppa: fix fanotify_mark decoding

Dmitry V. Levin ldv at altlinux.org
Thu Feb 26 21:36:18 UTC 2015


On Thu, Feb 26, 2015 at 02:16:13PM -0500, Mike Frysinger wrote:
> 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

Really weird.  What if they stop using sys_parisc32.c?

BTW, syscall names defined in linux/hppa/syscallent.h are out of sync with 
arch/parisc/include/uapi/asm/unistd.h; this is why stat32-v.test fails
there.  And it's not a recent regression, we just didn't tested these
things before.


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


More information about the Strace-devel mailing list