]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
selftests/seccomp: Allow syscall nr and ret value to be set separately
authorKees Cook <keescook@chromium.org>
Sat, 19 Sep 2020 07:21:34 +0000 (00:21 -0700)
committerKees Cook <keescook@chromium.org>
Thu, 8 Oct 2020 20:16:27 +0000 (13:16 -0700)
commitbef71f86b64de8b2eb5b2f26e1cbd7735e3551da
tree5466982802313c1114d5b48413821c28d9423174
parent71c87fbe720038007543abff7540ef0376c519f5
selftests/seccomp: Allow syscall nr and ret value to be set separately

In preparation for setting syscall nr and ret values separately, refactor
the helpers to take a pointer to a value, so that a NULL can indicate
"do not change this respective value". This is done to keep the regset
read/write happening once and in one code path.

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/lkml/20200921075031.j4gruygeugkp2zwd@wittgenstein/
Signed-off-by: Kees Cook <keescook@chromium.org>
tools/testing/selftests/seccomp/seccomp_bpf.c