From: Tycho Andersen <tycho.andersen@canonical•com>
To: Daniel Borkmann <daniel@iogearbox•net>
Cc: davem@davemloft•net, netdev@vger•kernel.org,
Pavel Emelyanov <xemul@parallels•com>,
Kees Cook <keescook@chromium•org>,
Andy Lutomirski <luto@amacapital•net>,
Alexei Starovoitov <ast@plumgrid•com>
Subject: Re: [PATCH net-next] bpf, seccomp: prepare for upcoming criu support
Date: Fri, 2 Oct 2015 09:06:03 -0600 [thread overview]
Message-ID: <20151002150603.GM23065@smitten> (raw)
In-Reply-To: <65c43ff26bd4f37c268d2aad7b8d368edfd42200.1443789826.git.daniel@iogearbox.net>
Hi Daniel,
On Fri, Oct 02, 2015 at 03:17:33PM +0200, 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>
> Cc: Tycho Andersen <tycho.andersen@canonical•com>
Thanks for this patch. When I rebase my tree on top of it it works
fine,
Tested-by: Tycho Andersen <tycho.andersen@canonical•com>
> Cc: Pavel Emelyanov <xemul@parallels•com>
> Cc: Kees Cook <keescook@chromium•org>
> Cc: Andy Lutomirski <luto@amacapital•net>
> Cc: Alexei Starovoitov <ast@plumgrid•com>
> ---
> This is in realtion to Tycho's latest patch set under [1]. The BPF
> handling is unfortunately not correct (triggering a crash on kernels
> that can set pages as ro).
>
> This patch here provides a minimal, simple interface from BPF API side
> as a possible step forward, so that the focus can then be on seccomp
> side wrt criu. F.e., dumping could happen similarly as in Pavel's
> sk_get_filter().
>
> I have tested/based this against net-next, but have no issues whether
> Kees wants to take it, or whether it should go through both trees to
> reduce merge issues as once the case with 0fc174dea545 ("ebpf: make
> internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs").
I'll send out a revised version of my set with Andy's comments later
today and not include this patch. Let me know if I should do something
differently.
Thanks,
Tycho
next prev parent reply other threads:[~2015-10-02 15:06 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 [this message]
2015-10-02 15:17 ` Daniel Borkmann
2015-10-02 15:09 ` Alexei Starovoitov
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=20151002150603.GM23065@smitten \
--to=tycho.andersen@canonical$(echo .)com \
--cc=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=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