[PATCH 10/23] m68k: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Dave Martin posted 23 patches 3 months, 1 week ago
[PATCH 10/23] m68k: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Posted by Dave Martin 3 months, 1 week ago
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
---
 arch/m68k/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index c20d590e4297..cfa2df24eced 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -319,7 +319,7 @@ enum m68k_regset {
 
 static const struct user_regset m68k_user_regsets[] = {
 	[REGSET_GPR] = {
-		.core_note_type = NT_PRSTATUS,
+		USER_REGSET_NOTE_TYPE(PRSTATUS),
 		.n = ELF_NGREG,
 		.size = sizeof(u32),
 		.align = sizeof(u16),
@@ -327,7 +327,7 @@ static const struct user_regset m68k_user_regsets[] = {
 	},
 #ifdef CONFIG_FPU
 	[REGSET_FPU] = {
-		.core_note_type = NT_PRFPREG,
+		USER_REGSET_NOTE_TYPE(PRFPREG),
 		.n = sizeof(struct user_m68kfp_struct) / sizeof(u32),
 		.size = sizeof(u32),
 		.align = sizeof(u32),
-- 
2.34.1
Re: [PATCH 10/23] m68k: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Posted by Geert Uytterhoeven 3 months ago
On Tue, 1 Jul 2025 at 15:56, Dave Martin <Dave.Martin@arm.com> wrote:
> 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>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Re: [PATCH 10/23] m68k: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Posted by Dave Martin 3 months ago
On Sun, Jul 06, 2025 at 11:25:21AM +0200, Geert Uytterhoeven wrote:
> On Tue, 1 Jul 2025 at 15:56, Dave Martin <Dave.Martin@arm.com> wrote:
> > 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>
> 
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> 
> Gr{oetje,eeting}s,
> 
>                         Geert

[...]

Thanks!

---Dave