public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tycho Andersen <tycho.andersen@canonical.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Kees Cook <keescook@chromium.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Will Drewry <wad@chromium.org>, Oleg Nesterov <oleg@redhat.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Pavel Emelyanov <xemul@parallels.com>,
	"Serge E. Hallyn" <serge.hallyn@ubuntu.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Linux API <linux-api@vger.kernel.org>
Subject: Re: v5 of seccomp filter c/r patches
Date: Fri, 2 Oct 2015 16:59:15 -0600	[thread overview]
Message-ID: <20151002225915.GP23065@smitten> (raw)
In-Reply-To: <560F0BED.2070304@iogearbox.net>

On Sat, Oct 03, 2015 at 12:57:49AM +0200, Daniel Borkmann wrote:
> On 10/03/2015 12:44 AM, Tycho Andersen wrote:
> >On Fri, Oct 02, 2015 at 02:10:24PM -0700, Kees Cook wrote:
> ...
> >Ok, how about,
> >
> >struct sock_filter insns[BPF_MAXINSNS];
> >insn_cnt = ptrace(PTRACE_SECCOMP_GET_FILTER, pid, insns, i);
> 
> Would also be good that when the storage buffer (insns) is NULL,
> it just returns you the number of sock_filter insns (or 0 when
> nothing attached).
> 
> That would be consistent with classic socket filters (see
> sk_get_filter()), and user space could allocate a specific
> size instead of always passing in max insns.

Yep, the current set does this with SECCOMP_FD_DUMP and I agree that
it's nice behavior, so I'll plan on preserving it.

Thanks,

Tycho

  reply	other threads:[~2015-10-02 22:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 16:27 v5 of seccomp filter c/r patches Tycho Andersen
2015-10-02 16:27 ` [PATCH v5 1/3] seccomp: add the concept of a seccomp filter FD Tycho Andersen
2015-10-02 16:27 ` [PATCH v5 2/3] seccomp: add a ptrace command to get seccomp filter fds Tycho Andersen
2015-10-02 16:27 ` [PATCH v5 3/3] kcmp: add KCMP_SECCOMP_FD Tycho Andersen
2015-10-02 21:10 ` v5 of seccomp filter c/r patches Kees Cook
2015-10-02 21:29   ` Andy Lutomirski
2015-10-02 22:02     ` Kees Cook
2015-10-02 22:04       ` Andy Lutomirski
2015-10-02 22:06         ` Kees Cook
2015-10-02 22:16           ` Andy Lutomirski
2015-10-02 22:44   ` Tycho Andersen
2015-10-02 22:52     ` Andy Lutomirski
2015-10-02 22:56       ` Tycho Andersen
2015-10-02 22:57     ` Daniel Borkmann
2015-10-02 22:59       ` Tycho Andersen [this message]
2015-10-02 23:00       ` Kees Cook

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=20151002225915.GP23065@smitten \
    --to=tycho.andersen@canonical.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=netdev@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=serge.hallyn@ubuntu.com \
    --cc=wad@chromium.org \
    --cc=xemul@parallels.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox