Re: [PATCH v3 2/4] seccomp: Add SECCOMP_FILTER_FLAG_KILL_PROCESS

2017-08-11 Thread Kees Cook
On Fri, Aug 11, 2017 at 9:58 AM, Tyler Hicks wrote: >> @@ -201,8 +203,25 @@ static u32 seccomp_run_filters(const struct >> seccomp_data *sd, >>*/ >> for (; f; f = f->prev) { >> u32 cur_ret = BPF_PROG_RUN(f->prog, sd); >> + u32 action = cur_ret & SECCOMP_RET

Re: [PATCH v3 2/4] seccomp: Add SECCOMP_FILTER_FLAG_KILL_PROCESS

2017-08-11 Thread Tyler Hicks
On 08/09/2017 02:01 PM, Kees Cook wrote: > Right now, SECCOMP_RET_KILL kills the current thread. There have been > a few requests for RET_KILL to kill the entire process (the thread > group), but since seccomp's u32 return values are ABI, and ordered by > lowest value, with RET_KILL as 0, there isn

[PATCH v3 2/4] seccomp: Add SECCOMP_FILTER_FLAG_KILL_PROCESS

2017-08-09 Thread Kees Cook
Right now, SECCOMP_RET_KILL kills the current thread. There have been a few requests for RET_KILL to kill the entire process (the thread group), but since seccomp's u32 return values are ABI, and ordered by lowest value, with RET_KILL as 0, there isn't a trivial way to provide an even smaller value