]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nios2: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
authorDave Martin <Dave.Martin@arm.com>
Tue, 1 Jul 2025 13:56:05 +0000 (14:56 +0100)
committerKees Cook <kees@kernel.org>
Tue, 15 Jul 2025 05:27:47 +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: Dinh Nguyen <dinguyen@kernel.org>
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-13-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
arch/nios2/kernel/ptrace.c

index 9221c15972e684283a6cd94b00eacf499c6112f5..c88f5cabc0c1b21e8f73df93aa69c30208b6a7a9 100644 (file)
@@ -95,7 +95,7 @@ enum nios2_regset {
 
 static const struct user_regset nios2_regsets[] = {
        [REGSET_GENERAL] = {
-               .core_note_type = NT_PRSTATUS,
+               USER_REGSET_NOTE_TYPE(PRSTATUS),
                .n = NUM_PTRACE_REG,
                .size = sizeof(unsigned long),
                .align = sizeof(unsigned long),