linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Aleksa Sarai <cyphar@cyphar.com>,
	Chris Palmer <palmer@google.com>,
	Christian Brauner <christian.brauner@ubuntu.com>,
	Christoph Hellwig <hch@lst.de>, Matt Denton <mpdenton@google.com>,
	Robert Sesek <rsesek@google.com>,
	Thadeu Lima de Souza Cascardo <cascardo@canonical.com>,
	Sargun Dhillon <sargun@sargun.me>, Shuah Khan <shuah@kernel.org>,
	Tycho Andersen <tycho@tycho.ws>, Will Deacon <will@kernel.org>,
	Will Drewry <wad@chromium.org>, Yonghong Song <yhs@fb.com>
Subject: [GIT PULL] seccomp updates for v5.9-rc1
Date: Mon, 3 Aug 2020 12:39:30 -0700	[thread overview]
Message-ID: <202008031231.0D9CBD0FD@keescook> (raw)

Hi Linus,

Please pull these seccomp updates for v5.9-rc1. There are a bunch of
clean ups and selftest improvements along with two major updates to the
SECCOMP_RET_USER_NOTIF filter return: EPOLLHUP support to more easily
detect the death of a monitored process, and being able to inject fds when
intercepting syscalls that expect an fd-opening side-effect (needed by
both container folks and Chrome). The latter continued the refactoring
of __scm_install_fd() started by Christoph, and in the process found
and fixed a handful of bugs in various callers.

Thanks!

-Kees

The following changes since commit b3a9e3b9622ae10064826dccb4f7a52bd88c7407:

  Linux 5.8-rc1 (2020-06-14 12:45:04 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/seccomp-v5.9-rc1

for you to fetch changes up to c97aedc52dce4c87d4c44de4e6af941cd102600c:

  selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD (2020-07-14 16:30:22 -0700)

----------------------------------------------------------------
seccomp updates for v5.9-rc1

- Improved selftest coverage, timeouts, and reporting
- Add EPOLLHUP support for SECCOMP_RET_USER_NOTIF (Christian Brauner)
- Refactor __scm_install_fd() into __receive_fd() and fix buggy callers
- Introduce "addfd" command for SECCOMP_RET_USER_NOTIF (Sargun Dhillon)

----------------------------------------------------------------
Christian Brauner (5):
      seccomp: rename "usage" to "refs" and document
      seccomp: release filter after task is fully dead
      seccomp: Lift wait_queue into struct seccomp_filter
      seccomp: notify about unused filter
      selftests/seccomp: Check for EPOLLHUP for user_notif

Kees Cook (21):
      selftests/seccomp: Rename XFAIL to SKIP
      selftests/seccomp: Add SKIPs for failed unshare()
      selftests/seccomp: Set NNP for TSYNC ESRCH flag test
      seccomp: Report number of loaded filters in /proc/$pid/status
      selftests/seccomp: Expand benchmark to per-filter measurements
      selftests/seccomp: Improve calibration loop
      seccomp: Use pr_fmt
      selftests/seccomp: Make kcmp() less required
      selftests/seccomp: Rename user_trap_syscall() to user_notif_syscall()
      seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID
      seccomp: Use -1 marker for end of mode 1 syscall list
      selftests/harness: Clean up kern-doc for fixtures
      selftests/seccomp: Refactor to use fixture variants
      selftests/seccomp: Check ENOSYS under tracing
      net/compat: Add missing sock updates for SCM_RIGHTS
      pidfd: Add missing sock updates for pidfd_getfd()
      net/scm: Regularize compat handling of scm_detach_fds()
      fs: Move __scm_install_fd() to __receive_fd()
      fs: Add receive_fd() wrapper for __receive_fd()
      pidfd: Replace open-coded receive_fd()
      fs: Expand __receive_fd() to accept existing fd

Sargun Dhillon (3):
      seccomp: Add find_notification helper
      seccomp: Introduce addfd ioctl to seccomp user notifier
      selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD

Thadeu Lima de Souza Cascardo (1):
      selftests/seccomp: use 90s as timeout

 arch/mips/include/asm/seccomp.h                    |   4 +-
 fs/file.c                                          |  61 ++
 fs/proc/array.c                                    |   2 +
 include/asm-generic/seccomp.h                      |   2 +-
 include/linux/file.h                               |  19 +
 include/linux/seccomp.h                            |  10 +-
 include/net/sock.h                                 |   4 +
 include/uapi/linux/seccomp.h                       |  25 +-
 init/init_task.c                                   |   3 +
 kernel/exit.c                                      |   1 +
 kernel/fork.c                                      |   1 -
 kernel/pid.c                                       |  14 +-
 kernel/seccomp.c                                   | 376 ++++++++---
 net/compat.c                                       |  55 +-
 net/core/scm.c                                     |  50 +-
 net/core/sock.c                                    |  21 +
 tools/testing/selftests/kselftest_harness.h        |  15 +-
 tools/testing/selftests/seccomp/config             |   1 +
 .../testing/selftests/seccomp/seccomp_benchmark.c  |  80 ++-
 tools/testing/selftests/seccomp/seccomp_bpf.c      | 708 +++++++++++++++------
 tools/testing/selftests/seccomp/settings           |   1 +
 21 files changed, 1061 insertions(+), 392 deletions(-)
 create mode 100644 tools/testing/selftests/seccomp/settings

-- 
Kees Cook

             reply	other threads:[~2020-08-03 19:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 19:39 Kees Cook [this message]
2020-08-04 21:40 ` [GIT PULL] seccomp updates for v5.9-rc1 pr-tracker-bot

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=202008031231.0D9CBD0FD@keescook \
    --to=keescook@chromium.org \
    --cc=cascardo@canonical.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=cyphar@cyphar.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpdenton@google.com \
    --cc=palmer@google.com \
    --cc=rsesek@google.com \
    --cc=sargun@sargun.me \
    --cc=shuah@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tycho@tycho.ws \
    --cc=wad@chromium.org \
    --cc=will@kernel.org \
    --cc=yhs@fb.com \
    /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;
as well as URLs for NNTP newsgroup(s).