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: <7vfuydqp3hrlnld2mf6j5u4bmcecpaxz4pbkbrp2cnsk5lddsu@mvnaqal25dty>
Date: Mon, 26 Jan 2026 17:10:28 +0100
From: Jan Kara <jack@...e.cz>
To: Dorjoy Chowdhury <dorjoychy111@...il.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, 
	viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz, jlayton@...nel.org, 
	chuck.lever@...cle.com, alex.aring@...il.com, arnd@...db.de
Subject: Re: [PATCH v2 1/2] open: new O_REGULAR flag support

On Mon 26-01-26 21:39:21, Dorjoy Chowdhury wrote:
> This flag indicates the path should be opened if it's a regular file.
> A relevant error code ENOTREGULAR(35) has been introduced. For example,
> if open is called on path /dev/null with O_REGULAR in the flag param,
> it will return -ENOTREGULAR.
> 
> When used in combination with O_CREAT, either the regular file is
> created, or if the path already exists, it is opened if it's a regular
> file. Otherwise, -ENOTREGULAR is returned.
> 
> -EINVAL is returned when O_REGULAR is combined with O_DIRECTORY (not
> part of O_TMPFILE) because it doesn't make sense to open a path that
> is both a directory and a regular file.
> 
> Signed-off-by: Dorjoy Chowdhury <dorjoychy111@...il.com>

The feature looks useful to me (but the justification with the danger of
being tricked into opening some device nodes would be nice to have here in
the changelog).

> diff --git a/arch/parisc/include/uapi/asm/fcntl.h b/arch/parisc/include/uapi/asm/fcntl.h
> index 03dee816cb13..efd763335ff7 100644
> --- a/arch/parisc/include/uapi/asm/fcntl.h
> +++ b/arch/parisc/include/uapi/asm/fcntl.h
> @@ -19,6 +19,7 @@
>  
>  #define O_PATH	020000000
>  #define __O_TMPFILE	040000000
> +#define O_REGULAR	060000000

This looks wrong? O_REGULAR is overlapping with O_PATH and __O_TMPFILE???

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ