Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107595558
D32623.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32623.diff
View Options
diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c
--- a/sys/amd64/linux/linux_ptrace.c
+++ b/sys/amd64/linux/linux_ptrace.c
@@ -44,6 +44,7 @@
#include <amd64/linux/linux.h>
#include <amd64/linux/linux_proto.h>
#include <compat/linux/linux_emul.h>
+#include <compat/linux/linux_errno.h>
#include <compat/linux/linux_misc.h>
#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_util.h>
@@ -639,6 +640,9 @@
* the ptracing process fall back to another method.
*/
si.op = LINUX_PTRACE_SYSCALL_INFO_NONE;
+ } else if (sr.sr_error == ERESTART) {
+ si.exit.rval = -LINUX_ERESTARTSYS;
+ si.exit.is_error = 1;
} else {
si.exit.rval = bsd_to_linux_errno(sr.sr_error);
si.exit.is_error = 1;
diff --git a/sys/compat/linux/linux_errno.h b/sys/compat/linux/linux_errno.h
--- a/sys/compat/linux/linux_errno.h
+++ b/sys/compat/linux/linux_errno.h
@@ -182,4 +182,10 @@
#define LINUX_ELAST LINUX_EHWPOISON
+/*
+ * This is a special "internal" errno that must never be returned
+ * to a Linux process, but might be observed via ptrace(2).
+ */
+#define LINUX_ERESTARTSYS 512
+
#endif /* _LINUX_ERRNO_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 17, 9:51 AM (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15837430
Default Alt Text
D32623.diff (1 KB)
Attached To
Mode
D32623: linux: Fix ptrace panic with ERESTART
Attached
Detach File
Event Timeline
Log In to Comment