Thread (2 messages) flat view 2 messages, 2 authors, 2019-12-17

Re: [PATCH v3 4/4] samples: Add example of using pidfd getfd in conjunction with user trap

From: Christian Brauner <hidden>
Date: 2019-12-17 02:07:31
Also in: linux-fsdevel, lkml

On Tue, Dec 17, 2019 at 01:00:27AM +0000, Sargun Dhillon wrote:
This sample adds the usage of SECCOMP_RET_USER_NOTIF together with pidfd
GETFD ioctl. It shows trapping a syscall, and handling it by extracting
the FD into the parent process without stopping the child process.
Although, in this example, there's no explicit policy separation in
the two processes, it can be generalized into the example of a transparent
proxy.

Signed-off-by: Sargun Dhillon <redacted>
---
 samples/seccomp/.gitignore        |   1 +
 samples/seccomp/Makefile          |   9 +-
 samples/seccomp/user-trap-pidfd.c | 190 ++++++++++++++++++++++++++++++
This is a great sample.
Could you please also add tests without seccomp to the pidfd-testsuite
itself under tools/testing/selftests/pidfd. I want to have all pidfd
features tested in one place so that people don't need to run
seccomp-bpf, or compile the optional samples but can just run the pidfd
test-suite and it'll bang on all features.

Christian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help