]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
aarch64: Add NT_ARM_PAC_* regset
authorKuan-Ying Lee <kuan-ying.lee@canonical.com>
Wed, 14 Aug 2024 08:51:19 +0000 (16:51 +0800)
committerMark Wielaard <mark@klomp.org>
Fri, 30 Aug 2024 14:25:02 +0000 (16:25 +0200)
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
libebl/eblcorenotetypename.c

index 38b21de7d9751c8fd0339c590e3cbfaea5b073d9..9966e4279f43328c0d2f03bb6e2f307e8d84e28f 100644 (file)
@@ -127,6 +127,14 @@ static const Ebl_Core_Item aarch64_pac_items [] =
     }
   };
 
+static const Ebl_Core_Item aarch64_pac_enabled_items [] =
+  {
+    {
+      .name = "enabled_keys", .type = ELF_T_XWORD, .format = 'x',
+      .offset = 0, .group = "register"
+    }
+  };
+
 #define AARCH64_HWBP_REG(KIND, N)                                      \
     {                                                                  \
       .name = "DBG" KIND "VR" #N "_EL1", .type = ELF_T_XWORD, .format = 'x', \
@@ -189,6 +197,7 @@ AARCH64_BP_WP_GROUP ("W", aarch64_hw_wp_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_PAC_ENABLED_KEYS, 8, aarch64_pac_enabled_items)  \
   EXTRA_ITEMS (NT_ARM_PAC_MASK, 16, aarch64_pac_items)
 
 #include "linux-core-note.c"
index 7bb5333a7490d1b5ec616b149c005b4b7b7e8636..eab9a5dc0bbe0909f6c53ac8f6370ca9a6844c68 100644 (file)
@@ -96,6 +96,8 @@ ebl_core_note_type_name (Ebl *ebl, uint32_t type, char *buf, size_t len)
            KNOWNSTYPE (ARM_SVE);
            KNOWNSTYPE (ARM_SSVE);
            KNOWNSTYPE (ARM_ZA);
+           KNOWNSTYPE (ARM_PAC_ENABLED_KEYS);
+           KNOWNSTYPE (ARM_PAC_MASK);
            KNOWNSTYPE (SIGINFO);
            KNOWNSTYPE (FILE);
 #undef KNOWNSTYPE