[PATCH v7 0/1] Checkpoint Support for Syscall User Dispatch

From: Gregory Price
Date: Thu Jan 26 2023 - 14:06:53 EST


v7: drop ptrace suspend flag, not required
hanging unreferenced variable
whitespace

v6: drop fs/proc/array update, it's not needed
drop on_dispatch field exposure in config structure, it's not
checkpoint relevant.
(Thank you for the reviews Oleg and Andrei)

v5: automated test for !defined(GENERIC_ENTRY) failed, fix fs/proc
use ifdef for GENERIC_ENTRY || TIF_SYSCALL_USER_DISPATCH
note: syscall user dispatch is not presently supported for
non-generic entry, but could be implemented. question is
whether the TIF_ define should be carved out now or then

v4: Whitespace
s/CHECKPOINT_RESTART/CHECKPOINT_RESUME
check test_syscall_work(SYSCALL_USER_DISPATCH) to determine if it's
turned on or not in fs/proc/array and getter interface

v3: Kernel test robot static function fix
Whitespace nitpicks

v2: Implements the getter/setter interface in ptrace rather than prctl

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:
- 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.

Gregory Price (1):
ptrace,syscall_user_dispatch: checkpoint/restore support for SUD

.../admin-guide/syscall-user-dispatch.rst | 5 ++-
include/linux/syscall_user_dispatch.h | 18 +++++++++
include/uapi/linux/ptrace.h | 9 +++++
kernel/entry/syscall_user_dispatch.c | 39 +++++++++++++++++++
kernel/ptrace.c | 9 +++++
5 files changed, 79 insertions(+), 1 deletion(-)

--
2.39.0