public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@plumgrid•com>
To: Daniel Borkmann <daniel@iogearbox•net>, davem@davemloft•net
Cc: netdev@vger•kernel.org,
	Tycho Andersen <tycho.andersen@canonical•com>,
	Pavel Emelyanov <xemul@parallels•com>,
	Kees Cook <keescook@chromium•org>,
	Andy Lutomirski <luto@amacapital•net>
Subject: Re: [PATCH net-next] bpf, seccomp: prepare for upcoming criu support
Date: Fri, 2 Oct 2015 08:09:50 -0700	[thread overview]
Message-ID: <560E9E3E.2080000@plumgrid.com> (raw)
In-Reply-To: <65c43ff26bd4f37c268d2aad7b8d368edfd42200.1443789826.git.daniel@iogearbox.net>

On 10/2/15 6:17 AM, Daniel Borkmann wrote:
> The current ongoing effort to dump existing cBPF seccomp filters back
> to user space requires to hold the pre-transformed instructions like
> we do in case of socket filters from sk_attach_filter() side, so they
> can be reloaded in original form at a later point in time by utilities
> such as criu.
>
> To prepare for this, simply extend the bpf_prog_create_from_user()
> API to hold a flag that tells whether we should store the original
> or not. Also, fanout filters could make use of that in future for
> things like diag. While fanout filters already use bpf_prog_destroy(),
> move seccomp over to them as well to handle original programs when
> present.
>
> Signed-off-by: Daniel Borkmann<daniel@iogearbox•net>

I agree that adding flag to bpf_prog_create_from_user() is cleaner
than exposing static bpf_prog_store_orig_filter(), so
Acked-by: Alexei Starovoitov <ast@plumgrid•com>

  parent reply	other threads:[~2015-10-02 15:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 13:17 [PATCH net-next] bpf, seccomp: prepare for upcoming criu support Daniel Borkmann
2015-10-02 15:06 ` Tycho Andersen
2015-10-02 15:17   ` Daniel Borkmann
2015-10-02 15:09 ` Alexei Starovoitov [this message]
2015-10-02 15:21   ` Daniel Borkmann
2015-10-05 13:53 ` David Miller

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=560E9E3E.2080000@plumgrid.com \
    --to=ast@plumgrid$(echo .)com \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=keescook@chromium$(echo .)org \
    --cc=luto@amacapital$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=tycho.andersen@canonical$(echo .)com \
    --cc=xemul@parallels$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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