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

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

authored by

Dave Martin and committed by
Kees Cook
2c2fb861 87b0d081

+2 -2
+2 -2
arch/csky/kernel/ptrace.c
··· 166 166 167 167 static const struct user_regset csky_regsets[] = { 168 168 [REGSET_GPR] = { 169 - .core_note_type = NT_PRSTATUS, 169 + USER_REGSET_NOTE_TYPE(PRSTATUS), 170 170 .n = sizeof(struct pt_regs) / sizeof(u32), 171 171 .size = sizeof(u32), 172 172 .align = sizeof(u32), ··· 174 174 .set = gpr_set, 175 175 }, 176 176 [REGSET_FPR] = { 177 - .core_note_type = NT_PRFPREG, 177 + USER_REGSET_NOTE_TYPE(PRFPREG), 178 178 .n = sizeof(struct user_fp) / sizeof(u32), 179 179 .size = sizeof(u32), 180 180 .align = sizeof(u32),