public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* O_CLOEXEC use for OPEN_TREE_CLOEXEC
@ 2026-01-13 22:40 Florian Weimer
  2026-01-14 16:03 ` Christian Brauner
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2026-01-13 22:40 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-api, linux-kernel, Al Viro, David Howells, DJ Delorie

In <linux/mount.h>, we have this:

#define OPEN_TREE_CLOEXEC      O_CLOEXEC       /* Close the file on execve() */

This causes a few pain points for us to on the glibc side when we mirror
this into <linux/mount.h> becuse O_CLOEXEC is defined in <fcntl.h>,
which is one of the headers that's completely incompatible with the UAPI
headers.

The reason why this is painful is because O_CLOEXEC has at least three
different values across architectures: 0x80000, 0x200000, 0x400000

Even for the UAPI this isn't ideal because it effectively burns three
open_tree flags, unless the flags are made architecture-specific, too.

Thanks,
Florian


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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 22:40 O_CLOEXEC use for OPEN_TREE_CLOEXEC Florian Weimer
2026-01-14 16:03 ` Christian Brauner
2026-01-14 19:42   ` Andy Lutomirski
2026-01-14 21:18     ` Aleksa Sarai
2026-01-15  8:55   ` Florian Weimer
2026-01-16 10:00     ` Christian Brauner

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