diff --git a/lib/libc/include/arm64-linux-any/asm/auxvec.h b/lib/libc/include/aarch64-linux-any/asm/auxvec.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/auxvec.h rename to lib/libc/include/aarch64-linux-any/asm/auxvec.h diff --git a/lib/libc/include/arm64-linux-any/asm/bitsperlong.h b/lib/libc/include/aarch64-linux-any/asm/bitsperlong.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/bitsperlong.h rename to lib/libc/include/aarch64-linux-any/asm/bitsperlong.h diff --git a/lib/libc/include/arm64-linux-any/asm/bpf_perf_event.h b/lib/libc/include/aarch64-linux-any/asm/bpf_perf_event.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/bpf_perf_event.h rename to lib/libc/include/aarch64-linux-any/asm/bpf_perf_event.h diff --git a/lib/libc/include/arm64-linux-any/asm/byteorder.h b/lib/libc/include/aarch64-linux-any/asm/byteorder.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/byteorder.h rename to lib/libc/include/aarch64-linux-any/asm/byteorder.h diff --git a/lib/libc/include/arm64-linux-any/asm/fcntl.h b/lib/libc/include/aarch64-linux-any/asm/fcntl.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/fcntl.h rename to lib/libc/include/aarch64-linux-any/asm/fcntl.h diff --git a/lib/libc/include/arm64-linux-any/asm/hwcap.h b/lib/libc/include/aarch64-linux-any/asm/hwcap.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/hwcap.h rename to lib/libc/include/aarch64-linux-any/asm/hwcap.h diff --git a/lib/libc/include/arm64-linux-any/asm/kvm.h b/lib/libc/include/aarch64-linux-any/asm/kvm.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/kvm.h rename to lib/libc/include/aarch64-linux-any/asm/kvm.h diff --git a/lib/libc/include/arm64-linux-any/asm/mman.h b/lib/libc/include/aarch64-linux-any/asm/mman.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/mman.h rename to lib/libc/include/aarch64-linux-any/asm/mman.h diff --git a/lib/libc/include/arm64-linux-any/asm/param.h b/lib/libc/include/aarch64-linux-any/asm/param.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/param.h rename to lib/libc/include/aarch64-linux-any/asm/param.h diff --git a/lib/libc/include/arm64-linux-any/asm/perf_regs.h b/lib/libc/include/aarch64-linux-any/asm/perf_regs.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/perf_regs.h rename to lib/libc/include/aarch64-linux-any/asm/perf_regs.h diff --git a/lib/libc/include/arm64-linux-any/asm/posix_types.h b/lib/libc/include/aarch64-linux-any/asm/posix_types.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/posix_types.h rename to lib/libc/include/aarch64-linux-any/asm/posix_types.h diff --git a/lib/libc/include/arm64-linux-any/asm/ptrace.h b/lib/libc/include/aarch64-linux-any/asm/ptrace.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/ptrace.h rename to lib/libc/include/aarch64-linux-any/asm/ptrace.h diff --git a/lib/libc/include/arm64-linux-any/asm/setup.h b/lib/libc/include/aarch64-linux-any/asm/setup.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/setup.h rename to lib/libc/include/aarch64-linux-any/asm/setup.h diff --git a/lib/libc/include/arm64-linux-any/asm/sigcontext.h b/lib/libc/include/aarch64-linux-any/asm/sigcontext.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/sigcontext.h rename to lib/libc/include/aarch64-linux-any/asm/sigcontext.h diff --git a/lib/libc/include/arm64-linux-any/asm/signal.h b/lib/libc/include/aarch64-linux-any/asm/signal.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/signal.h rename to lib/libc/include/aarch64-linux-any/asm/signal.h diff --git a/lib/libc/include/arm64-linux-any/asm/statfs.h b/lib/libc/include/aarch64-linux-any/asm/statfs.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/statfs.h rename to lib/libc/include/aarch64-linux-any/asm/statfs.h diff --git a/lib/libc/include/arm64-linux-any/asm/sve_context.h b/lib/libc/include/aarch64-linux-any/asm/sve_context.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/sve_context.h rename to lib/libc/include/aarch64-linux-any/asm/sve_context.h diff --git a/lib/libc/include/arm64-linux-any/asm/ucontext.h b/lib/libc/include/aarch64-linux-any/asm/ucontext.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/ucontext.h rename to lib/libc/include/aarch64-linux-any/asm/ucontext.h diff --git a/lib/libc/include/arm64-linux-any/asm/unistd.h b/lib/libc/include/aarch64-linux-any/asm/unistd.h similarity index 100% rename from lib/libc/include/arm64-linux-any/asm/unistd.h rename to lib/libc/include/aarch64-linux-any/asm/unistd.h diff --git a/lib/libc/include/any-linux-any/asm-generic/poll.h b/lib/libc/include/any-linux-any/asm-generic/poll.h index 5a056d94fb..e46fb2b83e 100644 --- a/lib/libc/include/any-linux-any/asm-generic/poll.h +++ b/lib/libc/include/any-linux-any/asm-generic/poll.h @@ -29,7 +29,7 @@ #define POLLRDHUP 0x2000 #endif -#define POLLFREE (__poll_t)0x4000 /* currently only for epoll */ +#define POLLFREE (__poll_t)0x4000 #define POLL_BUSY_LOOP (__poll_t)0x8000 diff --git a/lib/libc/include/any-linux-any/drm/virtgpu_drm.h b/lib/libc/include/any-linux-any/drm/virtgpu_drm.h index dbfc2d8e8f..3e6c78ce82 100644 --- a/lib/libc/include/any-linux-any/drm/virtgpu_drm.h +++ b/lib/libc/include/any-linux-any/drm/virtgpu_drm.h @@ -196,6 +196,13 @@ struct drm_virtgpu_context_init { __u64 ctx_set_params; }; +/* + * Event code that's given when VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK is in + * effect. The event size is sizeof(drm_event), since there is no additional + * payload. + */ +#define VIRTGPU_EVENT_FENCE_SIGNALED 0x90000000 + #define DRM_IOCTL_VIRTGPU_MAP \ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map) diff --git a/lib/libc/include/any-linux-any/linux/byteorder/big_endian.h b/lib/libc/include/any-linux-any/linux/byteorder/big_endian.h index 5a2871c649..66d4f0c344 100644 --- a/lib/libc/include/any-linux-any/linux/byteorder/big_endian.h +++ b/lib/libc/include/any-linux-any/linux/byteorder/big_endian.h @@ -9,6 +9,7 @@ #define __BIG_ENDIAN_BITFIELD #endif +#include #include #include diff --git a/lib/libc/include/any-linux-any/linux/byteorder/little_endian.h b/lib/libc/include/any-linux-any/linux/byteorder/little_endian.h index 981bfec681..5959febbc5 100644 --- a/lib/libc/include/any-linux-any/linux/byteorder/little_endian.h +++ b/lib/libc/include/any-linux-any/linux/byteorder/little_endian.h @@ -9,6 +9,7 @@ #define __LITTLE_ENDIAN_BITFIELD #endif +#include #include #include diff --git a/lib/libc/include/any-linux-any/linux/if_ether.h b/lib/libc/include/any-linux-any/linux/if_ether.h index d7069f0e5e..53b8462712 100644 --- a/lib/libc/include/any-linux-any/linux/if_ether.h +++ b/lib/libc/include/any-linux-any/linux/if_ether.h @@ -117,7 +117,7 @@ #define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */ #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is less than this value +#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is more than this value * then the frame is Ethernet II. Else it is 802.3 */ /* diff --git a/lib/libc/include/any-linux-any/linux/mptcp.h b/lib/libc/include/any-linux-any/linux/mptcp.h index d58014aa18..d146c9a3e9 100644 --- a/lib/libc/include/any-linux-any/linux/mptcp.h +++ b/lib/libc/include/any-linux-any/linux/mptcp.h @@ -134,19 +134,21 @@ struct mptcp_info { * MPTCP_EVENT_REMOVED: token, rem_id * An address has been lost by the peer. * - * MPTCP_EVENT_SUB_ESTABLISHED: token, family, saddr4 | saddr6, - * daddr4 | daddr6, sport, dport, backup, - * if_idx [, error] + * MPTCP_EVENT_SUB_ESTABLISHED: token, family, loc_id, rem_id, + * saddr4 | saddr6, daddr4 | daddr6, sport, + * dport, backup, if_idx [, error] * A new subflow has been established. 'error' should not be set. * - * MPTCP_EVENT_SUB_CLOSED: token, family, saddr4 | saddr6, daddr4 | daddr6, - * sport, dport, backup, if_idx [, error] + * MPTCP_EVENT_SUB_CLOSED: token, family, loc_id, rem_id, saddr4 | saddr6, + * daddr4 | daddr6, sport, dport, backup, if_idx + * [, error] * A subflow has been closed. An error (copy of sk_err) could be set if an * error has been detected for this subflow. * - * MPTCP_EVENT_SUB_PRIORITY: token, family, saddr4 | saddr6, daddr4 | daddr6, - * sport, dport, backup, if_idx [, error] - * The priority of a subflow has changed. 'error' should not be set. + * MPTCP_EVENT_SUB_PRIORITY: token, family, loc_id, rem_id, saddr4 | saddr6, + * daddr4 | daddr6, sport, dport, backup, if_idx + * [, error] + * The priority of a subflow has changed. 'error' should not be set. */ enum mptcp_event_type { MPTCP_EVENT_UNSPEC = 0, diff --git a/lib/libc/include/any-linux-any/linux/nfc.h b/lib/libc/include/any-linux-any/linux/nfc.h index 2ed487942c..15dee8a25a 100644 --- a/lib/libc/include/any-linux-any/linux/nfc.h +++ b/lib/libc/include/any-linux-any/linux/nfc.h @@ -263,7 +263,7 @@ enum nfc_sdp_attr { #define NFC_SE_ENABLED 0x1 struct sockaddr_nfc { - sa_family_t sa_family; + __kernel_sa_family_t sa_family; __u32 dev_idx; __u32 target_idx; __u32 nfc_protocol; @@ -271,14 +271,14 @@ struct sockaddr_nfc { #define NFC_LLCP_MAX_SERVICE_NAME 63 struct sockaddr_nfc_llcp { - sa_family_t sa_family; + __kernel_sa_family_t sa_family; __u32 dev_idx; __u32 target_idx; __u32 nfc_protocol; __u8 dsap; /* Destination SAP, if known */ __u8 ssap; /* Source SAP to be bound to */ char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */; - size_t service_name_len; + __kernel_size_t service_name_len; }; /* NFC socket protocols */ diff --git a/lib/libc/include/any-linux-any/linux/resource.h b/lib/libc/include/any-linux-any/linux/resource.h index fa597fbb25..99d1815c09 100644 --- a/lib/libc/include/any-linux-any/linux/resource.h +++ b/lib/libc/include/any-linux-any/linux/resource.h @@ -66,10 +66,17 @@ struct rlimit64 { #define _STK_LIM (8*1024*1024) /* - * GPG2 wants 64kB of mlocked memory, to make sure pass phrases - * and other sensitive information are never written to disk. + * Limit the amount of locked memory by some sane default: + * root can always increase this limit if needed. + * + * The main use-cases are (1) preventing sensitive memory + * from being swapped; (2) real-time operations; (3) via + * IOURING_REGISTER_BUFFERS. + * + * The first two don't need much. The latter will take as + * much as it can get. 8MB is a reasonably sane default. */ -#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) +#define MLOCK_LIMIT (8*1024*1024) /* * Due to binary compatibility, the actual resource numbers diff --git a/lib/libc/include/any-linux-any/linux/version.h b/lib/libc/include/any-linux-any/linux/version.h index 43e0b8295b..118d1d84fc 100644 --- a/lib/libc/include/any-linux-any/linux/version.h +++ b/lib/libc/include/any-linux-any/linux/version.h @@ -1,5 +1,5 @@ -#define LINUX_VERSION_CODE 331776 +#define LINUX_VERSION_CODE 331778 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) #define LINUX_VERSION_MAJOR 5 #define LINUX_VERSION_PATCHLEVEL 16 -#define LINUX_VERSION_SUBLEVEL 0 \ No newline at end of file +#define LINUX_VERSION_SUBLEVEL 2 \ No newline at end of file diff --git a/tools/update-linux-headers.zig b/tools/update-linux-headers.zig index 0a3fb85f71..48fdfbbb34 100644 --- a/tools/update-linux-headers.zig +++ b/tools/update-linux-headers.zig @@ -55,7 +55,7 @@ const linux_targets = [_]LibCTarget{ }, LibCTarget{ .name = "arm64", - .arch = .arm64, + .arch = .{ .specific = .aarch64 }, }, LibCTarget{ .name = "csky",