Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v3 0/5] gdb/aarch64: Add POR_EL0 register support for FEAT_S1POE
@ 2026-07-14 20:15 srinath.parvathaneni
  2026-07-14 20:15 ` [PATCH v3 1/5] [PATCH 1/5] " srinath.parvathaneni
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: srinath.parvathaneni @ 2026-07-14 20:15 UTC (permalink / raw)
  To: gdb-patches
  Cc: luis.machado.foss, guinevere, thiago.bauermann, Ezra.Sitorus,
	Matthieu.Longo, simark, Srinath Parvathaneni

From: Srinath Parvathaneni <srinath.parvathaneni@arm.com>

Changes v2 -> v3:

Patch 1:
* Address review comments.
* After discussion, retain the _EL0 suffix for the POE register.
* Merge the POR_EL0 custom printing support from v2 Patch 2.
* Update the XML description to use the POR_EL0_FLAGS type for
  custom register printing.

Patch 2:
* Corresponds to v2 Patch 3.
* No functional changes.
* Approved by Thiago Jung Bauermann.

Patch 3:
* Corresponds to v2 Patch 4.
* No functional changes.
* Approved by Thiago Jung Bauermann.

Patch 4:
* The BFD/readelf changes from v2 Patch 5 have been posted separately
  to binutils-gdb and have since been approved and committed.
* Corresponds to v2 Patch 6.
* Address review comments on the GDB core file support.

Patch 5:
* Corresponds to v2 Patch 7.
* Address review comments.
* Update the tests to reflect the POR_EL0 custom string shown by
  `info registers por_el0` and `print $por_el0`.
* Fix aarch64-poe-core.exp test issues.

* Rebased onto current upstream master, including:
  * Matthieu Longo's "gdb: align siginfo_t with the Linux kernel definition".
  * My "gdb: Fix assignment to TYPE_CODE_FLAGS registers" patch.
----------------

Changes v1 -> v2:

* Rebased the SIGSEGV diagnostic support on Matthieu Longo's generic
  "siginfo_t" changes, using the new "_._addr_pkey.si_pkey" layout
  instead of introducing a target-specific "siginfo_t" extension.

* Split the original series into smaller, subsystem-specific patches:
  * GDB register support
  * POR_EL0 pretty printing
  * SIGSEGV diagnostics
  * gdbserver support
  * BFD/readelf core file support
  * GDB core file support
  * Testsuite

* Separated BFD/readelf and GDB core file support into independent
  patches.

* Retained FEAT_S1POE expansion as "Permission Overlay Extension" after internal discussion.

* Removed the POR_EL0 permission decoding string (e.g. `por_el0[pkey=<value>] = rwx`) from
  SIGSEGV diagnostics, as displaying permissions without also showing base and effective
  permissions can be misleading to users.

* Rebased the series onto current upstream master + Matthieu's patch
  "gdb: align siginfo_t with the Linux kernel definition"

----------------

Hi,

This series adds support for the AArch64 Permission Overlay Extension
(FEAT_S1POE) in GDB and gdbserver.

The series introduces support for the POR_EL0 register, allowing GDB
to read and write it using the Linux NT_ARM_POE regset. It also improves
SIGSEGV diagnostics for Permission Overlay violations, extends gdbserver
to transfer POR_EL0 during remote debugging, restores POR_EL0 from core
files, and adds testsuite coverage.

The BFD/readelf support for the NT_ARM_POE core note has already been
posted and approved separately.

commit d15490528409305f97004a2860fdb04543862774
Author: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
Date:   Thu Jul 2 13:57:25 2026 +0000

    bfd/readelf: Add core file support for FEAT_S1POE


The series consists of the following patches:

[1/5] gdb/aarch64: Add POR_EL0 register support
Add support for reading and writing the POR_EL0 register using the Linux
NT_ARM_POE regset.

[2/5] gdb: Improve SIGSEGV diagnostics for POE faults
Report the faulting address together with the associated protection key
for Permission Overlay violations.

[3/5] gdbserver/aarch64: Add POR_EL0 register support
Transfer the POR register through the Linux NT_ARM_POE regset during
remote debugging.

[4/5] gdb/aarch64: Add core file support for FEAT_S1POE
Restore the POR_EL0 register from Linux core files and signal frames.

[5/5] gdb/testsuite: Add FEAT_S1POE testcases
Add tests covering POR_EL0 register access, SIGSEGV diagnostics,
fix-and-continue support, and core file support.

The series has been tested natively and using gdbserver with remote GDB
on an FVP built using shrinkwrap with a Linux kernel configured with
CONFIG_ARM64_POE=y and a glibc version providing userspace POE support.

Regression tested on aarch64-none-linux-gnu with no regressions.

Ok for GDB master?

----------
>> This series adds support for the AArch64 Permission Overlay Extension
>> (FEAT_S1POE) in GDB, gdbserver, BFD and the testsuite.
>
> Hi Srinath!
>
> I don't know much about the arm architecture or this extension in 
> specific, but it seems that it at least adds new registers so this seems 
> like a valid question: Do these impact recording of ARM instructions 
> with the record-full subsystem at all?
> 
> It would be nice to have a gdb.reverse test that exercises some (ideally 
> all) new instructions if there are any, and some other instructions that 
> manipulate those new registers, if needed.
> 
> This isn't required to get this series merged, of course, but it would 
> be very nice to have it.

Hi Guinevere,

As far as I understand, FEAT_S1POE doesn't introduce any new AArch64
instructions in userspace, it only exposes the POR_EL0 register, which
is accessed through the Linux Protection-key APIs. The register itself
is managed by the kernel rather than being modified by normal AArch64
instructions. Because of that, I don't think this support has any impact
on the record-full subsystem.

Thanks for the suggestion about adding gdb.reverse tests. I'll keep that
in mind for other feature support.

Regards,
Srinath

Srinath Parvathaneni (5):
  gdb/aarch64: Add POR_EL0 register support for FEAT_S1POE
  gdb: Improve SIGSEGV diagnostics for POE faults
  gdbserver/aarch64: Add POR_EL0 register support
  gdb/aarch64: Add core file support for FEAT_S1POE
  gdb/testsuite: Add FEAT_S1POE testcases

 gdb/Makefile.in                               |   2 +
 gdb/aarch64-linux-nat.c                       |  64 +++++++++++
 gdb/aarch64-linux-tdep.c                      |  71 +++++++++++-
 gdb/aarch64-tdep.c                            |  23 ++++
 gdb/aarch64-tdep.h                            |  10 ++
 gdb/arch/aarch64-poe-linux.h                  |  29 +++++
 gdb/arch/aarch64.c                            |   4 +
 gdb/arch/aarch64.h                            |   8 +-
 gdb/features/Makefile                         |   1 +
 gdb/features/aarch64-poe.c                    |  68 ++++++++++++
 gdb/features/aarch64-poe.xml                  |  47 ++++++++
 gdb/nat/aarch64-poe-linux.h                   |  29 +++++
 gdb/testsuite/gdb.arch/aarch64-poe-core.exp   | 101 ++++++++++++++++++
 gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.   |   0
 gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.c  |  52 +++++++++
 .../gdb.arch/aarch64-poe-sigsegv.exp          |  58 ++++++++++
 gdb/testsuite/gdb.arch/aarch64-poe.c          |  29 +++++
 gdb/testsuite/gdb.arch/aarch64-poe.exp        |  46 ++++++++
 gdb/testsuite/lib/gdb.exp                     |  55 ++++++++++
 gdbserver/linux-aarch64-low.cc                |  30 ++++++
 20 files changed, 723 insertions(+), 4 deletions(-)
 create mode 100644 gdb/arch/aarch64-poe-linux.h
 create mode 100644 gdb/features/aarch64-poe.c
 create mode 100644 gdb/features/aarch64-poe.xml
 create mode 100644 gdb/nat/aarch64-poe-linux.h
 create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe-core.exp
 create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.
 create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.c
 create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.exp
 create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe.c
 create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe.exp

-- 
2.43.0


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

end of thread, other threads:[~2026-07-25 18:45 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-14 20:15 [PATCH v3 0/5] gdb/aarch64: Add POR_EL0 register support for FEAT_S1POE srinath.parvathaneni
2026-07-14 20:15 ` [PATCH v3 1/5] [PATCH 1/5] " srinath.parvathaneni
2026-07-21 19:53   ` Luis
2026-07-25  6:20     ` Thiago Jung Bauermann
2026-07-25  7:37       ` Luis
2026-07-25 18:44         ` Thiago Jung Bauermann
2026-07-21 20:25   ` Luis
2026-07-23  9:29     ` Srinath Parvathaneni
2026-07-25  6:13       ` Thiago Jung Bauermann
2026-07-25  7:29         ` Luis
2026-07-14 20:15 ` [PATCH v3 2/5] [PATCH 2/5] gdb: Improve SIGSEGV diagnostics for POE faults srinath.parvathaneni
2026-07-21 20:30   ` Luis
2026-07-22  9:41     ` Matthieu Longo
2026-07-22 23:11       ` Luis
2026-07-23  9:03         ` Srinath Parvathaneni
2026-07-25  7:39           ` Luis
2026-07-14 20:15 ` [PATCH v3 3/5] [PATCH 3/5] gdbserver/aarch64: Add POR_EL0 register support srinath.parvathaneni
2026-07-14 20:15 ` [PATCH v3 4/5] [PATCH 4/5] gdb/aarch64: Add core file support for FEAT_S1POE srinath.parvathaneni
2026-07-21 20:14   ` Luis
2026-07-14 20:15 ` [PATCH v3 5/5] [PATCH 5/5] gdb/testsuite: Add FEAT_S1POE testcases srinath.parvathaneni
2026-07-21 20:38   ` Luis
2026-07-25  6:23   ` Thiago Jung Bauermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox