public inbox for containers@lists.linux.dev
 help / color / mirror / Atom feed
From: Tycho Andersen <tycho-E0fblnxP3wo@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: "Tobin C . Harding" <me-xzjC0nNlxno@public.gmane.org>,
	Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Akihiro Suda
	<suda.akihiro-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>,
	Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
	"Eric W . Biederman"
	<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
	Christian Brauner
	<christian.brauner-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>,
	Tyler Hicks <tyhicks-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Subject: [PATCH v2 0/4] seccomp trap to userspace
Date: Thu, 17 May 2018 09:12:14 -0600	[thread overview]
Message-ID: <20180517151218.12850-1-tycho@tycho.ws> (raw)

Hi,

After a while focusing on other things, I finally managed ot get a v2 of
this series prepared. I believe I've addressed all the feedback from v1,
except for one major point: switching the communication protocol over
the fd to nlattr. I looked into doing this, but the kernel stuff for
dealing with nlattr seems to require an skb (via nlmsg_{new,put} and
netlink_unicast), which means we need to deal with the netlink sequence
numbers, portids, and create a socket protocol. I can do this if we
still think nlattr is necessary, but based on looking at it, it seems
like a lot of extra code for no real benefit.

I've also added support for passing fds. The code itself is simple, but
the API could/should probably be different, see patch 4 for discussion.

Tycho

Tycho Andersen (4):
  seccomp: add a return code to trap to userspace
  seccomp: make get_nth_filter available outside of CHECKPOINT_RESTORE
  seccomp: add a way to get a listener fd from ptrace
  seccomp: add support for passing fds via USER_NOTIF

 arch/Kconfig                                  |   7 +
 include/linux/seccomp.h                       |  14 +-
 include/uapi/linux/ptrace.h                   |   2 +
 include/uapi/linux/seccomp.h                  |  20 +-
 kernel/ptrace.c                               |   4 +
 kernel/seccomp.c                              | 480 +++++++++++++++++-
 tools/testing/selftests/seccomp/seccomp_bpf.c | 359 ++++++++++++-
 7 files changed, 878 insertions(+), 8 deletions(-)

-- 
2.17.0

             reply	other threads:[~2018-05-17 15:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 15:12 Tycho Andersen [this message]
     [not found] ` <20180517151218.12850-1-tycho-E0fblnxP3wo@public.gmane.org>
2018-05-17 15:12   ` [PATCH v2 1/4] seccomp: add a return code to trap to userspace Tycho Andersen
2018-05-17 15:12   ` [PATCH v2 2/4] seccomp: make get_nth_filter available outside of CHECKPOINT_RESTORE Tycho Andersen
2018-05-17 15:12   ` [PATCH v2 3/4] seccomp: add a way to get a listener fd from ptrace Tycho Andersen
2018-05-17 15:12   ` [PATCH v2 4/4] seccomp: add support for passing fds via USER_NOTIF Tycho Andersen
     [not found] ` <20180517151218.12850-4-tycho@tycho.ws>
     [not found]   ` <20180517151218.12850-4-tycho-E0fblnxP3wo@public.gmane.org>
2018-05-17 15:41     ` [PATCH v2 3/4] seccomp: add a way to get a listener fd from ptrace Oleg Nesterov
     [not found]       ` <20180517154139.GB8586-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-05-17 15:57         ` Tycho Andersen
     [not found]       ` <20180517155733.GB3831@cisco>
2018-05-17 15:59         ` Tycho Andersen
     [not found]   ` <20180518140556.GC26297@mailbox.org>
     [not found]     ` <20180518140556.GC26297-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2018-05-18 15:10       ` Tycho Andersen
     [not found] ` <20180517151218.12850-2-tycho@tycho.ws>
     [not found]   ` <20180517153323.GA8586@redhat.com>
     [not found]     ` <20180517153323.GA8586-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-05-17 15:39       ` [PATCH v2 1/4] seccomp: add a return code to trap to userspace Tycho Andersen
     [not found]     ` <20180517153957.GA3831@cisco>
2018-05-17 15:46       ` Oleg Nesterov
     [not found]       ` <20180517154637.GC8586@redhat.com>
     [not found]         ` <20180517154637.GC8586-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-05-24 15:28           ` Tycho Andersen
     [not found]   ` <20180518140415.GB26297@mailbox.org>
     [not found]     ` <20180518140415.GB26297-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2018-05-18 15:21       ` Tycho Andersen
     [not found]   ` <20180517151218.12850-2-tycho-E0fblnxP3wo@public.gmane.org>
2018-05-17 15:33     ` Oleg Nesterov
2018-05-19  0:14     ` kbuild test robot
2018-05-19  5:01     ` kbuild test robot
     [not found]       ` <201805191041.sVHKG1E9%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-05-21 22:55         ` Tycho Andersen

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=20180517151218.12850-1-tycho@tycho.ws \
    --to=tycho-e0fblnxp3wo@public.gmane.org \
    --cc=christian.brauner-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
    --cc=me-xzjC0nNlxno@public.gmane.org \
    --cc=oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=suda.akihiro-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
    --cc=tyhicks-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    /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