[PATCH 2/3] aarch64: Add NT_ARM_PAC_* regset
Kuan-Ying Lee
kuan-ying.lee@canonical.com
Wed Aug 14 08:51:19 GMT 2024
Add the NT_ARM_PAC_MASK and NT_ARM_PAC_ENABLED_KEYS for aarch64.
Recognize and print the new core item.
Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com>
---
backends/aarch64_corenote.c | 24 +++++++++++++++++++++++-
libebl/eblcorenotetypename.c | 2 ++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/backends/aarch64_corenote.c b/backends/aarch64_corenote.c
index bd0a4a725411..35c8e8012c7b 100644
--- a/backends/aarch64_corenote.c
+++ b/backends/aarch64_corenote.c
@@ -115,6 +115,26 @@ static const Ebl_Core_Item aarch64_mte_items [] =
}
};
+static const Ebl_Core_Item aarch64_pac_enabled_items [] =
+ {
+ {
+ .name = "enabled_keys", .type = ELF_T_XWORD, .format = 'x',
+ .offset = 0, .group = "register"
+ }
+ };
+
+static const Ebl_Core_Item aarch64_pac_mask_items [] =
+ {
+ {
+ .name = "pauth_dmask", .type = ELF_T_XWORD, .format = 'x',
+ .offset = 0, .group = "register"
+ },
+ {
+ .name = "pauth_cmask", .type = ELF_T_XWORD, .format = 'x',
+ .offset = 8, .group = "register"
+ }
+ };
+
#define AARCH64_HWBP_REG(KIND, N) \
{ \
.name = "DBG" KIND "VR" #N "_EL1", .type = ELF_T_XWORD, .format = 'x', \
@@ -176,6 +196,8 @@ AARCH64_BP_WP_GROUP ("W", aarch64_hw_wp_items);
EXTRA_ITEMS (NT_ARM_HW_BREAK, 264, aarch64_hw_bp_items) \
EXTRA_ITEMS (NT_ARM_HW_WATCH, 264, aarch64_hw_wp_items) \
EXTRA_ITEMS (NT_ARM_SYSTEM_CALL, 4, aarch64_syscall_items) \
- EXTRA_ITEMS (NT_ARM_TAGGED_ADDR_CTRL, 8, aarch64_mte_items)
+ EXTRA_ITEMS (NT_ARM_TAGGED_ADDR_CTRL, 8, aarch64_mte_items) \
+ EXTRA_ITEMS (NT_ARM_PAC_ENABLED_KEYS, 8, aarch64_pac_enabled_items) \
+ EXTRA_ITEMS (NT_ARM_PAC_MASK, 16, aarch64_pac_mask_items)
#include "linux-core-note.c"
diff --git a/libebl/eblcorenotetypename.c b/libebl/eblcorenotetypename.c
index 49331bdf76e8..3e2f8daa0fd5 100644
--- a/libebl/eblcorenotetypename.c
+++ b/libebl/eblcorenotetypename.c
@@ -93,6 +93,8 @@ ebl_core_note_type_name (Ebl *ebl, uint32_t type, char *buf, size_t len)
KNOWNSTYPE (ARM_HW_WATCH);
KNOWNSTYPE (ARM_SYSTEM_CALL);
KNOWNSTYPE (ARM_TAGGED_ADDR_CTRL);
+ KNOWNSTYPE (ARM_PAC_ENABLED_KEYS);
+ KNOWNSTYPE (ARM_PAC_MASK);
KNOWNSTYPE (SIGINFO);
KNOWNSTYPE (FILE);
#undef KNOWNSTYPE
--
2.43.0
More information about the Elfutils-devel
mailing list