Re: [net-next v2 2/2] bpf: Add eBPF seccomp sample programs

2018-02-18 Thread Sargun Dhillon
On Sat, Feb 17, 2018 at 9:58 AM, Randy Dunlap wrote: > On 02/16/2018 11:36 PM, Sargun Dhillon wrote: >> + close(111); >> + assert(errno == EBADF); >> + close(999); >> + assert(errno = EPERM); > > should that be == ? > Woops. Embarassing. Will fix that

Re: [net-next v2 2/2] bpf: Add eBPF seccomp sample programs

2018-02-17 Thread Randy Dunlap
On 02/16/2018 11:36 PM, Sargun Dhillon wrote: > + close(111); > + assert(errno == EBADF); > + close(999); > + assert(errno = EPERM); should that be == ? > + > + return 0; > +} -- ~Randy

[net-next v2 2/2] bpf: Add eBPF seccomp sample programs

2018-02-16 Thread Sargun Dhillon
This adds a sample program that uses seccomp-eBPF, called seccomp1. It shows the simple ability to code seccomp filters in C. Signed-off-by: Sargun Dhillon --- samples/bpf/Makefile| 5 + samples/bpf/bpf_load.c | 9 +++-- samples/bpf/seccomp1_kern.c | 43