]> git.baikalelectronics.ru Git - kernel.git/commit
samples/seccomp: Adjust sample to also provide kill option
authorKees Cook <keescook@chromium.org>
Tue, 8 Feb 2022 04:53:34 +0000 (20:53 -0800)
committerKees Cook <keescook@chromium.org>
Fri, 11 Feb 2022 03:09:12 +0000 (19:09 -0800)
commite68eeab92bc12b28337b01d9c87fdc8d6615b466
tree2a825afbd7c73595c3679e39dd43ecbaa5d9d8d3
parent8a9adc9e0038e27cca4e5855cc379f979d5e84cd
samples/seccomp: Adjust sample to also provide kill option

As a quick way to test SECCOMP_RET_KILL, have a negative errno mean to
kill the process.

While we're in here, also swap the arch and syscall arguments so they're
ordered more like how seccomp filters order them.

Signed-off-by: Kees Cook <keescook@chromium.org>
samples/seccomp/dropper.c