Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107405617
D32726.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
843 B
Referenced Files
None
Subscribers
None
D32726.diff
View Options
diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c
--- a/sys/kern/subr_syscall.c
+++ b/sys/kern/subr_syscall.c
@@ -260,9 +260,15 @@
* the exec event now and then clear TDB_EXEC so that
* the next stop is reported as a syscall exit by
* linux_ptrace_status().
+ *
+ * We are accessing p->p_pptr without any additional
+ * locks here: it cannot change while p is kept locked;
+ * while the debugger could in theory change its ABI
+ * while tracing another process, the outcome of such
+ * a race wouln't be deterministic anyway.
*/
- if ((td->td_dbgflags & TDB_EXEC) != 0 &&
- SV_PROC_ABI(td->td_proc) == SV_ABI_LINUX) {
+ if (traced && (td->td_dbgflags & TDB_EXEC) != 0 &&
+ SV_PROC_ABI(p->p_pptr) == SV_ABI_LINUX) {
ptracestop(td, SIGTRAP, NULL);
td->td_dbgflags &= ~TDB_EXEC;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 14, 5:06 PM (6 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15797468
Default Alt Text
D32726.diff (843 B)
Attached To
Mode
D32726: linux: Add additional ptracestop only if the debugger is Linux
Attached
Detach File
Event Timeline
Log In to Comment