All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Berg <benjamin@sipsolutions.net>
To: linux-um@lists.infradead.org
Cc: Benjamin Berg <benjamin@sipsolutions.net>
Subject: [RFC PATCH v2 3/9] um: Add UML_SECCOMP configuration option
Date: Wed, 23 Oct 2024 16:08:21 +0200	[thread overview]
Message-ID: <20241023140827.136550-4-benjamin@sipsolutions.net> (raw)
In-Reply-To: <20241023140827.136550-1-benjamin@sipsolutions.net>

Add the UML_SECCOMP configuration options. The next commits will add the
support itself in smaller chunks.

Only x86_64 will be supported for now.

Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>

---

RFCv2:
- Remove "default n"
---
 arch/um/Kconfig | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index a9876bdb5bf9..7ec0e98493fa 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -257,6 +257,25 @@ config KASAN_SHADOW_OFFSET
 	  set to a large value. On low-memory systems, try 0x7fff8000, as it fits
 	  into the immediate of most instructions, improving performance.
 
+config UML_SECCOMP
+	bool "SECCOMP based userspace"
+	help
+	  With SECCOMP userspace processes work collaboratively with the kernel
+	  instead of being traced using ptrace. All syscalls from the application
+	  are caught and redirected using a signal. This signal handler in turn
+	  is permitted to do the selected set of syscalls to communicate with
+	  the UML kernel and do the required memory management.
+
+	  This method is overall faster than the ptrace based userspace,
+	  primarily because it reduces the number of context switches for
+	  (minor) page faults.
+	  However, the SECCOMP filter is not (yet) restrictive enough to prevent
+	  userspace from reading and writing all physical memory. Userspace
+	  processes could also trick the stub into disabling SIGALRM which
+	  prevents it from being interrupted for scheduling purposes.
+
+	  If in doubt say N, as the feature has security implications.
+
 endmenu
 
 source "arch/um/drivers/Kconfig"
-- 
2.47.0



  parent reply	other threads:[~2024-10-23 14:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 14:08 [RFC PATCH v2 0/9] SECCOMP based userspace for UML Benjamin Berg
2024-10-23 14:08 ` [RFC PATCH v2 1/9] um: Store full CSGSFS and SS register from mcontext Benjamin Berg
2024-10-23 14:08 ` [RFC PATCH v2 2/9] um: Move faultinfo extraction into userspace routine Benjamin Berg
2024-10-23 14:08 ` Benjamin Berg [this message]
2024-10-23 14:08 ` [RFC PATCH v2 4/9] um: Add stub side of SECCOMP/futex based process handling Benjamin Berg
2024-10-23 14:08 ` [RFC PATCH v2 5/9] um: Add helper functions to get/set state for SECCOMP Benjamin Berg
2024-10-23 14:08 ` [RFC PATCH v2 6/9] um: Add SECCOMP support detection and initialization Benjamin Berg
2024-10-23 14:08 ` [RFC PATCH v2 7/9] um: Track userspace children dying in SECCOMP mode Benjamin Berg
2024-10-23 14:08 ` [RFC PATCH v2 8/9] um: Implement kernel side of SECCOMP based process handling Benjamin Berg
2024-10-23 14:08 ` [RFC PATCH v2 9/9] um: pass FD for memory operations when needed Benjamin Berg
2024-10-24 13:52   ` Tiwei Bie
2024-10-26 10:33     ` Benjamin Berg

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=20241023140827.136550-4-benjamin@sipsolutions.net \
    --to=benjamin@sipsolutions.net \
    --cc=linux-um@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.