Package: libc6
Version: 2.11.2-10

syscall(__NR_fanotify_mark, fanotify_fd, flags, mask, dfd, pathname),
failed with 'Invalid argument'.
strace shows 'syscall' didn't pass the correct parameters:
    syscall(0x10f1, 0x3, 0x11, 0, 0x20, 0, 0xffffff9c, 0x4013e0)
    ( The expected one is: syscall(0x10f1, 0x3, 0x17, 0x20, 0, -100, 0x4013e0) )

Direct __NR_fanotify_mark call works.

Test platform is fuloong-2f box:
1. CPU: loongson 2f
2. libc6 version 2.11.2-10 and 2.11.2-11
3. Linux-2.6.37 with fanotify enabled (64bit kernel)  (also tried Linux-2.6.38)
4. Debian squeeze mipsel (o32 ABI)

Attachment is the source code of test program, usage:
1. tar xf fanotify-test.tar.bz2
2. cd fanotify-test
3. gcc -o fa-test *.c
4. ./fa-test

Note: modify "missing.h" to switch between indirect __NR_fanotify_mark
syscall and direct syscall.

Attachment: fanotify-test.tar.bz2
Description: BZip2 compressed data

Reply via email to