Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148629270
D22546.id64856.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
946 B
Referenced Files
None
Subscribers
None
D22546.id64856.diff
View Options
Index: sys/kern/kern_sig.c
===================================================================
--- sys/kern/kern_sig.c
+++ sys/kern/kern_sig.c
@@ -65,6 +65,7 @@
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/procdesc.h>
+#include <sys/ptrace.h>
#include <sys/posix4.h>
#include <sys/pioctl.h>
#include <sys/racct.h>
@@ -1320,6 +1321,14 @@
error = 0;
}
}
+
+ /*
+ * If PTRACE_SCE or PTRACE_SCX were set after
+ * userspace entered the syscall, return spurious
+ * EINTR.
+ */
+ if ((p->p_ptevents & PTRACE_SYSCALL) != 0)
+ error = EINTR;
}
new_block = saved_mask;
@@ -1532,6 +1541,14 @@
has_sig += postsig(sig);
}
mtx_unlock(&p->p_sigacts->ps_mtx);
+
+ /*
+ * If PTRACE_SCE or PTRACE_SCX were set after
+ * userspace entered the syscall, return spurious
+ * EINTR.
+ */
+ if ((p->p_ptevents & PTRACE_SYSCALL) != 0)
+ has_sig += 1;
}
PROC_UNLOCK(p);
td->td_errno = EINTR;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 20, 6:02 AM (21 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30003116
Default Alt Text
D22546.id64856.diff (946 B)
Attached To
Mode
D22546: Ease the life of PT_TO_SCE/PT_TO_SCX users when debuggee sleeps in sigsuspend(2)/sig{timed,}wait(2).
Attached
Detach File
Event Timeline
Log In to Comment