1 |
commit: 783847e64953495e7225ed89b1dfccefb14082bf |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 29 11:13:14 2016 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 29 11:13:14 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=783847e6 |
7 |
|
8 |
libsandbox: fix x86 tracing when schizo is active |
9 |
|
10 |
Commit 48520a35697aa39bed046b9668a3e3e5f8a8ba93 fixed the configure logic, |
11 |
but the build would fail to link for x86 systems as the syscall table was |
12 |
not actually set up. |
13 |
|
14 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
15 |
|
16 |
libsandbox/trace/linux/i386.c | 10 ++++++++++ |
17 |
1 file changed, 10 insertions(+) |
18 |
|
19 |
diff --git a/libsandbox/trace/linux/i386.c b/libsandbox/trace/linux/i386.c |
20 |
index d7b9eaa..f9476aa 100644 |
21 |
--- a/libsandbox/trace/linux/i386.c |
22 |
+++ b/libsandbox/trace/linux/i386.c |
23 |
@@ -8,6 +8,16 @@ static bool _trace_possible(const void *data) |
24 |
(ehdr->e_machine == EM_386); |
25 |
} |
26 |
|
27 |
+#ifdef SB_SCHIZO |
28 |
+static const struct syscall_entry syscall_table[] = { |
29 |
+#define S(s) { SB_SYS_x86_##s, SB_NR_##s, #s }, |
30 |
+#include "trace_syscalls_x86.h" |
31 |
+#undef S |
32 |
+ { SB_NR_UNDEF, SB_NR_UNDEF, NULL }, |
33 |
+}; |
34 |
+# define trace_check_personality(regs) syscall_table |
35 |
+#endif |
36 |
+ |
37 |
#define trace_reg_sysnum orig_eax |
38 |
#define trace_reg_ret eax |