Re: [PATCH v17 11/13] open: introduce openat2(2) syscall

2019-11-24 Thread Al Viro
On Sun, Nov 17, 2019 at 12:17:11PM +1100, Aleksa Sarai wrote: > +/* how->upgrade flags for openat2(2). */ > +/* First bit is reserved for a future UPGRADE_NOEXEC flag. */ > +#define UPGRADE_NOREAD 0x02 /* Block re-opening with MAY_READ. > */ > +#define UPGRADE_NOWRITE 0

[PATCH v17 11/13] open: introduce openat2(2) syscall

2019-11-16 Thread Aleksa Sarai
/* Background. */ For a very long time, extending openat(2) with new features has been incredibly frustrating. This stems from the fact that openat(2) is possibly the most famous counter-example to the mantra "don't silently accept garbage from userspace" -- it doesn't check whether unknown flags a