mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] O_REGULAR flag support for open
@ 2026-01-25 14:14 Dorjoy Chowdhury
  2026-01-25 14:14 ` [PATCH 1/2] open: new O_REGULAR flag support Dorjoy Chowdhury
  2026-01-25 14:14 ` [PATCH 2/2] kselftest/openat2: test for O_REGULAR flag Dorjoy Chowdhury
  0 siblings, 2 replies; 9+ messages in thread
From: Dorjoy Chowdhury @ 2026-01-25 14:14 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: linux-kernel, viro, brauner, jack, jlayton, chuck.lever,
	alex.aring, arnd

Hi,

I came upon this "Ability to only open regular files" uapi feature suggestion
from https://uapi-group.org/kernel-features/#ability-to-only-open-regular-files
and thought it would be something I could do as a first patch and get to
know the kernel code a bit better.

I am not quite sure if the semantics that I baked into the code for this
O_REGULAR flag's behavior when combined with other flags like O_CREAT look
good and if there are other places that need the checks. I can fixup my
patch according to suggestions for improvement. I did some happy path testing
and the O_REGULAR flag seems to work as intended.

Thanks.

Regards,
Dorjoy

Dorjoy Chowdhury (2):
  open: new O_REGULAR flag support
  kselftest/openat2: test for O_REGULAR flag

 fs/fcntl.c                                    |  2 +-
 fs/namei.c                                    |  6 +++
 fs/open.c                                     |  4 +-
 include/linux/fcntl.h                         |  2 +-
 include/uapi/asm-generic/errno-base.h         |  1 +
 include/uapi/asm-generic/fcntl.h              |  4 ++
 .../testing/selftests/openat2/openat2_test.c  | 37 ++++++++++++++++++-
 7 files changed, 52 insertions(+), 4 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-01-26  8:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-25 14:14 [PATCH 0/2] O_REGULAR flag support for open Dorjoy Chowdhury
2026-01-25 14:14 ` [PATCH 1/2] open: new O_REGULAR flag support Dorjoy Chowdhury
2026-01-25 14:40   ` Arnd Bergmann
2026-01-25 15:41     ` Dorjoy Chowdhury
2026-01-25 16:28       ` Jeff Layton
2026-01-25 16:59         ` Dorjoy Chowdhury
2026-01-26  8:00       ` Arnd Bergmann
2026-01-25 16:22   ` kernel test robot
2026-01-25 14:14 ` [PATCH 2/2] kselftest/openat2: test for O_REGULAR flag Dorjoy Chowdhury

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome