History log of /external/ltp/testcases/kernel/syscalls/fanotify/fanotify.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ff96476bbaaa4685a94813e370bfa4de47884976 29-Jul-2014 Helge Deller <deller@gmx.de> fix fanotify syscall (again)

This patch to some degree reverts my last patch which was committed as:
commit 5d08e164964e19be693e6e8fddf3afb82e505b4f
Author: Helge Deller <deller@gmx.de>
Date: Wed Apr 16 21:00:28 2014 +0200
fix fanotify syscall check on compat kernel

The problem is, that fanotify_mark() uses a 64bit parameter (mask).
When calling this syscall with it's 64bit parameter on a 32bit arch it is very
architecture and compiler dependend, in which order the lower and higher 32bits
are put on the stack and thus ends up in the arguments for the Linux kernel.

So, to avoid any problems we really need to call this syscall the same way as
it's defined by glibc.

This patch drops the myfanotify*() functions and uses the fanotify*() functions
directly from the glibc header <sys/fanotify.h> if available. If the header is
not available, it will provide wrapped syscalls as fallback.

Furthermore, in the fanotify03 testcase it will now correctly return TCONF instead
of TFAIL if the CONFIG_FANOTIFY_ACCESS_PERMISSIONS kernel config option has not been
set in the currently running Linux kernel.

Tested on the hppa/parisc 32- and 64bit architecture.

Signed-off-by: Helge Deller <deller@gmx.de>
/external/ltp/testcases/kernel/syscalls/fanotify/fanotify.h
5d08e164964e19be693e6e8fddf3afb82e505b4f 16-Apr-2014 Helge Deller <deller@gmx.de> fix fanotify syscall check on compat kernel

The fanotify[0-5] testcases use the myfanotify_mark() wrapper for the
fanotify_mark() syscall. But the #define does not take into account, that
the mask field is actually of type _u64 where we need to split the hi
and low word in the syscall on a 32bit arch.

The attached patch converts the #define to a inline function where
the compiler will help to convert the given values to the correct types
(e.g. unsigned long).

Bug found and tested on the parisc/hppa (32bit userspace with 64bit
kernel) arch.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/fanotify/fanotify.h
f057c1c9861cf87ffa94d96702bbac6714e71c3f 20-Nov-2013 Jan Kara <jack@suse.cz> fanotify: Add tests verifying fanotify syscalls

Signed-off-by: Jan Kara <jack@suse.cz>
/external/ltp/testcases/kernel/syscalls/fanotify/fanotify.h