Re: [PATCH v6 1/4] openat2: new OPENAT2_REGULAR flag support

From: Jori Koolstra

Date: Thu Apr 16 2026 - 17:43:19 EST



> Op 16-04-2026 17:15 CEST schreef Aleksa Sarai <cyphar@xxxxxxxxxx>:
>
>
> Oh, I didn't notice that this wasn't mentioned here, we had a separate
> discussion about it in a thread with Jori and I must've assumed we
> discussed it in both. (My brain is also really not wired up to read
> large octal values easily.)
>
> While it is hard to add new O_* flags (hence OPENAT2_REGULAR), it's not
> /impossible/ (Jori has a patch for OPENAT2_EMPTY_PATH that is safe to
> add to O_* flags because of some fun historical coincidences).

But it would change userspace, at least in theory, right? If anyone for
some reason decided to set whatever the bit will be for O_EMPTYPATH
in a call to openat(), and pass an empty string, relying on this to fail,
that will no longer be the case. But that is just really silly. Or are you
hinting on something else?

Thanks,
Jori.