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: <20241006145904.GE4017910@ZenIV>
Date: Sun, 6 Oct 2024 15:59:04 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: kernel test robot <oliver.sang@...el.com>
Cc: Christian Göttsche <cgzones@...glemail.com>,
	oe-lkp@...ts.linux.dev, lkp@...el.com,
	linux-fsdevel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
	Christian Brauner <brauner@...nel.org>, linux-alpha@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
	linux-mips@...r.kernel.org, linux-parisc@...r.kernel.org,
	linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
	linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
	audit@...r.kernel.org, linux-api@...r.kernel.org,
	linux-arch@...r.kernel.org
Subject: Re: [viro-vfs:work.xattr2] [fs/xattr]  64d47e878a:
 xfstests.xfs.046.fail

On Sun, Oct 06, 2024 at 10:20:57PM +0800, kernel test robot wrote:

> xfs/046       - output mismatch (see /lkp/benchmarks/xfstests/results//xfs/046.out.bad)
>     --- tests/xfs/046.out	2024-09-30 21:13:44.000000000 +0000
>     +++ /lkp/benchmarks/xfstests/results//xfs/046.out.bad	2024-10-06 05:31:50.379495110 +0000
>     @@ -34,4 +34,8 @@
>      xfsrestore: restore complete: SECS seconds elapsed
>      xfsrestore: Restore Status: SUCCESS
>      Comparing listing of dump directory with restore directory
>     +ls: /fs/scratch/dumpdir/sub/a-link: No such file or directory
>     +ls: /fs/scratch/dumpdir/sub/b-link: No such file or directory
>     +ls: /fs/scratch/restoredir/dumpdir/sub/a-link: No such file or directory
>     +ls: /fs/scratch/restoredir/dumpdir/sub/b-link: No such file or directory
>     ...
>     (Run 'diff -u /lkp/benchmarks/xfstests/tests/xfs/046.out /lkp/benchmarks/xfstests/results//xfs/046.out.bad'  to see the entire diff)
> Ran: xfs/046
> Failures: xfs/046
> Failed 1 of 1 tests

*stares*

D'oh...  Inverted sense for AT_SYMLINK_NOFOLLOW => LOOKUP_FLAGS...

Try this:

diff --git a/fs/xattr.c b/fs/xattr.c
index 0b506b6565b7..b96cca3f4bf8 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -721,7 +721,7 @@ static int path_setxattrat(int dfd, const char __user *pathname,
 	if ((at_flags & ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) != 0)
 		return -EINVAL;
 
-	if (at_flags & AT_SYMLINK_NOFOLLOW)
+	if (!(at_flags & AT_SYMLINK_NOFOLLOW))
 		lookup_flags = LOOKUP_FOLLOW;
 
 	error = setxattr_copy(name, &ctx);
@@ -880,7 +880,7 @@ static ssize_t path_getxattrat(int dfd, const char __user *pathname,
 		return file_getxattr(fd_file(f), &ctx);
 	} else {
 		int lookup_flags = 0;
-		if (at_flags & AT_SYMLINK_NOFOLLOW)
+		if (!(at_flags & AT_SYMLINK_NOFOLLOW))
 			lookup_flags = LOOKUP_FOLLOW;
 		return filename_getxattr(dfd, filename, lookup_flags, &ctx);
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ