Hi!
> > > 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.
> > 
> > Does it work on the same kernel with -m64 ?
> > In any case, for the tests to work the kernel needs to have been compiled 
> > with the
> > kernel option CONFIG_FANOTIFY_ACCESS_PERMISSIONS set. In my initial tests 
> > this
> > option wasn't set and I got EINVAL too.
> 
> And it seems to work (-m32 with your patch) on two testing machines with
> slightly older kernel. So I guess that the patch is fine and I had just
> bad luck with one particular machine.

Found the cause:

commit 91c2e0bcae72a3086c698b5de2b950b885abb0e6
Author: Al Viro <[email protected]>
Date:   Tue Mar 5 20:10:59 2013 -0500

    unify compat fanotify_mark(2), switch to COMPAT_SYSCALL_DEFINE
    
    Signed-off-by: Al Viro <[email protected]>


Which was fixed in:

commit 592f6b842f64e416c7598a1b97c649b34241e22d
Author: Heiko Carstens <[email protected]>
Date:   Mon Jan 27 17:07:19 2014 -0800

    compat: fix sys_fanotify_mark
    
    Commit 91c2e0bcae72 ("unify compat fanotify_mark(2), switch to
    COMPAT_SYSCALL_DEFINE") added a new unified compat fanotify_mark syscall
    to be used by all architectures.
    
    Unfortunately the unified version merges the split mask parameter in a
    wrong way: the lower and higher word got swapped.
    
    This was discovered with glibc's tst-fanotify test case.


So kernels between 3.10 and 3.14 are broken.

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to