mbox series

[v4,0/4] arm64/sme: ptrace support for TPIDR2_EL0

Message ID 20220829154921.837871-1-broonie@kernel.org (mailing list archive)
Headers show
Series arm64/sme: ptrace support for TPIDR2_EL0 | expand

Message

Mark Brown Aug. 29, 2022, 3:49 p.m. UTC
When SME was initially merged we did not add support for TPIDR2_EL0 to
the ptrace interface, creating difficulties for debuggers in accessing
lazy save state for ZA. This series implements that support, extending
the existing NT_ARM_TLS regset to support the register when available,
and adds kselftest coverage for the existing and new NT_ARM_TLS
functionality.

Existing programs that query the size of the register set will be able
to observe the increased size of the register set. Programs that assume
the register set is single register will see no change. On systems that
do not support SME TPIDR2_EL0 will read as 0 and writes will be ignored,
support for SME should be queried via hwcaps as normal.

v4:
 - Rebase onto v6.0-rc3.
v3:
 - Fix copyright date on test program.
v2:
 - Rebase onto v6.0-rc1.

Mark Brown (4):
  kselftest/arm64: Add test coverage for NT_ARM_TLS
  arm64/ptrace: Document extension of NT_ARM_TLS to cover TPIDR2_EL0
  arm64/ptrace: Support access to TPIDR2_EL0
  kselftest/arm64: Add coverage of TPIDR2_EL0 ptrace interface

 Documentation/arm64/sme.rst                  |   3 +
 arch/arm64/kernel/ptrace.c                   |  25 +-
 tools/testing/selftests/arm64/abi/.gitignore |   1 +
 tools/testing/selftests/arm64/abi/Makefile   |   2 +-
 tools/testing/selftests/arm64/abi/ptrace.c   | 241 +++++++++++++++++++
 5 files changed, 266 insertions(+), 6 deletions(-)
 create mode 100644 tools/testing/selftests/arm64/abi/ptrace.c


base-commit: b90cb1053190353cc30f0fef0ef1f378ccc063c5

Comments

Catalin Marinas Sept. 21, 2022, 5:19 p.m. UTC | #1
On Mon, 29 Aug 2022 16:49:17 +0100, Mark Brown wrote:
> When SME was initially merged we did not add support for TPIDR2_EL0 to
> the ptrace interface, creating difficulties for debuggers in accessing
> lazy save state for ZA. This series implements that support, extending
> the existing NT_ARM_TLS regset to support the register when available,
> and adds kselftest coverage for the existing and new NT_ARM_TLS
> functionality.
> 
> [...]

Applied to arm64 (for-next/tpidr2_el0), thanks!

[1/4] kselftest/arm64: Add test coverage for NT_ARM_TLS
      https://git.kernel.org/arm64/c/ecaf4d3f734f
[2/4] arm64/ptrace: Document extension of NT_ARM_TLS to cover TPIDR2_EL0
      https://git.kernel.org/arm64/c/f285da05c62a
[3/4] arm64/ptrace: Support access to TPIDR2_EL0
      https://git.kernel.org/arm64/c/0027d9c6c7b5
[4/4] kselftest/arm64: Add coverage of TPIDR2_EL0 ptrace interface
      https://git.kernel.org/arm64/c/2ddadec2206c