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

m68k: 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: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-m68k@lists.linux-m68k.org
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-11-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>

authored by

Dave Martin and committed by
Kees Cook
e572168e 1260e3b1

+2 -2
+2 -2
arch/m68k/kernel/ptrace.c
··· 319 319 320 320 static const struct user_regset m68k_user_regsets[] = { 321 321 [REGSET_GPR] = { 322 - .core_note_type = NT_PRSTATUS, 322 + USER_REGSET_NOTE_TYPE(PRSTATUS), 323 323 .n = ELF_NGREG, 324 324 .size = sizeof(u32), 325 325 .align = sizeof(u16), ··· 327 327 }, 328 328 #ifdef CONFIG_FPU 329 329 [REGSET_FPU] = { 330 - .core_note_type = NT_PRFPREG, 330 + USER_REGSET_NOTE_TYPE(PRFPREG), 331 331 .n = sizeof(struct user_m68kfp_struct) / sizeof(u32), 332 332 .size = sizeof(u32), 333 333 .align = sizeof(u32),