Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hexagon: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

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: Brian Cain <bcain@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-hexagon@vger.kernel.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-9-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>

authored by

Dave Martin and committed by
Kees Cook
55821111 2c2fb861

+1 -1
+1 -1
arch/hexagon/kernel/ptrace.c
··· 137 137 138 138 static const struct user_regset hexagon_regsets[] = { 139 139 [REGSET_GENERAL] = { 140 - .core_note_type = NT_PRSTATUS, 140 + USER_REGSET_NOTE_TYPE(PRSTATUS), 141 141 .n = ELF_NGREG, 142 142 .size = sizeof(unsigned long), 143 143 .align = sizeof(unsigned long),