Hi Konstantin, On Thu, Mar 7, 2019 at 3:00 AM Konstantin Belousov <kostik...@gmail.com> wrote: > > On Wed, Mar 06, 2019 at 10:56:49PM +0000, Conrad Meyer wrote: > > FUSE: Prevent trivial panic > > > > When open(2) was invoked against a FUSE filesystem with an unexpected > > flags > > value (no O_RDONLY / O_RDWR / O_WRONLY), an assertion fired, causing > > panic. > > Did you miss O_EXEC ?
Nope. > O_RDONLY is defined as zero, and we interpret the > flags as having O_RDONLY if no other flags were passed. The commit message probably could have been more clear. The check that we actually perform (and guard against with this change) is ((flags & (FREAD | FWRITE)) == 0). FREAD is non-zero. Alan has empirically demonstrated that O_EXEC at the open(2) layer does not translate into a FREAD flag at the VOP_OPEN() layer. > VFS guarantees that one of the O_EXEC/FREAD/FWRITE flag is always > there. If it does not, it is bug. See the code at the start of > kern_openat(). Sure. FUSE is not prepared to handle (flags & (O_EXEC|FREAD|FWRITE)) == O_EXEC at this time. This revision just changes that (user-inducible) scenario into an error, instead of a panic. Like the commit message says, it is not intended to be the correct long-term solution. Best, Conrad _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"