Page MenuHomeFreeBSD

D32726.1775844449.diff
No OneTemporary

Size
822 B
Referenced Files
None
Subscribers
None

D32726.1775844449.diff

Index: sys/kern/subr_syscall.c
===================================================================
--- sys/kern/subr_syscall.c
+++ sys/kern/subr_syscall.c
@@ -260,9 +260,14 @@
* 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,
+ * and a debugger process changing its ABI while tracing
+ * another process seems highly unprobable.
*/
- 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

Mime Type
text/plain
Expires
Fri, Apr 10, 6:07 PM (8 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28318244
Default Alt Text
D32726.1775844449.diff (822 B)

Event Timeline