mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
ARM: 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: Russell King <linux@armlinux.org.uk> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Kees Cook <kees@kernel.org> Cc: Akihiko Odaki <akihiko.odaki@daynix.com> Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20250701135616.29630-6-Dave.Martin@arm.com Signed-off-by: Kees Cook <kees@kernel.org>
This commit is contained in:
@@ -677,7 +677,7 @@ enum arm_regset {
|
||||
|
||||
static const struct user_regset arm_regsets[] = {
|
||||
[REGSET_GPR] = {
|
||||
.core_note_type = NT_PRSTATUS,
|
||||
USER_REGSET_NOTE_TYPE(PRSTATUS),
|
||||
.n = ELF_NGREG,
|
||||
.size = sizeof(u32),
|
||||
.align = sizeof(u32),
|
||||
@@ -689,7 +689,7 @@ static const struct user_regset arm_regsets[] = {
|
||||
* For the FPA regs in fpstate, the real fields are a mixture
|
||||
* of sizes, so pretend that the registers are word-sized:
|
||||
*/
|
||||
.core_note_type = NT_PRFPREG,
|
||||
USER_REGSET_NOTE_TYPE(PRFPREG),
|
||||
.n = sizeof(struct user_fp) / sizeof(u32),
|
||||
.size = sizeof(u32),
|
||||
.align = sizeof(u32),
|
||||
@@ -702,7 +702,7 @@ static const struct user_regset arm_regsets[] = {
|
||||
* Pretend that the VFP regs are word-sized, since the FPSCR is
|
||||
* a single word dangling at the end of struct user_vfp:
|
||||
*/
|
||||
.core_note_type = NT_ARM_VFP,
|
||||
USER_REGSET_NOTE_TYPE(ARM_VFP),
|
||||
.n = ARM_VFPREGS_SIZE / sizeof(u32),
|
||||
.size = sizeof(u32),
|
||||
.align = sizeof(u32),
|
||||
|
||||
Reference in New Issue
Block a user