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>pull/1309/head
parent
87b0d081dc
commit
2c2fb861fc
|
|
@ -166,7 +166,7 @@ static int fpr_set(struct task_struct *target,
|
|||
|
||||
static const struct user_regset csky_regsets[] = {
|
||||
[REGSET_GPR] = {
|
||||
.core_note_type = NT_PRSTATUS,
|
||||
USER_REGSET_NOTE_TYPE(PRSTATUS),
|
||||
.n = sizeof(struct pt_regs) / sizeof(u32),
|
||||
.size = sizeof(u32),
|
||||
.align = sizeof(u32),
|
||||
|
|
@ -174,7 +174,7 @@ static const struct user_regset csky_regsets[] = {
|
|||
.set = gpr_set,
|
||||
},
|
||||
[REGSET_FPR] = {
|
||||
.core_note_type = NT_PRFPREG,
|
||||
USER_REGSET_NOTE_TYPE(PRFPREG),
|
||||
.n = sizeof(struct user_fp) / sizeof(u32),
|
||||
.size = sizeof(u32),
|
||||
.align = sizeof(u32),
|
||||
|
|
|
|||
Loading…
Reference in New Issue