From: Christian Brauner <christian.brauner@ubuntu.com>
To: Sargun Dhillon <sargun@sargun.me>
Cc: linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org, linux-api@vger.kernel.org,
linux-fsdevel@vger.kernel.org, tycho@tycho.ws, jannh@google.com,
cyphar@cyphar.com, oleg@redhat.com, luto@amacapital.net,
viro@zeniv.linux.org.uk, gpascutto@mozilla.com,
ealvarez@mozilla.com, fweimer@redhat.com, jld@mozilla.com
Subject: Re: [PATCH v3 4/4] samples: Add example of using pidfd getfd in conjunction with user trap
Date: Tue, 17 Dec 2019 03:07:24 +0100 [thread overview]
Message-ID: <20191217020723.cluy5x2kg5q3ithf@wittgenstein> (raw)
In-Reply-To: <20191217010025.GA14479@ircssh-2.c.rugged-nimbus-611.internal>
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 <sargun@sargun.me>
> ---
> 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
prev parent reply other threads:[~2019-12-17 2:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 1:00 [PATCH v3 4/4] samples: Add example of using pidfd getfd in conjunction with user trap Sargun Dhillon
2019-12-17 2:07 ` Christian Brauner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191217020723.cluy5x2kg5q3ithf@wittgenstein \
--to=christian.brauner@ubuntu.com \
--cc=containers@lists.linux-foundation.org \
--cc=cyphar@cyphar.com \
--cc=ealvarez@mozilla.com \
--cc=fweimer@redhat.com \
--cc=gpascutto@mozilla.com \
--cc=jannh@google.com \
--cc=jld@mozilla.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=oleg@redhat.com \
--cc=sargun@sargun.me \
--cc=tycho@tycho.ws \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox