lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOQ4uxhkZ989daUzNos3=7ucsOWx9bRd36gLppA7ttgbquWkeg@mail.gmail.com>
Date: Thu, 26 Jun 2025 13:20:34 +0200
From: Amir Goldstein <amir73il@...il.com>
To: Naresh Kamboju <naresh.kamboju@...aro.org>, Petr Vorel <pvorel@...e.cz>
Cc: LTP List <ltp@...ts.linux.it>, open list <linux-kernel@...r.kernel.org>, 
	linux-stable <stable@...r.kernel.org>, lkft-triage@...ts.linaro.org, 
	Linux Regressions <regressions@...ts.linux.dev>, chrubis <chrubis@...e.cz>, 
	Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, 
	Dan Carpenter <dan.carpenter@...aro.org>, Arnd Bergmann <arnd@...db.de>, 
	Anders Roxell <anders.roxell@...aro.org>
Subject: Re: stable-rc: 5.4 and 5.10: fanotify01.c:339: TFAIL:
 fanotify_mark(fd_notify, 0x00000001, 0x00000008, -100, ".") expected EXDEV:
 ENODEV (19)

On Thu, Jun 26, 2025 at 11:57 AM Amir Goldstein <amir73il@...il.com> wrote:
>
> On Thu, Jun 26, 2025 at 9:03 AM Naresh Kamboju
> <naresh.kamboju@...aro.org> wrote:
> >
> > Regression in the LTP syscalls/fanotify01 test on the Linux stable-rc 5.4
> > and 5.10 kernel after upgrading to LTP version 20250530.
> >
> >  - The test passed with LTP version 20250130
> >  - The test fails with LTP version 20250530
> >
> > Regressions found on stable-rc 5.4 and 5.10 LTP syscalls fanotify01.c
> > fanotify_mark expected EXDEV: ENODEV (19)
> >
> > Regression Analysis:
> >  - New regression? Yes
> >  - Reproducibility? Yes
> >
> > Test regression: stable-rc 5.4 and 5.10
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> >
> > fanotify01.c:339: TFAIL: fanotify_mark(fd_notify, 0x00000001,
> > 0x00000008, -100, ".") expected EXDEV: ENODEV (19)
> >
> > The test expected fanotify_mark() to fail with EXDEV, but received
> > ENODEV instead. This indicates a potential mismatch between updated
> > LTP test expectations and the behavior of the 5.4 kernel’s fanotify
> > implementation.
> >
>
> Yap, that's true.
>
> The change to fanotify01:
> * db197b7b5 - fanotify01: fix test failure when running with nfs TMPDIR
>
> Depends on this kernel change from v6.8:
> * 30ad1938326b - fanotify: allow "weak" fsid when watching a single filesystem
>
> Which fs type is your LTP TMPDIR?
>
> Can you please test this fix:
>
> --- a/testcases/kernel/syscalls/fanotify/fanotify01.c
> +++ b/testcases/kernel/syscalls/fanotify/fanotify01.c
> @@ -374,7 +374,21 @@ static void setup(void)
>         }
>
>         if (fanotify_flags_supported_on_fs(FAN_REPORT_FID,
> FAN_MARK_MOUNT, FAN_OPEN, ".")) {
> -               inode_mark_fid_xdev = (errno == ENODEV) ? EXDEV : errno;
> +               inode_mark_fid_xdev = errno;
> +               if (inode_mark_fid_xdev == ENODEV) {
> +                       /*
> +                        * The fs on TMPDIR has zero fsid.
> +                        * On kernels <  v6.8 an inode mark fails with ENODEV.
> +                        * On kernels >= v6.8 an inode mark is allowed but multi
> +                        * fs inode marks will fail with EXDEV.
> +                        * See kernel commit 30ad1938326b
> +                        * ("fanotify: allow "weak" fsid when watching
> a single filesystem").
> +                        */
> +                       if
> (fanotify_flags_supported_on_fs(FAN_REPORT_FID, FAN_MARK_INODE,
> FAN_OPEN, "."))
> +                               inode_mark_fid_xdev = errno;
> +                       else
> +                               inode_mark_fid_xdev = EXDEV;
> +               }
>                 tst_res(TINFO | TERRNO, "TMPDIR does not support
> reporting events with fid from multi fs");
>         }
>  }
>
>

Please test the attached patch instead.
It is simpler and more correct in some configurations.

Thanks,
Amir.

View attachment "0001-fanotify01-Fix-regression-on-kernels-v6.8.patch" of type "text/x-patch" (2716 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ