diff options
author | Paul Moore <pmoore@redhat.com> | 2014-08-22 12:50:00 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-08-27 10:41:56 -0400 |
commit | c188588835d060e41e484e7b7ad4a78e7282b33e (patch) | |
tree | 25276608c6cd3106d681ce8f98a50573b5833e66 | |
parent | ab63dc7fec3d4e5552bf5f363231c3fe1a7436d7 (diff) | |
download | libseccomp-c188588835d060e41e484e7b7ad4a78e7282b33e.tar.gz |
tools: add the missing x32 check to arch-syscall-check
Also, now that we've fixed arch-syscall-check to include x32, bring
the x32 syscall table up to speed with the rest of the library.
Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r-- | src/arch-syscall-check.c | 13 | ||||
-rw-r--r-- | src/arch-x32-syscalls.c | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/arch-syscall-check.c b/src/arch-syscall-check.c index e60050e..379af6e 100644 --- a/src/arch-syscall-check.c +++ b/src/arch-syscall-check.c @@ -27,6 +27,7 @@ #include "arch.h" #include "arch-x86.h" #include "arch-x86_64.h" +#include "arch-x32.h" #include "arch-arm.h" #include "arch-aarch64.h" #include "arch-mips.h" @@ -60,6 +61,7 @@ int main(int argc, char *argv[]) { int i_x86 = 0; int i_x86_64 = 0; + int i_x32 = 0; int i_arm = 0; int i_aarch64 = 0; int i_mips = 0; @@ -77,6 +79,8 @@ int main(int argc, char *argv[]) /* check each arch using x86 as the reference */ syscall_check(str_miss, sys_name, "x86_64", x86_64_syscall_iterate_name(i_x86_64)); + syscall_check(str_miss, sys_name, "x32", + x32_syscall_iterate_name(i_x32)); syscall_check(str_miss, sys_name, "arm", arm_syscall_iterate_name(i_arm)); syscall_check(str_miss, sys_name, "aarch64", @@ -101,6 +105,8 @@ int main(int argc, char *argv[]) i_x86++; if (!x86_64_syscall_iterate_name(++i_x86_64)) i_x86_64 = -1; + if (!x32_syscall_iterate_name(++i_x32)) + i_x32 = -1; if (!arm_syscall_iterate_name(++i_arm)) i_arm = -1; if (!mips_syscall_iterate_name(++i_mips)) @@ -111,7 +117,7 @@ int main(int argc, char *argv[]) i_mips64n32 = -1; if (!aarch64_syscall_iterate_name(++i_aarch64)) i_aarch64 = -1; - } while (i_x86_64 >= 0 && + } while (i_x86_64 >= 0 && i_x32 >= 0 && i_arm >= 0 && i_aarch64 >= 0 && i_mips >= 0 && i_mips64 >= 0 && i_mips64n32 >= 0); @@ -126,6 +132,11 @@ int main(int argc, char *argv[]) x86_64_syscall_iterate_name(i_x86_64)); return 1; } + if (i_x32 >= 0) { + printf("%s: ERROR, x32 has additional syscalls\n", + x32_syscall_iterate_name(i_x32)); + return 1; + } if (i_arm >= 0) { printf("%s: ERROR, arm has additional syscalls\n", arm_syscall_iterate_name(i_arm)); diff --git a/src/arch-x32-syscalls.c b/src/arch-x32-syscalls.c index 9e6b7c8..0c6a1e5 100644 --- a/src/arch-x32-syscalls.c +++ b/src/arch-x32-syscalls.c @@ -28,6 +28,8 @@ /* NOTE: based on Linux 3.17-rc1+ */ const struct arch_syscall_def x32_syscall_table[] = { \ + { "_llseek", __PNR__llseek }, + { "_newselect", __PNR__newselect }, { "_sysctl", __PNR__sysctl }, { "accept", (X32_SYSCALL_BIT + 43) }, { "accept4", (X32_SYSCALL_BIT + 288) }, |