> Op 02-04-2026 04:52 CEST schreef Aleksa Sarai <[email protected]>:
> 
> Please do not use O_* flags! O_CLOEXEC takes up 3 flag bits on different
> architectures which makes adding new flags a nightmare.
> 
> I think this should take AT_* flags and (like most newer syscalls)
> O_CLOEXEC should be automatically set. Userspace can unset it with
> fnctl(F_SETFD) in the relatively rare case where they don't want
> O_CLOEXEC.

And then do something like statx_lookup_flags() does to build the lookup
flags from those AT flags? But there is also no AT_ROOT_CONTAINED (or whatever
you would want to call the RESOLVE_IN_ROOT AT-equivalent) right now.

> Alternatively, we could just bite the bullet and make
> AT_NO_CLOEXEC a thing...

What's the bullet to bite there?

> 
> But yes, new syscalls *absolutely* need to take some kind of flag
> argument. I'd hoped we finally learned our lesson on that one...
> 
> -- 
> Aleksa Sarai
> https://www.cyphar.com/

Thanks,
Jori.

Reply via email to