From: Luis Chamberlain <mcgrof@kernel.org>
To: Scott Branden <scott.branden@broadcom.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Kees Cook <keescook@chromium.org>,
Mimi Zohar <zohar@linux.vnet.ibm.com>,
linux-security-module <linux-security-module@vger.kernel.org>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Jens Axboe <axboe@kernel.dk>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd()
Date: Fri, 22 May 2020 22:47:02 +0000 [thread overview]
Message-ID: <20200522224702.GF11244@42.do-not-panic.com> (raw)
In-Reply-To: <075ae77b-000b-c00f-b425-59105dc2584a@broadcom.com>
On Fri, May 22, 2020 at 03:14:59PM -0700, Scott Branden wrote:
>
>
> On 2020-05-22 2:59 p.m., Scott Branden wrote:
> > Hi Luis,
> >
> > On 2020-05-13 7:19 a.m., Luis Chamberlain wrote:
> > > On Wed, May 13, 2020 at 7:13 AM Luis Chamberlain <mcgrof@kernel.org>
> > > wrote:
> > > > On Wed, May 13, 2020 at 06:49:50AM +0100, Al Viro wrote:
> > > > > On Tue, May 12, 2020 at 01:43:05PM -0600, Shuah Khan wrote:
> > > > > > diff --git a/fs/exec.c b/fs/exec.c
> > > > > > index 06b4c550af5d..ea24bdce939d 100644
> > > > > > --- a/fs/exec.c
> > > > > > +++ b/fs/exec.c
> > > > > > @@ -1021,8 +1021,8 @@ int kernel_read_file_from_fd(int
> > > > > > fd, void **buf, loff_t *size, loff_t max_size,
> > > > > > goto out;
> > > > > >
> > > > > > ret = kernel_read_file(f.file, buf, size, max_size, id);
> > > > > > -out:
> > > > > > fdput(f);
> > > > > > +out:
> > > > > > return ret;
> > > > > Incidentally, why is that thing exported?
> > > > Both kernel_read_file_from_fd() and kernel_read_file() are exported
> > > > because they have users, however kernel_read_file() only has security
> > > > stuff as a user. Do we want to get rid of the lsm hook for it?
> > > Alright, yeah just the export needs to be removed. I have a patch
> > > series dealing with these callers so will add it to my queue.
> > When will these changes make it into linux-next?
> > It is difficult for me to complete my patch series without these other
> > misc. changes in place.
> Sorry, I see the patch series is still being worked on (missing changelog,
> comments, etc).
> Hopefully the patches stabilize so I can apply my changes on top fairly
> soon.
Yeah I have to redo that series to take into account feedback. I'll be
sure cc you on that. I have a few other series to attend to before that,
so I think this will take a week.
Luis
next prev parent reply other threads:[~2020-05-22 22:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 19:43 [PATCH v2 0/2] fs: avoid fdput() after failed fdget() Shuah Khan
2020-05-12 19:43 ` [PATCH v2 1/2] fs: avoid fdput() after failed fdget() in ksys_sync_file_range() Shuah Khan
2020-05-13 5:46 ` Al Viro
2020-05-12 19:43 ` [PATCH v2 2/2] fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd() Shuah Khan
2020-05-13 5:49 ` Al Viro
2020-05-13 13:13 ` Luis Chamberlain
2020-05-13 14:19 ` Luis Chamberlain
2020-05-22 21:59 ` Scott Branden
2020-05-22 22:14 ` Scott Branden
2020-05-22 22:47 ` Luis Chamberlain [this message]
2020-05-13 17:56 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200522224702.GF11244@42.do-not-panic.com \
--to=mcgrof@kernel.org \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=axboe@kernel.dk \
--cc=daniel@iogearbox.net \
--cc=jmorris@namei.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=keescook@chromium.org \
--cc=kpsingh@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=scott.branden@broadcom.com \
--cc=serge@hallyn.com \
--cc=skhan@linuxfoundation.org \
--cc=songliubraving@fb.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yhs@fb.com \
--cc=zohar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.