1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
From 5cbecad4e885d63ed6fd174b846b6aee09749cdc Mon Sep 17 00:00:00 2001
From: Tobias Klauser <tklauser@distanz.ch>
Date: Wed, 10 Jan 2018 13:06:02 -0500
Subject: [PATCH] arch: add the statx syscall
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>
(imported from commit 4793ea990ea80ee26ed63e2a20723fdb417abf5b)
---
src/arch-aarch64-syscalls.c | 3 ++-
src/arch-arm-syscalls.c | 3 ++-
src/arch-mips-syscalls.c | 3 ++-
src/arch-mips64-syscalls.c | 3 ++-
src/arch-mips64n32-syscalls.c | 3 ++-
src/arch-ppc-syscalls.c | 3 ++-
src/arch-ppc64-syscalls.c | 3 ++-
src/arch-s390-syscalls.c | 3 ++-
src/arch-s390x-syscalls.c | 3 ++-
src/arch-x32-syscalls.c | 3 ++-
src/arch-x86-syscalls.c | 3 ++-
src/arch-x86_64-syscalls.c | 3 ++-
12 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/src/arch-aarch64-syscalls.c b/src/arch-aarch64-syscalls.c
index d907182..157aedc 100644
--- a/src/arch-aarch64-syscalls.c
+++ b/src/arch-aarch64-syscalls.c
@@ -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 },
diff --git a/src/arch-arm-syscalls.c b/src/arch-arm-syscalls.c
index 6f40caa..43e2cc5 100644
--- a/src/arch-arm-syscalls.c
+++ b/src/arch-arm-syscalls.c
@@ -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 },
diff --git a/src/arch-mips-syscalls.c b/src/arch-mips-syscalls.c
index e53f565..a5264c8 100644
--- a/src/arch-mips-syscalls.c
+++ b/src/arch-mips-syscalls.c
@@ -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 },
diff --git a/src/arch-mips64-syscalls.c b/src/arch-mips64-syscalls.c
index 248acaf..bc16b1d 100644
--- a/src/arch-mips64-syscalls.c
+++ b/src/arch-mips64-syscalls.c
@@ -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 },
diff --git a/src/arch-mips64n32-syscalls.c b/src/arch-mips64n32-syscalls.c
index 1525f8b..fa89bc2 100644
--- a/src/arch-mips64n32-syscalls.c
+++ b/src/arch-mips64n32-syscalls.c
@@ -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 },
diff --git a/src/arch-ppc-syscalls.c b/src/arch-ppc-syscalls.c
index c117da9..fe0cdfb 100644
--- a/src/arch-ppc-syscalls.c
+++ b/src/arch-ppc-syscalls.c
@@ -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 },
diff --git a/src/arch-ppc64-syscalls.c b/src/arch-ppc64-syscalls.c
index bbd5876..dc09610 100644
--- a/src/arch-ppc64-syscalls.c
+++ b/src/arch-ppc64-syscalls.c
@@ -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 },
diff --git a/src/arch-s390-syscalls.c b/src/arch-s390-syscalls.c
index 959b42f..8a6cecc 100644
--- a/src/arch-s390-syscalls.c
+++ b/src/arch-s390-syscalls.c
@@ -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 },
diff --git a/src/arch-s390x-syscalls.c b/src/arch-s390x-syscalls.c
index f6a2759..728dfc4 100644
--- a/src/arch-s390x-syscalls.c
+++ b/src/arch-s390x-syscalls.c
@@ -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 },
diff --git a/src/arch-x32-syscalls.c b/src/arch-x32-syscalls.c
index 64e180a..bb3e077 100644
--- a/src/arch-x32-syscalls.c
+++ b/src/arch-x32-syscalls.c
@@ -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 },
diff --git a/src/arch-x86-syscalls.c b/src/arch-x86-syscalls.c
index 5443095..81a52a3 100644
--- a/src/arch-x86-syscalls.c
+++ b/src/arch-x86-syscalls.c
@@ -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 },
diff --git a/src/arch-x86_64-syscalls.c b/src/arch-x86_64-syscalls.c
index 6c389b8..1da2530 100644
--- a/src/arch-x86_64-syscalls.c
+++ b/src/arch-x86_64-syscalls.c
@@ -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 },
diff --git a/src/arch-parisc-syscalls.c b/src/arch-parisc-syscalls.c
index 6c389b8..1da2530 100644
--- a/src/arch-parisc-syscalls.c
+++ b/src/arch-parisc-syscalls.c
@@ -392,6 +392,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
{ "stat64", 101 },
{ "statfs", 99 },
{ "statfs64", 298 },
+ { "statx", 349 },
{ "stime", 25 },
{ "stty", __PNR_stty },
{ "subpage_prot", __PNR_subpage_prot },
|