Page MenuHomeFreeBSD

D32623.diff
No OneTemporary

D32623.diff

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

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)

Event Timeline