strace: update to 4.8

Update strace to 4.8:

* Update License file.
* Remove the backport patches which are already in version 4.8.
* Add file git-version-gen from git repo. Without this file configure
  fails.

(From OE-Core rev: 3ae2592b40900caaebe2452c875912f82f9e5200)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Kai Kang
2013-06-21 16:12:20 +08:00
committed by Richard Purdie
parent 011608a7b0
commit 4e5ba5f882
15 changed files with 251 additions and 6037 deletions

View File

@@ -1,54 +0,0 @@
Upstream-Status: Backport
From 24ee60b836ad33bb4ac694ca99d6c94a8cc5ff92 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Fri, 4 May 2012 19:37:29 -0400
Subject: [PATCH 03/31] util: fix building when glibc has a stub
process_vm_readv
If you have a newer glibc which provides process_vm_readv, but it is built
against older kernel headers which lack __NR_process_vm_readv, the library
will contain a stub implementation that just returns ENOSYS. Autoconf
checks for this case explicitly and will declare it as unavailable. So we
end up in a case where the headers provide the prototype, but autoconf has
not defined HAVE_PROCESS_VM_READV, so we hit the same build failure again:
util.c:738:16: error: static declaration of 'process_vm_readv' follows non-static declaration
/usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here
So rename our local function to something unique, and add a define so the
callers all hit the right place.
* util.c (strace_process_vm_readv): Rename from process_vm_readv.
(process_vm_readv): Define to strace_process_vm_readv.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
util.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util.c b/util.c
index d347bd8..f27acdf 100644
--- a/util.c
+++ b/util.c
@@ -735,7 +735,8 @@ static bool process_vm_readv_not_supported = 0;
#if defined(__NR_process_vm_readv)
static bool process_vm_readv_not_supported = 0;
-static ssize_t process_vm_readv(pid_t pid,
+/* Have to avoid duplicating with the C library headers. */
+static ssize_t strace_process_vm_readv(pid_t pid,
const struct iovec *lvec,
unsigned long liovcnt,
const struct iovec *rvec,
@@ -744,6 +745,7 @@ static ssize_t process_vm_readv(pid_t pid,
{
return syscall(__NR_process_vm_readv, (long)pid, lvec, liovcnt, rvec, riovcnt, flags);
}
+#define process_vm_readv strace_process_vm_readv
#else
static bool process_vm_readv_not_supported = 1;
# define process_vm_readv(...) (errno = ENOSYS, -1)
--
1.8.0

View File

@@ -1,91 +0,0 @@
Upstream-Status: Backport
From d7df59197d406b14af21cbc734d286c27108e2db Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 4 Jun 2012 14:01:59 -0400
Subject: [PATCH 14/31] x32: update syscall table
This syncs with the syscall table as it is in linux 3.4.
* linux/x32/syscallent.h (59): Fix comment typo.
(78): Add missing getdents entry.
(174): Delete create_module entry (not in the kernel).
(181, 182, 183, 184, 185): Add missing entries.
(524, 536, 539, 540): Fix spacing.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
linux/x32/syscallent.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h
index fcb6a23..ee4c4ce 100644
--- a/linux/x32/syscallent.h
+++ b/linux/x32/syscallent.h
@@ -57,7 +57,7 @@
{ 5, TP, sys_clone, "clone" }, /* 56 */
{ 0, TP, sys_fork, "fork" }, /* 57 */
{ 0, TP, sys_vfork, "vfork" }, /* 58 */
- { }, /* 47 */
+ { }, /* 59 */
{ 1, TP, sys_exit, "_exit" }, /* 60 */
{ 4, TP, sys_wait4, "wait4" }, /* 61 */
{ 2, TS, sys_kill, "kill" }, /* 62 */
@@ -76,7 +76,7 @@
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 75 */
{ 2, TF, sys_truncate, "truncate" }, /* 76 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 77 */
- { }, /* 78 */
+ { 3, TD, sys_getdents, "getdents" }, /* 78 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 79 */
{ 1, TF, sys_chdir, "chdir" }, /* 80 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 81 */
@@ -172,18 +172,18 @@
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 171 */
{ 1, 0, sys_iopl, "iopl" }, /* 172 */
{ 3, 0, sys_ioperm, "ioperm" }, /* 173 */
- { 2, 0, sys_create_module, "create_module" }, /* 174 */
+ { }, /* 174 */
{ 3, 0, sys_init_module, "init_module" }, /* 175 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 176 */
{ }, /* 177 */
{ }, /* 178 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 179 */
{ }, /* 180 */
- { }, /* 181 */
- { }, /* 182 */
- { }, /* 183 */
- { }, /* 184 */
- { }, /* 185 */
+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */
+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */
+ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 183 */
+ { 3, 0, sys_tuxcall, "tuxcall" }, /* 184 */
+ { 3, 0, sys_security, "security" }, /* 185 */
{ 0, 0, sys_gettid, "gettid" }, /* 186 */
{ 4, TD, sys_readahead, "readahead" }, /* 187 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 188 */
@@ -325,7 +325,7 @@
{ 4, 0, sys_ptrace, "ptrace" }, /* 521 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 522 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 523 */
- { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 524 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 524 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 525 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 526 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 527 */
@@ -337,8 +337,8 @@
{ 6, 0, sys_move_pages, "move_pages" }, /* 533 */
{ 5, TD, sys_preadv, "preadv" }, /* 534 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 535 */
- { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 536 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 536 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 537 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 538 */
- { 6, 0, sys_process_vm_readv, "process_vm_readv"}, /* 539 */
- { 6, 0, sys_process_vm_writev, "process_vm_writev"}, /* 540 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 539 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 540 */
--
1.8.0

View File

@@ -1,43 +0,0 @@
Upstream-Status: Backport
From f04b5de5a5a743f0b3ca0895379dd2ba702ea174 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Wed, 22 Aug 2012 11:56:15 -0400
Subject: [PATCH 18/31] x32: update {g,s}etsockopt syscall numbers
Starting with linux 3.6 (and backported to earlier kernels), these two
syscalls have changed numbers (moving from native to compat entry points).
Update the strace syscall list accordingly.
* linux/x32/syscallent.h: Move setsockopt from 54 to 541, and move
getsockopt from 55 to 542.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
linux/x32/syscallent.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h
index ee4c4ce..6385d45 100644
--- a/linux/x32/syscallent.h
+++ b/linux/x32/syscallent.h
@@ -52,8 +52,8 @@
{ 3, TN, sys_getsockname, "getsockname" }, /* 51 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 52 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 53 */
- { 5, TN, sys_setsockopt, "setsockopt" }, /* 54 */
- { 5, TN, sys_getsockopt, "getsockopt" }, /* 55 */
+ { }, /* 54 */
+ { }, /* 55 */
{ 5, TP, sys_clone, "clone" }, /* 56 */
{ 0, TP, sys_fork, "fork" }, /* 57 */
{ 0, TP, sys_vfork, "vfork" }, /* 58 */
@@ -342,3 +342,5 @@
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 538 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 539 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 540 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 541 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 542 */
--
1.8.0

View File

@@ -1,231 +0,0 @@
Upstream-Status: Backport
From 85c217849046414a98d2d90173960f39defc145f Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Thu, 27 Sep 2012 01:12:39 -0400
Subject: [PATCH 24/31] x32: add 64bit annotation too
Since someone can invoke these entry points directly with syscall(),
at least decode their name and show that they're 64bit versions rather
than just showing syscall_###.
* linux/x32/syscallent.h: Sync all missing entries below 312 with x86_64.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
linux/x32/syscallent.h | 84 +++++++++++++++++++++++++-------------------------
1 file changed, 42 insertions(+), 42 deletions(-)
diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h
index 6385d45..978af94 100644
--- a/linux/x32/syscallent.h
+++ b/linux/x32/syscallent.h
@@ -11,14 +11,14 @@
{ 3, 0, sys_mprotect, "mprotect" }, /* 10 */
{ 2, 0, sys_munmap, "munmap" }, /* 11 */
{ 1, 0, sys_brk, "brk" }, /* 12 */
- { }, /* 13 */
+ { 4, TS, printargs, "64:rt_sigaction" }, /* 13 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 14 */
- { }, /* 15 */
- { }, /* 16 */
+ { 0, TS, printargs, "64:rt_sigreturn" }, /* 15 */
+ { 3, TD, printargs, "64:ioctl" }, /* 16 */
{ 5, TD, sys_pread, "pread" }, /* 17 */
{ 5, TD, sys_pwrite, "pwrite" }, /* 18 */
- { }, /* 19 */
- { }, /* 20 */
+ { 3, TD, printargs, "64:readv" }, /* 19 */
+ { 3, TD, printargs, "64:writev" }, /* 20 */
{ 2, TF, sys_access, "access" }, /* 21 */
{ 1, TD, sys_pipe, "pipe" }, /* 22 */
{ 5, TD, sys_select, "select" }, /* 23 */
@@ -43,21 +43,21 @@
{ 3, TN, sys_connect, "connect" }, /* 42 */
{ 3, TN, sys_accept, "accept" }, /* 43 */
{ 6, TN, sys_sendto, "sendto" }, /* 44 */
- { }, /* 45 */
- { }, /* 46 */
- { }, /* 47 */
+ { 6, TN, printargs, "64:recvfrom" }, /* 45 */
+ { 3, TN, printargs, "64:sendmsg" }, /* 46 */
+ { 5, TN, printargs, "64:recvmsg" }, /* 47 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 48 */
{ 3, TN, sys_bind, "bind" }, /* 49 */
{ 2, TN, sys_listen, "listen" }, /* 50 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 51 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 52 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 53 */
- { }, /* 54 */
- { }, /* 55 */
+ { 5, TN, printargs, "64:setsockopt" }, /* 54 */
+ { 5, TN, printargs, "64:getsockopt" }, /* 55 */
{ 5, TP, sys_clone, "clone" }, /* 56 */
{ 0, TP, sys_fork, "fork" }, /* 57 */
{ 0, TP, sys_vfork, "vfork" }, /* 58 */
- { }, /* 59 */
+ { 3, TF|TP, printargs, "64:execve" }, /* 59 */
{ 1, TP, sys_exit, "_exit" }, /* 60 */
{ 4, TP, sys_wait4, "wait4" }, /* 61 */
{ 2, TS, sys_kill, "kill" }, /* 62 */
@@ -99,7 +99,7 @@
{ 2, 0, sys_getrusage, "getrusage" }, /* 98 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 99 */
{ 1, 0, sys_times, "times" }, /* 100 */
- { }, /* 101 */
+ { 4, 0, printargs, "64:ptrace" }, /* 101 */
{ 0, NF, sys_getuid, "getuid" }, /* 102 */
{ 3, 0, sys_syslog, "syslog" }, /* 103 */
{ 0, NF, sys_getgid, "getgid" }, /* 104 */
@@ -125,14 +125,14 @@
{ 1, 0, sys_getsid, "getsid" }, /* 124 */
{ 2, 0, sys_capget, "capget" }, /* 125 */
{ 2, 0, sys_capset, "capset" }, /* 126 */
- { }, /* 127 */
- { }, /* 128 */
- { }, /* 129 */
+ { 2, TS, printargs, "64:rt_sigpending" }, /* 127 */
+ { 4, TS, printargs, "64:rt_sigtimedwait" }, /* 128 */
+ { 3, TS, printargs, "64:rt_sigqueueinfo" }, /* 129 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 130 */
- { }, /* 131 */
+ { 2, TS, printargs, "64:sigaltstack"}, /* 131 */
{ 2, TF, sys_utime, "utime" }, /* 132 */
{ 3, TF, sys_mknod, "mknod" }, /* 133 */
- { }, /* 134 */
+ { 1, TF, printargs, "64:uselib" }, /* 134 */
{ 1, 0, sys_personality, "personality" }, /* 135 */
{ 2, 0, sys_ustat, "ustat" }, /* 136 */
{ 2, TF, sys_statfs, "statfs" }, /* 137 */
@@ -154,7 +154,7 @@
{ 0, 0, sys_vhangup, "vhangup" }, /* 153 */
{ 3, 0, sys_modify_ldt, "modify_ldt" }, /* 154 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 155 */
- { }, /* 156 */
+ { 1, 0, printargs, "64:_sysctl" }, /* 156 */
{ 5, 0, sys_prctl, "prctl" }, /* 157 */
{ 2, TP, sys_arch_prctl, "arch_prctl" }, /* 158 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 159 */
@@ -172,13 +172,13 @@
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 171 */
{ 1, 0, sys_iopl, "iopl" }, /* 172 */
{ 3, 0, sys_ioperm, "ioperm" }, /* 173 */
- { }, /* 174 */
+ { 2, 0, printargs, "64:create_module" }, /* 174 */
{ 3, 0, sys_init_module, "init_module" }, /* 175 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 176 */
- { }, /* 177 */
- { }, /* 178 */
+ { 1, 0, printargs, "64:get_kernel_syms" }, /* 177 */
+ { 5, 0, printargs, "64:query_module" }, /* 178 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 179 */
- { }, /* 180 */
+ { 3, 0, printargs, "64:nfsservctl" }, /* 180 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 183 */
@@ -203,24 +203,24 @@
{ 6, 0, sys_futex, "futex" }, /* 202 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 203 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 204 */
- { }, /* 205 */
+ { 1, 0, printargs, "64:set_thread_area" }, /* 205 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 206 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 207 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 208 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 209 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 210 */
- { }, /* 211 */
+ { 1, 0, printargs, "64:get_thread_area" }, /* 211 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 212 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 213 */
- { }, /* 214 */
- { }, /* 215 */
+ { 4, 0, printargs, "64:epoll_ctl_old" }, /* 214 */
+ { 4, 0, printargs, "64:epoll_wait_old" }, /* 215 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 216 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 217 */
{ 1, 0, sys_set_tid_address, "set_tid_address"}, /* 218 */
{ 0, 0, sys_restart_syscall, "restart_syscall"}, /* 219 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 220 */
{ 4, TD, sys_fadvise64_64, "fadvise64" }, /* 221 */
- { }, /* 222 */
+ { 3, 0, printargs, "64:timer_create"}, /* 222 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 223 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 224 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 225 */
@@ -234,7 +234,7 @@
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 233 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 234 */
{ 2, TF, sys_utimes, "utimes" }, /* 235 */
- { }, /* 236 */
+ { 5, 0, printargs, "64:vserver" }, /* 236 */
{ 6, 0, sys_mbind, "mbind" }, /* 237 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 238 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 239 */
@@ -242,10 +242,10 @@
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 241 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 242 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 243 */
- { }, /* 244 */
+ { 2, 0, printargs, "64:mq_notify" }, /* 244 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 245 */
- { }, /* 246 */
- { }, /* 247 */
+ { 4, 0, printargs, "64:kexec_load" }, /* 246 */
+ { 5, TP, printargs, "64:waitid" }, /* 247 */
{ 5, 0, sys_add_key, "add_key" }, /* 248 */
{ 4, 0, sys_request_key, "request_key" }, /* 249 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 250 */
@@ -271,13 +271,13 @@
{ 6, TD, sys_pselect6, "pselect6" }, /* 270 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 271 */
{ 1, TP, sys_unshare, "unshare" }, /* 272 */
- { }, /* 273 */
- { }, /* 274 */
+ { 2, 0, printargs, "64:set_robust_list" }, /* 273 */
+ { 3, 0, printargs, "64:get_robust_list" }, /* 274 */
{ 6, TD, sys_splice, "splice" }, /* 275 */
{ 4, TD, sys_tee, "tee" }, /* 276 */
{ 4, TD, sys_sync_file_range, "sync_file_range" }, /* 277 */
- { }, /* 278 */
- { }, /* 279 */
+ { 4, TD, printargs, "64:vmsplice" }, /* 278 */
+ { 6, 0, printargs, "64:move_pages" }, /* 279 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 280 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 281 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 282 */
@@ -293,11 +293,11 @@
{ 3, TD, sys_dup3, "dup3" }, /* 292 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 293 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 294 */
- { }, /* 295 */
- { }, /* 296 */
- { }, /* 297 */
+ { 5, TD, printargs, "64:preadv" }, /* 295 */
+ { 5, TD, printargs, "64:pwritev" }, /* 296 */
+ { 4, TP|TS, printargs, "64:rt_tgsigqueueinfo"}, /* 297 */
{ 5, TD, sys_perf_event_open, "perf_event_open"}, /* 298 */
- { }, /* 299 */
+ { 5, TN, printargs, "64:recvmmsg" }, /* 299 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 300 */
{ 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 301 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 302 */
@@ -305,11 +305,11 @@
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 304 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 305 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 306 */
- { }, /* 307 */
+ { 4, TN, printargs, "64:sendmmsg" }, /* 307 */
{ 2, TD, sys_setns, "setns" }, /* 308 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 309 */
- { }, /* 310 */
- { }, /* 311 */
+ { 6, 0, printargs, "64:process_vm_readv" }, /* 310 */
+ { 6, 0, printargs, "64:process_vm_writev" }, /* 311 */
[312 ... 511] = {},
--
1.8.0

View File

@@ -1,36 +0,0 @@
Upstream-Status: Backport
From d6dbd998b723087f933f88a9e10843c6a7682fa2 Mon Sep 17 00:00:00 2001
From: Steve McIntyre <steve.mcintyre@linaro.org>
Date: Wed, 24 Oct 2012 14:49:20 +0100
Subject: [PATCH 26/31] linux: add new errno values for EPROBE_DEFER and
EOPENSTALE
New definitions match updates in Linux 3.4 and Linux 3.5 respectively.
* linux/errnoent.h (ERRNO_517): Change to EPROBE_DEFER.
(ERRNO_518): Change to EOPENSTALE.
Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
---
linux/errnoent.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux/errnoent.h b/linux/errnoent.h
index e43bff5..c2ac683 100644
--- a/linux/errnoent.h
+++ b/linux/errnoent.h
@@ -519,8 +519,8 @@
"ERESTARTNOHAND", /* 514 */
"ENOIOCTLCMD", /* 515 */
"ERESTART_RESTARTBLOCK", /* 516 */
- "ERRNO_517", /* 517 */
- "ERRNO_518", /* 518 */
+ "EPROBE_DEFER", /* 517 */
+ "EOPENSTALE", /* 518 */
"ERRNO_519", /* 519 */
"ERRNO_520", /* 520 */
"EBADHANDLE", /* 521 */
--
1.8.0

View File

@@ -1,542 +0,0 @@
Upstream-Status: Backport
From d8d3bd3709eb52581c8ce86cec5a7a9c43c3c5b9 Mon Sep 17 00:00:00 2001
From: Steve McIntyre <steve.mcintyre@linaro.org>
Date: Wed, 24 Oct 2012 17:58:16 +0100
Subject: [PATCH 27/31] Add AArch64 support to strace
AArch64 has been included in linux from 3.7 onwards.
Add support for AArch64 in strace, tested on linux in a simulator.
* configure.ac: Support AArch64.
* defs.h [AARCH64]: Include <sys/ptrace.h>, define TCB_WAITEXECVE.
* ipc.c (indirect_ipccall): Support AArch64.
* process.c (struct_user_offsets): Likewise.
* syscall.c [AARCH64]: Include <asm/ptrace.h>, <sys/uio.h>, and
<elf.h>. Define struct user_pt_regs regs.
(get_scno, get_syscall_result): Support AArch64 using PTRACE_GETREGSET.
(get_syscall_args, get_error): Support AArch64.
* linux/aarch64/ioctlent.h.in: New file.
* linux/aarch64/syscallent.h: New file, based on linux 3.7 version of
asm-generic/unistd.h.
Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
---
configure.ac | 4 +
defs.h | 5 +-
ipc.c | 2 +-
linux/aarch64/ioctlent.h.in | 1 +
linux/aarch64/syscallent.h | 330 ++++++++++++++++++++++++++++++++++++++++++++
process.c | 7 +-
syscall.c | 32 +++++
7 files changed, 375 insertions(+), 6 deletions(-)
create mode 100644 linux/aarch64/ioctlent.h.in
create mode 100644 linux/aarch64/syscallent.h
diff --git a/configure.ac b/configure.ac
index a9f8d15..f44eaf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,10 @@ arm*)
arch=arm
AC_DEFINE([ARM], 1, [Define for the ARM architecture.])
;;
+aarch64*)
+ arch=aarch64
+ AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.])
+ ;;
avr32*)
arch=avr32
AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.])
diff --git a/defs.h b/defs.h
index d366b21..11e26bb 100644
--- a/defs.h
+++ b/defs.h
@@ -134,7 +134,7 @@ extern char *stpcpy(char *dst, const char *src);
# define LINUX_MIPS64
#endif
-#if (defined(LINUXSPARC) || defined(X86_64) || defined(ARM) || defined(AVR32)) && defined(__GLIBC__)
+#if (defined(LINUXSPARC) || defined(X86_64) || defined(ARM) || defined(AARCH64) || defined(AVR32)) && defined(__GLIBC__)
# include <sys/ptrace.h>
#else
/* Work around awkward prototype in ptrace.h. */
@@ -389,7 +389,8 @@ struct tcb {
#if defined(ALPHA) || defined(AVR32) || defined(SPARC) || defined(SPARC64) \
|| defined(POWERPC) || defined(IA64) || defined(HPPA) \
|| defined(SH) || defined(SH64) || defined(S390) || defined(S390X) \
- || defined(ARM) || defined(MIPS) || defined(BFIN) || defined(TILE)
+ || defined(ARM) || defined(AARCH64) || defined(MIPS) || defined(BFIN) \
+ || defined(TILE)
/* This tracee has entered into execve syscall. Expect post-execve SIGTRAP
* to happen. (When it is detected, tracee is continued and this bit is cleared.)
*/
diff --git a/ipc.c b/ipc.c
index f4ec522..0bde1cf 100644
--- a/ipc.c
+++ b/ipc.c
@@ -174,7 +174,7 @@ indirect_ipccall(struct tcb *tcp)
#if defined IA64
return tcp->scno < 1024; /* ia32 emulation syscalls are low */
#endif
-#if defined(ALPHA) || defined(MIPS) || defined(HPPA) || defined(__ARM_EABI__)
+#if defined(ALPHA) || defined(MIPS) || defined(HPPA) || defined(__ARM_EABI__) || defined(AARCH64)
return 0;
#endif
return 1;
diff --git a/linux/aarch64/ioctlent.h.in b/linux/aarch64/ioctlent.h.in
new file mode 100644
index 0000000..83e6eb2
--- /dev/null
+++ b/linux/aarch64/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../arm/ioctlent.h.in"
diff --git a/linux/aarch64/syscallent.h b/linux/aarch64/syscallent.h
new file mode 100644
index 0000000..eeda429
--- /dev/null
+++ b/linux/aarch64/syscallent.h
@@ -0,0 +1,330 @@
+ { 2, 0, sys_io_setup, "io_setup" }, /* 0 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 2 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 5 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 8 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 11 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 12 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 14 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 17 */
+ { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */
+ { 1, TD, sys_dup, "dup" }, /* 23 */
+ { 3, TD, sys_dup3, "dup3" }, /* 24 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 25 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */
+ { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */
+ { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 29 */
+ { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */
+ { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */
+ { 2, TD, sys_flock, "flock" }, /* 32 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 37 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 38 */
+ { 2, TF, sys_umount2, "umount2" }, /* 39 */
+ { 5, TF, sys_mount, "mount" }, /* 40 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */
+ { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */
+ { 2, TF, sys_statfs, "statfs64" }, /* 43 */
+ { 2, TD, sys_fstatfs, "fstatfs64" }, /* 44 */
+ { 2, TF, sys_truncate, "truncate64" }, /* 45 */
+ { 2, TD, sys_ftruncate, "ftruncate64" }, /* 46 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 47 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */
+ { 1, TF, sys_chdir, "chdir" }, /* 49 */
+ { 1, TD, sys_fchdir, "fchdir" }, /* 50 */
+ { 1, TF, sys_chroot, "chroot" }, /* 51 */
+ { 2, TD, sys_fchmod, "fchmod" }, /* 52 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */
+ { 3, TD, sys_fchown, "fchown" }, /* 55 */
+ { 4, TD|TF, sys_openat, "openat" }, /* 56 */
+ { 1, TD, sys_close, "close" }, /* 57 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 58 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 59 */
+ { 4, 0, sys_quotactl, "quotactl" }, /* 60 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 61 */
+ { 3, TD, sys_lseek, "lseek" }, /* 62 */
+ { 3, TD, sys_read, "read" }, /* 63 */
+ { 3, TD, sys_write, "write" }, /* 64 */
+ { 3, TD, sys_readv, "readv" }, /* 65 */
+ { 3, TD, sys_writev, "writev" }, /* 66 */
+ { 5, TD, sys_pread, "pread64" }, /* 67 */
+ { 5, TD, sys_pwrite, "pwrite64" }, /* 68 */
+ { 5, TD, sys_preadv, "preadv" }, /* 69 */
+ { 5, TD, sys_pwritev, "pwritev" }, /* 70 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 71 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 72 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 73 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */
+ { 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */
+ { 6, TD, sys_splice, "splice" }, /* 76 */
+ { 4, TD, sys_tee, "tee" }, /* 77 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 79 */
+ { 2, TD, sys_fstat, "fstat" }, /* 80 */
+ { 0, 0, sys_sync, "sync" }, /* 81 */
+ { 1, TD, sys_fsync, "fsync" }, /* 82 */
+ { 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */
+ { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */
+ { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */
+ { 1, TF, sys_acct, "acct" }, /* 89 */
+ { 2, 0, sys_capget, "capget" }, /* 90 */
+ { 2, 0, sys_capset, "capset" }, /* 91 */
+ { 1, 0, sys_personality, "personality" }, /* 92 */
+ { 1, TP, sys_exit, "exit" }, /* 93 */
+ { 1, TP, sys_exit, "exit_group" }, /* 94 */
+ { 5, TP, sys_waitid, "waitid" }, /* 95 */
+ { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */
+ { 1, TP, sys_unshare, "unshare" }, /* 97 */
+ { 6, 0, sys_futex, "futex" }, /* 98 */
+ { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */
+ { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */
+ { 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */
+ { 2, 0, sys_getitimer, "getitimer" }, /* 102 */
+ { 3, 0, sys_setitimer, "setitimer" }, /* 103 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */
+ { 3, 0, sys_init_module, "init_module" }, /* 105 */
+ { 2, 0, sys_delete_module, "delete_module" }, /* 106 */
+ { 3, 0, sys_timer_create, "timer_create" }, /* 107 */
+ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */
+ { 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */
+ { 3, 0, sys_syslog, "syslog" }, /* 116 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 117 */
+ { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */
+ { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */
+ { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */
+ { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 125 */
+ { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 126 */
+ { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */
+ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */
+ { 2, TS, sys_kill, "kill" }, /* 129 */
+ { 2, TS, sys_kill, "tkill" }, /* 130 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 131 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */
+ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */
+ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */
+ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */
+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */
+ { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */
+ { 3, 0, sys_setpriority, "setpriority" }, /* 140 */
+ { 2, 0, sys_getpriority, "getpriority" }, /* 141 */
+ { 4, 0, sys_reboot, "reboot" }, /* 142 */
+ { 2, 0, sys_setregid, "setregid" }, /* 143 */
+ { 1, 0, sys_setgid, "setgid" }, /* 144 */
+ { 2, 0, sys_setreuid, "setreuid" }, /* 145 */
+ { 1, 0, sys_setuid, "setuid" }, /* 146 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 147 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 148 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 149 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 150 */
+ { 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */
+ { 1, 0, sys_times, "times" }, /* 153 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 154 */
+ { 1, 0, sys_getpgid, "getpgid" }, /* 155 */
+ { 1, 0, sys_getsid, "getsid" }, /* 156 */
+ { 0, 0, sys_setsid, "setsid" }, /* 157 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 158 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 159 */
+ { 1, 0, sys_uname, "uname" }, /* 160 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 161 */
+ { 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 165 */
+ { 1, 0, sys_umask, "umask" }, /* 166 */
+ { 5, 0, sys_prctl, "prctl" }, /* 167 */
+ { 3, 0, sys_getcpu, "getcpu" }, /* 168 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */
+ { 0, 0, sys_getpid, "getpid" }, /* 172 */
+ { 0, 0, sys_getppid, "getppid" }, /* 173 */
+ { 0, NF, sys_getuid, "getuid" }, /* 174 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 175 */
+ { 0, NF, sys_getgid, "getgid" }, /* 176 */
+ { 0, NF, sys_getegid, "getegid" }, /* 177 */
+ { 0, 0, sys_gettid, "gettid" }, /* 178 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */
+ { 4, 0, sys_mq_open, "mq_open" }, /* 180 */
+ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */
+ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */
+ { 4, TI, sys_msgget, "msgget" }, /* 186 */
+ { 3, TI, sys_msgctl, "msgctl" }, /* 187 */
+ { 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */
+ { 4, TI, sys_semget, "semget" }, /* 190 */
+ { 4, TI, sys_semctl, "semctl" }, /* 191 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */
+ { 4, TI, sys_semop, "semop" }, /* 193 */
+ { 4, TI, sys_shmget, "shmget" }, /* 194 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 195 */
+ { 4, TI, sys_shmat, "shmat" }, /* 196 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 197 */
+ { 3, TN, sys_socket, "socket" }, /* 198 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 199 */
+ { 3, TN, sys_bind, "bind" }, /* 200 */
+ { 2, TN, sys_listen, "listen" }, /* 201 */
+ { 3, TN, sys_accept, "accept" }, /* 202 */
+ { 3, TN, sys_connect, "connect" }, /* 203 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 204 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 205 */
+ { 6, TN, sys_sendto, "sendto" }, /* 206 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 210 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */
+ { 5, TN, sys_recvmsg, "recvmsg" }, /* 212 */
+ { 4, TD, sys_readahead, "readahead" }, /* 213 */
+ { 1, TM, sys_brk, "brk" }, /* 214 */
+ { 2, TM, sys_munmap, "munmap" }, /* 215 */
+ { 5, TM, sys_mremap, "mremap" }, /* 216 */
+ { 5, 0, sys_add_key, "add_key" }, /* 217 */
+ { 4, 0, sys_request_key, "request_key" }, /* 218 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 219 */
+ { 5, TP, sys_clone, "clone" }, /* 220 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 221 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 222 */
+ { 4, TD, sys_fadvise64, "fadvise64" }, /* 223 */
+ { 2, TF, sys_swapon, "swapon" }, /* 224 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 225 */
+ { 3, TM, sys_mprotect, "mprotect" }, /* 226 */
+ { 3, TM, sys_msync, "msync" }, /* 227 */
+ { 3, TM, sys_msync, "msync" }, /* 228 */
+ { 2, TM, sys_munlock, "munlock" }, /* 229 */
+ { 1, TM, sys_mlockall, "mlockall" }, /* 230 */
+ { 0, TM, sys_munlockall, "munlockall" }, /* 231 */
+ { 3, TM, sys_mincore, "mincore" }, /* 232 */
+ { 3, TM, sys_madvise, "madvise" }, /* 233 */
+ { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 234 */
+ { 6, TM, sys_mbind, "mbind" }, /* 235 */
+ { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */
+ { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */
+ { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */
+ { 6, TM, sys_move_pages, "move_pages" }, /* 239 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */
+ { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */
+ { 4, TN, sys_accept4, "accept4" }, /* 242 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */
+
+ /* Arch-specific block, not used on AArch64 */
+ [244 ... 259] = { },
+
+ { 4, TP, sys_wait4, "wait4" }, /* 260 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */
+ { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */
+ { 1, TD, sys_syncfs, "syncfs" }, /* 267 */
+ { 2, TD, sys_setns, "setns" }, /* 268 */
+ { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */
+
+ /* Blank down to 1023 */
+ [272 ... 1023] = { },
+
+ /* Quote from asm-generic/unistd.h:
+ *
+ * All syscalls below here should go away really,
+ * these are provided for both review and as a porting
+ * help for the C library version.
+ *
+ * Last chance: are any of these important enough to
+ * enable by default?
+ */
+
+ { 3, TD|TF, sys_open, "open" }, /* 1024 */
+ { 2, TF, sys_link, "link" }, /* 1025 */
+ { 1, TF, sys_unlink, "unlink" }, /* 1026 */
+ { 3, TF, sys_mknod, "mknod" }, /* 1027 */
+ { 2, TF, sys_chmod, "chmod" }, /* 1028 */
+ { 3, TF, sys_chown, "chown" }, /* 1029 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 1030 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 1031 */
+ { 3, TF, sys_chown, "lchown" }, /* 1032 */
+ { 2, TF, sys_access, "access" }, /* 1033 */
+ { 2, TF, sys_rename, "rename" }, /* 1034 */
+ { 3, TF, sys_readlink, "readlink" }, /* 1035 */
+ { 2, TF, sys_symlink, "symlink" }, /* 1036 */
+ { 2, TF, sys_utimes, "utimes" }, /* 1037 */
+ { 2, TF, sys_stat, "stat" }, /* 1038 */
+ { 2, TF, sys_lstat, "lstat" }, /* 1039 */
+ { 1, TD, sys_pipe, "pipe" }, /* 1040 */
+ { 2, TD, sys_dup2, "dup2" }, /* 1041 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 1042 */
+ { 0, TD, sys_inotify_init, "inotify_init" }, /* 1043 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 1044 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 1045 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 1046 */
+ { 2, TD, sys_ftruncate, "ftruncate" }, /* 1047 */
+ { 2, TF, sys_truncate, "truncate" }, /* 1048 */
+ { 2, TF, sys_stat, "stat" }, /* 1049 */
+ { 2, TF, sys_lstat, "lstat" }, /* 1050 */
+ { 2, TD, sys_fstat, "fstat" }, /* 1051 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 1052 */
+ { 4, TD, sys_fadvise64, "fadvise64" }, /* 1053 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 1054 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 1055 */
+ { 2, TF, sys_statfs, "statfs" }, /* 1056 */
+ { 3, TD, sys_lseek, "lseek" }, /* 1057 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 1058 */
+ { 1, 0, sys_alarm, "alarm" }, /* 1059 */
+ { 0, 0, sys_getpgrp, "getpgrp" }, /* 1060 */
+ { 0, TS, sys_pause, "pause" }, /* 1061 */
+ { 1, 0, sys_time, "time" }, /* 1062 */
+ { 2, TF, sys_utime, "utime" }, /* 1063 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 1064 */
+ { 3, TD, sys_getdents, "getdents" }, /* 1065 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 1066 */
+ { 5, TD, sys_select, "select" }, /* 1067 */
+ { 3, TD, sys_poll, "poll" }, /* 1068 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 1069 */
+ { 2, 0, sys_ustat, "ustat" }, /* 1070 */
+ { 0, TP, sys_vfork, "vfork" }, /* 1071 */
+ { 4, TP, sys_wait4, "wait4" }, /* 1072 */
+ { 6, TN, sys_recv, "recv" }, /* 1073 */
+ { 4, TD|TN, sys_send, "send" }, /* 1074 */
+ { 2, 0, sys_bdflush, "bdflush" }, /* 1075 */
+ { 2, TF, sys_umount, "umount" }, /* 1076 */
+ { 1, TF, sys_uselib, "uselib" }, /* 1077 */
+ { 1, 0, sys_sysctl, "sysctl" }, /* 1078 */
+ { 0, TP, sys_fork, "fork" }, /* 1079 */
diff --git a/process.c b/process.c
index fa304e5..467c096 100644
--- a/process.c
+++ b/process.c
@@ -2119,7 +2119,8 @@ const struct xlat struct_user_offsets[] = {
#if !defined(SPARC) && !defined(HPPA) && !defined(POWERPC) \
&& !defined(ALPHA) && !defined(IA64) \
- && !defined(CRISV10) && !defined(CRISV32) && !defined(MICROBLAZE)
+ && !defined(CRISV10) && !defined(CRISV32) && !defined(MICROBLAZE) \
+ && !defined(AARCH64)
# if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32) && !defined(BFIN) && !defined(TILE)
{ uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" },
# endif
@@ -2148,7 +2149,7 @@ const struct xlat struct_user_offsets[] = {
# if !defined(SPARC64)
{ uoff(u_ar0), "offsetof(struct user, u_ar0)" },
# endif
-# if !defined(ARM) && !defined(AVR32) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN) && !defined(TILE)
+# if !defined(ARM) && !defined(AARCH64) && !defined(AVR32) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN) && !defined(TILE)
{ uoff(u_fpstate), "offsetof(struct user, u_fpstate)" },
# endif
{ uoff(magic), "offsetof(struct user, magic)" },
@@ -2158,7 +2159,7 @@ const struct xlat struct_user_offsets[] = {
# endif
#endif /* !defined(many arches) */
-#ifndef HPPA
+#if !defined(HPPA) && !defined(AARCH64)
{ sizeof(struct user), "sizeof(struct user)" },
#endif
{ 0, NULL },
diff --git a/syscall.c b/syscall.c
index 37936ad..680cbc3 100644
--- a/syscall.c
+++ b/syscall.c
@@ -65,6 +65,12 @@
# include <asm/rse.h>
#endif
+#if defined(AARCH64)
+# include <asm/ptrace.h>
+# include <sys/uio.h>
+# include <elf.h>
+#endif
+
#ifndef ERESTARTSYS
# define ERESTARTSYS 512
#endif
@@ -657,6 +663,8 @@ static long d0;
static long r0;
#elif defined(ARM)
static struct pt_regs regs;
+#elif defined(AARCH64)
+static struct user_pt_regs regs;
#elif defined(ALPHA)
static long r0;
static long a3;
@@ -967,6 +975,13 @@ get_scno(struct tcb *tcp)
fprintf(stderr, "pid %d stray syscall entry\n", tcp->pid);
tcp->flags |= TCB_INSYSCALL;
}
+#elif defined(AARCH64)
+ struct iovec io;
+ io.iov_base = &regs;
+ io.iov_len = sizeof(regs);
+ if (ptrace(PTRACE_GETREGSET, tcp->pid, NT_PRSTATUS, (void *)&io) == -1)
+ return -1;
+ scno = regs.regs[8];
#elif defined(M68K)
if (upeek(tcp, 4*PT_ORIG_D0, &scno) < 0)
return -1;
@@ -1403,6 +1418,9 @@ get_syscall_args(struct tcb *tcp)
#elif defined(ARM)
for (i = 0; i < nargs; ++i)
tcp->u_arg[i] = regs.uregs[i];
+#elif defined(AARCH64)
+ for (i = 0; i < nargs; ++i)
+ tcp->u_arg[i] = regs.regs[i];
#elif defined(AVR32)
(void)i;
(void)nargs;
@@ -1641,6 +1659,12 @@ get_syscall_result(struct tcb *tcp)
/* Read complete register set in one go. */
if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)&regs) == -1)
return -1;
+#elif defined(AARCH64)
+ struct iovec io;
+ io.iov_base = &regs;
+ io.iov_len = sizeof(regs);
+ if (ptrace(PTRACE_GETREGSET, tcp->pid, NT_PRSTATUS, (void *)&io) == -1)
+ return -1;
#elif defined(M68K)
if (upeek(tcp, 4*PT_D0, &d0) < 0)
return -1;
@@ -1823,6 +1847,14 @@ get_error(struct tcb *tcp)
else {
tcp->u_rval = regs.ARM_r0;
}
+#elif defined(AARCH64)
+ if (check_errno && is_negated_errno(regs.regs[0])) {
+ tcp->u_rval = -1;
+ u_error = -regs.regs[0];
+ }
+ else {
+ tcp->u_rval = regs.regs[0];
+ }
#elif defined(AVR32)
if (check_errno && regs.r12 && (unsigned) -regs.r12 < nerrnos) {
tcp->u_rval = -1;
--
1.8.0

View File

@@ -1,391 +0,0 @@
Upstream-Status: Backport
From 7943966f6cd137e44f27d56aaf21b023fb1fae63 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Fri, 26 Oct 2012 23:43:13 +0000
Subject: [PATCH 28/31] Enhance quotactl decoding
* quota.c (sys_quotactl): Decode 2nd syscall argument using printpath.
* pathtrace.c (pathtrace_match): Add quotactl support.
* linux/*/syscallent.h: Add TF flag to quotactl entry.
---
linux/aarch64/syscallent.h | 2 +-
linux/alpha/syscallent.h | 2 +-
linux/arm/syscallent.h | 2 +-
linux/avr32/syscallent.h | 2 +-
linux/bfin/syscallent.h | 2 +-
linux/hppa/syscallent.h | 2 +-
linux/i386/syscallent.h | 2 +-
linux/ia64/syscallent.h | 2 +-
linux/m68k/syscallent.h | 2 +-
linux/microblaze/syscallent.h | 2 +-
linux/mips/syscallent.h | 16 ++++++++--------
linux/powerpc/syscallent.h | 2 +-
linux/s390/syscallent.h | 2 +-
linux/s390x/syscallent.h | 2 +-
linux/sh/syscallent.h | 2 +-
linux/sh64/syscallent.h | 2 +-
linux/sparc/syscallent.h | 2 +-
linux/tile/syscallent.h | 2 +-
linux/x32/syscallent.h | 2 +-
linux/x86_64/syscallent.h | 2 +-
pathtrace.c | 6 ++++++
quota.c | 2 +-
22 files changed, 34 insertions(+), 28 deletions(-)
diff --git a/linux/aarch64/syscallent.h b/linux/aarch64/syscallent.h
index eeda429..b712c9f 100644
--- a/linux/aarch64/syscallent.h
+++ b/linux/aarch64/syscallent.h
@@ -58,7 +58,7 @@
{ 1, TD, sys_close, "close" }, /* 57 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 58 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 59 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 60 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 60 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 61 */
{ 3, TD, sys_lseek, "lseek" }, /* 62 */
{ 3, TD, sys_read, "read" }, /* 63 */
diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h
index aa76a43..dde7017 100644
--- a/linux/alpha/syscallent.h
+++ b/linux/alpha/syscallent.h
@@ -174,7 +174,7 @@
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */
{ 5, 0, printargs, "osf_old_killpg" }, /* 146, not implemented */
{ 0, 0, sys_setsid, "setsid" }, /* 147 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 148 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 148 */
{ 5, 0, printargs, "osf_oldquota" }, /* 149, not implemented */
{ 3, TN, sys_getsockname, "getsockname" }, /* 150 */
{ 5, 0, NULL, NULL }, /* 151 */
diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h
index 9b8da02..123b910 100644
--- a/linux/arm/syscallent.h
+++ b/linux/arm/syscallent.h
@@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h
index 6076fca..b215cc1 100644
--- a/linux/avr32/syscallent.h
+++ b/linux/avr32/syscallent.h
@@ -142,7 +142,7 @@
{ 0, TP, sys_vfork, "vfork" }, /* 114 */
{ 3, 0, sys_init_module, "init_module" }, /* 115 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 116 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 117 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 117 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 118 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 119 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 120 */
diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h
index 7a9e618..05194fb 100644
--- a/linux/bfin/syscallent.h
+++ b/linux/bfin/syscallent.h
@@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h
index f21d0c3..dc12299 100644
--- a/linux/hppa/syscallent.h
+++ b/linux/hppa/syscallent.h
@@ -133,7 +133,7 @@
{ 4, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h
index dd76244..1b7feb5 100644
--- a/linux/i386/syscallent.h
+++ b/linux/i386/syscallent.h
@@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h
index bbdfc36..8e130ad 100644
--- a/linux/ia64/syscallent.h
+++ b/linux/ia64/syscallent.h
@@ -925,7 +925,7 @@
{ 2, 0, sys_delete_module, "delete_module" }, /* 1134 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 1135 */
{ 5, 0, sys_query_module, "query_module" }, /* 1136 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 1137 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 1137 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 1138 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 1139 */
{ 1, 0, sys_personality, "personality" }, /* 1140 */
diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h
index f95cf8d..184f01c 100644
--- a/linux/m68k/syscallent.h
+++ b/linux/m68k/syscallent.h
@@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h
index 51c5e6c..c5a52fa 100644
--- a/linux/microblaze/syscallent.h
+++ b/linux/microblaze/syscallent.h
@@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/mips/syscallent.h b/linux/mips/syscallent.h
index 4c72763..df206ec 100644
--- a/linux/mips/syscallent.h
+++ b/linux/mips/syscallent.h
@@ -1141,7 +1141,7 @@
{ 0, TM, printargs, "sysv_madvise" }, /* 1138 */
{ 0, 0, printargs, "sysv_pagelock" }, /* 1139 */
{ 0, 0, printargs, "sysv_getpagesize" }, /* 1140 */
- { 0, 0, printargs, "sysv_quotactl" }, /* 1141 */
+ { 0, TF, printargs, "sysv_quotactl" }, /* 1141 */
{ 0, 0, printargs, "sysv_libdetach" }, /* 1142 */
{ 0, 0, printargs, "sysv_BSDgetpgrp" }, /* 1143 */
{ 0, 0, printargs, "sysv_BSDsetpgrp" }, /* 1144 */
@@ -2168,7 +2168,7 @@
{ 0, 0, printargs, "bsd43_getdomainname" }, /* 2165 */
{ 0, 0, printargs, "bsd43_setdomainname" }, /* 2166 */
{ 0, 0, printargs, "bsd43_pcfs_mount" }, /* 2167 */
- { 0, 0, printargs, "bsd43_quotactl" }, /* 2168 */
+ { 0, TF, printargs, "bsd43_quotactl" }, /* 2168 */
{ 0, 0, printargs, "bsd43_oldexportfs" }, /* 2169 */
{ 0, 0, printargs, "bsd43_smount" }, /* 2170 */
{ 0, 0, printargs, "bsd43_mipshwconf" }, /* 2171 */
@@ -4133,7 +4133,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 4128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 4129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 4130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 4131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 4131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 4132 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 4133 */
{ 2, 0, sys_bdflush, "bdflush" }, /* 4134 */
@@ -4481,7 +4481,7 @@
{ 0, 0, printargs, "o32_init_module" }, /* 4128 */
{ 0, 0, printargs, "o32_delete_module" }, /* 4129 */
{ 0, 0, printargs, "o32_get_kernel_syms"}, /* 4130 */
- { 0, 0, printargs, "o32_quotactl" }, /* 4131 */
+ { 0, TF, printargs, "o32_quotactl" }, /* 4131 */
{ 0, 0, printargs, "o32_getpgid" }, /* 4132 */
{ 0, 0, printargs, "o32_fchdir" }, /* 4133 */
{ 0, 0, printargs, "o32_bdflush" }, /* 4134 */
@@ -5525,7 +5525,7 @@
{ 1, 0, sys_delete_module, "delete_module" }, /* 5169 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 5170 */
{ 5, 0, sys_query_module, "query_module" }, /* 5171 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 5172 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 5172 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 5173 */
{ 5, TN, printargs, "getpmsg" }, /* 5174 */
{ 5, TN, printargs, "putpmsg" }, /* 5175 */
@@ -5832,7 +5832,7 @@
{ 0, 0, printargs, "n64_delete_module" }, /* 5169 */
{ 0, 0, printargs, "n64_get_kernel_syms" }, /* 5170 */
{ 0, 0, printargs, "n64_query_module" }, /* 5171 */
- { 0, 0, printargs, "n64_quotactl" }, /* 5172 */
+ { 0, TF, printargs, "n64_quotactl" }, /* 5172 */
{ 0, 0, printargs, "n64_nfsservctl" }, /* 5173 */
{ 0, 0, printargs, "n64_getpmsg" }, /* 5174 */
{ 0, 0, printargs, "n64_putpmsg" }, /* 5175 */
@@ -6836,7 +6836,7 @@
{ 1, 0, sys_delete_module, "delete_module" }, /* 6169 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 6170 */
{ 5, 0, sys_query_module, "query_module" }, /* 6171 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 6172 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 6172 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 6173 */
{ 5, TN, printargs, "getpmsg" }, /* 6174 */
{ 5, TN, printargs, "putpmsg" }, /* 6175 */
@@ -7149,7 +7149,7 @@
{ 0, 0, printargs, "n32_delete_module" }, /* 6169 */
{ 0, 0, printargs, "n32_get_kernel_syms" }, /* 6170 */
{ 0, 0, printargs, "n32_query_module" }, /* 6171 */
- { 0, 0, printargs, "n32_quotactl" }, /* 6172 */
+ { 0, TF, printargs, "n32_quotactl" }, /* 6172 */
{ 0, 0, printargs, "n32_nfsservctl" }, /* 6173 */
{ 0, 0, printargs, "n32_getpmsg" }, /* 6174 */
{ 0, 0, printargs, "n32_putpmsg" }, /* 6175 */
diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h
index 3228f97..e61946e 100644
--- a/linux/powerpc/syscallent.h
+++ b/linux/powerpc/syscallent.h
@@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h
index 1ce0fe2..94f4d25 100644
--- a/linux/s390/syscallent.h
+++ b/linux/s390/syscallent.h
@@ -159,7 +159,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h
index 7fa8ff5..ebf35d4 100644
--- a/linux/s390x/syscallent.h
+++ b/linux/s390x/syscallent.h
@@ -158,7 +158,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h
index d9228b4..1546ff6 100644
--- a/linux/sh/syscallent.h
+++ b/linux/sh/syscallent.h
@@ -159,7 +159,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h
index 39c13e0..4e20c47 100644
--- a/linux/sh64/syscallent.h
+++ b/linux/sh64/syscallent.h
@@ -157,7 +157,7 @@
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 131 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h
index d6b518a..fe3a940 100644
--- a/linux/sparc/syscallent.h
+++ b/linux/sparc/syscallent.h
@@ -163,7 +163,7 @@
{ 2, 0, printargs, "getdomainname" }, /* 162 */
{ 2, 0, sys_setdomainname,"setdomainname" }, /* 163 */
{ 5, 0, printargs, "utrap_install" }, /* 164 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 165 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 165 */
{ 1, 0, sys_set_tid_address,"set_tid_address" }, /* 166 */
{ 5, TF, sys_mount, "mount" }, /* 167 */
{ 2, 0, sys_ustat, "ustat" }, /* 168 */
diff --git a/linux/tile/syscallent.h b/linux/tile/syscallent.h
index 89205e3..3bf59ae 100644
--- a/linux/tile/syscallent.h
+++ b/linux/tile/syscallent.h
@@ -131,7 +131,7 @@
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 130 */
{ 3, 0, sys_init_module, "init_module" }, /* 131 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 132 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 133 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 133 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 134 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 135 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 136 */
diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h
index 924164e..cfe546c 100644
--- a/linux/x32/syscallent.h
+++ b/linux/x32/syscallent.h
@@ -177,7 +177,7 @@
{ 2, 0, sys_delete_module, "delete_module" }, /* 176 */
{ 1, 0, printargs, "64:get_kernel_syms" }, /* 177 */
{ 5, 0, printargs, "64:query_module" }, /* 178 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 179 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 179 */
{ 3, 0, printargs, "64:nfsservctl" }, /* 180 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */
diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h
index 2ce663f..f98cd37 100644
--- a/linux/x86_64/syscallent.h
+++ b/linux/x86_64/syscallent.h
@@ -177,7 +177,7 @@
{ 2, 0, sys_delete_module, "delete_module" }, /* 176 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 177 */
{ 5, 0, sys_query_module, "query_module" }, /* 178 */
- { 4, 0, sys_quotactl, "quotactl" }, /* 179 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 179 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 180 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */
diff --git a/pathtrace.c b/pathtrace.c
index c000c83..12e47e9 100644
--- a/pathtrace.c
+++ b/pathtrace.c
@@ -213,6 +213,12 @@ pathtrace_match(struct tcb *tcp)
upathmatch(tcp, tcp->u_arg[1]);
}
+ if (s->sys_func == sys_quotactl)
+ {
+ /* x, path */
+ return upathmatch(tcp, tcp->u_arg[1]);
+ }
+
if (s->sys_func == sys_renameat ||
s->sys_func == sys_linkat)
{
diff --git a/quota.c b/quota.c
index a1fd92d..780abf9 100644
--- a/quota.c
+++ b/quota.c
@@ -617,7 +617,7 @@ sys_quotactl(struct tcb *tcp)
tprints("|");
printxval(quotatypes, type, "???QUOTA");
tprints(", ");
- printstr(tcp, tcp->u_arg[1], -1);
+ printpath(tcp, tcp->u_arg[1]);
tprints(", ");
switch (cmd) {
case Q_V1_QUOTAON:
--
1.8.0

View File

@@ -1,145 +0,0 @@
Upstream-Status: Backport
From 17e3860ee8684b397b99eea59b6458a8a7b88f5c Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Sat, 27 Oct 2012 01:11:13 +0000
Subject: [PATCH 29/31] Filter out redundant "*32" ioctl entries
* linux/ioctlent-filter.awk: New file.
* Makefile.am: Use it.
* linux/ioctlent.h.in: Removed redundant "*32" entries.
---
Makefile.am | 3 ++-
linux/ioctlent-filter.awk | 19 +++++++++++++++++++
linux/ioctlent.h.in | 14 --------------
3 files changed, 21 insertions(+), 15 deletions(-)
create mode 100644 linux/ioctlent-filter.awk
diff --git a/Makefile.am b/Makefile.am
index 3e8c810..aa1a5f4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -151,4 +151,5 @@ $(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
$(MKDIR_P) $(builddir)/$(OS)
cat $(ioctlent_h_deps) | \
$(COMPILE) -E -P - | \
- LC_ALL=C sort -u -k3,3 -k2,2 > $@
+ LC_ALL=C sort -u -k3,3 -k2,2 | \
+ awk -f $(srcdir)/linux/ioctlent-filter.awk > $@
diff --git a/linux/ioctlent-filter.awk b/linux/ioctlent-filter.awk
new file mode 100644
index 0000000..181c4bf
--- /dev/null
+++ b/linux/ioctlent-filter.awk
@@ -0,0 +1,19 @@
+#!/bin/awk -f
+# Filter out redundant "*32" symbols.
+
+BEGIN {
+ s=""
+ c=""
+}
+
+NF == 3 && $2 ~ /^"[^",]*",$/ {
+ if ($2 == s && $3 == c)
+ next
+ s = $2
+ sub(/",$/, "32\",", s)
+ c = $3
+}
+
+{
+ print
+}
diff --git a/linux/ioctlent.h.in b/linux/ioctlent.h.in
index 98ebbcc..895070c 100644
--- a/linux/ioctlent.h.in
+++ b/linux/ioctlent.h.in
@@ -103,7 +103,6 @@
{"linux/fs.h", "BLKBSZSET", 0x1271},
{"linux/fs.h", "BLKGETSIZE64", 0x1272},
{"linux/fs.h", "BLKTRACESETUP", 0x1273},
- {"linux/blktrace_api.h", "BLKTRACESETUP32", 0x1273},
{"linux/fs.h", "BLKTRACESTART", 0x1274},
{"linux/fs.h", "BLKTRACESTOP", 0x1275},
{"linux/fs.h", "BLKTRACETEARDOWN", 0x1276},
@@ -257,14 +256,12 @@
{"linux/cciss_ioctl.h", "CCISS_GETDRIVVER", 0x4209},
{"linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", 0x420a},
{"linux/cciss_ioctl.h", "CCISS_PASSTHRU", 0x420b},
- {"linux/cciss_ioctl.h", "CCISS_PASSTHRU32", 0x420b},
{"linux/cciss_ioctl.h", "CCISS_DEREGDISK", 0x420c},
{"linux/cciss_ioctl.h", "CCISS_REGNEWDISK", 0x420d},
{"linux/cciss_ioctl.h", "CCISS_REGNEWD", 0x420e},
{"linux/cciss_ioctl.h", "CCISS_RESCANDISK", 0x4210},
{"linux/cciss_ioctl.h", "CCISS_GETLUNINFO", 0x4211},
{"linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU", 0x4212},
- {"linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU32", 0x4212},
{"linux/soundcard.h", "SNDCTL_COPR_RESET", 0x4300},
{"linux/capi.h", "CAPI_REGISTER", 0x4301},
{"linux/soundcard.h", "SNDCTL_COPR_LOAD", 0x4301},
@@ -775,25 +772,19 @@
{"linux/if_tun.h", "TUNSETVNETHDRSZ", 0x54d8},
{"sound/asound.h", "SNDRV_CTL_IOCTL_PVERSION", 0x5500},
{"linux/usbdevice_fs.h", "USBDEVFS_CONTROL", 0x5500},
- {"linux/usbdevice_fs.h", "USBDEVFS_CONTROL32", 0x5500},
{"sound/asound.h", "SNDRV_CTL_IOCTL_CARD_INFO", 0x5501},
{"linux/uinput.h", "UI_DEV_CREATE", 0x5501},
{"linux/uinput.h", "UI_DEV_DESTROY", 0x5502},
{"linux/usbdevice_fs.h", "USBDEVFS_BULK", 0x5502},
- {"linux/usbdevice_fs.h", "USBDEVFS_BULK32", 0x5502},
{"linux/usbdevice_fs.h", "USBDEVFS_RESETEP", 0x5503},
{"linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", 0x5504},
{"linux/usbdevice_fs.h", "USBDEVFS_SETCONFIGURATION", 0x5505},
{"linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", 0x5508},
{"linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", 0x550a},
- {"linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB32", 0x550a},
{"linux/usbdevice_fs.h", "USBDEVFS_DISCARDURB", 0x550b},
{"linux/usbdevice_fs.h", "USBDEVFS_REAPURB", 0x550c},
- {"linux/usbdevice_fs.h", "USBDEVFS_REAPURB32", 0x550c},
{"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY", 0x550d},
- {"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY32", 0x550d},
{"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", 0x550e},
- {"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL32", 0x550e},
{"linux/usbdevice_fs.h", "USBDEVFS_CLAIMINTERFACE", 0x550f},
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LIST", 0x5510},
{"linux/usbdevice_fs.h", "USBDEVFS_RELEASEINTERFACE", 0x5510},
@@ -801,7 +792,6 @@
{"linux/usbdevice_fs.h", "USBDEVFS_CONNECTINFO", 0x5511},
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_READ", 0x5512},
{"linux/usbdevice_fs.h", "USBDEVFS_IOCTL", 0x5512},
- {"linux/usbdevice_fs.h", "USBDEVFS_IOCTL32", 0x5512},
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_WRITE", 0x5513},
{"linux/usbdevice_fs.h", "USBDEVFS_HUB_PORTINFO", 0x5513},
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LOCK", 0x5514},
@@ -1119,7 +1109,6 @@
{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG_TRUNC", 0x690b},
{"media/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", 0x690b},
{"linux/i2o-dev.h", "I2OPASSTHRU", 0x690c},
- {"linux/i2o-dev.h", "I2OPASSTHRU32", 0x690c},
{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG", 0x690c},
{"media/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", 0x690c},
{"linux/ipmi.h", "IPMICTL_SEND_COMMAND", 0x690d},
@@ -1194,11 +1183,9 @@
{"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x6c42},
{"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0x6c43},
{"linux/synclink.h", "MGSL_IOCSPARAMS", 0x6d00},
- {"linux/synclink.h", "MGSL_IOCSPARAMS32", 0x6d00},
{"linux/mmtimer.h", "MMTIMER_GETOFFSET", 0x6d00},
{"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0x6d00},
{"linux/synclink.h", "MGSL_IOCGPARAMS", 0x6d01},
- {"linux/synclink.h", "MGSL_IOCGPARAMS32", 0x6d01},
{"linux/mmtimer.h", "MMTIMER_GETRES", 0x6d01},
{"linux/msm_mdp.h", "MSMFB_GRP_DISP", 0x6d01},
{"linux/mtio.h", "MTIOCTOP", 0x6d01},
@@ -1754,7 +1741,6 @@
{"linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", 0x9362},
{"linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", 0x9363},
{"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", 0x9364},
- {"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT32", 0x9364},
{"linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", 0x9365},
{"linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", 0x9366},
{"linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", 0x9367},
--
1.8.0

View File

@@ -1,571 +0,0 @@
Upstream-Status: Backport
From 716c93ecf8edc5dda092d4fa4d878f333a601b51 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Mon, 12 Nov 2012 14:04:46 +0000
Subject: [PATCH 30/31] Move asm-generic ioctl definitions to
linux/ioctlent.h.in
* linux/ioctlent.h.in: Add asm-generic ioctl entries from all
linux/*/ioctlent.h.in files.
* linux/bfin/ioctlent.h.in: Remove asm-generic ioctl entries.
* linux/i386/ioctlent.h.in: Likewise.
* linux/powerpc/ioctlent.h.in: Likewise.
* linux/s390/ioctlent.h.in: Likewise.
* linux/sparc/ioctlent.h.in: Likewise.
---
linux/bfin/ioctlent.h.in | 78 -------------------------------------------
linux/i386/ioctlent.h.in | 77 -------------------------------------------
linux/ioctlent.h.in | 80 +++++++++++++++++++++++++++++++++++++++++++++
linux/powerpc/ioctlent.h.in | 30 -----------------
linux/s390/ioctlent.h.in | 76 ------------------------------------------
linux/sparc/ioctlent.h.in | 53 ------------------------------
6 files changed, 80 insertions(+), 314 deletions(-)
diff --git a/linux/bfin/ioctlent.h.in b/linux/bfin/ioctlent.h.in
index 3773544..791d8e3 100644
--- a/linux/bfin/ioctlent.h.in
+++ b/linux/bfin/ioctlent.h.in
@@ -1,86 +1,8 @@
{"asm/bfin_sport.h", "SPORT_IOC_CONFIG", 0x5001},
{"asm/bfin_sport.h", "SPORT_IOC_GET_SYSTEMCLOCK", 0x5002},
{"asm/bfin_sport.h", "SPORT_IOC_SET_BAUDRATE", 0x5003},
- {"asm-generic/ioctls.h", "TCGETS", 0x5401},
- {"asm-generic/ioctls.h", "TCSETS", 0x5402},
- {"asm-generic/ioctls.h", "TCSETSW", 0x5403},
- {"asm-generic/ioctls.h", "TCSETSF", 0x5404},
- {"asm-generic/ioctls.h", "TCGETA", 0x5405},
- {"asm-generic/ioctls.h", "TCSETA", 0x5406},
- {"asm-generic/ioctls.h", "TCSETAW", 0x5407},
- {"asm-generic/ioctls.h", "TCSETAF", 0x5408},
- {"asm-generic/ioctls.h", "TCSBRK", 0x5409},
- {"asm-generic/ioctls.h", "TCXONC", 0x540a},
- {"asm-generic/ioctls.h", "TCFLSH", 0x540b},
- {"asm-generic/ioctls.h", "TIOCEXCL", 0x540c},
- {"asm-generic/ioctls.h", "TIOCNXCL", 0x540d},
- {"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e},
- {"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
- {"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
- {"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
- {"asm-generic/ioctls.h", "TIOCSTI", 0x5412},
- {"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
- {"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
- {"asm-generic/ioctls.h", "TIOCMGET", 0x5415},
- {"asm-generic/ioctls.h", "TIOCMBIS", 0x5416},
- {"asm-generic/ioctls.h", "TIOCMBIC", 0x5417},
- {"asm-generic/ioctls.h", "TIOCMSET", 0x5418},
- {"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419},
- {"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a},
- {"asm-generic/ioctls.h", "FIONREAD", 0x541b},
- {"asm-generic/ioctls.h", "TIOCLINUX", 0x541c},
- {"asm-generic/ioctls.h", "TIOCCONS", 0x541d},
- {"asm-generic/ioctls.h", "TIOCGSERIAL", 0x541e},
- {"asm-generic/ioctls.h", "TIOCSSERIAL", 0x541f},
- {"asm-generic/ioctls.h", "TIOCPKT", 0x5420},
- {"asm-generic/ioctls.h", "FIONBIO", 0x5421},
- {"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422},
- {"asm-generic/ioctls.h", "TIOCSETD", 0x5423},
- {"asm-generic/ioctls.h", "TIOCGETD", 0x5424},
- {"asm-generic/ioctls.h", "TCSBRKP", 0x5425},
- {"asm-generic/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
- {"asm-generic/ioctls.h", "TIOCSBRK", 0x5427},
- {"asm-generic/ioctls.h", "TIOCCBRK", 0x5428},
- {"asm-generic/ioctls.h", "TIOCGSID", 0x5429},
- {"asm-generic/ioctls.h", "TCGETS2", 0x542a},
- {"asm-generic/ioctls.h", "TCSETS2", 0x542b},
- {"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
- {"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
- {"asm-generic/ioctls.h", "TIOCGRS485", 0x542e},
- {"asm-generic/ioctls.h", "TIOCSRS485", 0x542f},
- {"asm-generic/ioctls.h", "TIOCGPTN", 0x5430},
- {"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431},
- {"asm-generic/ioctls.h", "TCGETX", 0x5432},
- {"asm-generic/ioctls.h", "TCSETX", 0x5433},
- {"asm-generic/ioctls.h", "TCSETXF", 0x5434},
- {"asm-generic/ioctls.h", "TCSETXW", 0x5435},
- {"asm-generic/ioctls.h", "TIOCSIG", 0x5436},
- {"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
- {"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
- {"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
- {"asm-generic/ioctls.h", "TIOCSERCONFIG", 0x5453},
- {"asm-generic/ioctls.h", "TIOCSERGWILD", 0x5454},
- {"asm-generic/ioctls.h", "TIOCSERSWILD", 0x5455},
- {"asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
- {"asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
- {"asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
- {"asm-generic/ioctls.h", "TIOCSERGETLSR", 0x5459},
- {"asm-generic/ioctls.h", "TIOCSERGETMULTI", 0x545a},
- {"asm-generic/ioctls.h", "TIOCSERSETMULTI", 0x545b},
- {"asm-generic/ioctls.h", "TIOCMIWAIT", 0x545c},
- {"asm-generic/ioctls.h", "TIOCGICOUNT", 0x545d},
{"asm/ioctls.h", "FIOQSIZE", 0x545e},
- {"asm-generic/ioctls.h", "TIOCGHAYESESP", 0x545e},
- {"asm-generic/ioctls.h", "TIOCSHAYESESP", 0x545f},
- {"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_SET_PERIOD", 0x7402},
{"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_START", 0x7406},
{"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_STOP", 0x7408},
{"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_READ", 0x740a},
- {"asm-generic/sockios.h", "FIOSETOWN", 0x8901},
- {"asm-generic/sockios.h", "SIOCSPGRP", 0x8902},
- {"asm-generic/sockios.h", "FIOGETOWN", 0x8903},
- {"asm-generic/sockios.h", "SIOCGPGRP", 0x8904},
- {"asm-generic/sockios.h", "SIOCATMARK", 0x8905},
- {"asm-generic/sockios.h", "SIOCGSTAMP", 0x8906},
- {"asm-generic/sockios.h", "SIOCGSTAMPNS", 0x8907},
diff --git a/linux/i386/ioctlent.h.in b/linux/i386/ioctlent.h.in
index 9a90ec8..449ad40 100644
--- a/linux/i386/ioctlent.h.in
+++ b/linux/i386/ioctlent.h.in
@@ -11,82 +11,5 @@
{"asm/mtrr.h", "MTRRIOC_DEL_PAGE_ENTRY", 0x4d07},
{"asm/mtrr.h", "MTRRIOC_GET_PAGE_ENTRY", 0x4d08},
{"asm/mtrr.h", "MTRRIOC_KILL_PAGE_ENTRY", 0x4d09},
- {"asm-generic/ioctls.h", "TCGETS", 0x5401},
- {"asm-generic/ioctls.h", "TCSETS", 0x5402},
- {"asm-generic/ioctls.h", "TCSETSW", 0x5403},
- {"asm-generic/ioctls.h", "TCSETSF", 0x5404},
- {"asm-generic/ioctls.h", "TCGETA", 0x5405},
- {"asm-generic/ioctls.h", "TCSETA", 0x5406},
- {"asm-generic/ioctls.h", "TCSETAW", 0x5407},
- {"asm-generic/ioctls.h", "TCSETAF", 0x5408},
- {"asm-generic/ioctls.h", "TCSBRK", 0x5409},
- {"asm-generic/ioctls.h", "TCXONC", 0x540a},
- {"asm-generic/ioctls.h", "TCFLSH", 0x540b},
- {"asm-generic/ioctls.h", "TIOCEXCL", 0x540c},
- {"asm-generic/ioctls.h", "TIOCNXCL", 0x540d},
- {"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e},
- {"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
- {"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
- {"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
- {"asm-generic/ioctls.h", "TIOCSTI", 0x5412},
- {"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
- {"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
- {"asm-generic/ioctls.h", "TIOCMGET", 0x5415},
- {"asm-generic/ioctls.h", "TIOCMBIS", 0x5416},
- {"asm-generic/ioctls.h", "TIOCMBIC", 0x5417},
- {"asm-generic/ioctls.h", "TIOCMSET", 0x5418},
- {"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419},
- {"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a},
- {"asm-generic/ioctls.h", "FIONREAD", 0x541b},
- {"asm-generic/ioctls.h", "TIOCLINUX", 0x541c},
- {"asm-generic/ioctls.h", "TIOCCONS", 0x541d},
- {"asm-generic/ioctls.h", "TIOCGSERIAL", 0x541e},
- {"asm-generic/ioctls.h", "TIOCSSERIAL", 0x541f},
- {"asm-generic/ioctls.h", "TIOCPKT", 0x5420},
- {"asm-generic/ioctls.h", "FIONBIO", 0x5421},
- {"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422},
- {"asm-generic/ioctls.h", "TIOCSETD", 0x5423},
- {"asm-generic/ioctls.h", "TIOCGETD", 0x5424},
- {"asm-generic/ioctls.h", "TCSBRKP", 0x5425},
- {"asm-generic/ioctls.h", "TIOCSBRK", 0x5427},
- {"asm-generic/ioctls.h", "TIOCCBRK", 0x5428},
- {"asm-generic/ioctls.h", "TIOCGSID", 0x5429},
- {"asm-generic/ioctls.h", "TCGETS2", 0x542a},
- {"asm-generic/ioctls.h", "TCSETS2", 0x542b},
- {"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
- {"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
- {"asm-generic/ioctls.h", "TIOCGRS485", 0x542e},
- {"asm-generic/ioctls.h", "TIOCSRS485", 0x542f},
- {"asm-generic/ioctls.h", "TIOCGPTN", 0x5430},
- {"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431},
- {"asm-generic/ioctls.h", "TCGETX", 0x5432},
- {"asm-generic/ioctls.h", "TIOCGDEV", 0x5432},
- {"asm-generic/ioctls.h", "TCSETX", 0x5433},
- {"asm-generic/ioctls.h", "TCSETXF", 0x5434},
- {"asm-generic/ioctls.h", "TCSETXW", 0x5435},
- {"asm-generic/ioctls.h", "TIOCSIG", 0x5436},
- {"asm-generic/ioctls.h", "TIOCVHANGUP", 0x5437},
- {"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
- {"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
- {"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
- {"asm-generic/ioctls.h", "TIOCSERCONFIG", 0x5453},
- {"asm-generic/ioctls.h", "TIOCSERGWILD", 0x5454},
- {"asm-generic/ioctls.h", "TIOCSERSWILD", 0x5455},
- {"asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
- {"asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
- {"asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
- {"asm-generic/ioctls.h", "TIOCSERGETLSR", 0x5459},
- {"asm-generic/ioctls.h", "TIOCSERGETMULTI", 0x545a},
- {"asm-generic/ioctls.h", "TIOCSERSETMULTI", 0x545b},
- {"asm-generic/ioctls.h", "TIOCMIWAIT", 0x545c},
- {"asm-generic/ioctls.h", "TIOCGICOUNT", 0x545d},
- {"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"asm/msr.h", "X86_IOC_RDMSR_REGS", 0x63a0},
{"asm/msr.h", "X86_IOC_WRMSR_REGS", 0x63a1},
- {"asm-generic/sockios.h", "FIOSETOWN", 0x8901},
- {"asm-generic/sockios.h", "SIOCSPGRP", 0x8902},
- {"asm-generic/sockios.h", "FIOGETOWN", 0x8903},
- {"asm-generic/sockios.h", "SIOCGPGRP", 0x8904},
- {"asm-generic/sockios.h", "SIOCATMARK", 0x8905},
- {"asm-generic/sockios.h", "SIOCGSTAMP", 0x8906},
- {"asm-generic/sockios.h", "SIOCGSTAMPNS", 0x8907},
diff --git a/linux/ioctlent.h.in b/linux/ioctlent.h.in
index 895070c..8843b47 100644
--- a/linux/ioctlent.h.in
+++ b/linux/ioctlent.h.in
@@ -734,21 +734,94 @@
{"sound/asound.h", "SNDRV_TIMER_IOCTL_PVERSION", 0x5400},
{"linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", 0x5401},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_NEXT_DEVICE", 0x5401},
+ {"asm-generic/ioctls.h", "TCGETS", 0x5401},
{"linux/soundcard.h", "SNDCTL_TMR_START", 0x5402},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_TREAD", 0x5402},
+ {"asm-generic/ioctls.h", "TCSETS", 0x5402},
{"linux/soundcard.h", "SNDCTL_TMR_STOP", 0x5403},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_GINFO", 0x5403},
+ {"asm-generic/ioctls.h", "TCSETSW", 0x5403},
{"linux/soundcard.h", "SNDCTL_TMR_CONTINUE", 0x5404},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_GPARAMS", 0x5404},
+ {"asm-generic/ioctls.h", "TCSETSF", 0x5404},
{"linux/soundcard.h", "SNDCTL_TMR_TEMPO", 0x5405},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_GSTATUS", 0x5405},
+ {"asm-generic/ioctls.h", "TCGETA", 0x5405},
{"linux/soundcard.h", "SNDCTL_TMR_SOURCE", 0x5406},
+ {"asm-generic/ioctls.h", "TCSETA", 0x5406},
{"linux/soundcard.h", "SNDCTL_TMR_METRONOME", 0x5407},
+ {"asm-generic/ioctls.h", "TCSETAW", 0x5407},
{"linux/soundcard.h", "SNDCTL_TMR_SELECT", 0x5408},
+ {"asm-generic/ioctls.h", "TCSETAF", 0x5408},
+ {"asm-generic/ioctls.h", "TCSBRK", 0x5409},
+ {"asm-generic/ioctls.h", "TCXONC", 0x540a},
+ {"asm-generic/ioctls.h", "TCFLSH", 0x540b},
+ {"asm-generic/ioctls.h", "TIOCEXCL", 0x540c},
+ {"asm-generic/ioctls.h", "TIOCNXCL", 0x540d},
+ {"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e},
+ {"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_SELECT", 0x5410},
+ {"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_INFO", 0x5411},
+ {"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_PARAMS", 0x5412},
+ {"asm-generic/ioctls.h", "TIOCSTI", 0x5412},
+ {"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_STATUS", 0x5414},
+ {"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
+ {"asm-generic/ioctls.h", "TIOCMGET", 0x5415},
+ {"asm-generic/ioctls.h", "TIOCMBIS", 0x5416},
+ {"asm-generic/ioctls.h", "TIOCMBIC", 0x5417},
+ {"asm-generic/ioctls.h", "TIOCMSET", 0x5418},
+ {"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419},
+ {"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a},
+ {"asm-generic/ioctls.h", "FIONREAD", 0x541b},
+ {"asm-generic/ioctls.h", "TIOCLINUX", 0x541c},
+ {"asm-generic/ioctls.h", "TIOCCONS", 0x541d},
+ {"asm-generic/ioctls.h", "TIOCGSERIAL", 0x541e},
+ {"asm-generic/ioctls.h", "TIOCSSERIAL", 0x541f},
+ {"asm-generic/ioctls.h", "TIOCPKT", 0x5420},
+ {"asm-generic/ioctls.h", "FIONBIO", 0x5421},
+ {"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422},
+ {"asm-generic/ioctls.h", "TIOCSETD", 0x5423},
+ {"asm-generic/ioctls.h", "TIOCGETD", 0x5424},
+ {"asm-generic/ioctls.h", "TCSBRKP", 0x5425},
+ {"asm-generic/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
+ {"asm-generic/ioctls.h", "TIOCSBRK", 0x5427},
+ {"asm-generic/ioctls.h", "TIOCCBRK", 0x5428},
+ {"asm-generic/ioctls.h", "TIOCGSID", 0x5429},
+ {"asm-generic/ioctls.h", "TCGETS2", 0x542a},
+ {"asm-generic/ioctls.h", "TCSETS2", 0x542b},
+ {"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
+ {"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
+ {"asm-generic/ioctls.h", "TIOCGRS485", 0x542e},
+ {"asm-generic/ioctls.h", "TIOCSRS485", 0x542f},
+ {"asm-generic/ioctls.h", "TIOCGPTN", 0x5430},
+ {"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431},
+ {"asm-generic/ioctls.h", "TCGETX", 0x5432},
+ {"asm-generic/ioctls.h", "TIOCGDEV", 0x5432},
+ {"asm-generic/ioctls.h", "TCSETX", 0x5433},
+ {"asm-generic/ioctls.h", "TCSETXF", 0x5434},
+ {"asm-generic/ioctls.h", "TCSETXW", 0x5435},
+ {"asm-generic/ioctls.h", "TIOCSIG", 0x5436},
+ {"asm-generic/ioctls.h", "TIOCVHANGUP", 0x5437},
+ {"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
+ {"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
+ {"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
+ {"asm-generic/ioctls.h", "TIOCSERCONFIG", 0x5453},
+ {"asm-generic/ioctls.h", "TIOCSERGWILD", 0x5454},
+ {"asm-generic/ioctls.h", "TIOCSERSWILD", 0x5455},
+ {"asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
+ {"asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
+ {"asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
+ {"asm-generic/ioctls.h", "TIOCSERGETLSR", 0x5459},
+ {"asm-generic/ioctls.h", "TIOCSERGETMULTI", 0x545a},
+ {"asm-generic/ioctls.h", "TIOCSERSETMULTI", 0x545b},
+ {"asm-generic/ioctls.h", "TIOCMIWAIT", 0x545c},
+ {"asm-generic/ioctls.h", "TIOCGICOUNT", 0x545d},
+ {"asm-generic/ioctls.h", "TIOCGHAYESESP", 0x545e},
+ {"asm-generic/ioctls.h", "TIOCSHAYESESP", 0x545f},
+ {"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_START", 0x54a0},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_STOP", 0x54a1},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_CONTINUE", 0x54a2},
@@ -1606,6 +1679,13 @@
{"linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", 0x7c01},
{"linux/media.h", "MEDIA_IOC_ENUM_LINKS", 0x7c02},
{"linux/media.h", "MEDIA_IOC_SETUP_LINK", 0x7c03},
+ {"asm-generic/sockios.h", "FIOSETOWN", 0x8901},
+ {"asm-generic/sockios.h", "SIOCSPGRP", 0x8902},
+ {"asm-generic/sockios.h", "FIOGETOWN", 0x8903},
+ {"asm-generic/sockios.h", "SIOCGPGRP", 0x8904},
+ {"asm-generic/sockios.h", "SIOCATMARK", 0x8905},
+ {"asm-generic/sockios.h", "SIOCGSTAMP", 0x8906},
+ {"asm-generic/sockios.h", "SIOCGSTAMPNS", 0x8907},
{"linux/sockios.h", "SIOCADDRT", 0x890b},
{"linux/sockios.h", "SIOCDELRT", 0x890c},
{"linux/sockios.h", "SIOCRTMSG", 0x890d},
diff --git a/linux/powerpc/ioctlent.h.in b/linux/powerpc/ioctlent.h.in
index 0870704..510f5aa 100644
--- a/linux/powerpc/ioctlent.h.in
+++ b/linux/powerpc/ioctlent.h.in
@@ -1,36 +1,18 @@
- {"asm-generic/ioctls.h", "TCGETS", 0x5401},
- {"asm-generic/ioctls.h", "TCSETS", 0x5402},
- {"asm-generic/ioctls.h", "TCSETSW", 0x5403},
- {"asm-generic/ioctls.h", "TCSETSF", 0x5404},
- {"asm-generic/ioctls.h", "TCGETA", 0x5405},
- {"asm-generic/ioctls.h", "TCSETA", 0x5406},
- {"asm-generic/ioctls.h", "TCSETAW", 0x5407},
- {"asm-generic/ioctls.h", "TCSETAF", 0x5408},
- {"asm-generic/ioctls.h", "TCSBRK", 0x5409},
- {"asm-generic/ioctls.h", "TCXONC", 0x540a},
- {"asm-generic/ioctls.h", "TCFLSH", 0x540b},
{"asm/ioctls.h", "TIOCEXCL", 0x540c},
{"asm/ioctls.h", "TIOCNXCL", 0x540d},
{"asm/ioctls.h", "TIOCSCTTY", 0x540e},
- {"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
- {"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
- {"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
{"asm/ioctls.h", "TIOCSTI", 0x5412},
- {"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
- {"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
{"asm/ioctls.h", "TIOCMGET", 0x5415},
{"asm/ioctls.h", "TIOCMBIS", 0x5416},
{"asm/ioctls.h", "TIOCMBIC", 0x5417},
{"asm/ioctls.h", "TIOCMSET", 0x5418},
{"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419},
{"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a},
- {"asm-generic/ioctls.h", "FIONREAD", 0x541b},
{"asm/ioctls.h", "TIOCLINUX", 0x541c},
{"asm/ioctls.h", "TIOCCONS", 0x541d},
{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm/ioctls.h", "TIOCPKT", 0x5420},
- {"asm-generic/ioctls.h", "FIONBIO", 0x5421},
{"asm/ioctls.h", "TIOCNOTTY", 0x5422},
{"asm/ioctls.h", "TIOCSETD", 0x5423},
{"asm/ioctls.h", "TIOCGETD", 0x5424},
@@ -38,22 +20,11 @@
{"asm/ioctls.h", "TIOCSBRK", 0x5427},
{"asm/ioctls.h", "TIOCCBRK", 0x5428},
{"asm/ioctls.h", "TIOCGSID", 0x5429},
- {"asm-generic/ioctls.h", "TCGETS2", 0x542a},
- {"asm-generic/ioctls.h", "TCSETS2", 0x542b},
- {"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
- {"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
{"asm/ioctls.h", "TIOCGRS485", 0x542e},
{"asm/ioctls.h", "TIOCSRS485", 0x542f},
{"asm/ioctls.h", "TIOCGPTN", 0x5430},
{"asm/ioctls.h", "TIOCSPTLCK", 0x5431},
- {"asm-generic/ioctls.h", "TCGETX", 0x5432},
- {"asm-generic/ioctls.h", "TCSETX", 0x5433},
- {"asm-generic/ioctls.h", "TCSETXF", 0x5434},
- {"asm-generic/ioctls.h", "TCSETXW", 0x5435},
{"asm/ioctls.h", "TIOCSIG", 0x5436},
- {"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
- {"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
- {"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
@@ -65,7 +36,6 @@
{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
- {"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"asm/ioctls.h", "FIOCLEX", 0x6601},
{"asm/ioctls.h", "FIONCLEX", 0x6602},
{"asm/ioctls.h", "FIOASYNC", 0x667d},
diff --git a/linux/s390/ioctlent.h.in b/linux/s390/ioctlent.h.in
index 35cdd81..1e93a0b 100644
--- a/linux/s390/ioctlent.h.in
+++ b/linux/s390/ioctlent.h.in
@@ -19,76 +19,7 @@
{"asm/cmb.h", "BIODASDCMFDISABLE", 0x4421},
{"asm/cmb.h", "BIODASDREADALLCMB", 0x4421},
{"asm/dasd.h", "BIODASDSYMMIO", 0x44f0},
- {"asm-generic/ioctls.h", "TCGETS", 0x5401},
- {"asm-generic/ioctls.h", "TCSETS", 0x5402},
- {"asm-generic/ioctls.h", "TCSETSW", 0x5403},
- {"asm-generic/ioctls.h", "TCSETSF", 0x5404},
- {"asm-generic/ioctls.h", "TCGETA", 0x5405},
- {"asm-generic/ioctls.h", "TCSETA", 0x5406},
- {"asm-generic/ioctls.h", "TCSETAW", 0x5407},
- {"asm-generic/ioctls.h", "TCSETAF", 0x5408},
- {"asm-generic/ioctls.h", "TCSBRK", 0x5409},
- {"asm-generic/ioctls.h", "TCXONC", 0x540a},
- {"asm-generic/ioctls.h", "TCFLSH", 0x540b},
- {"asm-generic/ioctls.h", "TIOCEXCL", 0x540c},
- {"asm-generic/ioctls.h", "TIOCNXCL", 0x540d},
- {"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e},
- {"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
- {"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
- {"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
- {"asm-generic/ioctls.h", "TIOCSTI", 0x5412},
- {"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
- {"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
- {"asm-generic/ioctls.h", "TIOCMGET", 0x5415},
- {"asm-generic/ioctls.h", "TIOCMBIS", 0x5416},
- {"asm-generic/ioctls.h", "TIOCMBIC", 0x5417},
- {"asm-generic/ioctls.h", "TIOCMSET", 0x5418},
- {"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419},
- {"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a},
- {"asm-generic/ioctls.h", "FIONREAD", 0x541b},
- {"asm-generic/ioctls.h", "TIOCLINUX", 0x541c},
- {"asm-generic/ioctls.h", "TIOCCONS", 0x541d},
- {"asm-generic/ioctls.h", "TIOCGSERIAL", 0x541e},
- {"asm-generic/ioctls.h", "TIOCSSERIAL", 0x541f},
- {"asm-generic/ioctls.h", "TIOCPKT", 0x5420},
- {"asm-generic/ioctls.h", "FIONBIO", 0x5421},
- {"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422},
- {"asm-generic/ioctls.h", "TIOCSETD", 0x5423},
- {"asm-generic/ioctls.h", "TIOCGETD", 0x5424},
- {"asm-generic/ioctls.h", "TCSBRKP", 0x5425},
- {"asm-generic/ioctls.h", "TIOCSBRK", 0x5427},
- {"asm-generic/ioctls.h", "TIOCCBRK", 0x5428},
- {"asm-generic/ioctls.h", "TIOCGSID", 0x5429},
- {"asm-generic/ioctls.h", "TCGETS2", 0x542a},
- {"asm-generic/ioctls.h", "TCSETS2", 0x542b},
- {"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
- {"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
- {"asm-generic/ioctls.h", "TIOCGRS485", 0x542e},
- {"asm-generic/ioctls.h", "TIOCSRS485", 0x542f},
- {"asm-generic/ioctls.h", "TIOCGPTN", 0x5430},
- {"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431},
- {"asm-generic/ioctls.h", "TCGETX", 0x5432},
- {"asm-generic/ioctls.h", "TIOCGDEV", 0x5432},
- {"asm-generic/ioctls.h", "TCSETX", 0x5433},
- {"asm-generic/ioctls.h", "TCSETXF", 0x5434},
- {"asm-generic/ioctls.h", "TCSETXW", 0x5435},
- {"asm-generic/ioctls.h", "TIOCSIG", 0x5436},
- {"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
- {"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
- {"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
- {"asm-generic/ioctls.h", "TIOCSERCONFIG", 0x5453},
- {"asm-generic/ioctls.h", "TIOCSERGWILD", 0x5454},
- {"asm-generic/ioctls.h", "TIOCSERSWILD", 0x5455},
- {"asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
- {"asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
- {"asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
- {"asm-generic/ioctls.h", "TIOCSERGETLSR", 0x5459},
- {"asm-generic/ioctls.h", "TIOCSERGETMULTI", 0x545a},
- {"asm-generic/ioctls.h", "TIOCSERSETMULTI", 0x545b},
- {"asm-generic/ioctls.h", "TIOCMIWAIT", 0x545c},
- {"asm-generic/ioctls.h", "TIOCGICOUNT", 0x545d},
{"asm/ioctls.h", "FIOQSIZE", 0x545e},
- {"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"asm/chsc.h", "CHSC_START", 0x6381},
{"asm/chsc.h", "CHSC_INFO_CHANNEL_PATH", 0x6382},
{"asm/chsc.h", "CHSC_INFO_CU", 0x6383},
@@ -116,10 +47,3 @@
{"asm/zcrypt.h", "Z90STAT_PCIXCCMCL3COUNT", 0x7a4c},
{"asm/zcrypt.h", "Z90STAT_CEX2CCOUNT", 0x7a4d},
{"asm/zcrypt.h", "Z90STAT_CEX2ACOUNT", 0x7a4e},
- {"asm-generic/sockios.h", "FIOSETOWN", 0x8901},
- {"asm-generic/sockios.h", "SIOCSPGRP", 0x8902},
- {"asm-generic/sockios.h", "FIOGETOWN", 0x8903},
- {"asm-generic/sockios.h", "SIOCGPGRP", 0x8904},
- {"asm-generic/sockios.h", "SIOCATMARK", 0x8905},
- {"asm-generic/sockios.h", "SIOCGSTAMP", 0x8906},
- {"asm-generic/sockios.h", "SIOCGSTAMPNS", 0x8907},
diff --git a/linux/sparc/ioctlent.h.in b/linux/sparc/ioctlent.h.in
index 25b7b4d..008aae0 100644
--- a/linux/sparc/ioctlent.h.in
+++ b/linux/sparc/ioctlent.h.in
@@ -32,76 +32,24 @@
{"asm/openpromio.h", "OPIOCGETNEXT", 0x4f05},
{"asm/openpromio.h", "OPIOCGETCHILD", 0x4f06},
{"asm/ioctls.h", "TCGETA", 0x5401},
- {"asm-generic/ioctls.h", "TCGETS", 0x5401},
{"asm/ioctls.h", "TCSETA", 0x5402},
- {"asm-generic/ioctls.h", "TCSETS", 0x5402},
{"asm/ioctls.h", "TCSETAW", 0x5403},
- {"asm-generic/ioctls.h", "TCSETSW", 0x5403},
{"asm/ioctls.h", "TCSETAF", 0x5404},
- {"asm-generic/ioctls.h", "TCSETSF", 0x5404},
- {"asm-generic/ioctls.h", "TCGETA", 0x5405},
{"asm/ioctls.h", "TCSBRK", 0x5405},
- {"asm-generic/ioctls.h", "TCSETA", 0x5406},
{"asm/ioctls.h", "TCXONC", 0x5406},
{"asm/ioctls.h", "TCFLSH", 0x5407},
- {"asm-generic/ioctls.h", "TCSETAW", 0x5407},
{"asm/ioctls.h", "TCGETS", 0x5408},
- {"asm-generic/ioctls.h", "TCSETAF", 0x5408},
- {"asm-generic/ioctls.h", "TCSBRK", 0x5409},
{"asm/ioctls.h", "TCSETS", 0x5409},
{"asm/ioctls.h", "TCSETSW", 0x540a},
- {"asm-generic/ioctls.h", "TCXONC", 0x540a},
- {"asm-generic/ioctls.h", "TCFLSH", 0x540b},
{"asm/ioctls.h", "TCSETSF", 0x540b},
{"asm/ioctls.h", "TCGETS2", 0x540c},
- {"asm-generic/ioctls.h", "TIOCEXCL", 0x540c},
{"asm/ioctls.h", "TCSETS2", 0x540d},
- {"asm-generic/ioctls.h", "TIOCNXCL", 0x540d},
{"asm/ioctls.h", "TCSETSW2", 0x540e},
- {"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e},
{"asm/ioctls.h", "TCSETSF2", 0x540f},
- {"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
- {"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
- {"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
- {"asm-generic/ioctls.h", "TIOCSTI", 0x5412},
- {"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
- {"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
- {"asm-generic/ioctls.h", "TIOCMGET", 0x5415},
- {"asm-generic/ioctls.h", "TIOCMBIS", 0x5416},
- {"asm-generic/ioctls.h", "TIOCMBIC", 0x5417},
- {"asm-generic/ioctls.h", "TIOCMSET", 0x5418},
- {"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419},
- {"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a},
- {"asm-generic/ioctls.h", "FIONREAD", 0x541b},
{"asm/ioctls.h", "TIOCLINUX", 0x541c},
- {"asm-generic/ioctls.h", "TIOCCONS", 0x541d},
{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
- {"asm-generic/ioctls.h", "TIOCPKT", 0x5420},
- {"asm-generic/ioctls.h", "FIONBIO", 0x5421},
- {"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422},
- {"asm-generic/ioctls.h", "TIOCSETD", 0x5423},
- {"asm-generic/ioctls.h", "TIOCGETD", 0x5424},
{"asm/ioctls.h", "TCSBRKP", 0x5425},
- {"asm-generic/ioctls.h", "TIOCSBRK", 0x5427},
- {"asm-generic/ioctls.h", "TIOCCBRK", 0x5428},
- {"asm-generic/ioctls.h", "TIOCGSID", 0x5429},
- {"asm-generic/ioctls.h", "TCGETS2", 0x542a},
- {"asm-generic/ioctls.h", "TCSETS2", 0x542b},
- {"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
- {"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
- {"asm-generic/ioctls.h", "TIOCGRS485", 0x542e},
- {"asm-generic/ioctls.h", "TIOCSRS485", 0x542f},
- {"asm-generic/ioctls.h", "TIOCGPTN", 0x5430},
- {"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431},
- {"asm-generic/ioctls.h", "TCGETX", 0x5432},
- {"asm-generic/ioctls.h", "TCSETX", 0x5433},
- {"asm-generic/ioctls.h", "TCSETXF", 0x5434},
- {"asm-generic/ioctls.h", "TCSETXW", 0x5435},
- {"asm-generic/ioctls.h", "TIOCSIG", 0x5436},
- {"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
- {"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
- {"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
@@ -113,7 +61,6 @@
{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
- {"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"asm/watchdog.h", "WIOCSTART", 0x570a},
{"asm/watchdog.h", "WIOCSTOP", 0x570b},
{"asm/watchdog.h", "WIOCGSTAT", 0x570c},
--
1.8.0

View File

@@ -1,963 +0,0 @@
Upstream-Status: Backport
From 890a5cad2321ae72fb5ca1b253edb874b1ca7180 Mon Sep 17 00:00:00 2001
From: Steve McIntyre <steve.mcintyre@linaro.org>
Date: Sat, 10 Nov 2012 11:24:48 +0000
Subject: [PATCH 31/31] Add support for tracing 32-bit ARM EABI binaries on
AArch64
* defs.h [AARCH64]: Copy in the definition of arm_pt_regs and the
accessor macros, so it's possible to build on AArch64 without
ARM system headers. Set SUPPORTED_PERSONALITIES to 2.
Define PERSONALITY0_WORDSIZE and PERSONALITY1_WORDSIZE.
Set DEFAULT_PERSONALITY to 1.
* linux/aarch64/errnoent1.h: New file, includes generic errnoent.h.
* linux/aarch64/ioctlent1.h: New file, includes generic ioctlent.h.
* linux/aarch64/signalent1.h: New file, includes generic signalent.h.
* linux/aarch64/syscallent1.h: Rename from linux/aarch64/syscallent.h.
* linux/aarch64/syscallent.h: New file, includes arm/syscallent.h.
* syscall.c [AARCH64]: Define aarch64_regs.
(update_personality) [AARCH64]: Add debug output.
(get_scno) [AARCH64]: Determine if we're in ARM or AArch64 mode by
checking the size of the returned uio structure from PTRACE_GETREGSET
and interpret the structure accordingly.
(get_syscall_result): Likewise.
(get_syscall_args): Merge the AArch64 and ARM sections so that on
AArch64 we can fall back to supporting the ARM personality.
(get_error): Likewise.
Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
---
defs.h | 34 +++++
linux/aarch64/errnoent1.h | 2 +
linux/aarch64/ioctlent1.h | 1 +
linux/aarch64/signalent1.h | 1 +
linux/aarch64/syscallent.h | 331 +-------------------------------------------
linux/aarch64/syscallent1.h | 330 +++++++++++++++++++++++++++++++++++++++++++
syscall.c | 111 ++++++++++-----
7 files changed, 448 insertions(+), 362 deletions(-)
create mode 100644 linux/aarch64/errnoent1.h
create mode 100644 linux/aarch64/ioctlent1.h
create mode 100644 linux/aarch64/signalent1.h
create mode 100644 linux/aarch64/syscallent1.h
diff --git a/defs.h b/defs.h
index 11e26bb..0e05c6e 100644
--- a/defs.h
+++ b/defs.h
@@ -196,6 +196,30 @@ extern long ptrace(int, int, char *, long);
# define REG_PC (0*8)
# define REG_SYSCALL (2*8)
#endif /* SH64 */
+#ifdef AARCH64
+#define NUM_ARM_REGS 18
+struct arm_pt_regs {
+ int uregs[NUM_ARM_REGS];
+};
+#define ARM_cpsr uregs[16]
+#define ARM_pc uregs[15]
+#define ARM_lr uregs[14]
+#define ARM_sp uregs[13]
+#define ARM_ip uregs[12]
+#define ARM_fp uregs[11]
+#define ARM_r10 uregs[10]
+#define ARM_r9 uregs[9]
+#define ARM_r8 uregs[8]
+#define ARM_r7 uregs[7]
+#define ARM_r6 uregs[6]
+#define ARM_r5 uregs[5]
+#define ARM_r4 uregs[4]
+#define ARM_r3 uregs[3]
+#define ARM_r2 uregs[2]
+#define ARM_r1 uregs[1]
+#define ARM_r0 uregs[0]
+#define ARM_ORIG_r0 uregs[17]
+#endif /* AARCH64 */
#define SUPPORTED_PERSONALITIES 1
#define DEFAULT_PERSONALITY 0
@@ -241,6 +265,16 @@ extern long ptrace(int, int, char *, long);
# define PERSONALITY1_WORDSIZE 4
#endif
+#ifdef AARCH64
+# undef SUPPORTED_PERSONALITIES
+/* The existing ARM personality, then AArch64 */
+# define SUPPORTED_PERSONALITIES 2
+# define PERSONALITY0_WORDSIZE 4
+# define PERSONALITY1_WORDSIZE 8
+# undef DEFAULT_PERSONALITY
+# define DEFAULT_PERSONALITY 1
+#endif
+
#ifdef POWERPC64
# undef SUPPORTED_PERSONALITIES
# define SUPPORTED_PERSONALITIES 2
diff --git a/linux/aarch64/errnoent1.h b/linux/aarch64/errnoent1.h
new file mode 100644
index 0000000..e1cbe33
--- /dev/null
+++ b/linux/aarch64/errnoent1.h
@@ -0,0 +1,2 @@
+/* Native AArch64 */
+#include "../errnoent.h"
diff --git a/linux/aarch64/ioctlent1.h b/linux/aarch64/ioctlent1.h
new file mode 100644
index 0000000..df485d3
--- /dev/null
+++ b/linux/aarch64/ioctlent1.h
@@ -0,0 +1 @@
+#include "../ioctlent.h"
diff --git a/linux/aarch64/signalent1.h b/linux/aarch64/signalent1.h
new file mode 100644
index 0000000..d31e6a4
--- /dev/null
+++ b/linux/aarch64/signalent1.h
@@ -0,0 +1 @@
+#include "../signalent.h"
diff --git a/linux/aarch64/syscallent.h b/linux/aarch64/syscallent.h
index b712c9f..1b892be 100644
--- a/linux/aarch64/syscallent.h
+++ b/linux/aarch64/syscallent.h
@@ -1,330 +1 @@
- { 2, 0, sys_io_setup, "io_setup" }, /* 0 */
- { 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */
- { 3, 0, sys_io_submit, "io_submit" }, /* 2 */
- { 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */
- { 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */
- { 5, TF, sys_setxattr, "setxattr" }, /* 5 */
- { 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */
- { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */
- { 4, TF, sys_getxattr, "getxattr" }, /* 8 */
- { 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */
- { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */
- { 3, TF, sys_listxattr, "listxattr" }, /* 11 */
- { 3, TF, sys_listxattr, "llistxattr" }, /* 12 */
- { 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */
- { 2, TF, sys_removexattr, "removexattr" }, /* 14 */
- { 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */
- { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */
- { 2, TF, sys_getcwd, "getcwd" }, /* 17 */
- { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */
- { 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */
- { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */
- { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */
- { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */
- { 1, TD, sys_dup, "dup" }, /* 23 */
- { 3, TD, sys_dup3, "dup3" }, /* 24 */
- { 3, TD, sys_fcntl, "fcntl" }, /* 25 */
- { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */
- { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */
- { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */
- { 3, TD, sys_ioctl, "ioctl" }, /* 29 */
- { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */
- { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */
- { 2, TD, sys_flock, "flock" }, /* 32 */
- { 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */
- { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */
- { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */
- { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */
- { 5, TD|TF, sys_linkat, "linkat" }, /* 37 */
- { 4, TD|TF, sys_renameat, "renameat" }, /* 38 */
- { 2, TF, sys_umount2, "umount2" }, /* 39 */
- { 5, TF, sys_mount, "mount" }, /* 40 */
- { 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */
- { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */
- { 2, TF, sys_statfs, "statfs64" }, /* 43 */
- { 2, TD, sys_fstatfs, "fstatfs64" }, /* 44 */
- { 2, TF, sys_truncate, "truncate64" }, /* 45 */
- { 2, TD, sys_ftruncate, "ftruncate64" }, /* 46 */
- { 6, TD, sys_fallocate, "fallocate" }, /* 47 */
- { 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */
- { 1, TF, sys_chdir, "chdir" }, /* 49 */
- { 1, TD, sys_fchdir, "fchdir" }, /* 50 */
- { 1, TF, sys_chroot, "chroot" }, /* 51 */
- { 2, TD, sys_fchmod, "fchmod" }, /* 52 */
- { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */
- { 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */
- { 3, TD, sys_fchown, "fchown" }, /* 55 */
- { 4, TD|TF, sys_openat, "openat" }, /* 56 */
- { 1, TD, sys_close, "close" }, /* 57 */
- { 0, 0, sys_vhangup, "vhangup" }, /* 58 */
- { 2, TD, sys_pipe2, "pipe2" }, /* 59 */
- { 4, TF, sys_quotactl, "quotactl" }, /* 60 */
- { 3, TD, sys_getdents64, "getdents64" }, /* 61 */
- { 3, TD, sys_lseek, "lseek" }, /* 62 */
- { 3, TD, sys_read, "read" }, /* 63 */
- { 3, TD, sys_write, "write" }, /* 64 */
- { 3, TD, sys_readv, "readv" }, /* 65 */
- { 3, TD, sys_writev, "writev" }, /* 66 */
- { 5, TD, sys_pread, "pread64" }, /* 67 */
- { 5, TD, sys_pwrite, "pwrite64" }, /* 68 */
- { 5, TD, sys_preadv, "preadv" }, /* 69 */
- { 5, TD, sys_pwritev, "pwritev" }, /* 70 */
- { 4, TD|TN, sys_sendfile, "sendfile" }, /* 71 */
- { 6, TD, sys_pselect6, "pselect6" }, /* 72 */
- { 5, TD, sys_ppoll, "ppoll" }, /* 73 */
- { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */
- { 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */
- { 6, TD, sys_splice, "splice" }, /* 76 */
- { 4, TD, sys_tee, "tee" }, /* 77 */
- { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */
- { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 79 */
- { 2, TD, sys_fstat, "fstat" }, /* 80 */
- { 0, 0, sys_sync, "sync" }, /* 81 */
- { 1, TD, sys_fsync, "fsync" }, /* 82 */
- { 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */
- { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */
- { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */
- { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */
- { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */
- { 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */
- { 1, TF, sys_acct, "acct" }, /* 89 */
- { 2, 0, sys_capget, "capget" }, /* 90 */
- { 2, 0, sys_capset, "capset" }, /* 91 */
- { 1, 0, sys_personality, "personality" }, /* 92 */
- { 1, TP, sys_exit, "exit" }, /* 93 */
- { 1, TP, sys_exit, "exit_group" }, /* 94 */
- { 5, TP, sys_waitid, "waitid" }, /* 95 */
- { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */
- { 1, TP, sys_unshare, "unshare" }, /* 97 */
- { 6, 0, sys_futex, "futex" }, /* 98 */
- { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */
- { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */
- { 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */
- { 2, 0, sys_getitimer, "getitimer" }, /* 102 */
- { 3, 0, sys_setitimer, "setitimer" }, /* 103 */
- { 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */
- { 3, 0, sys_init_module, "init_module" }, /* 105 */
- { 2, 0, sys_delete_module, "delete_module" }, /* 106 */
- { 3, 0, sys_timer_create, "timer_create" }, /* 107 */
- { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */
- { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */
- { 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */
- { 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */
- { 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */
- { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */
- { 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */
- { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */
- { 3, 0, sys_syslog, "syslog" }, /* 116 */
- { 4, 0, sys_ptrace, "ptrace" }, /* 117 */
- { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */
- { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */
- { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */
- { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */
- { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */
- { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */
- { 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */
- { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 125 */
- { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 126 */
- { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */
- { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */
- { 2, TS, sys_kill, "kill" }, /* 129 */
- { 2, TS, sys_kill, "tkill" }, /* 130 */
- { 3, TS, sys_tgkill, "tgkill" }, /* 131 */
- { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */
- { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */
- { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */
- { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */
- { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */
- { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */
- { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */
- { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */
- { 3, 0, sys_setpriority, "setpriority" }, /* 140 */
- { 2, 0, sys_getpriority, "getpriority" }, /* 141 */
- { 4, 0, sys_reboot, "reboot" }, /* 142 */
- { 2, 0, sys_setregid, "setregid" }, /* 143 */
- { 1, 0, sys_setgid, "setgid" }, /* 144 */
- { 2, 0, sys_setreuid, "setreuid" }, /* 145 */
- { 1, 0, sys_setuid, "setuid" }, /* 146 */
- { 3, 0, sys_setresuid, "setresuid" }, /* 147 */
- { 3, 0, sys_getresuid, "getresuid" }, /* 148 */
- { 3, 0, sys_setresgid, "setresgid" }, /* 149 */
- { 3, 0, sys_getresgid, "getresgid" }, /* 150 */
- { 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */
- { 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */
- { 1, 0, sys_times, "times" }, /* 153 */
- { 2, 0, sys_setpgid, "setpgid" }, /* 154 */
- { 1, 0, sys_getpgid, "getpgid" }, /* 155 */
- { 1, 0, sys_getsid, "getsid" }, /* 156 */
- { 0, 0, sys_setsid, "setsid" }, /* 157 */
- { 2, 0, sys_getgroups, "getgroups" }, /* 158 */
- { 2, 0, sys_setgroups, "setgroups" }, /* 159 */
- { 1, 0, sys_uname, "uname" }, /* 160 */
- { 2, 0, sys_sethostname, "sethostname" }, /* 161 */
- { 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */
- { 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */
- { 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */
- { 2, 0, sys_getrusage, "getrusage" }, /* 165 */
- { 1, 0, sys_umask, "umask" }, /* 166 */
- { 5, 0, sys_prctl, "prctl" }, /* 167 */
- { 3, 0, sys_getcpu, "getcpu" }, /* 168 */
- { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */
- { 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */
- { 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */
- { 0, 0, sys_getpid, "getpid" }, /* 172 */
- { 0, 0, sys_getppid, "getppid" }, /* 173 */
- { 0, NF, sys_getuid, "getuid" }, /* 174 */
- { 0, NF, sys_geteuid, "geteuid" }, /* 175 */
- { 0, NF, sys_getgid, "getgid" }, /* 176 */
- { 0, NF, sys_getegid, "getegid" }, /* 177 */
- { 0, 0, sys_gettid, "gettid" }, /* 178 */
- { 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */
- { 4, 0, sys_mq_open, "mq_open" }, /* 180 */
- { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */
- { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */
- { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */
- { 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */
- { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */
- { 4, TI, sys_msgget, "msgget" }, /* 186 */
- { 3, TI, sys_msgctl, "msgctl" }, /* 187 */
- { 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */
- { 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */
- { 4, TI, sys_semget, "semget" }, /* 190 */
- { 4, TI, sys_semctl, "semctl" }, /* 191 */
- { 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */
- { 4, TI, sys_semop, "semop" }, /* 193 */
- { 4, TI, sys_shmget, "shmget" }, /* 194 */
- { 4, TI, sys_shmctl, "shmctl" }, /* 195 */
- { 4, TI, sys_shmat, "shmat" }, /* 196 */
- { 4, TI, sys_shmdt, "shmdt" }, /* 197 */
- { 3, TN, sys_socket, "socket" }, /* 198 */
- { 4, TN, sys_socketpair, "socketpair" }, /* 199 */
- { 3, TN, sys_bind, "bind" }, /* 200 */
- { 2, TN, sys_listen, "listen" }, /* 201 */
- { 3, TN, sys_accept, "accept" }, /* 202 */
- { 3, TN, sys_connect, "connect" }, /* 203 */
- { 3, TN, sys_getsockname, "getsockname" }, /* 204 */
- { 3, TN, sys_getpeername, "getpeername" }, /* 205 */
- { 6, TN, sys_sendto, "sendto" }, /* 206 */
- { 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */
- { 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */
- { 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */
- { 2, TN, sys_shutdown, "shutdown" }, /* 210 */
- { 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */
- { 5, TN, sys_recvmsg, "recvmsg" }, /* 212 */
- { 4, TD, sys_readahead, "readahead" }, /* 213 */
- { 1, TM, sys_brk, "brk" }, /* 214 */
- { 2, TM, sys_munmap, "munmap" }, /* 215 */
- { 5, TM, sys_mremap, "mremap" }, /* 216 */
- { 5, 0, sys_add_key, "add_key" }, /* 217 */
- { 4, 0, sys_request_key, "request_key" }, /* 218 */
- { 5, 0, sys_keyctl, "keyctl" }, /* 219 */
- { 5, TP, sys_clone, "clone" }, /* 220 */
- { 3, TF|TP, sys_execve, "execve" }, /* 221 */
- { 6, TD|TM, sys_mmap, "mmap" }, /* 222 */
- { 4, TD, sys_fadvise64, "fadvise64" }, /* 223 */
- { 2, TF, sys_swapon, "swapon" }, /* 224 */
- { 1, TF, sys_swapoff, "swapoff" }, /* 225 */
- { 3, TM, sys_mprotect, "mprotect" }, /* 226 */
- { 3, TM, sys_msync, "msync" }, /* 227 */
- { 3, TM, sys_msync, "msync" }, /* 228 */
- { 2, TM, sys_munlock, "munlock" }, /* 229 */
- { 1, TM, sys_mlockall, "mlockall" }, /* 230 */
- { 0, TM, sys_munlockall, "munlockall" }, /* 231 */
- { 3, TM, sys_mincore, "mincore" }, /* 232 */
- { 3, TM, sys_madvise, "madvise" }, /* 233 */
- { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 234 */
- { 6, TM, sys_mbind, "mbind" }, /* 235 */
- { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */
- { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */
- { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */
- { 6, TM, sys_move_pages, "move_pages" }, /* 239 */
- { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */
- { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */
- { 4, TN, sys_accept4, "accept4" }, /* 242 */
- { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */
-
- /* Arch-specific block, not used on AArch64 */
- [244 ... 259] = { },
-
- { 4, TP, sys_wait4, "wait4" }, /* 260 */
- { 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */
- { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */
- { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */
- { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */
- { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */
- { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */
- { 1, TD, sys_syncfs, "syncfs" }, /* 267 */
- { 2, TD, sys_setns, "setns" }, /* 268 */
- { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */
- { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */
- { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */
-
- /* Blank down to 1023 */
- [272 ... 1023] = { },
-
- /* Quote from asm-generic/unistd.h:
- *
- * All syscalls below here should go away really,
- * these are provided for both review and as a porting
- * help for the C library version.
- *
- * Last chance: are any of these important enough to
- * enable by default?
- */
-
- { 3, TD|TF, sys_open, "open" }, /* 1024 */
- { 2, TF, sys_link, "link" }, /* 1025 */
- { 1, TF, sys_unlink, "unlink" }, /* 1026 */
- { 3, TF, sys_mknod, "mknod" }, /* 1027 */
- { 2, TF, sys_chmod, "chmod" }, /* 1028 */
- { 3, TF, sys_chown, "chown" }, /* 1029 */
- { 2, TF, sys_mkdir, "mkdir" }, /* 1030 */
- { 1, TF, sys_rmdir, "rmdir" }, /* 1031 */
- { 3, TF, sys_chown, "lchown" }, /* 1032 */
- { 2, TF, sys_access, "access" }, /* 1033 */
- { 2, TF, sys_rename, "rename" }, /* 1034 */
- { 3, TF, sys_readlink, "readlink" }, /* 1035 */
- { 2, TF, sys_symlink, "symlink" }, /* 1036 */
- { 2, TF, sys_utimes, "utimes" }, /* 1037 */
- { 2, TF, sys_stat, "stat" }, /* 1038 */
- { 2, TF, sys_lstat, "lstat" }, /* 1039 */
- { 1, TD, sys_pipe, "pipe" }, /* 1040 */
- { 2, TD, sys_dup2, "dup2" }, /* 1041 */
- { 1, TD, sys_epoll_create, "epoll_create" }, /* 1042 */
- { 0, TD, sys_inotify_init, "inotify_init" }, /* 1043 */
- { 1, TD, sys_eventfd, "eventfd" }, /* 1044 */
- { 3, TD|TS, sys_signalfd, "signalfd" }, /* 1045 */
- { 4, TD|TN, sys_sendfile, "sendfile" }, /* 1046 */
- { 2, TD, sys_ftruncate, "ftruncate" }, /* 1047 */
- { 2, TF, sys_truncate, "truncate" }, /* 1048 */
- { 2, TF, sys_stat, "stat" }, /* 1049 */
- { 2, TF, sys_lstat, "lstat" }, /* 1050 */
- { 2, TD, sys_fstat, "fstat" }, /* 1051 */
- { 3, TD, sys_fcntl, "fcntl" }, /* 1052 */
- { 4, TD, sys_fadvise64, "fadvise64" }, /* 1053 */
- { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 1054 */
- { 2, TD, sys_fstatfs, "fstatfs" }, /* 1055 */
- { 2, TF, sys_statfs, "statfs" }, /* 1056 */
- { 3, TD, sys_lseek, "lseek" }, /* 1057 */
- { 6, TD|TM, sys_mmap, "mmap" }, /* 1058 */
- { 1, 0, sys_alarm, "alarm" }, /* 1059 */
- { 0, 0, sys_getpgrp, "getpgrp" }, /* 1060 */
- { 0, TS, sys_pause, "pause" }, /* 1061 */
- { 1, 0, sys_time, "time" }, /* 1062 */
- { 2, TF, sys_utime, "utime" }, /* 1063 */
- { 2, TD|TF, sys_creat, "creat" }, /* 1064 */
- { 3, TD, sys_getdents, "getdents" }, /* 1065 */
- { 3, TD|TF, sys_futimesat, "futimesat" }, /* 1066 */
- { 5, TD, sys_select, "select" }, /* 1067 */
- { 3, TD, sys_poll, "poll" }, /* 1068 */
- { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 1069 */
- { 2, 0, sys_ustat, "ustat" }, /* 1070 */
- { 0, TP, sys_vfork, "vfork" }, /* 1071 */
- { 4, TP, sys_wait4, "wait4" }, /* 1072 */
- { 6, TN, sys_recv, "recv" }, /* 1073 */
- { 4, TD|TN, sys_send, "send" }, /* 1074 */
- { 2, 0, sys_bdflush, "bdflush" }, /* 1075 */
- { 2, TF, sys_umount, "umount" }, /* 1076 */
- { 1, TF, sys_uselib, "uselib" }, /* 1077 */
- { 1, 0, sys_sysctl, "sysctl" }, /* 1078 */
- { 0, TP, sys_fork, "fork" }, /* 1079 */
+#include "../arm/syscallent.h"
diff --git a/linux/aarch64/syscallent1.h b/linux/aarch64/syscallent1.h
new file mode 100644
index 0000000..b712c9f
--- /dev/null
+++ b/linux/aarch64/syscallent1.h
@@ -0,0 +1,330 @@
+ { 2, 0, sys_io_setup, "io_setup" }, /* 0 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 2 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 5 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 8 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 11 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 12 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 14 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 17 */
+ { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */
+ { 1, TD, sys_dup, "dup" }, /* 23 */
+ { 3, TD, sys_dup3, "dup3" }, /* 24 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 25 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */
+ { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */
+ { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 29 */
+ { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */
+ { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */
+ { 2, TD, sys_flock, "flock" }, /* 32 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 37 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 38 */
+ { 2, TF, sys_umount2, "umount2" }, /* 39 */
+ { 5, TF, sys_mount, "mount" }, /* 40 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */
+ { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */
+ { 2, TF, sys_statfs, "statfs64" }, /* 43 */
+ { 2, TD, sys_fstatfs, "fstatfs64" }, /* 44 */
+ { 2, TF, sys_truncate, "truncate64" }, /* 45 */
+ { 2, TD, sys_ftruncate, "ftruncate64" }, /* 46 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 47 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */
+ { 1, TF, sys_chdir, "chdir" }, /* 49 */
+ { 1, TD, sys_fchdir, "fchdir" }, /* 50 */
+ { 1, TF, sys_chroot, "chroot" }, /* 51 */
+ { 2, TD, sys_fchmod, "fchmod" }, /* 52 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */
+ { 3, TD, sys_fchown, "fchown" }, /* 55 */
+ { 4, TD|TF, sys_openat, "openat" }, /* 56 */
+ { 1, TD, sys_close, "close" }, /* 57 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 58 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 59 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 60 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 61 */
+ { 3, TD, sys_lseek, "lseek" }, /* 62 */
+ { 3, TD, sys_read, "read" }, /* 63 */
+ { 3, TD, sys_write, "write" }, /* 64 */
+ { 3, TD, sys_readv, "readv" }, /* 65 */
+ { 3, TD, sys_writev, "writev" }, /* 66 */
+ { 5, TD, sys_pread, "pread64" }, /* 67 */
+ { 5, TD, sys_pwrite, "pwrite64" }, /* 68 */
+ { 5, TD, sys_preadv, "preadv" }, /* 69 */
+ { 5, TD, sys_pwritev, "pwritev" }, /* 70 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 71 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 72 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 73 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */
+ { 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */
+ { 6, TD, sys_splice, "splice" }, /* 76 */
+ { 4, TD, sys_tee, "tee" }, /* 77 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 79 */
+ { 2, TD, sys_fstat, "fstat" }, /* 80 */
+ { 0, 0, sys_sync, "sync" }, /* 81 */
+ { 1, TD, sys_fsync, "fsync" }, /* 82 */
+ { 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */
+ { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */
+ { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */
+ { 1, TF, sys_acct, "acct" }, /* 89 */
+ { 2, 0, sys_capget, "capget" }, /* 90 */
+ { 2, 0, sys_capset, "capset" }, /* 91 */
+ { 1, 0, sys_personality, "personality" }, /* 92 */
+ { 1, TP, sys_exit, "exit" }, /* 93 */
+ { 1, TP, sys_exit, "exit_group" }, /* 94 */
+ { 5, TP, sys_waitid, "waitid" }, /* 95 */
+ { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */
+ { 1, TP, sys_unshare, "unshare" }, /* 97 */
+ { 6, 0, sys_futex, "futex" }, /* 98 */
+ { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */
+ { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */
+ { 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */
+ { 2, 0, sys_getitimer, "getitimer" }, /* 102 */
+ { 3, 0, sys_setitimer, "setitimer" }, /* 103 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */
+ { 3, 0, sys_init_module, "init_module" }, /* 105 */
+ { 2, 0, sys_delete_module, "delete_module" }, /* 106 */
+ { 3, 0, sys_timer_create, "timer_create" }, /* 107 */
+ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */
+ { 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */
+ { 3, 0, sys_syslog, "syslog" }, /* 116 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 117 */
+ { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */
+ { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */
+ { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */
+ { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 125 */
+ { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 126 */
+ { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */
+ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */
+ { 2, TS, sys_kill, "kill" }, /* 129 */
+ { 2, TS, sys_kill, "tkill" }, /* 130 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 131 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */
+ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */
+ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */
+ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */
+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */
+ { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */
+ { 3, 0, sys_setpriority, "setpriority" }, /* 140 */
+ { 2, 0, sys_getpriority, "getpriority" }, /* 141 */
+ { 4, 0, sys_reboot, "reboot" }, /* 142 */
+ { 2, 0, sys_setregid, "setregid" }, /* 143 */
+ { 1, 0, sys_setgid, "setgid" }, /* 144 */
+ { 2, 0, sys_setreuid, "setreuid" }, /* 145 */
+ { 1, 0, sys_setuid, "setuid" }, /* 146 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 147 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 148 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 149 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 150 */
+ { 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */
+ { 1, 0, sys_times, "times" }, /* 153 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 154 */
+ { 1, 0, sys_getpgid, "getpgid" }, /* 155 */
+ { 1, 0, sys_getsid, "getsid" }, /* 156 */
+ { 0, 0, sys_setsid, "setsid" }, /* 157 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 158 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 159 */
+ { 1, 0, sys_uname, "uname" }, /* 160 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 161 */
+ { 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 165 */
+ { 1, 0, sys_umask, "umask" }, /* 166 */
+ { 5, 0, sys_prctl, "prctl" }, /* 167 */
+ { 3, 0, sys_getcpu, "getcpu" }, /* 168 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */
+ { 0, 0, sys_getpid, "getpid" }, /* 172 */
+ { 0, 0, sys_getppid, "getppid" }, /* 173 */
+ { 0, NF, sys_getuid, "getuid" }, /* 174 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 175 */
+ { 0, NF, sys_getgid, "getgid" }, /* 176 */
+ { 0, NF, sys_getegid, "getegid" }, /* 177 */
+ { 0, 0, sys_gettid, "gettid" }, /* 178 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */
+ { 4, 0, sys_mq_open, "mq_open" }, /* 180 */
+ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */
+ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */
+ { 4, TI, sys_msgget, "msgget" }, /* 186 */
+ { 3, TI, sys_msgctl, "msgctl" }, /* 187 */
+ { 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */
+ { 4, TI, sys_semget, "semget" }, /* 190 */
+ { 4, TI, sys_semctl, "semctl" }, /* 191 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */
+ { 4, TI, sys_semop, "semop" }, /* 193 */
+ { 4, TI, sys_shmget, "shmget" }, /* 194 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 195 */
+ { 4, TI, sys_shmat, "shmat" }, /* 196 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 197 */
+ { 3, TN, sys_socket, "socket" }, /* 198 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 199 */
+ { 3, TN, sys_bind, "bind" }, /* 200 */
+ { 2, TN, sys_listen, "listen" }, /* 201 */
+ { 3, TN, sys_accept, "accept" }, /* 202 */
+ { 3, TN, sys_connect, "connect" }, /* 203 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 204 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 205 */
+ { 6, TN, sys_sendto, "sendto" }, /* 206 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 210 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */
+ { 5, TN, sys_recvmsg, "recvmsg" }, /* 212 */
+ { 4, TD, sys_readahead, "readahead" }, /* 213 */
+ { 1, TM, sys_brk, "brk" }, /* 214 */
+ { 2, TM, sys_munmap, "munmap" }, /* 215 */
+ { 5, TM, sys_mremap, "mremap" }, /* 216 */
+ { 5, 0, sys_add_key, "add_key" }, /* 217 */
+ { 4, 0, sys_request_key, "request_key" }, /* 218 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 219 */
+ { 5, TP, sys_clone, "clone" }, /* 220 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 221 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 222 */
+ { 4, TD, sys_fadvise64, "fadvise64" }, /* 223 */
+ { 2, TF, sys_swapon, "swapon" }, /* 224 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 225 */
+ { 3, TM, sys_mprotect, "mprotect" }, /* 226 */
+ { 3, TM, sys_msync, "msync" }, /* 227 */
+ { 3, TM, sys_msync, "msync" }, /* 228 */
+ { 2, TM, sys_munlock, "munlock" }, /* 229 */
+ { 1, TM, sys_mlockall, "mlockall" }, /* 230 */
+ { 0, TM, sys_munlockall, "munlockall" }, /* 231 */
+ { 3, TM, sys_mincore, "mincore" }, /* 232 */
+ { 3, TM, sys_madvise, "madvise" }, /* 233 */
+ { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 234 */
+ { 6, TM, sys_mbind, "mbind" }, /* 235 */
+ { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */
+ { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */
+ { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */
+ { 6, TM, sys_move_pages, "move_pages" }, /* 239 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */
+ { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */
+ { 4, TN, sys_accept4, "accept4" }, /* 242 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */
+
+ /* Arch-specific block, not used on AArch64 */
+ [244 ... 259] = { },
+
+ { 4, TP, sys_wait4, "wait4" }, /* 260 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */
+ { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */
+ { 1, TD, sys_syncfs, "syncfs" }, /* 267 */
+ { 2, TD, sys_setns, "setns" }, /* 268 */
+ { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */
+
+ /* Blank down to 1023 */
+ [272 ... 1023] = { },
+
+ /* Quote from asm-generic/unistd.h:
+ *
+ * All syscalls below here should go away really,
+ * these are provided for both review and as a porting
+ * help for the C library version.
+ *
+ * Last chance: are any of these important enough to
+ * enable by default?
+ */
+
+ { 3, TD|TF, sys_open, "open" }, /* 1024 */
+ { 2, TF, sys_link, "link" }, /* 1025 */
+ { 1, TF, sys_unlink, "unlink" }, /* 1026 */
+ { 3, TF, sys_mknod, "mknod" }, /* 1027 */
+ { 2, TF, sys_chmod, "chmod" }, /* 1028 */
+ { 3, TF, sys_chown, "chown" }, /* 1029 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 1030 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 1031 */
+ { 3, TF, sys_chown, "lchown" }, /* 1032 */
+ { 2, TF, sys_access, "access" }, /* 1033 */
+ { 2, TF, sys_rename, "rename" }, /* 1034 */
+ { 3, TF, sys_readlink, "readlink" }, /* 1035 */
+ { 2, TF, sys_symlink, "symlink" }, /* 1036 */
+ { 2, TF, sys_utimes, "utimes" }, /* 1037 */
+ { 2, TF, sys_stat, "stat" }, /* 1038 */
+ { 2, TF, sys_lstat, "lstat" }, /* 1039 */
+ { 1, TD, sys_pipe, "pipe" }, /* 1040 */
+ { 2, TD, sys_dup2, "dup2" }, /* 1041 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 1042 */
+ { 0, TD, sys_inotify_init, "inotify_init" }, /* 1043 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 1044 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 1045 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 1046 */
+ { 2, TD, sys_ftruncate, "ftruncate" }, /* 1047 */
+ { 2, TF, sys_truncate, "truncate" }, /* 1048 */
+ { 2, TF, sys_stat, "stat" }, /* 1049 */
+ { 2, TF, sys_lstat, "lstat" }, /* 1050 */
+ { 2, TD, sys_fstat, "fstat" }, /* 1051 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 1052 */
+ { 4, TD, sys_fadvise64, "fadvise64" }, /* 1053 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 1054 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 1055 */
+ { 2, TF, sys_statfs, "statfs" }, /* 1056 */
+ { 3, TD, sys_lseek, "lseek" }, /* 1057 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 1058 */
+ { 1, 0, sys_alarm, "alarm" }, /* 1059 */
+ { 0, 0, sys_getpgrp, "getpgrp" }, /* 1060 */
+ { 0, TS, sys_pause, "pause" }, /* 1061 */
+ { 1, 0, sys_time, "time" }, /* 1062 */
+ { 2, TF, sys_utime, "utime" }, /* 1063 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 1064 */
+ { 3, TD, sys_getdents, "getdents" }, /* 1065 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 1066 */
+ { 5, TD, sys_select, "select" }, /* 1067 */
+ { 3, TD, sys_poll, "poll" }, /* 1068 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 1069 */
+ { 2, 0, sys_ustat, "ustat" }, /* 1070 */
+ { 0, TP, sys_vfork, "vfork" }, /* 1071 */
+ { 4, TP, sys_wait4, "wait4" }, /* 1072 */
+ { 6, TN, sys_recv, "recv" }, /* 1073 */
+ { 4, TD|TN, sys_send, "send" }, /* 1074 */
+ { 2, 0, sys_bdflush, "bdflush" }, /* 1075 */
+ { 2, TF, sys_umount, "umount" }, /* 1076 */
+ { 1, TF, sys_uselib, "uselib" }, /* 1077 */
+ { 1, 0, sys_sysctl, "sysctl" }, /* 1078 */
+ { 0, TP, sys_fork, "fork" }, /* 1079 */
diff --git a/syscall.c b/syscall.c
index 680cbc3..69eceed 100644
--- a/syscall.c
+++ b/syscall.c
@@ -287,6 +287,12 @@ update_personality(struct tcb *tcp, int personality)
fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n",
tcp->pid, names[personality]);
}
+# elif defined(AARCH64)
+ if (!qflag) {
+ static const char *const names[] = {"32-bit ARM", "AArch64"};
+ fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n",
+ tcp->pid, names[personality]);
+ }
# endif
}
#endif
@@ -664,7 +670,8 @@ static long r0;
#elif defined(ARM)
static struct pt_regs regs;
#elif defined(AARCH64)
-static struct user_pt_regs regs;
+static struct user_pt_regs aarch64_regs;
+static struct arm_pt_regs regs;
#elif defined(ALPHA)
static long r0;
static long a3;
@@ -916,6 +923,29 @@ get_scno(struct tcb *tcp)
if (upeek(tcp, PT_R15, &scno) < 0)
return -1;
}
+#elif defined(AARCH64)
+ struct iovec io;
+ char buf[sizeof(aarch64_regs)];
+ io.iov_base = &buf;
+ io.iov_len = sizeof(aarch64_regs);
+ if (ptrace(PTRACE_GETREGSET, tcp->pid, NT_PRSTATUS, (void *)&io) == -1)
+ return -1;
+ switch (io.iov_len) {
+ case sizeof(aarch64_regs):
+ /* We are in 64-bit mode */
+ memcpy(&aarch64_regs, buf, sizeof(aarch64_regs));
+ scno = aarch64_regs.regs[8];
+ update_personality(tcp, 1);
+ break;
+ case sizeof(regs):
+ /* We are in 32-bit mode */
+ memcpy(&regs, buf, sizeof(regs));
+ scno = regs.uregs[7];
+ update_personality(tcp, 0);
+ break;
+ default:
+ return -1;
+ }
#elif defined(ARM)
/* Read complete register set in one go. */
if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)&regs) == -1)
@@ -975,13 +1005,6 @@ get_scno(struct tcb *tcp)
fprintf(stderr, "pid %d stray syscall entry\n", tcp->pid);
tcp->flags |= TCB_INSYSCALL;
}
-#elif defined(AARCH64)
- struct iovec io;
- io.iov_base = &regs;
- io.iov_len = sizeof(regs);
- if (ptrace(PTRACE_GETREGSET, tcp->pid, NT_PRSTATUS, (void *)&io) == -1)
- return -1;
- scno = regs.regs[8];
#elif defined(M68K)
if (upeek(tcp, 4*PT_ORIG_D0, &scno) < 0)
return -1;
@@ -1415,12 +1438,15 @@ get_syscall_args(struct tcb *tcp)
for (i = 0; i < nargs; ++i)
if (upeek(tcp, PT_GR26-4*i, &tcp->u_arg[i]) < 0)
return -1;
-#elif defined(ARM)
+#elif defined(ARM) || defined(AARCH64)
+# if defined(AARCH64)
+ if (tcp->currpers == 1)
+ for (i = 0; i < nargs; ++i)
+ tcp->u_arg[i] = aarch64_regs.regs[i];
+ else
+# endif /* AARCH64 */
for (i = 0; i < nargs; ++i)
tcp->u_arg[i] = regs.uregs[i];
-#elif defined(AARCH64)
- for (i = 0; i < nargs; ++i)
- tcp->u_arg[i] = regs.regs[i];
#elif defined(AVR32)
(void)i;
(void)nargs;
@@ -1655,16 +1681,31 @@ get_syscall_result(struct tcb *tcp)
return -1;
if (upeek(tcp, PT_R10, &r10) < 0)
return -1;
-#elif defined(ARM)
- /* Read complete register set in one go. */
- if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)&regs) == -1)
- return -1;
#elif defined(AARCH64)
struct iovec io;
- io.iov_base = &regs;
- io.iov_len = sizeof(regs);
+ char buf[sizeof(aarch64_regs)];
+ io.iov_base = &buf;
+ io.iov_len = sizeof(aarch64_regs);
if (ptrace(PTRACE_GETREGSET, tcp->pid, NT_PRSTATUS, (void *)&io) == -1)
return -1;
+ switch (io.iov_len) {
+ case sizeof(aarch64_regs):
+ /* We are in 64-bit mode */
+ memcpy(&aarch64_regs, buf, sizeof(aarch64_regs));
+ update_personality(tcp, 1);
+ break;
+ case sizeof(regs):
+ /* We are in 32-bit mode */
+ memcpy(&regs, buf, sizeof(regs));
+ update_personality(tcp, 0);
+ break;
+ default:
+ return -1;
+ }
+#elif defined(ARM)
+ /* Read complete ARM register set in one go. */
+ if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)&regs) == -1)
+ return -1;
#elif defined(M68K)
if (upeek(tcp, 4*PT_D0, &d0) < 0)
return -1;
@@ -1839,21 +1880,27 @@ get_error(struct tcb *tcp)
else {
tcp->u_rval = d0;
}
-#elif defined(ARM)
- if (check_errno && is_negated_errno(regs.ARM_r0)) {
- tcp->u_rval = -1;
- u_error = -regs.ARM_r0;
- }
- else {
- tcp->u_rval = regs.ARM_r0;
- }
-#elif defined(AARCH64)
- if (check_errno && is_negated_errno(regs.regs[0])) {
- tcp->u_rval = -1;
- u_error = -regs.regs[0];
+#elif defined(ARM) || defined(AARCH64)
+# if defined(AARCH64)
+ if (tcp->currpers == 1) {
+ if (check_errno && is_negated_errno(aarch64_regs.regs[0])) {
+ tcp->u_rval = -1;
+ u_error = -aarch64_regs.regs[0];
+ }
+ else {
+ tcp->u_rval = aarch64_regs.regs[0];
+ }
}
- else {
- tcp->u_rval = regs.regs[0];
+ else
+# endif /* AARCH64 */
+ {
+ if (check_errno && is_negated_errno(regs.ARM_r0)) {
+ tcp->u_rval = -1;
+ u_error = -regs.ARM_r0;
+ }
+ else {
+ tcp->u_rval = regs.ARM_r0;
+ }
}
#elif defined(AVR32)
if (check_errno && regs.r12 && (unsigned) -regs.r12 < nerrnos) {
--
1.8.0

View File

@@ -1,38 +0,0 @@
Upstream-Status: Backport
From 0dbc80de895c25769791b7726022a274695eec31 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Mon, 14 May 2012 23:42:10 +0000
Subject: [PATCH] Fix kernel release string parsing
* strace.c (get_os_release): Handle "X.Y-something" utsname.release
strings properly.
Reported-by: Bryce Gibson <bryce@gibson-consulting.com.au>
---
strace.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/strace.c b/strace.c
index 857136d..65dee7d 100644
--- a/strace.c
+++ b/strace.c
@@ -1432,8 +1432,14 @@ get_os_release(void)
break;
while (*p >= '0' && *p <= '9')
p++;
- if (*p != '.')
+ if (*p != '.') {
+ if (rel >= KERNEL_VERSION(0,1,0)) {
+ /* "X.Y-something" means "X.Y.0" */
+ rel <<= 8;
+ break;
+ }
error_msg_and_die("Bad OS release string: '%s'", u.release);
+ }
p++;
}
return rel;
--
1.7.10.4

View File

@@ -0,0 +1,225 @@
#!/bin/sh
# Print a version string.
scriptversion=2012-12-31.23; # UTC
# Copyright (C) 2007-2013 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
# It may be run two ways:
# - from a git repository in which the "git describe" command below
# produces useful output (thus requiring at least one signed tag)
# - from a non-git-repo directory containing a .tarball-version file, which
# presumes this script is invoked like "./git-version-gen .tarball-version".
# In order to use intra-version strings in your project, you will need two
# separate generated version string files:
#
# .tarball-version - present only in a distribution tarball, and not in
# a checked-out repository. Created with contents that were learned at
# the last time autoconf was run, and used by git-version-gen. Must not
# be present in either $(srcdir) or $(builddir) for git-version-gen to
# give accurate answers during normal development with a checked out tree,
# but must be present in a tarball when there is no version control system.
# Therefore, it cannot be used in any dependencies. GNUmakefile has
# hooks to force a reconfigure at distribution time to get the value
# correct, without penalizing normal development with extra reconfigures.
#
# .version - present in a checked-out repository and in a distribution
# tarball. Usable in dependencies, particularly for files that don't
# want to depend on config.h but do want to track version changes.
# Delete this file prior to any autoconf run where you want to rebuild
# files to pick up a version string change; and leave it stale to
# minimize rebuild time after unrelated changes to configure sources.
#
# As with any generated file in a VC'd directory, you should add
# /.version to .gitignore, so that you don't accidentally commit it.
# .tarball-version is never generated in a VC'd directory, so needn't
# be listed there.
#
# Use the following line in your configure.ac, so that $(VERSION) will
# automatically be up-to-date each time configure is run (and note that
# since configure.ac no longer includes a version string, Makefile rules
# should not depend on configure.ac for version updates).
#
# AC_INIT([GNU project],
# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
# [bug-project@example])
#
# Then use the following lines in your Makefile.am, so that .version
# will be present for dependencies, and so that .version and
# .tarball-version will exist in distribution tarballs.
#
# EXTRA_DIST = $(top_srcdir)/.version
# BUILT_SOURCES = $(top_srcdir)/.version
# $(top_srcdir)/.version:
# echo $(VERSION) > $@-t && mv $@-t $@
# dist-hook:
# echo $(VERSION) > $(distdir)/.tarball-version
me=$0
version="git-version-gen $scriptversion
Copyright 2011 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
usage="\
Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
Print a version string.
Options:
--prefix prefix of git tags (default 'v')
--fallback fallback version to use if \"git --version\" fails
--help display this help and exit
--version output version information and exit
Running without arguments will suffice in most cases."
prefix=v
fallback=
while test $# -gt 0; do
case $1 in
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
--prefix) shift; prefix="$1";;
--fallback) shift; fallback="$1";;
-*)
echo "$0: Unknown option '$1'." >&2
echo "$0: Try '--help' for more information." >&2
exit 1;;
*)
if test "x$tarball_version_file" = x; then
tarball_version_file="$1"
elif test "x$tag_sed_script" = x; then
tag_sed_script="$1"
else
echo "$0: extra non-option argument '$1'." >&2
exit 1
fi;;
esac
shift
done
if test "x$tarball_version_file" = x; then
echo "$usage"
exit 1
fi
tag_sed_script="${tag_sed_script:-s/x/x/}"
nl='
'
# Avoid meddling by environment variable of the same name.
v=
v_from_git=
# First see if there is a tarball-only version file.
# then try "git describe", then default.
if test -f $tarball_version_file
then
v=`cat $tarball_version_file` || v=
case $v in
*$nl*) v= ;; # reject multi-line output
[0-9]*) ;;
*) v= ;;
esac
test "x$v" = x \
&& echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
fi
if test "x$v" != x
then
: # use $v
# Otherwise, if there is at least one git commit involving the working
# directory, and "git describe" output looks sensible, use that to
# derive a version string.
elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
&& v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
&& case $v in
$prefix[0-9]*) ;;
*) (exit 1) ;;
esac
then
# Is this a new git that lists number of commits since the last
# tag or the previous older version that did not?
# Newer: v6.10-77-g0f8faeb
# Older: v6.10-g0f8faeb
case $v in
*-*-*) : git describe is okay three part flavor ;;
*-*)
: git describe is older two part flavor
# Recreate the number of commits and rewrite such that the
# result is the same as if we were using the newer version
# of git describe.
vtag=`echo "$v" | sed 's/-.*//'`
commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
|| { commit_list=failed;
echo "$0: WARNING: git rev-list failed" 1>&2; }
numcommits=`echo "$commit_list" | wc -l`
v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
test "$commit_list" = failed && v=UNKNOWN
;;
esac
# Change the first '-' to a '.', so version-comparing tools work properly.
# Remove the "g" in git describe's output string, to save a byte.
v=`echo "$v" | sed 's/-/.0./;s/\(.*\)-g/\1-/'`;
v_from_git=1
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
v=UNKNOWN
else
v=$fallback
fi
v=`echo "$v" |sed "s/^$prefix//"`
# Test whether to append the "-dirty" suffix only if the version
# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
# or if it came from .tarball-version.
if test "x$v_from_git" != x; then
# Don't declare a version "dirty" merely because a time stamp has changed.
git update-index --refresh > /dev/null 2>&1
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
case "$dirty" in
'') ;;
*) # Append the suffix only if there isn't one already.
case $v in
*-dirty) ;;
*) v="$v-dirty" ;;
esac ;;
esac
fi
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
echo "$v" | tr -d "$nl"
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@@ -1,34 +0,0 @@
DESCRIPTION = "strace is a system call tracing tool."
HOMEPAGE = "http://strace.sourceforge.net"
SECTION = "console/utils"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=124500c21e856f0912df29295ba104c7"
PR = "r4"
SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
file://0003-util-fix-building-when-glibc-has-a-stub-process_vm_r.patch \
file://0014-x32-update-syscall-table.patch \
file://0018-x32-update-g-s-etsockopt-syscall-numbers.patch \
file://0024-x32-add-64bit-annotation-too.patch \
file://0025-Add-e-trace-memory-option.patch \
file://0026-linux-add-new-errno-values-for-EPROBE_DEFER-and-EOPE.patch \
file://0027-Add-AArch64-support-to-strace.patch \
file://0028-Enhance-quotactl-decoding.patch \
file://0029-Filter-out-redundant-32-ioctl-entries.patch \
file://0030-Move-asm-generic-ioctl-definitions-to-linux-ioctlent.patch \
file://0031-Add-support-for-tracing-32-bit-ARM-EABI-binaries-on-.patch \
file://0032-Fix-kernel-release-string-parsing.patch \
"
SRC_URI[md5sum] = "6054c3880a00c6703f83b57f15e04642"
SRC_URI[sha256sum] = "c49cd98873c119c5f201356200a9b9687da1ceea83a05047e2ae0a7ac1e41195"
inherit autotools
export INCLUDES = "-I. -I./linux"
do_install_append() {
# We don't ship strace-graph here because it needs perl
rm ${D}${bindir}/strace-graph
}
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,26 @@
DESCRIPTION = "strace is a system call tracing tool."
HOMEPAGE = "http://strace.sourceforge.net"
SECTION = "console/utils"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
PR = "r0"
SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
file://git-version-gen"
SRC_URI[md5sum] = "c575ef43829586801f514fd91bfe7575"
SRC_URI[sha256sum] = "f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8"
inherit autotools
export INCLUDES = "-I. -I./linux"
do_configure_prepend() {
cp ${WORKDIR}/git-version-gen ${S}
}
do_install_append() {
# We don't ship strace-graph here because it needs perl
rm ${D}${bindir}/strace-graph
}
BBCLASSEXTEND = "native"