Skip to content

Commit afe74ee

Browse files
Dave Martinkees
authored andcommitted
sh: 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: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Kees Cook <kees@kernel.org> Cc: Akihiko Odaki <akihiko.odaki@daynix.com> Cc: linux-sh@vger.kernel.org Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20250701135616.29630-19-Dave.Martin@arm.com Signed-off-by: Kees Cook <kees@kernel.org>
1 parent d6a883c commit afe74ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/sh/kernel/ptrace_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static const struct user_regset sh_regsets[] = {
291291
* PC, PR, SR, GBR, MACH, MACL, TRA
292292
*/
293293
[REGSET_GENERAL] = {
294-
.core_note_type = NT_PRSTATUS,
294+
USER_REGSET_NOTE_TYPE(PRSTATUS),
295295
.n = ELF_NGREG,
296296
.size = sizeof(long),
297297
.align = sizeof(long),
@@ -301,7 +301,7 @@ static const struct user_regset sh_regsets[] = {
301301

302302
#ifdef CONFIG_SH_FPU
303303
[REGSET_FPU] = {
304-
.core_note_type = NT_PRFPREG,
304+
USER_REGSET_NOTE_TYPE(PRFPREG),
305305
.n = sizeof(struct user_fpu_struct) / sizeof(long),
306306
.size = sizeof(long),
307307
.align = sizeof(long),

0 commit comments

Comments
 (0)