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] [thread-next>] [day] [month] [year] [list]
Message-ID: <174553064961.1160461.9412670014664878384.stgit@frogsfrogsfrogs>
Date: Thu, 24 Apr 2025 14:41:18 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 02/16] fuse2fs: return -EOPNOTSUPP when we don't recognize a
 fallocate mode

From: Darrick J. Wong <djwong@...nel.org>

If we don't recognize a set bit in the mode parameter to fallocate,
return EOPNOTSUPP to communicate that we don't support that mode instead
of EINVAL.  This avoids unnecessary failures in generic/521 such as:

generic/521       - output mismatch (see /var/tmp/fstests/generic/521.out.bad)
    --- tests/generic/521.out   2025-01-30 10:00:16.898276477 -0800
    +++ /var/tmp/fstests/generic/521.out.bad    2025-04-03 14:46:20.019822396 -0700
    @@ -1,2 +1,9 @@
     QA output created by 521
    +zero range: 0x407ca to 0x52885
    +do_zero_range: fallocate: Invalid argument

Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
 misc/fuse2fs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 5a92e54031a8b7..e5f3cec083c0f5 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -3630,7 +3630,7 @@ static int op_fallocate(const char *path EXT2FS_ATTR((unused)), int mode,
 
 	/* Catch unknown flags */
 	if (mode & ~(FL_PUNCH_HOLE_FLAG | FL_KEEP_SIZE_FLAG))
-		return -EINVAL;
+		return -EOPNOTSUPP;
 
 	pthread_mutex_lock(&ff->bfl);
 	if (!fs_writeable(fs)) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ