Re: [PATCH v2] fs: Allow opening only regular files during execve().

2019-02-19 Thread Tetsuo Handa
Hello, Al. What would you suggest if FMODE_EXEC is not the right choice? On 2019/01/22 9:51, Kees Cook wrote: > On Tue, Jan 22, 2019 at 10:18 AM Al Viro wrote: >> We are *NOT* going to use current->in_execve to propagate that information. >> Come up with a cleaner solution, if you care, but

Re: [PATCH v2] fs: Allow opening only regular files during execve().

2019-02-11 Thread Tetsuo Handa
Tetsuo Handa wrote: > Andrew Morton wrote: > > > --- a/fs/open.c > > > +++ b/fs/open.c > > > @@ -733,6 +733,12 @@ static int do_dentry_open(struct file *f, > > > return 0; > > > } > > > > > > + /* Any file opened for execve()/uselib() has to be a regular file. */ > > > + if

Re: [PATCH v2] fs: Allow opening only regular files during execve().

2019-02-11 Thread Tetsuo Handa
Andrew Morton wrote: > > --- a/fs/open.c > > +++ b/fs/open.c > > @@ -733,6 +733,12 @@ static int do_dentry_open(struct file *f, > > return 0; > > } > > > > + /* Any file opened for execve()/uselib() has to be a regular file. */ > > + if (unlikely(f->f_flags & FMODE_EXEC &&

Re: [PATCH v2] fs: Allow opening only regular files during execve().

2019-01-28 Thread Andrew Morton
goto cleanup_file; > > > + } > > > > We are *NOT* going to use current->in_execve to propagate that information. > > You mean check FMODE_EXEC instead of current->in_execve ? > > >From f80b32e1c3fbd65672387ee441a32ab58db456f8 Mon Sep 17 00:00:00 2001 > Fro

[PATCH v2] fs: Allow opening only regular files during execve().

2019-01-21 Thread Tetsuo Handa
ODE_EXEC instead of current->in_execve ? >From f80b32e1c3fbd65672387ee441a32ab58db456f8 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Tue, 22 Jan 2019 09:34:35 +0900 Subject: [PATCH v2] fs: Allow opening only regular files during execve(). syzbot is hitting lockdep warning [1]