Re: [PATCH net-next 3/3] bpf: Add eBPF seccomp sample programs

2018-02-13 Thread Kees Cook
On Tue, Feb 13, 2018 at 7:43 AM, Sargun Dhillon wrote: > +++ b/samples/bpf/seccomp1_kern.c > @@ -0,0 +1,17 @@ > +#include > +#include > +#include > +#include "bpf_helpers.h" > +#include > + > +/* Returns EPERM when trying to close fd 999 */ > +SEC("seccomp") > +int bpf_prog1(struct seccomp_dat

[PATCH net-next 3/3] bpf: Add eBPF seccomp sample programs

2018-02-13 Thread Sargun Dhillon
From: Sargun Dhillon This adds two sample programs: seccomp1: A simple eBPF seccomp filter seccomp2: A program which installs an eBPF filter and then retrieves it via ptrace to show checkpoint / restore capability. Signed-off-by: Sargun Dhillon --- samples/bpf/Makefile