Skip to content

Commit

Permalink
arch: add the statx syscall
Browse files Browse the repository at this point in the history
Fixes #88

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
[PM: fixed the incorrect x32 definition]
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
tklauser authored and pcmoore committed Jan 10, 2018
1 parent 0cc7203 commit 4793ea9
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/arch-aarch64-syscalls.c
Expand Up @@ -26,7 +26,7 @@
#include "arch.h"
#include "arch-aarch64.h"

/* NOTE: based on Linux 4.10-rc6+ */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def aarch64_syscall_table[] = { \
{ "_llseek", __PNR__llseek },
{ "_newselect", __PNR__newselect },
Expand Down Expand Up @@ -392,6 +392,7 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
{ "stat64", __PNR_stat64 },
{ "statfs", 43 },
{ "statfs64", __PNR_statfs64 },
{ "statx", 291 },
{ "stime", __PNR_stime },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-arm-syscalls.c
Expand Up @@ -37,7 +37,7 @@
#define __SCMP_NR_BASE __SCMP_NR_OABI_SYSCALL_BASE
#endif

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def arm_syscall_table[] = { \
/* NOTE: arm_sync_file_range() and sync_file_range2() share values */
{ "_llseek", (__SCMP_NR_BASE + 140) },
Expand Down Expand Up @@ -404,6 +404,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
{ "stat64", (__SCMP_NR_BASE + 195) },
{ "statfs", (__SCMP_NR_BASE + 99) },
{ "statfs64", (__SCMP_NR_BASE + 266) },
{ "statx", (__SCMP_NR_BASE + 397) },
{ "stime", __PNR_stime },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-mips-syscalls.c
Expand Up @@ -30,7 +30,7 @@
/* O32 ABI */
#define __SCMP_NR_BASE 4000

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def mips_syscall_table[] = { \
{ "_llseek", (__SCMP_NR_BASE + 140) },
{ "_newselect", (__SCMP_NR_BASE + 142) },
Expand Down Expand Up @@ -396,6 +396,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
{ "stat64", (__SCMP_NR_BASE + 213) },
{ "statfs", (__SCMP_NR_BASE + 99) },
{ "statfs64", (__SCMP_NR_BASE + 255) },
{ "statx", (__SCMP_NR_BASE + 366) },
{ "stime", (__SCMP_NR_BASE + 25) },
{ "stty", (__SCMP_NR_BASE + 31) },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-mips64-syscalls.c
Expand Up @@ -30,7 +30,7 @@
/* 64 ABI */
#define __SCMP_NR_BASE 5000

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def mips64_syscall_table[] = { \
{ "_llseek", __PNR__llseek },
{ "_newselect", (__SCMP_NR_BASE + 22) },
Expand Down Expand Up @@ -396,6 +396,7 @@ const struct arch_syscall_def mips64_syscall_table[] = { \
{ "stat64", __PNR_stat64 },
{ "statfs", (__SCMP_NR_BASE + 134) },
{ "statfs64", __PNR_statfs64 },
{ "statx", (__SCMP_NR_BASE + 326) },
{ "stime", __PNR_stime },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-mips64n32-syscalls.c
Expand Up @@ -30,7 +30,7 @@
/* N32 ABI */
#define __SCMP_NR_BASE 6000

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def mips64n32_syscall_table[] = { \
{ "_llseek", __PNR__llseek },
{ "_newselect", (__SCMP_NR_BASE + 22) },
Expand Down Expand Up @@ -396,6 +396,7 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \
{ "stat64", __PNR_stat64 },
{ "statfs", (__SCMP_NR_BASE + 134) },
{ "statfs64", (__SCMP_NR_BASE + 217) },
{ "statx", (__SCMP_NR_BASE + 330) },
{ "stime", __PNR_stime },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-parisc-syscalls.c
Expand Up @@ -10,7 +10,7 @@
#include "arch.h"
#include "arch-parisc.h"

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def parisc_syscall_table[] = { \
{ "_llseek", 140 },
{ "_newselect", 142 },
Expand Down Expand Up @@ -376,6 +376,7 @@ const struct arch_syscall_def parisc_syscall_table[] = { \
{ "stat64", 101 },
{ "statfs", 99 },
{ "statfs64", 298 },
{ "statx", 349 },
{ "stime", 25 },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-ppc-syscalls.c
Expand Up @@ -27,7 +27,7 @@
#include "arch.h"
#include "arch-ppc.h"

/* NOTE: based on Linux 4.10-rc6+ */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def ppc_syscall_table[] = { \
{ "_llseek", 140 },
{ "_newselect", 142 },
Expand Down Expand Up @@ -393,6 +393,7 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
{ "stat64", 195 },
{ "statfs", 99 },
{ "statfs64", 252 },
{ "statx", 383},
{ "stime", 25 },
{ "stty", 31 },
{ "subpage_prot", 310 },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-ppc64-syscalls.c
Expand Up @@ -27,7 +27,7 @@
#include "arch.h"
#include "arch-ppc64.h"

/* NOTE: based on Linux 4.10-rc6+ */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def ppc64_syscall_table[] = { \
{ "_llseek", 140 },
{ "_newselect", 142 },
Expand Down Expand Up @@ -393,6 +393,7 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
{ "stat64", __PNR_stat64 },
{ "statfs", 99 },
{ "statfs64", 252 },
{ "statx", 383},
{ "stime", 25 },
{ "stty", 31 },
{ "subpage_prot", 310 },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-s390-syscalls.c
Expand Up @@ -10,7 +10,7 @@
#include "arch.h"
#include "arch-s390.h"

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def s390_syscall_table[] = { \
{ "_llseek", 140 },
{ "_newselect", 142 },
Expand Down Expand Up @@ -376,6 +376,7 @@ const struct arch_syscall_def s390_syscall_table[] = { \
{ "stat64", 195 },
{ "statfs", 99 },
{ "statfs64", 265 },
{ "statx", 379 },
{ "stime", 25 },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-s390x-syscalls.c
Expand Up @@ -10,7 +10,7 @@
#include "arch.h"
#include "arch-s390x.h"

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def s390x_syscall_table[] = { \
{ "_llseek", __PNR__llseek },
{ "_newselect", __PNR__newselect },
Expand Down Expand Up @@ -376,6 +376,7 @@ const struct arch_syscall_def s390x_syscall_table[] = { \
{ "stat64", __PNR_stat64 },
{ "statfs", 99 },
{ "statfs64", 265 },
{ "statx", 379 },
{ "stime", __PNR_stime },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-x32-syscalls.c
Expand Up @@ -26,7 +26,7 @@
#include "arch.h"
#include "arch-x32.h"

/* NOTE: based on Linux 4.5-rc4 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def x32_syscall_table[] = { \
{ "_llseek", __PNR__llseek },
{ "_newselect", __PNR__newselect },
Expand Down Expand Up @@ -392,6 +392,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
{ "stat64", __PNR_stat64 },
{ "statfs", (X32_SYSCALL_BIT + 137) },
{ "statfs64", __PNR_statfs64 },
{ "statx", (X32_SYSCALL_BIT + 332) },
{ "stime", __PNR_stime },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-x86-syscalls.c
Expand Up @@ -26,7 +26,7 @@
#include "arch.h"
#include "arch-x86.h"

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def x86_syscall_table[] = { \
{ "_llseek", 140 },
{ "_newselect", 142 },
Expand Down Expand Up @@ -392,6 +392,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
{ "stat64", 195 },
{ "statfs", 99 },
{ "statfs64", 268 },
{ "statx", 383 },
{ "stime", 25 },
{ "stty", 31 },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down
3 changes: 2 additions & 1 deletion src/arch-x86_64-syscalls.c
Expand Up @@ -26,7 +26,7 @@
#include "arch.h"
#include "arch-x86_64.h"

/* NOTE: based on Linux 4.9 */
/* NOTE: based on Linux 4.14 */
const struct arch_syscall_def x86_64_syscall_table[] = { \
{ "_llseek", __PNR__llseek },
{ "_newselect", __PNR__newselect },
Expand Down Expand Up @@ -392,6 +392,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
{ "stat64", __PNR_stat64 },
{ "statfs", 137 },
{ "statfs64", __PNR_statfs64 },
{ "statx", 332 },
{ "stime", __PNR_stime },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
Expand Down

0 comments on commit 4793ea9

Please sign in to comment.