[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1363380330.10054.0.camel@localhost>
Date: Fri, 15 Mar 2013 16:45:30 -0400
From: Eric Paris <eparis@...hat.com>
To: Kees Cook <keescook@...omium.org>
Cc: Nicolas Schichan <nschichan@...ebox.fr>,
Will Drewry <wad@...omium.org>,
Mircea Gherzan <mgherzan@...il.com>,
Al Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
James Morris <james.l.morris@...cle.com>,
Serge Hallyn <serge.hallyn@...onical.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC 1/3] seccomp: add generic code for jitted seccomp
filters.
On Fri, 2013-03-15 at 11:45 -0700, Kees Cook wrote:
> On Fri, Mar 15, 2013 at 11:28 AM, Nicolas Schichan <nschichan@...ebox.fr> wrote:
> > diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h
> > index 6f19cfd..af27494 100644
> > --- a/include/linux/seccomp.h
> > +++ b/include/linux/seccomp.h
> > @@ -6,6 +6,7 @@
> > #ifdef CONFIG_SECCOMP
> >
> > #include <linux/thread_info.h>
> > +#include <linux/filter.h>
> > #include <asm/seccomp.h>
> >
> > struct seccomp_filter;
> > @@ -47,6 +48,44 @@ static inline int seccomp_mode(struct seccomp *s)
> > return s->mode;
> > }
> >
> > +/**
> > + * struct seccomp_filter - container for seccomp BPF programs
> > + *
> > + * @usage: reference count to manage the object lifetime.
> > + * get/put helpers should be used when accessing an instance
> > + * outside of a lifetime-guarded section. In general, this
> > + * is only needed for handling filters shared across tasks.
> > + * @prev: points to a previously installed, or inherited, filter
> > + * @len: the number of instructions in the program
> > + * @insns: the BPF program instructions to evaluate
>
> This should be updated to include the new bpf_func field.
>
> Regardless, it'd be better to not expose this structure to userspace.
This is fine....
include/uapi/linux/seccomp.h is exposed to userspace
include/linux/seccomp.h is kernel internal
-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists