Skip to content

Commit

Permalink
unix/linux: update to Linux kernel 6.2, glibc 2.37 and Go 1.20.1
Browse files Browse the repository at this point in the history
Also remove some manually defined AT_* contstants which are now defined
in the libc headers.

Change-Id: I342976a22948e9b05e38dc7503d9dd356cee6c7b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/470176
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
  • Loading branch information
tklauser authored and gopherbot committed Feb 23, 2023
1 parent cc0b67d commit 972870e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 36 deletions.
12 changes: 6 additions & 6 deletions unix/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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 11 Dec 2022
RUN git clone --branch v6.1 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
# GNU C library: Released 30 Jul 2022
RUN git clone --branch release/2.36/master --depth 1 https://sourceware.org/git/glibc.git
# Linux Kernel: Released 19 Feb 2023
RUN git clone --branch v6.2 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
# GNU C library: Released 1 Feb 2022
RUN git clone --branch release/2.37/master --depth 1 https://sourceware.org/git/glibc.git

# Get Go
ENV GOLANG_VERSION 1.20rc2
ENV GOLANG_VERSION 1.20.1
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_SHA256 9ba01a3be1a682b89f5bfc62f9fba0e7d6990a5b7018f6c7aaa56ad65ed96a0e
ENV GOLANG_DOWNLOAD_SHA256 000a5b1fca4f75895f78befeb2eecf10bfff3c428597f3f1e69133b63b911b02

RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
Expand Down
30 changes: 11 additions & 19 deletions unix/linux/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,25 +192,6 @@ typedef struct {
typedef struct stat my_stat;
#endif
// These are defined in linux/fcntl.h, but including it globally causes
// conflicts with fcntl.h
#ifndef AT_STATX_SYNC_TYPE
# define AT_STATX_SYNC_TYPE 0x6000 // Type of synchronisation required from statx()
#endif
#ifndef AT_STATX_SYNC_AS_STAT
# define AT_STATX_SYNC_AS_STAT 0x0000 // - Do whatever stat() does
#endif
#ifndef AT_STATX_FORCE_SYNC
# define AT_STATX_FORCE_SYNC 0x2000 // - Force the attributes to be sync'd with the server
#endif
#ifndef AT_STATX_DONT_SYNC
# define AT_STATX_DONT_SYNC 0x4000 // - Don't sync attributes with the server
#endif
#ifndef AT_EACCESS
# define AT_EACCESS 0x200 // Test access permitted for effective IDs, not real IDs.
#endif
#ifdef TCSETS2
// On systems that have "struct termios2" use this as type Termios.
typedef struct termios2 termios_t;
Expand Down Expand Up @@ -1963,6 +1944,10 @@ const (
NFT_MSG_GETOBJ = C.NFT_MSG_GETOBJ
NFT_MSG_DELOBJ = C.NFT_MSG_DELOBJ
NFT_MSG_GETOBJ_RESET = C.NFT_MSG_GETOBJ_RESET
NFT_MSG_NEWFLOWTABLE = C.NFT_MSG_NEWFLOWTABLE
NFT_MSG_GETFLOWTABLE = C.NFT_MSG_GETFLOWTABLE
NFT_MSG_DELFLOWTABLE = C.NFT_MSG_DELFLOWTABLE
NFT_MSG_GETRULE_RESET = C.NFT_MSG_GETRULE_RESET
NFT_MSG_MAX = C.NFT_MSG_MAX
NFTA_LIST_UNSPEC = C.NFTA_LIST_UNSPEC
NFTA_LIST_ELEM = C.NFTA_LIST_ELEM
Expand Down Expand Up @@ -2446,6 +2431,8 @@ const (
SOF_TIMESTAMPING_OPT_STATS = C.SOF_TIMESTAMPING_OPT_STATS
SOF_TIMESTAMPING_OPT_PKTINFO = C.SOF_TIMESTAMPING_OPT_PKTINFO
SOF_TIMESTAMPING_OPT_TX_SWHW = C.SOF_TIMESTAMPING_OPT_TX_SWHW
SOF_TIMESTAMPING_BIND_PHC = C.SOF_TIMESTAMPING_BIND_PHC
SOF_TIMESTAMPING_OPT_ID_TCP = C.SOF_TIMESTAMPING_OPT_ID_TCP

SOF_TIMESTAMPING_LAST = C.SOF_TIMESTAMPING_LAST
SOF_TIMESTAMPING_MASK = C.SOF_TIMESTAMPING_MASK
Expand Down Expand Up @@ -3285,6 +3272,7 @@ const (
DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR = C.DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR
DEVLINK_PORT_FN_ATTR_STATE = C.DEVLINK_PORT_FN_ATTR_STATE
DEVLINK_PORT_FN_ATTR_OPSTATE = C.DEVLINK_PORT_FN_ATTR_OPSTATE
DEVLINK_PORT_FN_ATTR_CAPS = C.DEVLINK_PORT_FN_ATTR_CAPS
DEVLINK_PORT_FUNCTION_ATTR_MAX = C.DEVLINK_PORT_FUNCTION_ATTR_MAX
)

Expand Down Expand Up @@ -3564,6 +3552,7 @@ const (
ETHTOOL_MSG_MODULE_SET = C.ETHTOOL_MSG_MODULE_SET
ETHTOOL_MSG_PSE_GET = C.ETHTOOL_MSG_PSE_GET
ETHTOOL_MSG_PSE_SET = C.ETHTOOL_MSG_PSE_SET
ETHTOOL_MSG_RSS_GET = C.ETHTOOL_MSG_RSS_GET
ETHTOOL_MSG_USER_MAX = C.ETHTOOL_MSG_USER_MAX
ETHTOOL_MSG_KERNEL_NONE = C.ETHTOOL_MSG_KERNEL_NONE
ETHTOOL_MSG_STRSET_GET_REPLY = C.ETHTOOL_MSG_STRSET_GET_REPLY
Expand Down Expand Up @@ -3603,6 +3592,7 @@ const (
ETHTOOL_MSG_MODULE_GET_REPLY = C.ETHTOOL_MSG_MODULE_GET_REPLY
ETHTOOL_MSG_MODULE_NTF = C.ETHTOOL_MSG_MODULE_NTF
ETHTOOL_MSG_PSE_GET_REPLY = C.ETHTOOL_MSG_PSE_GET_REPLY
ETHTOOL_MSG_RSS_GET_REPLY = C.ETHTOOL_MSG_RSS_GET_REPLY
ETHTOOL_MSG_KERNEL_MAX = C.ETHTOOL_MSG_KERNEL_MAX
ETHTOOL_A_HEADER_UNSPEC = C.ETHTOOL_A_HEADER_UNSPEC
ETHTOOL_A_HEADER_DEV_INDEX = C.ETHTOOL_A_HEADER_DEV_INDEX
Expand Down Expand Up @@ -3671,6 +3661,7 @@ const (
ETHTOOL_A_LINKSTATE_SQI_MAX = C.ETHTOOL_A_LINKSTATE_SQI_MAX
ETHTOOL_A_LINKSTATE_EXT_STATE = C.ETHTOOL_A_LINKSTATE_EXT_STATE
ETHTOOL_A_LINKSTATE_EXT_SUBSTATE = C.ETHTOOL_A_LINKSTATE_EXT_SUBSTATE
ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT = C.ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT
ETHTOOL_A_LINKSTATE_MAX = C.ETHTOOL_A_LINKSTATE_MAX
ETHTOOL_A_DEBUG_UNSPEC = C.ETHTOOL_A_DEBUG_UNSPEC
ETHTOOL_A_DEBUG_HEADER = C.ETHTOOL_A_DEBUG_HEADER
Expand Down Expand Up @@ -4464,6 +4455,7 @@ const (
NL80211_ATTR_SUPPORT_MESH_AUTH = C.NL80211_ATTR_SUPPORT_MESH_AUTH
NL80211_ATTR_SURVEY_INFO = C.NL80211_ATTR_SURVEY_INFO
NL80211_ATTR_SURVEY_RADIO_STATS = C.NL80211_ATTR_SURVEY_RADIO_STATS
NL80211_ATTR_TD_BITMAP = C.NL80211_ATTR_TD_BITMAP
NL80211_ATTR_TDLS_ACTION = C.NL80211_ATTR_TDLS_ACTION
NL80211_ATTR_TDLS_DIALOG_TOKEN = C.NL80211_ATTR_TDLS_DIALOG_TOKEN
NL80211_ATTR_TDLS_EXTERNAL_SETUP = C.NL80211_ATTR_TDLS_EXTERNAL_SETUP
Expand Down
10 changes: 8 additions & 2 deletions unix/zerrors_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 20 additions & 9 deletions unix/ztypes_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 972870e

Please sign in to comment.