mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: krisman@collabora.com, tglx@linutronix.de, luto@kernel.org,
	 peterz@infradead.org, keescook@chromium.org,
	gregory.price@memverge.com
Cc: Dmitry Vyukov <dvyukov@google.com>,
	Marco Elver <elver@google.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/3] syscall_user_dispatch: Add PR_SYS_DISPATCH_INCLUSIVE_ON
Date: Wed, 21 May 2025 17:04:27 +0200	[thread overview]
Message-ID: <cover.1747839440.git.dvyukov@google.com> (raw)

syscall_user_dispatch: Add PR_SYS_DISPATCH_INCLUSIVE_ON

There are two possible scenarios for syscall filtering:
- having a trusted/allowed range of PCs, and intercepting everything else
- or the opposite: a single untrusted/intercepted range and allowing
   everything else (this is relevant for any kind of sandboxing scenario,
   or monitoring behavior of a single library)

The current API only allows the former use case due to allowed
range wrap-around check. Add PR_SYS_DISPATCH_INCLUSIVE_ON that
enables the second use case.

Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Gregory Price <gregory.price@memverge.com>
Cc: Marco Elver <elver@google.com>
Cc: linux-kernel@vger.kernel.org

Dmitry Vyukov (3):
  selftests: Fix errno checking in syscall_user_dispatch test
  syscall_user_dispatch: Add PR_SYS_DISPATCH_INCLUSIVE_ON
  selftests: Add tests for PR_SYS_DISPATCH_INCLUSIVE_ON

 .../admin-guide/syscall-user-dispatch.rst     |  23 +--
 include/uapi/linux/prctl.h                    |   7 +-
 kernel/entry/syscall_user_dispatch.c          |  36 +++--
 tools/include/uapi/linux/prctl.h              |   7 +-
 .../syscall_user_dispatch/sud_test.c          | 140 ++++++++++++------
 5 files changed, 146 insertions(+), 67 deletions(-)


base-commit: 4a95bc121ccdaee04c4d72f84dbfa6b880a514b6
-- 
2.49.0.1143.g0be31eac6b-goog


                 reply	other threads:[~2025-05-21 15:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=cover.1747839440.git.dvyukov@google.com \
    --to=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=gregory.price@memverge.com \
    --cc=keescook@chromium.org \
    --cc=krisman@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®