]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD
authorSargun Dhillon <sargun@sargun.me>
Wed, 3 Jun 2020 01:10:44 +0000 (18:10 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 14 Jul 2020 23:30:22 +0000 (16:30 -0700)
commite5d3ed85fc4e1c3d04eebd7262301e41173247b8
treeb75804643e37ad7017ccf6a1a37834c78cd1ed00
parent8a331d6d37e3931a2d1fe9150533c0f62a56aead
selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD

Test whether we can add file descriptors in response to notifications.
This injects the file descriptors via notifications, and then uses kcmp
to determine whether or not it has been successful.

It also includes some basic sanity checking for arguments.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Chris Palmer <palmer@google.com>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Jann Horn <jannh@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Robert Sesek <rsesek@google.com>
Cc: Tycho Andersen <tycho@tycho.ws>
Cc: Matt Denton <mpdenton@google.com>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/20200603011044.7972-5-sargun@sargun.me
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
tools/testing/selftests/seccomp/seccomp_bpf.c