public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Helge Deller <deller@gmx.de>
Cc: ltp-list@lists.sourceforge.net, Mike Frysinger <vapier@gentoo.org>
Subject: Re: [LTP] [PATCH] fix fanotify syscall check on compat kernel
Date: Thu, 17 Apr 2014 11:33:29 +0200	[thread overview]
Message-ID: <20140417093329.GA6558@rei.suse.cz> (raw)
In-Reply-To: <20140416190028.GA2093@ls3530.fritz.box>

Hi!
>  #ifndef	__FANOTIFY_H__
>  #define	__FANOTIFY_H__
>  
> +#include <sys/types.h>
> +#include <endian.h>
> +#include "config.h"
> +#include "linux_syscall_numbers.h"
> +
>  /* fanotify(7) wrappers */
>  
>  #define	myfanotify_init(flags, event_f_flags) \
>  	syscall(__NR_fanotify_init, flags, event_f_flags)
>  
> -#define	myfanotify_mark(fd, flags, mask, dfd, pathname)	\
> -	syscall(__NR_fanotify_mark, fd, flags, mask, dfd, pathname)
> +long myfanotify_mark(int fd, unsigned int flags, unsigned long long mask, int dfd, const char *pathname)
> +{
> +#if __WORDSIZE == 64
> +	return ltp_syscall(__NR_fanotify_mark, fd, flags, mask, dfd, pathname);
> +#else
> +	return ltp_syscall(__NR_fanotify_mark, fd, flags,
> +			 __LONG_LONG_PAIR((unsigned long) (mask >> 32),
> +					  (unsigned long) mask),
> +			 dfd, (unsigned long) pathname);
> +#endif
> +}

I think that the x32 ABI should be handled here as well (as in the
fallocate.h). Mike can you confirm?

Also I've been unable to make the testcases work with -m32 on x86_64
both with and without the patch and even when using glibc wrappers from
sys/fallocate.h, in all cases the error is EINVAL which suggets that the
parameters are passed wrongly somewhere on the way.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2014-04-17  9:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 19:00 [LTP] [PATCH] fix fanotify syscall check on compat kernel Helge Deller
2014-04-17  9:33 ` chrubis [this message]
     [not found]   ` <trinity-7fc052ce-4544-4fa4-afc0-9b68430ef693-1397729289569@3capp-gmx-bs62>
2014-04-17 10:16     ` chrubis
2014-04-17 13:27     ` chrubis
2014-04-17 15:00       ` chrubis
2014-04-17 16:57 ` chrubis
     [not found]   ` <5350E02B.7080104@gmx.de>
     [not found]     ` <20140418082553.GA3389@ls3530.fritz.box>
2014-04-22 11:57       ` chrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140417093329.GA6558@rei.suse.cz \
    --to=chrubis@suse.cz \
    --cc=deller@gmx.de \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox