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
|