Skip to content

Commit 4793ea9

Browse files
tklauserpcmoore
authored andcommitted
arch: add the statx syscall
Fixes #88 Signed-off-by: Tobias Klauser <[email protected]> [PM: fixed the incorrect x32 definition] Signed-off-by: Paul Moore <[email protected]>
1 parent 0cc7203 commit 4793ea9

13 files changed

+26
-13
lines changed

src/arch-aarch64-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "arch.h"
2727
#include "arch-aarch64.h"
2828

29-
/* NOTE: based on Linux 4.10-rc6+ */
29+
/* NOTE: based on Linux 4.14 */
3030
const struct arch_syscall_def aarch64_syscall_table[] = { \
3131
{ "_llseek", __PNR__llseek },
3232
{ "_newselect", __PNR__newselect },
@@ -392,6 +392,7 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \
392392
{ "stat64", __PNR_stat64 },
393393
{ "statfs", 43 },
394394
{ "statfs64", __PNR_statfs64 },
395+
{ "statx", 291 },
395396
{ "stime", __PNR_stime },
396397
{ "stty", __PNR_stty },
397398
{ "subpage_prot", __PNR_subpage_prot },

src/arch-arm-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#define __SCMP_NR_BASE __SCMP_NR_OABI_SYSCALL_BASE
3838
#endif
3939

40-
/* NOTE: based on Linux 4.9 */
40+
/* NOTE: based on Linux 4.14 */
4141
const struct arch_syscall_def arm_syscall_table[] = { \
4242
/* NOTE: arm_sync_file_range() and sync_file_range2() share values */
4343
{ "_llseek", (__SCMP_NR_BASE + 140) },
@@ -404,6 +404,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
404404
{ "stat64", (__SCMP_NR_BASE + 195) },
405405
{ "statfs", (__SCMP_NR_BASE + 99) },
406406
{ "statfs64", (__SCMP_NR_BASE + 266) },
407+
{ "statx", (__SCMP_NR_BASE + 397) },
407408
{ "stime", __PNR_stime },
408409
{ "stty", __PNR_stty },
409410
{ "subpage_prot", __PNR_subpage_prot },

src/arch-mips-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/* O32 ABI */
3131
#define __SCMP_NR_BASE 4000
3232

33-
/* NOTE: based on Linux 4.9 */
33+
/* NOTE: based on Linux 4.14 */
3434
const struct arch_syscall_def mips_syscall_table[] = { \
3535
{ "_llseek", (__SCMP_NR_BASE + 140) },
3636
{ "_newselect", (__SCMP_NR_BASE + 142) },
@@ -396,6 +396,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
396396
{ "stat64", (__SCMP_NR_BASE + 213) },
397397
{ "statfs", (__SCMP_NR_BASE + 99) },
398398
{ "statfs64", (__SCMP_NR_BASE + 255) },
399+
{ "statx", (__SCMP_NR_BASE + 366) },
399400
{ "stime", (__SCMP_NR_BASE + 25) },
400401
{ "stty", (__SCMP_NR_BASE + 31) },
401402
{ "subpage_prot", __PNR_subpage_prot },

src/arch-mips64-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/* 64 ABI */
3131
#define __SCMP_NR_BASE 5000
3232

33-
/* NOTE: based on Linux 4.9 */
33+
/* NOTE: based on Linux 4.14 */
3434
const struct arch_syscall_def mips64_syscall_table[] = { \
3535
{ "_llseek", __PNR__llseek },
3636
{ "_newselect", (__SCMP_NR_BASE + 22) },
@@ -396,6 +396,7 @@ const struct arch_syscall_def mips64_syscall_table[] = { \
396396
{ "stat64", __PNR_stat64 },
397397
{ "statfs", (__SCMP_NR_BASE + 134) },
398398
{ "statfs64", __PNR_statfs64 },
399+
{ "statx", (__SCMP_NR_BASE + 326) },
399400
{ "stime", __PNR_stime },
400401
{ "stty", __PNR_stty },
401402
{ "subpage_prot", __PNR_subpage_prot },

src/arch-mips64n32-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/* N32 ABI */
3131
#define __SCMP_NR_BASE 6000
3232

33-
/* NOTE: based on Linux 4.9 */
33+
/* NOTE: based on Linux 4.14 */
3434
const struct arch_syscall_def mips64n32_syscall_table[] = { \
3535
{ "_llseek", __PNR__llseek },
3636
{ "_newselect", (__SCMP_NR_BASE + 22) },
@@ -396,6 +396,7 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \
396396
{ "stat64", __PNR_stat64 },
397397
{ "statfs", (__SCMP_NR_BASE + 134) },
398398
{ "statfs64", (__SCMP_NR_BASE + 217) },
399+
{ "statx", (__SCMP_NR_BASE + 330) },
399400
{ "stime", __PNR_stime },
400401
{ "stty", __PNR_stty },
401402
{ "subpage_prot", __PNR_subpage_prot },

src/arch-parisc-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "arch.h"
1111
#include "arch-parisc.h"
1212

13-
/* NOTE: based on Linux 4.9 */
13+
/* NOTE: based on Linux 4.14 */
1414
const struct arch_syscall_def parisc_syscall_table[] = { \
1515
{ "_llseek", 140 },
1616
{ "_newselect", 142 },
@@ -376,6 +376,7 @@ const struct arch_syscall_def parisc_syscall_table[] = { \
376376
{ "stat64", 101 },
377377
{ "statfs", 99 },
378378
{ "statfs64", 298 },
379+
{ "statx", 349 },
379380
{ "stime", 25 },
380381
{ "stty", __PNR_stty },
381382
{ "subpage_prot", __PNR_subpage_prot },

src/arch-ppc-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "arch.h"
2828
#include "arch-ppc.h"
2929

30-
/* NOTE: based on Linux 4.10-rc6+ */
30+
/* NOTE: based on Linux 4.14 */
3131
const struct arch_syscall_def ppc_syscall_table[] = { \
3232
{ "_llseek", 140 },
3333
{ "_newselect", 142 },
@@ -393,6 +393,7 @@ const struct arch_syscall_def ppc_syscall_table[] = { \
393393
{ "stat64", 195 },
394394
{ "statfs", 99 },
395395
{ "statfs64", 252 },
396+
{ "statx", 383},
396397
{ "stime", 25 },
397398
{ "stty", 31 },
398399
{ "subpage_prot", 310 },

src/arch-ppc64-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "arch.h"
2828
#include "arch-ppc64.h"
2929

30-
/* NOTE: based on Linux 4.10-rc6+ */
30+
/* NOTE: based on Linux 4.14 */
3131
const struct arch_syscall_def ppc64_syscall_table[] = { \
3232
{ "_llseek", 140 },
3333
{ "_newselect", 142 },
@@ -393,6 +393,7 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \
393393
{ "stat64", __PNR_stat64 },
394394
{ "statfs", 99 },
395395
{ "statfs64", 252 },
396+
{ "statx", 383},
396397
{ "stime", 25 },
397398
{ "stty", 31 },
398399
{ "subpage_prot", 310 },

src/arch-s390-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "arch.h"
1111
#include "arch-s390.h"
1212

13-
/* NOTE: based on Linux 4.9 */
13+
/* NOTE: based on Linux 4.14 */
1414
const struct arch_syscall_def s390_syscall_table[] = { \
1515
{ "_llseek", 140 },
1616
{ "_newselect", 142 },
@@ -376,6 +376,7 @@ const struct arch_syscall_def s390_syscall_table[] = { \
376376
{ "stat64", 195 },
377377
{ "statfs", 99 },
378378
{ "statfs64", 265 },
379+
{ "statx", 379 },
379380
{ "stime", 25 },
380381
{ "stty", __PNR_stty },
381382
{ "subpage_prot", __PNR_subpage_prot },

src/arch-s390x-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "arch.h"
1111
#include "arch-s390x.h"
1212

13-
/* NOTE: based on Linux 4.9 */
13+
/* NOTE: based on Linux 4.14 */
1414
const struct arch_syscall_def s390x_syscall_table[] = { \
1515
{ "_llseek", __PNR__llseek },
1616
{ "_newselect", __PNR__newselect },
@@ -376,6 +376,7 @@ const struct arch_syscall_def s390x_syscall_table[] = { \
376376
{ "stat64", __PNR_stat64 },
377377
{ "statfs", 99 },
378378
{ "statfs64", 265 },
379+
{ "statx", 379 },
379380
{ "stime", __PNR_stime },
380381
{ "stty", __PNR_stty },
381382
{ "subpage_prot", __PNR_subpage_prot },

src/arch-x32-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "arch.h"
2727
#include "arch-x32.h"
2828

29-
/* NOTE: based on Linux 4.5-rc4 */
29+
/* NOTE: based on Linux 4.14 */
3030
const struct arch_syscall_def x32_syscall_table[] = { \
3131
{ "_llseek", __PNR__llseek },
3232
{ "_newselect", __PNR__newselect },
@@ -392,6 +392,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \
392392
{ "stat64", __PNR_stat64 },
393393
{ "statfs", (X32_SYSCALL_BIT + 137) },
394394
{ "statfs64", __PNR_statfs64 },
395+
{ "statx", (X32_SYSCALL_BIT + 332) },
395396
{ "stime", __PNR_stime },
396397
{ "stty", __PNR_stty },
397398
{ "subpage_prot", __PNR_subpage_prot },

src/arch-x86-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "arch.h"
2727
#include "arch-x86.h"
2828

29-
/* NOTE: based on Linux 4.9 */
29+
/* NOTE: based on Linux 4.14 */
3030
const struct arch_syscall_def x86_syscall_table[] = { \
3131
{ "_llseek", 140 },
3232
{ "_newselect", 142 },
@@ -392,6 +392,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
392392
{ "stat64", 195 },
393393
{ "statfs", 99 },
394394
{ "statfs64", 268 },
395+
{ "statx", 383 },
395396
{ "stime", 25 },
396397
{ "stty", 31 },
397398
{ "subpage_prot", __PNR_subpage_prot },

src/arch-x86_64-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "arch.h"
2727
#include "arch-x86_64.h"
2828

29-
/* NOTE: based on Linux 4.9 */
29+
/* NOTE: based on Linux 4.14 */
3030
const struct arch_syscall_def x86_64_syscall_table[] = { \
3131
{ "_llseek", __PNR__llseek },
3232
{ "_newselect", __PNR__newselect },
@@ -392,6 +392,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
392392
{ "stat64", __PNR_stat64 },
393393
{ "statfs", 137 },
394394
{ "statfs64", __PNR_statfs64 },
395+
{ "statx", 332 },
395396
{ "stime", __PNR_stime },
396397
{ "stty", __PNR_stty },
397398
{ "subpage_prot", __PNR_subpage_prot },

0 commit comments

Comments
 (0)