]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Update Linux x86 system call number definitions
authorBart Van Assche <bvanassche@acm.org>
Mon, 1 Jul 2019 22:01:59 +0000 (15:01 -0700)
committerBart Van Assche <bvanassche@acm.org>
Tue, 2 Jul 2019 02:25:35 +0000 (19:25 -0700)
Introduce new header files for the system call numbers that are shared
across all Linux architectures and also for the system call numbers that
are shared across all 32-bit architectures.

include/pub_tool_vkiscnums_asm.h
include/vki/vki-scnums-32bit-linux.h [new file with mode: 0644]
include/vki/vki-scnums-amd64-linux.h
include/vki/vki-scnums-shared-linux.h [new file with mode: 0644]
include/vki/vki-scnums-x86-linux.h

index 484dded829ba5c6085ef6c59b3155d7dde2ed04b..af1552ffc9a25f8f347c41c72280e6bc74d28bc2 100644 (file)
 #define __PUB_TOOL_VKISCNUMS_ASM_H
 
 #if defined(VGP_x86_linux)
+#  include "vki/vki-scnums-shared-linux.h"
+#  include "vki/vki-scnums-32bit-linux.h"
 #  include "vki/vki-scnums-x86-linux.h"
 
 #elif defined(VGP_amd64_linux)
+#  include "vki/vki-scnums-shared-linux.h"
 #  include "vki/vki-scnums-amd64-linux.h"
 
 #elif defined(VGP_ppc32_linux)
+#  include "vki/vki-scnums-shared-linux.h"
+#  include "vki/vki-scnums-32bit-linux.h"
 #  include "vki/vki-scnums-ppc32-linux.h"
 
 #elif defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
+#  include "vki/vki-scnums-shared-linux.h"
 #  include "vki/vki-scnums-ppc64-linux.h"
 
 #elif defined(VGP_s390x_linux)
+#  include "vki/vki-scnums-shared-linux.h"
 #  include "vki/vki-scnums-s390x-linux.h"
 
 #elif defined(VGP_arm_linux)
+#  include "vki/vki-scnums-shared-linux.h"
+#  include "vki/vki-scnums-32bit-linux.h"
 #  include "vki/vki-scnums-arm-linux.h"
 
 #elif defined(VGP_arm64_linux)
+#  include "vki/vki-scnums-shared-linux.h"
 #  include "vki/vki-scnums-arm64-linux.h"
 
 #elif defined(VGP_mips32_linux)
+#  include "vki/vki-scnums-shared-linux.h"
+#  include "vki/vki-scnums-32bit-linux.h"
 #  include "vki/vki-scnums-mips32-linux.h"
 
 #elif defined(VGP_mips64_linux)
+#  include "vki/vki-scnums-shared-linux.h"
 #  include "vki/vki-scnums-mips64-linux.h"
 
 #elif defined(VGP_x86_darwin) || defined(VGP_amd64_darwin)
diff --git a/include/vki/vki-scnums-32bit-linux.h b/include/vki/vki-scnums-32bit-linux.h
new file mode 100644 (file)
index 0000000..f276dda
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+   This file is part of Valgrind, a dynamic binary instrumentation framework.
+
+   Copyright (C) 2019 Bart Van Assche <bvanassche@acm.org>
+
+   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 2 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/>.
+
+   The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __VKI_SCNUMS_32BIT_LINUX_H
+#define __VKI_SCNUMS_32BIT_LINUX_H
+
+// Derived from the __BITS_PER_LONG == 32 sections in
+// linux-5.2/include/uapi/asm-generic/unistd.h
+
+#define __NR_clock_gettime64   403
+#define __NR_clock_settime64   404
+#define __NR_clock_adjtime64   405
+#define __NR_clock_getres_time64       406
+#define __NR_clock_nanosleep_time64    407
+#define __NR_timer_gettime64   408
+#define __NR_timer_settime64   409
+#define __NR_timerfd_gettime64 410
+#define __NR_timerfd_settime64 411
+#define __NR_utimensat_time64  412
+#define __NR_pselect6_time64   413
+#define __NR_ppoll_time64      414
+#define __NR_io_pgetevents_time64      416
+#define __NR_recvmmsg_time64   417
+#define __NR_mq_timedsend_time64       418
+#define __NR_mq_timedreceive_time64    419
+#define __NR_semtimedop_time64 420
+#define __NR_rt_sigtimedwait_time64    421
+#define __NR_futex_time64      422
+#define __NR_sched_rr_get_interval_time64      423
+
+#endif
index ee6cccb51aeea474838e44bbec5c6a10924b3b81..65134734a52bd69badeea591a9dd3f253f249e1d 100644 (file)
@@ -30,7 +30,7 @@
 #ifndef __VKI_SCNUMS_AMD64_LINUX_H
 #define __VKI_SCNUMS_AMD64_LINUX_H
 
-// Derived from linux-2.6/arch/x86/entry/syscalls/syscall_64.tbl
+// Derived from linux-5.2/arch/x86/entry/syscalls/syscall_64.tbl
 
 #define __NR_read                                0
 #define __NR_write                               1
 #define __NR_pkey_alloc         330
 #define __NR_pkey_free          331
 #define __NR_statx              332
+#define __NR_io_pgetevents     333
+#define __NR_rseq              334
 
 #endif /* __VKI_SCNUMS_AMD64_LINUX_H */
 
diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h
new file mode 100644 (file)
index 0000000..6221d5a
--- /dev/null
@@ -0,0 +1,42 @@
+
+/* System call numbers for Linux that are shared across all architectures. */
+
+/*
+   This file is part of Valgrind, a dynamic binary instrumentation
+   framework.
+
+   Copyright (C) 2019 Bart Van Assche <bvanassche@acm.org>
+
+   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 2 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/>.
+
+   The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __VKI_SCNUMS_SHARED_LINUX_H
+#define __VKI_SCNUMS_SHARED_LINUX_H
+
+// Derived from linux-5.2/include/uapi/asm-generic/unistd.h
+
+#define __NR_pidfd_send_signal 424
+#define __NR_io_uring_setup    425
+#define __NR_io_uring_enter    426
+#define __NR_io_uring_register 427
+#define __NR_open_tree         428
+#define __NR_move_mount                429
+#define __NR_fsopen            430
+#define __NR_fsconfig          431
+#define __NR_fsmount           432
+#define __NR_fspick            433
+
+#endif
index 37683aa35b4e7d5b01a770f4b0aa0cb86e1b4ec0..5019321d3982e8eb41c616b538c65a571d0a61ff 100644 (file)
@@ -30,7 +30,7 @@
 #ifndef __VKI_SCNUMS_X86_LINUX_H
 #define __VKI_SCNUMS_X86_LINUX_H
 
-// Derived from linux-2.6/arch/x86/entry/syscalls/syscall_32.tbl
+// Derived from linux-5.2/arch/x86/entry/syscalls/syscall_32.tbl
 
 #define __NR_restart_syscall      0
 #define __NR_exit                1
 #define __NR_pkey_free          382
 #define __NR_statx              383
 #define __NR_arch_prctl         384
+#define __NR_io_pgetevents     385
+#define __NR_rseq              386
+#define __NR_semget            393
+#define __NR_semctl            394
+#define __NR_shmget            395
+#define __NR_shmctl            396
+#define __NR_shmat             397
+#define __NR_shmdt             398
+#define __NR_msgget            399
+#define __NR_msgsnd            400
+#define __NR_msgrcv            401
+#define __NR_msgctl            402
 
 #endif /* __VKI_SCNUMS_X86_LINUX_H */