Page MenuHomeFreeBSD

D40096.diff
No OneTemporary

D40096.diff

diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h
--- a/sys/amd64/linux/linux.h
+++ b/sys/amd64/linux/linux.h
@@ -279,6 +279,8 @@
struct linux_pt_regset *l_regset);
int linux_ptrace_peekuser(struct thread *td, pid_t pid,
void *addr, void *data);
+int linux_ptrace_pokeuser(struct thread *td, pid_t pid,
+ void *addr, void *data);
#endif /* _KERNEL */
#endif /* !_AMD64_LINUX_H_ */
diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c
--- a/sys/amd64/linux/linux_machdep.c
+++ b/sys/amd64/linux/linux_machdep.c
@@ -397,4 +397,12 @@
return (copyout(&val, data, sizeof(val)));
}
+int
+linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data)
+{
+
+ LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld "
+ "not implemented; returning EINVAL", (uintptr_t)addr);
+ return (EINVAL);
+}
#undef LINUX_URO
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -433,6 +433,8 @@
struct linux_pt_regset32 *l_regset);
int linux_ptrace_peekuser(struct thread *td, pid_t pid,
void *addr, void *data);
+int linux_ptrace_pokeuser(struct thread *td, pid_t pid,
+ void *addr, void *data);
extern bool linux32_emulate_i386;
#endif /* _KERNEL */
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -751,3 +751,12 @@
"returning EINVAL", (uintptr_t)addr);
return (EINVAL);
}
+
+int
+linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data)
+{
+
+ LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld "
+ "not implemented; returning EINVAL", (uintptr_t)addr);
+ return (EINVAL);
+}
diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h
--- a/sys/arm64/linux/linux.h
+++ b/sys/arm64/linux/linux.h
@@ -206,6 +206,8 @@
struct linux_pt_regset *l_regset);
int linux_ptrace_peekuser(struct thread *td, pid_t pid,
void *addr, void *data);
+int linux_ptrace_pokeuser(struct thread *td, pid_t pid,
+ void *addr, void *data);
#endif /* _KERNEL */
#endif /* _ARM64_LINUX_H_ */
diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c
--- a/sys/arm64/linux/linux_machdep.c
+++ b/sys/arm64/linux/linux_machdep.c
@@ -160,3 +160,12 @@
"returning EINVAL", (uintptr_t)addr);
return (EINVAL);
}
+
+int
+linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data)
+{
+
+ LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld "
+ "not implemented; returning EINVAL", (uintptr_t)addr);
+ return (EINVAL);
+}
diff --git a/sys/compat/linux/linux_ptrace.c b/sys/compat/linux/linux_ptrace.c
--- a/sys/compat/linux/linux_ptrace.c
+++ b/sys/compat/linux/linux_ptrace.c
@@ -174,14 +174,6 @@
return (error);
}
-static int
-linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data)
-{
-
- linux_msg(td, "PTRACE_POKEUSER not implemented; returning EINVAL");
- return (EINVAL);
-}
-
static int
linux_ptrace_setoptions(struct thread *td, pid_t pid, l_ulong data)
{

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 26, 10:12 PM (16 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32188524
Default Alt Text
D40096.diff (3 KB)

Event Timeline