Skip to content

Prepare syscall_get_arch for PTRACE_GET_SYSCALL_INFO

Dmitry V. Levin linux-audit lkml 2 versions – Applied

Status from this message: Merged into audit/next, thanks everyone.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 14 repliesApplied
  2. v114 patches 9 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/13Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.harch/arc/include/asm/elf.h include/uapi/linux/elf-em.h+3 -51 reply
2/13arc: define syscall_get_arch()arch/arc/include/asm/syscall.h include/uapi/linux/audit.h+15 -01 reply
3/13c6x: define syscall_get_arch()arch/c6x/include/asm/syscall.h include/uapi/linux/audit.h+9 -01 reply
4/13h8300: define syscall_get_arch()arch/h8300/include/asm/syscall.h include/uapi/linux/audit.h+7 -01 reply
5/13Move EM_HEXAGON to uapi/linux/elf-em.harch/hexagon/include/asm/elf.h include/uapi/linux/elf-em.h+2 -51 reply
6/13hexagon: define syscall_get_arch()arch/hexagon/include/asm/syscall.h include/uapi/linux/audit.h+9 -01 reply
7/13m68k: define syscall_get_arch()arch/m68k/include/asm/syscall.h+12 -01 reply
8/13Move EM_NDS32 to uapi/linux/elf-em.harch/nds32/include/asm/elf.h include/uapi/linux/elf-em.h+3 -21 reply
9/13nds32: define syscall_get_arch()arch/nds32/include/asm/syscall.h include/uapi/linux/audit.h+11 -01 reply
10/13nios2: define syscall_get_arch()arch/nios2/include/asm/syscall.h include/uapi/linux/audit.h+7 -01 reply
11/13Move EM_UNICORE to uapi/linux/elf-em.harch/unicore32/include/asm/elf.h include/uapi/linux/elf-em.h+2 -21 reply
12/13unicore32: define syscall_get_arch()arch/unicore32/include/asm/syscall.h include/uapi/linux/audit.h+13 -01 reply
13/13syscall_get_arch: add "struct task_struct *" argumentarch/alpha/include/asm/syscall.h arch/arc/include/asm/syscall.h arch/arm/include/asm/syscall.h +27 more+52 -421 reply

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchVineet GuptaPaul MooreMark SalterGeert UytterhoevenVincent ChenGreentime HuLey Foon TanAndy LutomirskiPalmer DabbeltPaul BurtonMichael EllermanKees CookRichard Guy Briggs
SeriesA-b
1/13A-b A-b
2/13A-b A-b
3/13A-b A-b
4/13A-b
5/13A-b
6/13A-b
7/13A-b R-b
8/13A-b A-b A-b
9/13A-b A-b A-b
10/13A-b A-b
11/13A-b
12/13A-b
13/13A-b A-b R-b R-b A-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 13 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/13] Prepare syscall_get_arch for PTRACE_GET_SYSCALL_INFO

syscall_get_arch() is required to be implemented on all architectures in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request:
syscall_get_arch() is going to be called from ptrace_request() along with syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions with a tracee as their argument.

The primary intent is that the triple (audit_arch, syscall_nr, arg1..arg6) should describe what system call is being called and what its arguments are.

This patchset began as a series called "Prepare for PTRACE_GET_SYSCALL_INFO", then I merged it into a series called "ptrace: add PTRACE_GET_SYSCALL_INFO request" that also contains ptrace-specific changes.

The ptrace-specific part, however, needs more attention to workaround problems on niche architectures like alpha, while the syscall_get_arch() part is straightforward, so I decided to split it out into a separate patchset that just prepares syscall_get_arch() for PTRACE_GET_SYSCALL_INFO: it adds syscall_get_arch() to those architectures that haven't implemented it yet, and then adds "struct task_struct *" argument to syscall_get_arch() on all architectures.

All patches from this patchset have been already reviewed, so it's ready to be merged without waiting for the ptrace-specific part. As it's all about syscall_get_arch(), it should probably go via audit tree.

Notes:
v2: rebased to v5.1-rc1, added Acked-by

Dmitry V. Levin (13):
Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.h
arc: define syscall_get_arch()
c6x: define syscall_get_arch()
h8300: define syscall_get_arch()
Move EM_HEXAGON to uapi/linux/elf-em.h
hexagon: define syscall_get_arch()
m68k: define syscall_get_arch()
Move EM_NDS32 to uapi/linux/elf-em.h
nds32: define syscall_get_arch()
nios2: define syscall_get_arch()
Move EM_UNICORE to uapi/linux/elf-em.h
unicore32: define syscall_get_arch()
syscall_get_arch: add "struct task_struct *" argument

 arch/alpha/include/asm/syscall.h      |  2 +-
 arch/arc/include/asm/elf.h            |  6 +-----
 arch/arc/include/asm/syscall.h        | 11 +++++++++++
 arch/arm/include/asm/syscall.h        |  2 +-
 arch/arm64/include/asm/syscall.h      |  4 ++--
 arch/c6x/include/asm/syscall.h        |  7 +++++++
 arch/csky/include/asm/syscall.h       |  2 +-
 arch/h8300/include/asm/syscall.h      |  6 ++++++
 arch/hexagon/include/asm/elf.h        |  6 +-----
 arch/hexagon/include/asm/syscall.h    |  8 ++++++++
 arch/ia64/include/asm/syscall.h       |  2 +-
 arch/m68k/include/asm/syscall.h       | 12 ++++++++++++
 arch/microblaze/include/asm/syscall.h |  2 +-
 arch/mips/include/asm/syscall.h       |  6 +++---
 arch/mips/kernel/ptrace.c             |  2 +-
 arch/nds32/include/asm/elf.h          |  3 +--
 arch/nds32/include/asm/syscall.h      |  9 +++++++++
 arch/nios2/include/asm/syscall.h      |  6 ++++++
 arch/openrisc/include/asm/syscall.h   |  2 +-
 arch/parisc/include/asm/syscall.h     |  4 ++--
 arch/powerpc/include/asm/syscall.h    | 10 ++++++++--
 arch/riscv/include/asm/syscall.h      |  2 +-
 arch/s390/include/asm/syscall.h       |  4 ++--
 arch/sh/include/asm/syscall_32.h      |  2 +-
 arch/sh/include/asm/syscall_64.h      |  2 +-
 arch/sparc/include/asm/syscall.h      |  5 +++--
 arch/unicore32/include/asm/elf.h      |  3 +--
 arch/unicore32/include/asm/syscall.h  | 12 ++++++++++++
 arch/x86/include/asm/syscall.h        |  8 +++++---
 arch/x86/um/asm/syscall.h             |  2 +-
 arch/xtensa/include/asm/syscall.h     |  2 +-
 include/asm-generic/syscall.h         |  5 +++--
 include/uapi/linux/audit.h            | 12 ++++++++++++
 include/uapi/linux/elf-em.h           |  6 ++++++
 kernel/auditsc.c                      |  4 ++--
 kernel/seccomp.c                      |  4 ++--
 36 files changed, 137 insertions(+), 48 deletions(-)
 create mode 100644 arch/m68k/include/asm/syscall.h
 create mode 100644 arch/unicore32/include/asm/syscall.h
Signature · 1 line
ldv