[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170922152540.6mll75g6xpn5k5ug@smitten>
Date: Fri, 22 Sep 2017 09:25:40 -0600
From: Tycho Andersen <tycho@...ker.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Kees Cook <keescook@...omium.org>,
Chris Salls <chrissalls5@...il.com>,
Andy Lutomirski <luto@...capital.net>,
Will Drewry <wad@...omium.org>,
"security@...nel.org" <security@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] seccomp: fix the usage of get/put_seccomp_filter() in
seccomp_get_filter()
On Fri, Sep 22, 2017 at 05:22:29PM +0200, Oleg Nesterov wrote:
> On 09/21, Kees Cook wrote:
> >
> > On Thu, Sep 21, 2017 at 3:57 AM, Oleg Nesterov <oleg@...hat.com> wrote:
> > > On 09/20, Kees Cook wrote:
> > >>
> > >> Given how reference counting is done for filters, I'd be happier with
> > >> leaving the get_seccomp_filter() as-is,
> > >
> > > No, please note that filter != tsk->seccomp.filter, get_seccomp_filter()
> > > won't work.
> >
> > Ah yes, sorry, you're right.
> >
> > >> (i.e. don't open-code
> > >> the refcount_inc()).
> > >
> > > agreed, probably another __get_seccomp_filter(filter) makes sense, especially
> > > if we do other changes like get_nth().
> > >
> > > But imo not in this fix.
> >
> > Regardless, whatever lands will need backport adjustment for
> > refcount_*/atomic_* in -stable.
>
> yes, but this adjustment is trivial, and we will need it whatever we do
> in this fix,
>
> > Can you resend the two patches; I can send the backport to -stable manually...
>
> Not sure I understand... Do you mean this fix + untested "introduce get_nth_filter()" ?
>
> Can't we push this simple fix first? Then we can discuss the cleanups. Besides,
> the 2nd patch connects to Tycho's "[PATCH] ptrace, seccomp: add support for
> retrieving seccomp flags", otherwise it could be more simple.
Yes, I'll happily fold your fix into the next version of my patch. As
it stands now I'm just waiting on input about unrelated API feedback.
Cheers,
Tycho
Powered by blists - more mailing lists