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 in the next re-spin.
>>
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
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 +++