]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xtensa: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
authorDave Martin <Dave.Martin@arm.com>
Tue, 1 Jul 2025 13:56:15 +0000 (14:56 +0100)
committerKees Cook <kees@kernel.org>
Tue, 15 Jul 2025 05:27:49 +0000 (22:27 -0700)
Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-23-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
arch/xtensa/kernel/ptrace.c

index 9056cd1a8302cdcd8ca5b4ac3d4a8a3ac7ffdaef..ff0600a0584ce847df2a55c041b422b76038a26b 100644 (file)
@@ -193,7 +193,7 @@ enum xtensa_regset {
 
 static const struct user_regset xtensa_regsets[] = {
        [REGSET_GPR] = {
-               .core_note_type = NT_PRSTATUS,
+               USER_REGSET_NOTE_TYPE(PRSTATUS),
                .n = sizeof(struct user_pt_regs) / sizeof(u32),
                .size = sizeof(u32),
                .align = sizeof(u32),
@@ -201,7 +201,7 @@ static const struct user_regset xtensa_regsets[] = {
                .set = gpr_set,
        },
        [REGSET_TIE] = {
-               .core_note_type = NT_PRFPREG,
+               USER_REGSET_NOTE_TYPE(PRFPREG),
                .n = sizeof(elf_xtregs_t) / sizeof(u32),
                .size = sizeof(u32),
                .align = sizeof(u32),