On Wed, May 17, 2023 at 11:11:24AM +0200, Christian Brauner wrote: > Adding fsdevel so we're aware of this quirk. > > So I'm not sure whether this was ever discussed on fsdevel when you took > the decision to treat fd 0 as AT_FDCWD or in general treat fd 0 as an > invalid value. I've never heard of this before, and I think it is compltely unacceptable. 0 ist just a normal FD, although one that happens to have specific meaning in userspace as stdin. > > If it was discussed then great but if not then I would like to make it > very clear that if in the future you decide to introduce custom > semantics for vfs provided infrastructure - especially when exposed to > userspace - that you please Cc us. I don't think it's just the future. We really need to undo this ASAP.