From c3d80250170dec19bf61949c81233cede5ddaf61 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 31 Mar 2020 13:15:04 +0200 Subject: [PATCH] unix: update Dockerfile to Linux 5.6, and Go 1.13.9 We cannot update to Go 1.14 yet, since cgo code generation for certain types is broken due to golang/go#37621. Change-Id: I7b60d23ff4e79a7bb7fa4f0e0625893e4eff81f1 Reviewed-on: https://go-review.googlesource.com/c/sys/+/226577 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Matt Layher --- unix/linux/Dockerfile | 9 +++++---- unix/mkerrors.sh | 1 + unix/zerrors_linux.go | 21 ++++++++++++++++----- unix/zsysnum_linux_386.go | 2 ++ unix/zsysnum_linux_amd64.go | 2 ++ unix/zsysnum_linux_arm.go | 2 ++ unix/zsysnum_linux_arm64.go | 2 ++ unix/zsysnum_linux_mips.go | 2 ++ unix/zsysnum_linux_mips64.go | 2 ++ unix/zsysnum_linux_mips64le.go | 2 ++ unix/zsysnum_linux_mipsle.go | 2 ++ unix/zsysnum_linux_ppc64.go | 2 ++ unix/zsysnum_linux_ppc64le.go | 2 ++ unix/zsysnum_linux_riscv64.go | 2 ++ unix/zsysnum_linux_s390x.go | 2 ++ unix/zsysnum_linux_sparc64.go | 2 ++ unix/ztypes_linux.go | 5 +++-- unix/ztypes_linux_386.go | 1 + unix/ztypes_linux_amd64.go | 1 + unix/ztypes_linux_arm.go | 1 + unix/ztypes_linux_arm64.go | 1 + unix/ztypes_linux_mips.go | 1 + unix/ztypes_linux_mips64.go | 1 + unix/ztypes_linux_mips64le.go | 1 + unix/ztypes_linux_mipsle.go | 1 + unix/ztypes_linux_ppc64.go | 1 + unix/ztypes_linux_ppc64le.go | 1 + unix/ztypes_linux_riscv64.go | 1 + unix/ztypes_linux_s390x.go | 1 + unix/ztypes_linux_sparc64.go | 1 + 30 files changed, 64 insertions(+), 11 deletions(-) diff --git a/unix/linux/Dockerfile b/unix/linux/Dockerfile index 0e4a9309..d724d0d6 100644 --- a/unix/linux/Dockerfile +++ b/unix/linux/Dockerfile @@ -12,15 +12,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Get the git sources. If not cached, this takes O(5 minutes). WORKDIR /git RUN git config --global advice.detachedHead false -# Linux Kernel: Released 27 Jan 2020 -RUN git clone --branch v5.5 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux +# Linux Kernel: Released 29 Mar 2020 +RUN git clone --branch v5.6 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux # GNU C library: Released 01 Feb 2020 (we should try to get a secure way to clone this) RUN git clone --branch release/2.31/master --depth 1 git://sourceware.org/git/glibc.git # Get Go -ENV GOLANG_VERSION 1.13.7 +# TODO: update to Go 1.14 once there is a minor release with https://golang.org/issue/37622 fixed. +ENV GOLANG_VERSION 1.13.9 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz -ENV GOLANG_DOWNLOAD_SHA256 b3dd4bd781a0271b33168e627f7f43886b4c5d1c794a4015abf34e99c6526ca3 +ENV GOLANG_DOWNLOAD_SHA256 f4ad8180dd0aaf7d7cda7e2b0a2bf27e84131320896d376549a7d849ecf237d7 RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index 2979bc9a..ab09aafc 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh @@ -486,6 +486,7 @@ ccflags="$@" $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || $2 ~ /^MODULE_INIT_/ || $2 !~ "NLA_TYPE_MASK" && + $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || diff --git a/unix/zerrors_linux.go b/unix/zerrors_linux.go index 99a59d68..21973940 100644 --- a/unix/zerrors_linux.go +++ b/unix/zerrors_linux.go @@ -216,6 +216,7 @@ const ( BPF_F_RDONLY = 0x8 BPF_F_RDONLY_PROG = 0x80 BPF_F_RECOMPUTE_CSUM = 0x1 + BPF_F_REPLACE = 0x4 BPF_F_REUSE_STACKID = 0x400 BPF_F_SEQ_NUMBER = 0x8 BPF_F_SKIP_FIELD_MASK = 0xff @@ -389,6 +390,7 @@ const ( CLONE_NEWNET = 0x40000000 CLONE_NEWNS = 0x20000 CLONE_NEWPID = 0x20000000 + CLONE_NEWTIME = 0x80 CLONE_NEWUSER = 0x10000000 CLONE_NEWUTS = 0x4000000 CLONE_PARENT = 0x8000 @@ -737,6 +739,7 @@ const ( GENL_NAMSIZ = 0x10 GENL_START_ALLOC = 0x13 GENL_UNS_ADMIN_PERM = 0x10 + GRND_INSECURE = 0x4 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HDIO_DRIVE_CMD = 0x31f @@ -1487,6 +1490,7 @@ const ( PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb PR_GET_FP_MODE = 0x2e + PR_GET_IO_FLUSHER = 0x3a PR_GET_KEEPCAPS = 0x7 PR_GET_NAME = 0x10 PR_GET_NO_NEW_PRIVS = 0x27 @@ -1522,6 +1526,7 @@ const ( PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc PR_SET_FP_MODE = 0x2d + PR_SET_IO_FLUSHER = 0x39 PR_SET_KEEPCAPS = 0x8 PR_SET_MM = 0x23 PR_SET_MM_ARG_END = 0x9 @@ -1750,12 +1755,15 @@ const ( RTM_DELRULE = 0x21 RTM_DELTCLASS = 0x29 RTM_DELTFILTER = 0x2d + RTM_DELVLAN = 0x71 RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 + RTM_F_OFFLOAD = 0x4000 RTM_F_PREFIX = 0x800 + RTM_F_TRAP = 0x8000 RTM_GETACTION = 0x32 RTM_GETADDR = 0x16 RTM_GETADDRLABEL = 0x4a @@ -1777,7 +1785,8 @@ const ( RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e - RTM_MAX = 0x6f + RTM_GETVLAN = 0x72 + RTM_MAX = 0x73 RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 @@ -1792,6 +1801,7 @@ const ( RTM_NEWNETCONF = 0x50 RTM_NEWNEXTHOP = 0x68 RTM_NEWNSID = 0x58 + RTM_NEWNVLAN = 0x70 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 @@ -1799,8 +1809,8 @@ const ( RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c - RTM_NR_FAMILIES = 0x18 - RTM_NR_MSGTYPES = 0x60 + RTM_NR_FAMILIES = 0x19 + RTM_NR_MSGTYPES = 0x64 RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 @@ -2090,7 +2100,7 @@ const ( TASKSTATS_GENL_NAME = "TASKSTATS" TASKSTATS_GENL_VERSION = 0x1 TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x9 + TASKSTATS_VERSION = 0xa TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 @@ -2271,7 +2281,7 @@ const ( VMADDR_CID_ANY = 0xffffffff VMADDR_CID_HOST = 0x2 VMADDR_CID_HYPERVISOR = 0x0 - VMADDR_CID_RESERVED = 0x1 + VMADDR_CID_LOCAL = 0x1 VMADDR_PORT_ANY = 0xffffffff VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 @@ -2398,6 +2408,7 @@ const ( XENFS_SUPER_MAGIC = 0xabba1974 XFS_SUPER_MAGIC = 0x58465342 Z3FOLD_MAGIC = 0x33 + ZONEFS_MAGIC = 0x5a4f4653 ZSMALLOC_MAGIC = 0x58295829 ) diff --git a/unix/zsysnum_linux_386.go b/unix/zsysnum_linux_386.go index 7aae554f..54559a89 100644 --- a/unix/zsysnum_linux_386.go +++ b/unix/zsysnum_linux_386.go @@ -431,4 +431,6 @@ const ( SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/zsysnum_linux_amd64.go b/unix/zsysnum_linux_amd64.go index 7968439a..054a741b 100644 --- a/unix/zsysnum_linux_amd64.go +++ b/unix/zsysnum_linux_amd64.go @@ -353,4 +353,6 @@ const ( SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/zsysnum_linux_arm.go b/unix/zsysnum_linux_arm.go index 3c663c69..307f2ba1 100644 --- a/unix/zsysnum_linux_arm.go +++ b/unix/zsysnum_linux_arm.go @@ -395,4 +395,6 @@ const ( SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/zsysnum_linux_arm64.go b/unix/zsysnum_linux_arm64.go index 1f3b4d15..e9404dd5 100644 --- a/unix/zsysnum_linux_arm64.go +++ b/unix/zsysnum_linux_arm64.go @@ -298,4 +298,6 @@ const ( SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/zsysnum_linux_mips.go b/unix/zsysnum_linux_mips.go index 00da3de9..68bb6d29 100644 --- a/unix/zsysnum_linux_mips.go +++ b/unix/zsysnum_linux_mips.go @@ -416,4 +416,6 @@ const ( SYS_FSPICK = 4433 SYS_PIDFD_OPEN = 4434 SYS_CLONE3 = 4435 + SYS_OPENAT2 = 4437 + SYS_PIDFD_GETFD = 4438 ) diff --git a/unix/zsysnum_linux_mips64.go b/unix/zsysnum_linux_mips64.go index d404fbd4..4e525118 100644 --- a/unix/zsysnum_linux_mips64.go +++ b/unix/zsysnum_linux_mips64.go @@ -346,4 +346,6 @@ const ( SYS_FSPICK = 5433 SYS_PIDFD_OPEN = 5434 SYS_CLONE3 = 5435 + SYS_OPENAT2 = 5437 + SYS_PIDFD_GETFD = 5438 ) diff --git a/unix/zsysnum_linux_mips64le.go b/unix/zsysnum_linux_mips64le.go index bfbf242f..4d9aa300 100644 --- a/unix/zsysnum_linux_mips64le.go +++ b/unix/zsysnum_linux_mips64le.go @@ -346,4 +346,6 @@ const ( SYS_FSPICK = 5433 SYS_PIDFD_OPEN = 5434 SYS_CLONE3 = 5435 + SYS_OPENAT2 = 5437 + SYS_PIDFD_GETFD = 5438 ) diff --git a/unix/zsysnum_linux_mipsle.go b/unix/zsysnum_linux_mipsle.go index 3826f497..64af0707 100644 --- a/unix/zsysnum_linux_mipsle.go +++ b/unix/zsysnum_linux_mipsle.go @@ -416,4 +416,6 @@ const ( SYS_FSPICK = 4433 SYS_PIDFD_OPEN = 4434 SYS_CLONE3 = 4435 + SYS_OPENAT2 = 4437 + SYS_PIDFD_GETFD = 4438 ) diff --git a/unix/zsysnum_linux_ppc64.go b/unix/zsysnum_linux_ppc64.go index 52e3da64..cc3c067b 100644 --- a/unix/zsysnum_linux_ppc64.go +++ b/unix/zsysnum_linux_ppc64.go @@ -395,4 +395,6 @@ const ( SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/zsysnum_linux_ppc64le.go b/unix/zsysnum_linux_ppc64le.go index 6141f90a..4050ff98 100644 --- a/unix/zsysnum_linux_ppc64le.go +++ b/unix/zsysnum_linux_ppc64le.go @@ -395,4 +395,6 @@ const ( SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/zsysnum_linux_riscv64.go b/unix/zsysnum_linux_riscv64.go index 4f7261a8..529abb6a 100644 --- a/unix/zsysnum_linux_riscv64.go +++ b/unix/zsysnum_linux_riscv64.go @@ -297,4 +297,6 @@ const ( SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/zsysnum_linux_s390x.go b/unix/zsysnum_linux_s390x.go index f47014ac..27665001 100644 --- a/unix/zsysnum_linux_s390x.go +++ b/unix/zsysnum_linux_s390x.go @@ -360,4 +360,6 @@ const ( SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/zsysnum_linux_sparc64.go b/unix/zsysnum_linux_sparc64.go index dd78abb0..4dc82bb2 100644 --- a/unix/zsysnum_linux_sparc64.go +++ b/unix/zsysnum_linux_sparc64.go @@ -374,4 +374,6 @@ const ( SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 + SYS_OPENAT2 = 437 + SYS_PIDFD_GETFD = 438 ) diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go index a8d0eac8..9c43c26f 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go @@ -114,7 +114,8 @@ type FscryptKeySpecifier struct { type FscryptAddKeyArg struct { Key_spec FscryptKeySpecifier Raw_size uint32 - _ [9]uint32 + Key_id uint32 + _ [8]uint32 } type FscryptRemoveKeyArg struct { @@ -479,7 +480,7 @@ const ( IFLA_NEW_IFINDEX = 0x31 IFLA_MIN_MTU = 0x32 IFLA_MAX_MTU = 0x33 - IFLA_MAX = 0x35 + IFLA_MAX = 0x36 IFLA_INFO_KIND = 0x1 IFLA_INFO_DATA = 0x2 IFLA_INFO_XSTATS = 0x3 diff --git a/unix/ztypes_linux_386.go b/unix/ztypes_linux_386.go index fc6b3fb5..761b67c8 100644 --- a/unix/ztypes_linux_386.go +++ b/unix/ztypes_linux_386.go @@ -287,6 +287,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint32 diff --git a/unix/ztypes_linux_amd64.go b/unix/ztypes_linux_amd64.go index 26c30b84..201fb348 100644 --- a/unix/ztypes_linux_amd64.go +++ b/unix/ztypes_linux_amd64.go @@ -298,6 +298,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64 diff --git a/unix/ztypes_linux_arm.go b/unix/ztypes_linux_arm.go index 814d42d5..8051b561 100644 --- a/unix/ztypes_linux_arm.go +++ b/unix/ztypes_linux_arm.go @@ -276,6 +276,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint32 diff --git a/unix/ztypes_linux_arm64.go b/unix/ztypes_linux_arm64.go index d9664c71..a936f216 100644 --- a/unix/ztypes_linux_arm64.go +++ b/unix/ztypes_linux_arm64.go @@ -277,6 +277,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64 diff --git a/unix/ztypes_linux_mips.go b/unix/ztypes_linux_mips.go index 0d721454..aaca03dd 100644 --- a/unix/ztypes_linux_mips.go +++ b/unix/ztypes_linux_mips.go @@ -281,6 +281,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint32 diff --git a/unix/ztypes_linux_mips64.go b/unix/ztypes_linux_mips64.go index ef697684..2e7f3b8c 100644 --- a/unix/ztypes_linux_mips64.go +++ b/unix/ztypes_linux_mips64.go @@ -280,6 +280,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64 diff --git a/unix/ztypes_linux_mips64le.go b/unix/ztypes_linux_mips64le.go index 485fda70..16add5a2 100644 --- a/unix/ztypes_linux_mips64le.go +++ b/unix/ztypes_linux_mips64le.go @@ -280,6 +280,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64 diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go index 569477ee..4ed2c8e5 100644 --- a/unix/ztypes_linux_mipsle.go +++ b/unix/ztypes_linux_mipsle.go @@ -281,6 +281,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint32 diff --git a/unix/ztypes_linux_ppc64.go b/unix/ztypes_linux_ppc64.go index 602d8b4e..74151909 100644 --- a/unix/ztypes_linux_ppc64.go +++ b/unix/ztypes_linux_ppc64.go @@ -287,6 +287,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64 diff --git a/unix/ztypes_linux_ppc64le.go b/unix/ztypes_linux_ppc64le.go index 6db9a7b7..046c2deb 100644 --- a/unix/ztypes_linux_ppc64le.go +++ b/unix/ztypes_linux_ppc64le.go @@ -287,6 +287,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64 diff --git a/unix/ztypes_linux_riscv64.go b/unix/ztypes_linux_riscv64.go index 52b5348c..0f2f61a6 100644 --- a/unix/ztypes_linux_riscv64.go +++ b/unix/ztypes_linux_riscv64.go @@ -305,6 +305,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64 diff --git a/unix/ztypes_linux_s390x.go b/unix/ztypes_linux_s390x.go index a111387b..cca1b6be 100644 --- a/unix/ztypes_linux_s390x.go +++ b/unix/ztypes_linux_s390x.go @@ -300,6 +300,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64 diff --git a/unix/ztypes_linux_sparc64.go b/unix/ztypes_linux_sparc64.go index 8153af18..33a73bf1 100644 --- a/unix/ztypes_linux_sparc64.go +++ b/unix/ztypes_linux_sparc64.go @@ -282,6 +282,7 @@ type Taskstats struct { Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 + Ac_btime64 uint64 } type cpuMask uint64