From: Gregory Price <gourry.memverge@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-doc@vger.kernel.org, linux-arch@vger.kernel.org,
oleg@redhat.com, avagin@gmail.com, peterz@infradead.org,
luto@kernel.org, krisman@collabora.com, tglx@linutronix.de,
corbet@lwn.net, shuah@kernel.org, catalin.marinas@arm.com,
arnd@arndb.de, Gregory Price <gregory.price@memverge.com>
Subject: [PATCH v16 0/4] Checkpoint Support for Syscall User Dispatch
Date: Fri, 7 Apr 2023 13:18:30 -0400 [thread overview]
Message-ID: <20230407171834.3558-1-gregory.price@memverge.com> (raw)
This appears to be in a good state now. Not sure which branch
I should seek to have this pulled through, or what else needs to
be done to push this forward.
v16: pick up review tags, mild comment change
v15: drop task_access_ok variant, instead prefer to just untag the
selector address when validating the user pointer.
v14: implement task_access_ok variant for cross-task pointer checks
v13: sizeof consistency and cosmetic changes in patch 2
v12: split test into its own patch
change from padding a u8 to using a u64
casting issues
checkpatch.pl
[truncating version history]
Syscall user dispatch makes it possible to cleanly intercept system
calls from user-land. However, most transparent checkpoint software
presently leverages some combination of ptrace and system call
injection to place software in a ready-to-checkpoint state.
If Syscall User Dispatch is enabled at the time of being quiesced,
injected system calls will subsequently be interposed upon and
dispatched to the task's signal handler.
Patch summary:
- Refactor configuration setting interface to operate on a task
rather than current, so the set and error paths can be consolidated
- Untag the selector address when being set in order to enable an
untagged tracer to set a tagged tracee's syscall dispatch selector.
Otherwise an untagged tracer will always fail to set a tagged address.
- Implement a getter interface for Syscall User Dispatch config info.
To resume successfully, the checkpoint/resume software has to
save and restore this information. Presently this configuration
is write-only, with no way for C/R software to save it.
This was done in ptrace because syscall user dispatch is not part of
uapi. The syscall_user_dispatch_config structure was added to the
ptrace exports.
- Selftest for the new feature
Gregory Price (4):
syscall_user_dispatch: helper function to operate on given task
syscall user dispatch: untag selector addresses before access_ok
ptrace,syscall_user_dispatch: checkpoint/restore support for SUD
selftest,ptrace: Add selftest for syscall user dispatch config api
.../admin-guide/syscall-user-dispatch.rst | 4 +
include/linux/syscall_user_dispatch.h | 18 +++++
include/uapi/linux/ptrace.h | 29 ++++++++
kernel/entry/syscall_user_dispatch.c | 74 ++++++++++++++++---
kernel/ptrace.c | 9 +++
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/ptrace/Makefile | 2 +-
tools/testing/selftests/ptrace/get_set_sud.c | 72 ++++++++++++++++++
8 files changed, 199 insertions(+), 10 deletions(-)
create mode 100644 tools/testing/selftests/ptrace/get_set_sud.c
--
2.39.1
next reply other threads:[~2023-04-07 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 17:18 Gregory Price [this message]
2023-04-07 17:18 ` [PATCH v16 1/4] syscall_user_dispatch: helper function to operate on given task Gregory Price
2023-04-18 8:47 ` [tip: core/entry] syscall_user_dispatch: Split up set_syscall_user_dispatch() tip-bot2 for Gregory Price
2023-04-07 17:18 ` [PATCH v16 2/4] syscall user dispatch: untag selector addresses before access_ok Gregory Price
2023-04-18 8:47 ` [tip: core/entry] syscall_user_dispatch: Untag selector address before access_ok() tip-bot2 for Gregory Price
2023-04-07 17:18 ` [PATCH v16 3/4] ptrace,syscall_user_dispatch: checkpoint/restore support for SUD Gregory Price
2023-04-18 8:47 ` [tip: core/entry] ptrace: Provide set/get interface for syscall user dispatch tip-bot2 for Gregory Price
2023-04-07 17:18 ` [PATCH v16 4/4] selftest,ptrace: Add selftest for syscall user dispatch config api Gregory Price
2023-04-18 8:47 ` [tip: core/entry] selftest, ptrace: " tip-bot2 for Gregory Price
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=20230407171834.3558-1-gregory.price@memverge.com \
--to=gourry.memverge@gmail.com \
--cc=arnd@arndb.de \
--cc=avagin@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=gregory.price@memverge.com \
--cc=krisman@collabora.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.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®