git: 046274e798e6 - stable/13 - linux: Improve debug for PTRACE_GETREGSET

From: Edward Tomasz Napierala <trasz_at_FreeBSD.org>
Date: Mon, 21 Feb 2022 13:48:57 UTC
The branch stable/13 has been updated by trasz:

URL: https://cgit.FreeBSD.org/src/commit/?id=046274e798e64094d32e00592902b49af884ce4f

commit 046274e798e64094d32e00592902b49af884ce4f
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-10-22 18:58:52 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2022-02-21 13:35:20 +0000

    linux: Improve debug for PTRACE_GETREGSET
    
    No functional changes.
    
    Sponsored By:   EPSRC
    
    (cherry picked from commit e3a83df1195cc4f48f2908b423b5c80dd9c49a21)
---
 sys/amd64/linux/linux_ptrace.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c
index 0917b175aa98..673d60d70a7f 100644
--- a/sys/amd64/linux/linux_ptrace.c
+++ b/sys/amd64/linux/linux_ptrace.c
@@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$");
 #define	LINUX_PTRACE_O_SUSPEND_SECCOMP	2097152
 
 #define	LINUX_NT_PRSTATUS		0x1
+#define	LINUX_NT_PRFPREG		0x2
 #define	LINUX_NT_X86_XSTATE		0x202
 
 #define	LINUX_PTRACE_O_MASK	(LINUX_PTRACE_O_TRACESYSGOOD |	\
@@ -575,6 +576,10 @@ linux_ptrace_getregset(struct thread *td, pid_t pid, l_ulong addr, l_ulong data)
 	switch (addr) {
 	case LINUX_NT_PRSTATUS:
 		return (linux_ptrace_getregset_prstatus(td, pid, data));
+	case LINUX_NT_PRFPREG:
+		linux_msg(td, "PTRAGE_GETREGSET NT_PRFPREG not implemented; "
+		    "returning EINVAL");
+		return (EINVAL);
 	case LINUX_NT_X86_XSTATE:
 		linux_msg(td, "PTRAGE_GETREGSET NT_X86_XSTATE not implemented; "
 		    "returning EINVAL");