From: Benjamin Berg <benjamin@sipsolutions.net>
To: linux-um@lists.infradead.org
Cc: Benjamin Berg <benjamin.berg@intel.com>
Subject: [RFC PATCH v2 0/9] SECCOMP based userspace for UML
Date: Wed, 23 Oct 2024 16:08:18 +0200 [thread overview]
Message-ID: <20241023140827.136550-1-benjamin@sipsolutions.net> (raw)
From: Benjamin Berg <benjamin.berg@intel.com>
Hi all,
here is an updated version of the SECCOMP patchset. The main improvement
to the previous RFC version is that now FP registers will work correctly
on 32 bit. I hope it is in a relatively good state overall, but I expect
we will not merge this into 6.13.
The patchset adds a new userspace handling mode to UML that is based on
a SECCOMP filter and trusted code within each userspace process.
One advantage of this approach is that it saves quite a few context
switches when handling pagefaults (and syscalls to some extend). The
reason is that the ptrace code needs a separate context switch to
execute syscalls in the stub as well as another one to grab the segfault
information.
Benjamin
RFCv2:
- Fix FP handling on i386
- Improved MM list for userspace sigchild handling
Benjamin Berg (9):
um: Store full CSGSFS and SS register from mcontext
um: Move faultinfo extraction into userspace routine
um: Add UML_SECCOMP configuration option
um: Add stub side of SECCOMP/futex based process handling
um: Add helper functions to get/set state for SECCOMP
um: Add SECCOMP support detection and initialization
um: Track userspace children dying in SECCOMP mode
um: Implement kernel side of SECCOMP based process handling
um: pass FD for memory operations when needed
arch/um/Kconfig | 19 +
arch/um/include/asm/irq.h | 5 +-
arch/um/include/asm/mmu.h | 3 +
arch/um/include/shared/common-offsets.h | 4 +
arch/um/include/shared/irq_user.h | 1 +
arch/um/include/shared/os.h | 3 +-
arch/um/include/shared/skas/mm_id.h | 13 +
arch/um/include/shared/skas/skas.h | 6 +
arch/um/include/shared/skas/stub-data.h | 21 +-
arch/um/kernel/irq.c | 5 +
arch/um/kernel/skas/mmu.c | 90 +++-
arch/um/kernel/skas/stub.c | 131 +++++-
arch/um/kernel/skas/stub_exe.c | 156 ++++++-
arch/um/os-Linux/internal.h | 4 +
arch/um/os-Linux/process.c | 31 ++
arch/um/os-Linux/registers.c | 4 +-
arch/um/os-Linux/signal.c | 19 +-
arch/um/os-Linux/skas/mem.c | 104 ++++-
arch/um/os-Linux/skas/process.c | 493 +++++++++++++++------
arch/um/os-Linux/start_up.c | 148 ++++++-
arch/x86/um/os-Linux/mcontext.c | 223 +++++++++-
arch/x86/um/ptrace.c | 76 +++-
arch/x86/um/shared/sysdep/kernel-offsets.h | 2 +
arch/x86/um/shared/sysdep/mcontext.h | 10 +
arch/x86/um/shared/sysdep/stub-data.h | 23 +
arch/x86/um/shared/sysdep/stub.h | 2 +
arch/x86/um/shared/sysdep/stub_32.h | 13 +
arch/x86/um/shared/sysdep/stub_64.h | 14 +
arch/x86/um/tls_32.c | 23 +-
29 files changed, 1437 insertions(+), 209 deletions(-)
create mode 100644 arch/x86/um/shared/sysdep/stub-data.h
--
2.47.0
next 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 Benjamin Berg [this message]
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 ` [RFC PATCH v2 3/9] um: Add UML_SECCOMP configuration option Benjamin Berg
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-1-benjamin@sipsolutions.net \
--to=benjamin@sipsolutions.net \
--cc=benjamin.berg@intel.com \
--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.