From f836c8edde35ccaa19dbb7a9b33beca7fe46fc10 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Tue, 23 Jun 2020 18:05:40 +0100 Subject: [PATCH] Update x86 and x86_64 syscalls to Linux v5.6-rc5, avoiding duplicates. There were some duplicate enum values for x86 which caused build failure. Updating the names to match the Linux table fixes this. Also updated awk command in comment to produce matching output. BUG=None TEST=cd syscall_defines; cargo build && cargo build --target i686-unknown-linux-gnu Change-Id: I99032352332281566f8e8322fadec73ca916d31d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2260597 Reviewed-by: Dylan Reid Reviewed-by: Daniel Verkamp Auto-Submit: Andrew Walbran Tested-by: Daniel Verkamp Commit-Queue: Andrew Walbran --- syscall_defines/src/linux-x86/mod.rs | 45 ++++++++++++------------- syscall_defines/src/linux-x86_64/mod.rs | 4 ++- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/syscall_defines/src/linux-x86/mod.rs b/syscall_defines/src/linux-x86/mod.rs index 161861eb4d..4a02899b5d 100644 --- a/syscall_defines/src/linux-x86/mod.rs +++ b/syscall_defines/src/linux-x86/mod.rs @@ -3,7 +3,7 @@ // found in the LICENSE file. // Generated with: cat arch/x86/entry/syscalls/syscall_32.tbl | -// awk ' { print "SYS_" $3 " = " $1"," } ' +// awk ' { if ($1 != "#" && $1 != "") print " SYS_" $3 " = " $1"," } ' #[allow(dead_code)] #[allow(non_camel_case_types)] pub enum LinuxSyscall { @@ -289,7 +289,6 @@ pub enum LinuxSyscall { SYS_mq_getsetattr = 282, SYS_kexec_load = 283, SYS_waitid = 284, - SYS_sys_setaltroot = 285, SYS_add_key = 286, SYS_request_key = 287, SYS_keyctl = 288, @@ -389,7 +388,7 @@ pub enum LinuxSyscall { SYS_pkey_free = 382, SYS_statx = 383, SYS_arch_prctl = 384, - SYS_io_pgetevents_time32 = 385, + SYS_io_pgetevents = 385, SYS_rseq = 386, SYS_semget = 393, SYS_semctl = 394, @@ -401,26 +400,26 @@ pub enum LinuxSyscall { SYS_msgsnd = 400, SYS_msgrcv = 401, SYS_msgctl = 402, - SYS_clock_gettime = 403, - SYS_clock_settime = 404, - SYS_clock_adjtime = 405, - SYS_clock_getres = 406, - SYS_clock_nanosleep = 407, - SYS_timer_gettime = 408, - SYS_timer_settime = 409, - SYS_timerfd_gettime = 410, - SYS_timerfd_settime = 411, - SYS_utimensat = 412, - SYS_pselect6 = 413, - SYS_ppoll = 414, - SYS_io_pgetevents = 416, - SYS_recvmmsg = 417, - SYS_mq_timedsend = 418, - SYS_mq_timedreceive = 419, - SYS_semtimedop = 420, - SYS_rt_sigtimedwait = 421, - SYS_futex = 422, - SYS_sched_rr_get_interval = 423, + SYS_clock_gettime64 = 403, + SYS_clock_settime64 = 404, + SYS_clock_adjtime64 = 405, + SYS_clock_getres_time64 = 406, + SYS_clock_nanosleep_time64 = 407, + SYS_timer_gettime64 = 408, + SYS_timer_settime64 = 409, + SYS_timerfd_gettime64 = 410, + SYS_timerfd_settime64 = 411, + SYS_utimensat_time64 = 412, + SYS_pselect6_time64 = 413, + SYS_ppoll_time64 = 414, + SYS_io_pgetevents_time64 = 416, + SYS_recvmmsg_time64 = 417, + SYS_mq_timedsend_time64 = 418, + SYS_mq_timedreceive_time64 = 419, + SYS_semtimedop_time64 = 420, + SYS_rt_sigtimedwait_time64 = 421, + SYS_futex_time64 = 422, + SYS_sched_rr_get_interval_time64 = 423, SYS_pidfd_send_signal = 424, SYS_io_uring_setup = 425, SYS_io_uring_enter = 426, diff --git a/syscall_defines/src/linux-x86_64/mod.rs b/syscall_defines/src/linux-x86_64/mod.rs index e7ac194df4..11d73540a8 100644 --- a/syscall_defines/src/linux-x86_64/mod.rs +++ b/syscall_defines/src/linux-x86_64/mod.rs @@ -3,7 +3,7 @@ // found in the LICENSE file. // Generated with: cat arch/x86/entry/syscalls/syscall_64.tbl | -// awk ' { print "SYS_" $3 " = " $1"," } ' +// awk ' { if ($1 != "#" && $1 != "") print " " ($2 == "x32" ? "compat_" : "") "SYS_" $3 " = " $1"," } ' #[allow(dead_code)] #[allow(non_camel_case_types)] pub enum LinuxSyscall { @@ -390,4 +390,6 @@ pub enum LinuxSyscall { compat_SYS_io_setup = 543, compat_SYS_io_submit = 544, compat_SYS_execveat = 545, + compat_SYS_preadv2 = 546, + compat_SYS_pwritev2 = 547, }