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: <004a01cf5ebe$4b701eb0$e2505c10$@samsung.com>
Date:	Wed, 23 Apr 2014 15:36:01 +0900
From:	Namjae Jeon <namjae.jeon@...sung.com>
To:	'Zheng Liu' <gnehzuil.liu@...il.com>
Cc:	'Theodore Ts'o' <tytso@....edu>,
	'linux-ext4' <linux-ext4@...r.kernel.org>,
	'Lukáš Czerner' <lczerner@...hat.com>
Subject: RE: [PATCH] ext4: use EINVAL if not a regular file in ext4_fallocate()

> On Sat, Apr 19, 2014 at 02:11:07PM +0900, Namjae Jeon wrote:
> > From: Namjae Jeon <namjae.jeon@...sung.com>
> >
> > Punch hole return EOPNOTSUPP about a non-REGULAR file also. So change EINVAL
> > to be consistent with xfs. And move this check to the start of
> > ext4_fallocate().
> 
> IMHO, EOPNOTSUPP makes sense to me.  From the man page of fallocate(2):
Hi Zheng.
IMHO, EOPNOTSUPP should be used where the operation is not yet implemented but
there is some chance that it could be implemented in future.
for example, it is ok for FS which has not yet implemented punch hole to
return EOPNOTSUPP as they could implement it in future. but for the cases where
it does not make sense to implement the operation, for example punching hole
for non regular files does not make any sense, it is better to use EINVAL.
On these lines, I agree that returning EOPNOTSUPP for collapse range in case of
non-extent based file is ok, as it is plausible to implemet collapse range for
non extent files in future.

Thanks for your opinion!

> 
> EOPNOTSUPP
>       The filesystem containing the file referred to by fd does not
>       support this operation; or the mode is not supported by the
>       filesystem containing the file referred to by fd.
> 
> Regards,
>                                                 - Zheng
> 
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ