Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177618086
D61597.1794849765.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61597.1794849765.diff
View Options
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -1050,7 +1050,10 @@
void *addr;
int data, error, i;
- error = 0;
+ error = ptrace_check_allowed(td, req, pd_mode, pid);
+ if (error != 0)
+ return (error);
+
addr = &r;
data = udata;
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -709,7 +709,7 @@
return (error);
}
-static int
+int
ptrace_check_allowed(struct thread *td, int req, bool pd_mode, pid_t pid)
{
if (!allow_ptrace)
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -292,6 +292,8 @@
#endif
void ptrace_unsuspend(struct proc *p);
+int ptrace_check_allowed(struct thread *td, int req, bool pd_mode,
+ pid_t pid);
int ptrace_action(struct thread *td, int req, bool pd_mode, pid_t pid,
int pfd, lwpid_t lwpid, void *addr, int data);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 5:22 PM (16 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41785005
Default Alt Text
D61597.1794849765.diff (1 KB)
Attached To
Mode
D61597: ptrace: Call ptrace_check_allowed() from the compat32 layer
Attached
Detach File
Event Timeline