Daniel Borkmann ac67eb2c53 seccomp, filter: add and use bpf_prog_create_from_user from seccomp
Seccomp has always been a special candidate when it comes to preparation
of its filters in seccomp_prepare_filter(). Due to the extra checks and
filter rewrite it partially duplicates code and has BPF internals exposed.

This patch adds a generic API inside the BPF code code that seccomp can use
and thus keep it's filter preparation code minimal and better maintainable.
The other side-effect is that now classic JITs can add seccomp support as
well by only providing a BPF_LDX | BPF_W | BPF_ABS translation.

Tested with seccomp and BPF test suites.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Nicolas Schichan <nschichan@freebox.fr>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Kees Cook <keescook@chromium.org>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 17:35:05 -04:00
..
2015-04-27 23:11:49 -04:00
2015-04-17 09:04:08 -04:00
2015-04-21 09:33:10 -07:00
2015-04-21 09:42:58 -07:00
2015-04-11 22:27:55 -04:00
2014-10-09 22:26:04 -04:00
2014-08-08 15:57:18 -07:00
2015-04-12 21:03:31 +02:00
2015-04-12 20:58:24 +02:00
2015-02-24 08:41:07 +01:00
2014-09-10 15:42:12 -07:00
2015-04-30 09:35:41 -07:00
2014-12-04 14:34:54 -05:00
2014-12-22 15:40:48 +01:00
2015-01-17 10:02:23 +13:00
2015-04-15 15:06:55 -04:00
2014-12-10 17:41:10 -08:00
2015-04-06 11:16:04 -04:00