Files
Linux/include/linux
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 <[email protected]>
Cc: Nicolas Schichan <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Kees Cook <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2015-05-09 17:35:05 -04:00
..
…
2015-03-29 16:17:10 +01:00
…
2015-01-29 10:49:28 +02:00
2015-04-07 11:17:34 +02:00
…
…
…
…
…
2015-03-25 20:28:11 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-04-17 09:03:53 -04:00
…
2015-04-17 08:31:12 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-03-11 15:56:59 -07:00
…
…
…
…
…
…
…
2015-04-16 12:33:51 +09:30
…
…
…
…
…
…
…
2015-02-12 18:54:15 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-02-18 15:08:33 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-03-16 21:45:54 +11:00
…
2015-04-03 16:18:02 +02:00
…
…
…
…
…
…
…
…
…
…
2015-01-27 11:09:13 +01:00
…
…
…
…
…
…
2015-05-05 19:24:43 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-02-13 21:21:36 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-04-14 16:49:05 -07:00
…
2015-03-25 11:44:52 +01:00
…
…
2015-04-17 09:04:07 -04:00
…
…
2015-03-31 12:04:12 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-04-23 14:36:28 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
2015-03-11 17:56:28 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-04-12 21:03:31 +02:00
…
…
2015-01-25 23:17:28 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-02-17 14:34:52 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-02-24 08:44:16 +01:00
2015-03-26 18:18:20 +01:00
…
…
…
…
…
…
…
…
…
…
2015-02-13 21:21:41 -08:00
…
…
…
…
2015-03-11 21:55:28 -04:00
2015-04-11 15:53:35 -04:00
…
…
…
…
…
…
…
…
…
2015-02-13 21:21:35 -08:00
…
…
…
…
…
…
2015-03-25 13:28:58 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-04-11 22:29:44 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-03-24 09:48:14 -07:00
…
…
…
…
…
…
…
…
2015-04-15 16:35:20 -07:00
…