linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v14 0/4] Checkpoint Support for Syscall User Dispatch
@ 2023-03-28 16:48 Gregory Price
  2023-03-28 16:48 ` [PATCH v14 1/4] asm-generic,arm64: create task variant of access_ok Gregory Price
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Gregory Price @ 2023-03-28 16:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-doc, linux-arm-kernel, linux-arch, oleg, avagin, peterz,
	luto, krisman, tglx, corbet, shuah, catalin.marinas, arnd, will,
	mark.rutland, tongtiangen, robin.murphy, Gregory Price

v14: implement task_access_ok variant for cross-task pointer checks
     patch 2/4 changed from access_ok to task_access_ok

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:
- Create new task_access_ok which leverages the provided task's
  information when validating userland pointers.  For ARM64 this means
  MTE tags are accounted for.  For all other architectures, this simply
  reduces to access_ok (presently).

- Refactor configuration setting interface to operate on a task
  rather than current, so the set and error paths can be consolidated

- 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):
  asm-generic,arm64: create task variant of access_ok
  syscall_user_dispatch: helper function to operate on given task
  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 ++
 arch/arm64/include/asm/uaccess.h              | 13 +++-
 include/asm-generic/access_ok.h               | 10 +++
 include/linux/syscall_user_dispatch.h         | 18 +++++
 include/uapi/linux/ptrace.h                   | 29 ++++++++
 kernel/entry/syscall_user_dispatch.c          | 67 ++++++++++++++---
 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 +++++++++++++++++++
 10 files changed, 213 insertions(+), 12 deletions(-)
 create mode 100644 tools/testing/selftests/ptrace/get_set_sud.c

-- 
2.39.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-03-30 14:44 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-28 16:48 [PATCH v14 0/4] Checkpoint Support for Syscall User Dispatch Gregory Price
2023-03-28 16:48 ` [PATCH v14 1/4] asm-generic,arm64: create task variant of access_ok Gregory Price
2023-03-28 18:46   ` Arnd Bergmann
2023-03-29 15:15   ` Oleg Nesterov
2023-03-29 15:41     ` Arnd Bergmann
2023-03-29 16:03       ` Oleg Nesterov
2023-03-29  3:56         ` Gregory Price
2023-03-29 17:13           ` Oleg Nesterov
2023-03-29  5:37             ` Gregory Price
2023-03-29 17:58               ` Oleg Nesterov
2023-03-29  5:54                 ` Gregory Price
2023-03-29 18:13                   ` Oleg Nesterov
2023-03-29 10:02                 ` Gregory Price
2023-03-29 23:54                   ` Oleg Nesterov
2023-03-29 18:29         ` Arnd Bergmann
2023-03-29 16:22   ` Catalin Marinas
2023-03-29  4:34     ` Gregory Price
2023-03-30 14:05       ` Catalin Marinas
2023-03-30  4:18         ` Gregory Price
2023-03-28 16:48 ` [PATCH v14 2/4] syscall_user_dispatch: helper function to operate on given task Gregory Price
2023-03-28 16:48 ` [PATCH v14 3/4] ptrace,syscall_user_dispatch: checkpoint/restore support for SUD Gregory Price
2023-03-28 16:48 ` [PATCH v14 4/4] selftest,ptrace: Add selftest for syscall user dispatch config api Gregory Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).