From 5d3679612fa6398ba5231f659438cfd72cd55adc Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Wed, 25 May 2022 13:36:15 -0700 Subject: [PATCH] Update to v5.18 kernel headers. Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-5.18 Test: Builds. Test: All bionic unit tests pass on a coral device. Change-Id: I5700813eec0fb0db55bee4d75b129400b7a239bd --- libc/include/elf.h | 2 - libc/kernel/uapi/asm-arm/asm/signal.h | 2 +- libc/kernel/uapi/asm-arm64/asm/hwcap.h | 1 + libc/kernel/uapi/asm-arm64/asm/kvm.h | 3 + libc/kernel/uapi/asm-generic/mman-common.h | 1 + libc/kernel/uapi/asm-generic/shmbuf.h | 4 +- libc/kernel/uapi/asm-generic/signal.h | 2 +- libc/kernel/uapi/asm-generic/socket.h | 1 + libc/kernel/uapi/asm-x86/asm/amd_hsmp.h | 136 ++++++++++++++++++ .../kernel/uapi/asm-x86/asm/processor-flags.h | 2 + libc/kernel/uapi/asm-x86/asm/shmbuf.h | 4 +- libc/kernel/uapi/asm-x86/asm/signal.h | 2 +- libc/kernel/uapi/drm/amdgpu_drm.h | 15 ++ libc/kernel/uapi/drm/msm_drm.h | 6 +- libc/kernel/uapi/linux/android/binder.h | 4 +- libc/kernel/uapi/linux/bpf.h | 28 +++- libc/kernel/uapi/linux/btrfs.h | 26 ++++ libc/kernel/uapi/linux/btrfs_tree.h | 1 + libc/kernel/uapi/linux/can/isotp.h | 3 +- libc/kernel/uapi/linux/counter.h | 1 + libc/kernel/uapi/linux/dm-ioctl.h | 4 +- libc/kernel/uapi/linux/dma-buf.h | 4 +- libc/kernel/uapi/linux/elf.h | 6 +- libc/kernel/uapi/linux/ethtool_netlink.h | 7 + libc/kernel/uapi/linux/fsi.h | 1 + libc/kernel/uapi/linux/gtp.h | 1 + libc/kernel/uapi/linux/if_addr.h | 5 + libc/kernel/uapi/linux/if_bridge.h | 16 +++ libc/kernel/uapi/linux/if_ether.h | 2 + libc/kernel/uapi/linux/if_link.h | 71 +++++++++ libc/kernel/uapi/linux/if_tunnel.h | 3 +- libc/kernel/uapi/linux/iio/types.h | 1 + libc/kernel/uapi/linux/input-event-codes.h | 15 ++ libc/kernel/uapi/linux/io_uring.h | 6 + libc/kernel/uapi/linux/ioam6_iptunnel.h | 4 + libc/kernel/uapi/linux/iommu.h | 72 ---------- libc/kernel/uapi/linux/kexec.h | 4 +- libc/kernel/uapi/linux/kfd_ioctl.h | 51 ++++++- libc/kernel/uapi/linux/kvm.h | 19 ++- libc/kernel/uapi/linux/lirc.h | 7 +- libc/kernel/uapi/linux/mctp.h | 8 ++ libc/kernel/uapi/linux/mptcp.h | 1 + libc/kernel/uapi/linux/mroute6.h | 1 + libc/kernel/uapi/linux/ndctl.h | 2 - libc/kernel/uapi/linux/net_dropmon.h | 1 + .../uapi/linux/netfilter/nfnetlink_queue.h | 1 + libc/kernel/uapi/linux/nfs4.h | 1 + libc/kernel/uapi/linux/nl80211.h | 39 +++++ libc/kernel/uapi/linux/nvme_ioctl.h | 6 +- libc/kernel/uapi/linux/omap3isp.h | 3 +- libc/kernel/uapi/linux/openvswitch.h | 7 + libc/kernel/uapi/linux/perf_event.h | 2 + libc/kernel/uapi/linux/pkt_cls.h | 8 ++ libc/kernel/uapi/linux/psci.h | 2 + libc/kernel/uapi/linux/reiserfs_xattr.h | 2 +- libc/kernel/uapi/linux/rfkill.h | 2 + libc/kernel/uapi/linux/rpmsg.h | 2 + libc/kernel/uapi/linux/rseq.h | 17 +-- libc/kernel/uapi/linux/rtc.h | 3 +- libc/kernel/uapi/linux/rtnetlink.h | 13 ++ libc/kernel/uapi/linux/serial_core.h | 2 + libc/kernel/uapi/linux/smc.h | 10 ++ libc/kernel/uapi/linux/socket.h | 3 + libc/kernel/uapi/linux/stddef.h | 3 + libc/kernel/uapi/linux/thermal.h | 5 + libc/kernel/uapi/linux/tipc_config.h | 1 - libc/kernel/uapi/linux/tty.h | 3 +- libc/kernel/uapi/linux/types.h | 3 +- libc/kernel/uapi/linux/userfaultfd.h | 3 +- libc/kernel/uapi/linux/v4l2-controls.h | 3 + libc/kernel/uapi/linux/version.h | 4 +- libc/kernel/uapi/linux/vfio.h | 39 +++-- libc/kernel/uapi/linux/vhost.h | 2 + libc/kernel/uapi/linux/videodev2.h | 7 +- libc/kernel/uapi/linux/virtio_config.h | 1 + libc/kernel/uapi/linux/virtio_crypto.h | 66 ++++++++- libc/kernel/uapi/linux/virtio_ids.h | 14 +- libc/kernel/uapi/misc/fastrpc.h | 47 +++++- libc/kernel/uapi/misc/habanalabs.h | 11 +- libc/kernel/uapi/sound/sof/abi.h | 4 +- 80 files changed, 730 insertions(+), 165 deletions(-) create mode 100644 libc/kernel/uapi/asm-x86/asm/amd_hsmp.h diff --git a/libc/include/elf.h b/libc/include/elf.h index 4739bbdf0..536b8c375 100644 --- a/libc/include/elf.h +++ b/libc/include/elf.h @@ -460,8 +460,6 @@ typedef Elf64_Xword Elf64_Relr; #define PF_MASKOS 0x0ff00000 #define PF_MASKPROC 0xf0000000 -#define PT_GNU_RELRO 0x6474e552 - #define STB_LOOS 10 #define STB_HIOS 12 #define STB_LOPROC 13 diff --git a/libc/kernel/uapi/asm-arm/asm/signal.h b/libc/kernel/uapi/asm-arm/asm/signal.h index 5f7e0c582..042438080 100644 --- a/libc/kernel/uapi/asm-arm/asm/signal.h +++ b/libc/kernel/uapi/asm-arm/asm/signal.h @@ -78,6 +78,6 @@ struct sigaction { typedef struct sigaltstack { void __user * ss_sp; int ss_flags; - size_t ss_size; + __kernel_size_t ss_size; } stack_t; #endif diff --git a/libc/kernel/uapi/asm-arm64/asm/hwcap.h b/libc/kernel/uapi/asm-arm64/asm/hwcap.h index 431672479..e0dbb131a 100644 --- a/libc/kernel/uapi/asm-arm64/asm/hwcap.h +++ b/libc/kernel/uapi/asm-arm64/asm/hwcap.h @@ -72,4 +72,5 @@ #define HWCAP2_ECV (1 << 19) #define HWCAP2_AFP (1 << 20) #define HWCAP2_RPRES (1 << 21) +#define HWCAP2_MTE3 (1 << 22) #endif diff --git a/libc/kernel/uapi/asm-arm64/asm/kvm.h b/libc/kernel/uapi/asm-arm64/asm/kvm.h index c53ee8768..eee066b81 100644 --- a/libc/kernel/uapi/asm-arm64/asm/kvm.h +++ b/libc/kernel/uapi/asm-arm64/asm/kvm.h @@ -214,6 +214,7 @@ struct kvm_arm_copy_mte_tags { #define KVM_ARM_VCPU_PMU_V3_IRQ 0 #define KVM_ARM_VCPU_PMU_V3_INIT 1 #define KVM_ARM_VCPU_PMU_V3_FILTER 2 +#define KVM_ARM_VCPU_PMU_V3_SET_PMU 3 #define KVM_ARM_VCPU_TIMER_CTRL 1 #define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0 #define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1 @@ -244,5 +245,7 @@ struct kvm_arm_copy_mte_tags { #define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED #define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS #define KVM_PSCI_RET_DENIED PSCI_RET_DENIED +#define KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (1ULL << 0) +#define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED (1ULL << 0) #endif #endif diff --git a/libc/kernel/uapi/asm-generic/mman-common.h b/libc/kernel/uapi/asm-generic/mman-common.h index 94405767b..e96f4cc2c 100644 --- a/libc/kernel/uapi/asm-generic/mman-common.h +++ b/libc/kernel/uapi/asm-generic/mman-common.h @@ -62,6 +62,7 @@ #define MADV_PAGEOUT 21 #define MADV_POPULATE_READ 22 #define MADV_POPULATE_WRITE 23 +#define MADV_DONTNEED_LOCKED 24 #define MAP_FILE 0 #define PKEY_DISABLE_ACCESS 0x1 #define PKEY_DISABLE_WRITE 0x2 diff --git a/libc/kernel/uapi/asm-generic/shmbuf.h b/libc/kernel/uapi/asm-generic/shmbuf.h index 067ffbcd8..11487f469 100644 --- a/libc/kernel/uapi/asm-generic/shmbuf.h +++ b/libc/kernel/uapi/asm-generic/shmbuf.h @@ -19,9 +19,11 @@ #ifndef __ASM_GENERIC_SHMBUF_H #define __ASM_GENERIC_SHMBUF_H #include +#include +#include struct shmid64_ds { struct ipc64_perm shm_perm; - size_t shm_segsz; + __kernel_size_t shm_segsz; #if __BITS_PER_LONG == 64 long shm_atime; long shm_dtime; diff --git a/libc/kernel/uapi/asm-generic/signal.h b/libc/kernel/uapi/asm-generic/signal.h index 874fece71..5cb1dce4c 100644 --- a/libc/kernel/uapi/asm-generic/signal.h +++ b/libc/kernel/uapi/asm-generic/signal.h @@ -84,7 +84,7 @@ struct sigaction { typedef struct sigaltstack { void __user * ss_sp; int ss_flags; - size_t ss_size; + __kernel_size_t ss_size; } stack_t; #endif #endif diff --git a/libc/kernel/uapi/asm-generic/socket.h b/libc/kernel/uapi/asm-generic/socket.h index 676799363..69261876a 100644 --- a/libc/kernel/uapi/asm-generic/socket.h +++ b/libc/kernel/uapi/asm-generic/socket.h @@ -100,6 +100,7 @@ #define SO_NETNS_COOKIE 71 #define SO_BUF_LOCK 72 #define SO_RESERVE_MEM 73 +#define SO_TXREHASH 74 #if __BITS_PER_LONG == 64 || defined(__x86_64__) && defined(__ILP32__) #define SO_TIMESTAMP SO_TIMESTAMP_OLD #define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD diff --git a/libc/kernel/uapi/asm-x86/asm/amd_hsmp.h b/libc/kernel/uapi/asm-x86/asm/amd_hsmp.h new file mode 100644 index 000000000..ed59bb81b --- /dev/null +++ b/libc/kernel/uapi/asm-x86/asm/amd_hsmp.h @@ -0,0 +1,136 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _UAPI_ASM_X86_AMD_HSMP_H_ +#define _UAPI_ASM_X86_AMD_HSMP_H_ +#include +#pragma pack(4) +#define HSMP_MAX_MSG_LEN 8 +enum hsmp_message_ids { + HSMP_TEST = 1, + HSMP_GET_SMU_VER, + HSMP_GET_PROTO_VER, + HSMP_GET_SOCKET_POWER, + HSMP_SET_SOCKET_POWER_LIMIT, + HSMP_GET_SOCKET_POWER_LIMIT, + HSMP_GET_SOCKET_POWER_LIMIT_MAX, + HSMP_SET_BOOST_LIMIT, + HSMP_SET_BOOST_LIMIT_SOCKET, + HSMP_GET_BOOST_LIMIT, + HSMP_GET_PROC_HOT, + HSMP_SET_XGMI_LINK_WIDTH, + HSMP_SET_DF_PSTATE, + HSMP_SET_AUTO_DF_PSTATE, + HSMP_GET_FCLK_MCLK, + HSMP_GET_CCLK_THROTTLE_LIMIT, + HSMP_GET_C0_PERCENT, + HSMP_SET_NBIO_DPM_LEVEL, + HSMP_GET_DDR_BANDWIDTH = 0x14, + HSMP_GET_TEMP_MONITOR, + HSMP_MSG_ID_MAX, +}; +struct hsmp_message { + __u32 msg_id; + __u16 num_args; + __u16 response_sz; + __u32 args[HSMP_MAX_MSG_LEN]; + __u16 sock_ind; +}; +enum hsmp_msg_type { + HSMP_RSVD = - 1, + HSMP_SET = 0, + HSMP_GET = 1, +}; +struct hsmp_msg_desc { + int num_args; + int response_sz; + enum hsmp_msg_type type; +}; +static const struct hsmp_msg_desc hsmp_msg_desc_table[] = { + { + 0, 0, HSMP_RSVD + } + , { + 1, 1, HSMP_GET + } + , { + 0, 1, HSMP_GET + } + , { + 0, 1, HSMP_GET + } + , { + 0, 1, HSMP_GET + } + , { + 1, 0, HSMP_SET + } + , { + 0, 1, HSMP_GET + } + , { + 0, 1, HSMP_GET + } + , { + 1, 0, HSMP_SET + } + , { + 1, 0, HSMP_SET + } + , { + 1, 1, HSMP_GET + } + , { + 0, 1, HSMP_GET + } + , { + 1, 0, HSMP_SET + } + , { + 1, 0, HSMP_SET + } + , { + 0, 0, HSMP_SET + } + , { + 0, 2, HSMP_GET + } + , { + 0, 1, HSMP_GET + } + , { + 0, 1, HSMP_GET + } + , { + 1, 0, HSMP_SET + } + , { + 0, 0, HSMP_RSVD + } + , { + 0, 1, HSMP_GET + } + , { + 0, 1, HSMP_GET + } + , +}; +#pragma pack() +#define HSMP_BASE_IOCTL_NR 0xF8 +#define HSMP_IOCTL_CMD _IOWR(HSMP_BASE_IOCTL_NR, 0, struct hsmp_message) +#endif diff --git a/libc/kernel/uapi/asm-x86/asm/processor-flags.h b/libc/kernel/uapi/asm-x86/asm/processor-flags.h index 85f9d7e21..0a95afd2b 100644 --- a/libc/kernel/uapi/asm-x86/asm/processor-flags.h +++ b/libc/kernel/uapi/asm-x86/asm/processor-flags.h @@ -127,6 +127,8 @@ #define X86_CR4_SMAP _BITUL(X86_CR4_SMAP_BIT) #define X86_CR4_PKE_BIT 22 #define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT) +#define X86_CR4_CET_BIT 23 +#define X86_CR4_CET _BITUL(X86_CR4_CET_BIT) #define X86_CR8_TPR _AC(0x0000000f, UL) #define CX86_PCR0 0x20 #define CX86_GCR 0xb8 diff --git a/libc/kernel/uapi/asm-x86/asm/shmbuf.h b/libc/kernel/uapi/asm-x86/asm/shmbuf.h index 03e195e39..2a0dcb58b 100644 --- a/libc/kernel/uapi/asm-x86/asm/shmbuf.h +++ b/libc/kernel/uapi/asm-x86/asm/shmbuf.h @@ -21,9 +21,11 @@ #if !defined(__x86_64__) || !defined(__ILP32__) #include #else +#include +#include struct shmid64_ds { struct ipc64_perm shm_perm; - size_t shm_segsz; + __kernel_size_t shm_segsz; __kernel_long_t shm_atime; __kernel_long_t shm_dtime; __kernel_long_t shm_ctime; diff --git a/libc/kernel/uapi/asm-x86/asm/signal.h b/libc/kernel/uapi/asm-x86/asm/signal.h index 8226da8f7..cbeeac463 100644 --- a/libc/kernel/uapi/asm-x86/asm/signal.h +++ b/libc/kernel/uapi/asm-x86/asm/signal.h @@ -90,7 +90,7 @@ struct sigaction { typedef struct sigaltstack { void __user * ss_sp; int ss_flags; - size_t ss_size; + __kernel_size_t ss_size; } stack_t; #endif #endif diff --git a/libc/kernel/uapi/drm/amdgpu_drm.h b/libc/kernel/uapi/drm/amdgpu_drm.h index 3764d51da..f38b61255 100644 --- a/libc/kernel/uapi/drm/amdgpu_drm.h +++ b/libc/kernel/uapi/drm/amdgpu_drm.h @@ -112,6 +112,8 @@ union drm_amdgpu_bo_list { #define AMDGPU_CTX_OP_FREE_CTX 2 #define AMDGPU_CTX_OP_QUERY_STATE 3 #define AMDGPU_CTX_OP_QUERY_STATE2 4 +#define AMDGPU_CTX_OP_GET_STABLE_PSTATE 5 +#define AMDGPU_CTX_OP_SET_STABLE_PSTATE 6 #define AMDGPU_CTX_NO_RESET 0 #define AMDGPU_CTX_GUILTY_RESET 1 #define AMDGPU_CTX_INNOCENT_RESET 2 @@ -127,6 +129,12 @@ union drm_amdgpu_bo_list { #define AMDGPU_CTX_PRIORITY_NORMAL 0 #define AMDGPU_CTX_PRIORITY_HIGH 512 #define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023 +#define AMDGPU_CTX_STABLE_PSTATE_FLAGS_MASK 0xf +#define AMDGPU_CTX_STABLE_PSTATE_NONE 0 +#define AMDGPU_CTX_STABLE_PSTATE_STANDARD 1 +#define AMDGPU_CTX_STABLE_PSTATE_MIN_SCLK 2 +#define AMDGPU_CTX_STABLE_PSTATE_MIN_MCLK 3 +#define AMDGPU_CTX_STABLE_PSTATE_PEAK 4 struct drm_amdgpu_ctx_in { __u32 op; __u32 flags; @@ -143,6 +151,10 @@ union drm_amdgpu_ctx_out { __u32 hangs; __u32 reset_status; } state; + struct { + __u32 flags; + __u32 _pad; + } pstate; }; union drm_amdgpu_ctx { struct drm_amdgpu_ctx_in in; @@ -438,6 +450,7 @@ struct drm_amdgpu_cs_chunk_data { #define AMDGPU_INFO_FW_TA 0x13 #define AMDGPU_INFO_FW_DMCUB 0x14 #define AMDGPU_INFO_FW_TOC 0x15 +#define AMDGPU_INFO_FW_CAP 0x16 #define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f #define AMDGPU_INFO_VRAM_USAGE 0x10 #define AMDGPU_INFO_GTT_USAGE 0x11 @@ -682,6 +695,8 @@ struct drm_amdgpu_info_video_caps { #define AMDGPU_FAMILY_NV 143 #define AMDGPU_FAMILY_VGH 144 #define AMDGPU_FAMILY_YC 146 +#define AMDGPU_FAMILY_GC_10_3_6 149 +#define AMDGPU_FAMILY_GC_10_3_7 151 #ifdef __cplusplus } #endif diff --git a/libc/kernel/uapi/drm/msm_drm.h b/libc/kernel/uapi/drm/msm_drm.h index b4ba1d09d..376f909b5 100644 --- a/libc/kernel/uapi/drm/msm_drm.h +++ b/libc/kernel/uapi/drm/msm_drm.h @@ -43,6 +43,7 @@ struct drm_msm_timespec { #define MSM_PARAM_PP_PGTABLE 0x08 #define MSM_PARAM_FAULTS 0x09 #define MSM_PARAM_SUSPENDS 0x0a +#define MSM_PARAM_SYSPROF 0x0b #define MSM_PARAM_NR_RINGS MSM_PARAM_PRIORITIES struct drm_msm_param { __u32 pipe; @@ -119,7 +120,8 @@ struct drm_msm_gem_submit_bo { #define MSM_SUBMIT_SUDO 0x10000000 #define MSM_SUBMIT_SYNCOBJ_IN 0x08000000 #define MSM_SUBMIT_SYNCOBJ_OUT 0x04000000 -#define MSM_SUBMIT_FLAGS (MSM_SUBMIT_NO_IMPLICIT | MSM_SUBMIT_FENCE_FD_IN | MSM_SUBMIT_FENCE_FD_OUT | MSM_SUBMIT_SUDO | MSM_SUBMIT_SYNCOBJ_IN | MSM_SUBMIT_SYNCOBJ_OUT | 0) +#define MSM_SUBMIT_FENCE_SN_IN 0x02000000 +#define MSM_SUBMIT_FLAGS (MSM_SUBMIT_NO_IMPLICIT | MSM_SUBMIT_FENCE_FD_IN | MSM_SUBMIT_FENCE_FD_OUT | MSM_SUBMIT_SUDO | MSM_SUBMIT_SYNCOBJ_IN | MSM_SUBMIT_SYNCOBJ_OUT | MSM_SUBMIT_FENCE_SN_IN | 0) #define MSM_SUBMIT_SYNCOBJ_RESET 0x00000001 #define MSM_SUBMIT_SYNCOBJ_FLAGS (MSM_SUBMIT_SYNCOBJ_RESET | 0) struct drm_msm_gem_submit_syncobj { @@ -172,6 +174,7 @@ struct drm_msm_submitqueue_query { __u32 pad; }; #define DRM_MSM_GET_PARAM 0x00 +#define DRM_MSM_SET_PARAM 0x01 #define DRM_MSM_GEM_NEW 0x02 #define DRM_MSM_GEM_INFO 0x03 #define DRM_MSM_GEM_CPU_PREP 0x04 @@ -183,6 +186,7 @@ struct drm_msm_submitqueue_query { #define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B #define DRM_MSM_SUBMITQUEUE_QUERY 0x0C #define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) +#define DRM_IOCTL_MSM_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SET_PARAM, struct drm_msm_param) #define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new) #define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info) #define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep) diff --git a/libc/kernel/uapi/linux/android/binder.h b/libc/kernel/uapi/linux/android/binder.h index ded175657..ecc7a5753 100644 --- a/libc/kernel/uapi/linux/android/binder.h +++ b/libc/kernel/uapi/linux/android/binder.h @@ -155,8 +155,8 @@ struct binder_transaction_data { binder_uintptr_t cookie; __u32 code; __u32 flags; - pid_t sender_pid; - uid_t sender_euid; + __kernel_pid_t sender_pid; + __kernel_uid_t sender_euid; binder_size_t data_size; binder_size_t offsets_size; union { diff --git a/libc/kernel/uapi/linux/bpf.h b/libc/kernel/uapi/linux/bpf.h index d363e8117..8de48a11a 100644 --- a/libc/kernel/uapi/linux/bpf.h +++ b/libc/kernel/uapi/linux/bpf.h @@ -228,6 +228,7 @@ enum bpf_attach_type { BPF_SK_REUSEPORT_SELECT, BPF_SK_REUSEPORT_SELECT_OR_MIGRATE, BPF_PERF_EVENT, + BPF_TRACE_KPROBE_MULTI, __MAX_BPF_ATTACH_TYPE }; #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE @@ -240,6 +241,7 @@ enum bpf_link_type { BPF_LINK_TYPE_NETNS = 5, BPF_LINK_TYPE_XDP = 6, BPF_LINK_TYPE_PERF_EVENT = 7, + BPF_LINK_TYPE_KPROBE_MULTI = 8, MAX_BPF_LINK_TYPE, }; #define BPF_F_ALLOW_OVERRIDE (1U << 0) @@ -250,6 +252,8 @@ enum bpf_link_type { #define BPF_F_TEST_RND_HI32 (1U << 2) #define BPF_F_TEST_STATE_FREQ (1U << 3) #define BPF_F_SLEEPABLE (1U << 4) +#define BPF_F_XDP_HAS_FRAGS (1U << 5) +#define BPF_F_KPROBE_MULTI_RETURN (1U << 0) #define BPF_PSEUDO_MAP_FD 1 #define BPF_PSEUDO_MAP_IDX 5 #define BPF_PSEUDO_MAP_VALUE 2 @@ -281,6 +285,7 @@ enum { }; #define BPF_F_QUERY_EFFECTIVE (1U << 0) #define BPF_F_TEST_RUN_ON_CPU (1U << 0) +#define BPF_F_TEST_XDP_LIVE_FRAMES (1U << 1) enum bpf_stats_type { BPF_STATS_RUN_TIME = 0, }; @@ -392,6 +397,7 @@ union bpf_attr { __aligned_u64 ctx_out; __u32 flags; __u32 cpu; + __u32 batch_size; } test; struct { union { @@ -456,6 +462,13 @@ union bpf_attr { struct { __u64 bpf_cookie; } perf_event; + struct { + __u32 flags; + __u32 cnt; + __aligned_u64 syms; + __aligned_u64 addrs; + __aligned_u64 cookies; + } kprobe_multi; }; } link_create; struct { @@ -480,7 +493,7 @@ union bpf_attr { __u32 flags; } prog_bind_map; } __attribute__((aligned(8))); -#define __BPF_FUNC_MAPPER(FN) FN(unspec), FN(map_lookup_elem), FN(map_update_elem), FN(map_delete_elem), FN(probe_read), FN(ktime_get_ns), FN(trace_printk), FN(get_prandom_u32), FN(get_smp_processor_id), FN(skb_store_bytes), FN(l3_csum_replace), FN(l4_csum_replace), FN(tail_call), FN(clone_redirect), FN(get_current_pid_tgid), FN(get_current_uid_gid), FN(get_current_comm), FN(get_cgroup_classid), FN(skb_vlan_push), FN(skb_vlan_pop), FN(skb_get_tunnel_key), FN(skb_set_tunnel_key), FN(perf_event_read), FN(redirect), FN(get_route_realm), FN(perf_event_output), FN(skb_load_bytes), FN(get_stackid), FN(csum_diff), FN(skb_get_tunnel_opt), FN(skb_set_tunnel_opt), FN(skb_change_proto), FN(skb_change_type), FN(skb_under_cgroup), FN(get_hash_recalc), FN(get_current_task), FN(probe_write_user), FN(current_task_under_cgroup), FN(skb_change_tail), FN(skb_pull_data), FN(csum_update), FN(set_hash_invalid), FN(get_numa_node_id), FN(skb_change_head), FN(xdp_adjust_head), FN(probe_read_str), FN(get_socket_cookie), FN(get_socket_uid), FN(set_hash), FN(setsockopt), FN(skb_adjust_room), FN(redirect_map), FN(sk_redirect_map), FN(sock_map_update), FN(xdp_adjust_meta), FN(perf_event_read_value), FN(perf_prog_read_value), FN(getsockopt), FN(override_return), FN(sock_ops_cb_flags_set), FN(msg_redirect_map), FN(msg_apply_bytes), FN(msg_cork_bytes), FN(msg_pull_data), FN(bind), FN(xdp_adjust_tail), FN(skb_get_xfrm_state), FN(get_stack), FN(skb_load_bytes_relative), FN(fib_lookup), FN(sock_hash_update), FN(msg_redirect_hash), FN(sk_redirect_hash), FN(lwt_push_encap), FN(lwt_seg6_store_bytes), FN(lwt_seg6_adjust_srh), FN(lwt_seg6_action), FN(rc_repeat), FN(rc_keydown), FN(skb_cgroup_id), FN(get_current_cgroup_id), FN(get_local_storage), FN(sk_select_reuseport), FN(skb_ancestor_cgroup_id), FN(sk_lookup_tcp), FN(sk_lookup_udp), FN(sk_release), FN(map_push_elem), FN(map_pop_elem), FN(map_peek_elem), FN(msg_push_data), FN(msg_pop_data), FN(rc_pointer_rel), FN(spin_lock), FN(spin_unlock), FN(sk_fullsock), FN(tcp_sock), FN(skb_ecn_set_ce), FN(get_listener_sock), FN(skc_lookup_tcp), FN(tcp_check_syncookie), FN(sysctl_get_name), FN(sysctl_get_current_value), FN(sysctl_get_new_value), FN(sysctl_set_new_value), FN(strtol), FN(strtoul), FN(sk_storage_get), FN(sk_storage_delete), FN(send_signal), FN(tcp_gen_syncookie), FN(skb_output), FN(probe_read_user), FN(probe_read_kernel), FN(probe_read_user_str), FN(probe_read_kernel_str), FN(tcp_send_ack), FN(send_signal_thread), FN(jiffies64), FN(read_branch_records), FN(get_ns_current_pid_tgid), FN(xdp_output), FN(get_netns_cookie), FN(get_current_ancestor_cgroup_id), FN(sk_assign), FN(ktime_get_boot_ns), FN(seq_printf), FN(seq_write), FN(sk_cgroup_id), FN(sk_ancestor_cgroup_id), FN(ringbuf_output), FN(ringbuf_reserve), FN(ringbuf_submit), FN(ringbuf_discard), FN(ringbuf_query), FN(csum_level), FN(skc_to_tcp6_sock), FN(skc_to_tcp_sock), FN(skc_to_tcp_timewait_sock), FN(skc_to_tcp_request_sock), FN(skc_to_udp6_sock), FN(get_task_stack), FN(load_hdr_opt), FN(store_hdr_opt), FN(reserve_hdr_opt), FN(inode_storage_get), FN(inode_storage_delete), FN(d_path), FN(copy_from_user), FN(snprintf_btf), FN(seq_printf_btf), FN(skb_cgroup_classid), FN(redirect_neigh), FN(per_cpu_ptr), FN(this_cpu_ptr), FN(redirect_peer), FN(task_storage_get), FN(task_storage_delete), FN(get_current_task_btf), FN(bprm_opts_set), FN(ktime_get_coarse_ns), FN(ima_inode_hash), FN(sock_from_file), FN(check_mtu), FN(for_each_map_elem), FN(snprintf), FN(sys_bpf), FN(btf_find_by_name_kind), FN(sys_close), FN(timer_init), FN(timer_set_callback), FN(timer_start), FN(timer_cancel), FN(get_func_ip), FN(get_attach_cookie), FN(task_pt_regs), FN(get_branch_snapshot), FN(trace_vprintk), FN(skc_to_unix_sock), FN(kallsyms_lookup_name), FN(find_vma), FN(loop), FN(strncmp), FN(get_func_arg), FN(get_func_ret), FN(get_func_arg_cnt), +#define __BPF_FUNC_MAPPER(FN) FN(unspec), FN(map_lookup_elem), FN(map_update_elem), FN(map_delete_elem), FN(probe_read), FN(ktime_get_ns), FN(trace_printk), FN(get_prandom_u32), FN(get_smp_processor_id), FN(skb_store_bytes), FN(l3_csum_replace), FN(l4_csum_replace), FN(tail_call), FN(clone_redirect), FN(get_current_pid_tgid), FN(get_current_uid_gid), FN(get_current_comm), FN(get_cgroup_classid), FN(skb_vlan_push), FN(skb_vlan_pop), FN(skb_get_tunnel_key), FN(skb_set_tunnel_key), FN(perf_event_read), FN(redirect), FN(get_route_realm), FN(perf_event_output), FN(skb_load_bytes), FN(get_stackid), FN(csum_diff), FN(skb_get_tunnel_opt), FN(skb_set_tunnel_opt), FN(skb_change_proto), FN(skb_change_type), FN(skb_under_cgroup), FN(get_hash_recalc), FN(get_current_task), FN(probe_write_user), FN(current_task_under_cgroup), FN(skb_change_tail), FN(skb_pull_data), FN(csum_update), FN(set_hash_invalid), FN(get_numa_node_id), FN(skb_change_head), FN(xdp_adjust_head), FN(probe_read_str), FN(get_socket_cookie), FN(get_socket_uid), FN(set_hash), FN(setsockopt), FN(skb_adjust_room), FN(redirect_map), FN(sk_redirect_map), FN(sock_map_update), FN(xdp_adjust_meta), FN(perf_event_read_value), FN(perf_prog_read_value), FN(getsockopt), FN(override_return), FN(sock_ops_cb_flags_set), FN(msg_redirect_map), FN(msg_apply_bytes), FN(msg_cork_bytes), FN(msg_pull_data), FN(bind), FN(xdp_adjust_tail), FN(skb_get_xfrm_state), FN(get_stack), FN(skb_load_bytes_relative), FN(fib_lookup), FN(sock_hash_update), FN(msg_redirect_hash), FN(sk_redirect_hash), FN(lwt_push_encap), FN(lwt_seg6_store_bytes), FN(lwt_seg6_adjust_srh), FN(lwt_seg6_action), FN(rc_repeat), FN(rc_keydown), FN(skb_cgroup_id), FN(get_current_cgroup_id), FN(get_local_storage), FN(sk_select_reuseport), FN(skb_ancestor_cgroup_id), FN(sk_lookup_tcp), FN(sk_lookup_udp), FN(sk_release), FN(map_push_elem), FN(map_pop_elem), FN(map_peek_elem), FN(msg_push_data), FN(msg_pop_data), FN(rc_pointer_rel), FN(spin_lock), FN(spin_unlock), FN(sk_fullsock), FN(tcp_sock), FN(skb_ecn_set_ce), FN(get_listener_sock), FN(skc_lookup_tcp), FN(tcp_check_syncookie), FN(sysctl_get_name), FN(sysctl_get_current_value), FN(sysctl_get_new_value), FN(sysctl_set_new_value), FN(strtol), FN(strtoul), FN(sk_storage_get), FN(sk_storage_delete), FN(send_signal), FN(tcp_gen_syncookie), FN(skb_output), FN(probe_read_user), FN(probe_read_kernel), FN(probe_read_user_str), FN(probe_read_kernel_str), FN(tcp_send_ack), FN(send_signal_thread), FN(jiffies64), FN(read_branch_records), FN(get_ns_current_pid_tgid), FN(xdp_output), FN(get_netns_cookie), FN(get_current_ancestor_cgroup_id), FN(sk_assign), FN(ktime_get_boot_ns), FN(seq_printf), FN(seq_write), FN(sk_cgroup_id), FN(sk_ancestor_cgroup_id), FN(ringbuf_output), FN(ringbuf_reserve), FN(ringbuf_submit), FN(ringbuf_discard), FN(ringbuf_query), FN(csum_level), FN(skc_to_tcp6_sock), FN(skc_to_tcp_sock), FN(skc_to_tcp_timewait_sock), FN(skc_to_tcp_request_sock), FN(skc_to_udp6_sock), FN(get_task_stack), FN(load_hdr_opt), FN(store_hdr_opt), FN(reserve_hdr_opt), FN(inode_storage_get), FN(inode_storage_delete), FN(d_path), FN(copy_from_user), FN(snprintf_btf), FN(seq_printf_btf), FN(skb_cgroup_classid), FN(redirect_neigh), FN(per_cpu_ptr), FN(this_cpu_ptr), FN(redirect_peer), FN(task_storage_get), FN(task_storage_delete), FN(get_current_task_btf), FN(bprm_opts_set), FN(ktime_get_coarse_ns), FN(ima_inode_hash), FN(sock_from_file), FN(check_mtu), FN(for_each_map_elem), FN(snprintf), FN(sys_bpf), FN(btf_find_by_name_kind), FN(sys_close), FN(timer_init), FN(timer_set_callback), FN(timer_start), FN(timer_cancel), FN(get_func_ip), FN(get_attach_cookie), FN(task_pt_regs), FN(get_branch_snapshot), FN(trace_vprintk), FN(skc_to_unix_sock), FN(kallsyms_lookup_name), FN(find_vma), FN(loop), FN(strncmp), FN(get_func_arg), FN(get_func_ret), FN(get_func_arg_cnt), FN(get_retval), FN(set_retval), FN(xdp_get_buff_len), FN(xdp_load_bytes), FN(xdp_store_bytes), FN(copy_from_user_task), FN(skb_set_tstamp), FN(ima_file_hash), #define __BPF_ENUM_FN(x) BPF_FUNC_ ##x enum bpf_func_id { __BPF_FUNC_MAPPER(__BPF_ENUM_FN) __BPF_FUNC_MAX_ID, @@ -595,6 +608,10 @@ enum { }; #define __bpf_md_ptr(type,name) union { type name; __u64 : 64; \ } __attribute__((aligned(8))) +enum { + BPF_SKB_TSTAMP_UNSPEC, + BPF_SKB_TSTAMP_DELIVERY_MONO, +}; struct __sk_buff { __u32 len; __u32 pkt_type; @@ -628,7 +645,8 @@ struct __sk_buff { __u32 gso_segs; __bpf_md_ptr(struct bpf_sock *, sk); __u32 gso_size; - __u32 : 32; + __u8 tstamp_type; + __u32 : 24; __u64 hwtstamp; }; struct bpf_tunnel_key { @@ -668,7 +686,8 @@ struct bpf_sock { __u32 src_ip4; __u32 src_ip6[4]; __u32 src_port; - __u32 dst_port; + __be16 dst_port; + __u16 : 16; __u32 dst_ip4; __u32 dst_ip6[4]; __u32 state; @@ -1160,7 +1179,8 @@ struct bpf_sk_lookup { __u32 protocol; __u32 remote_ip4; __u32 remote_ip6[4]; - __u32 remote_port; + __be16 remote_port; + __u16 : 16; __u32 local_ip4; __u32 local_ip6[4]; __u32 local_port; diff --git a/libc/kernel/uapi/linux/btrfs.h b/libc/kernel/uapi/linux/btrfs.h index 08b96a3f6..9f76d5296 100644 --- a/libc/kernel/uapi/linux/btrfs.h +++ b/libc/kernel/uapi/linux/btrfs.h @@ -189,6 +189,7 @@ struct btrfs_ioctl_fs_info_args { #define BTRFS_FEATURE_INCOMPAT_METADATA_UUID (1ULL << 10) #define BTRFS_FEATURE_INCOMPAT_RAID1C34 (1ULL << 11) #define BTRFS_FEATURE_INCOMPAT_ZONED (1ULL << 12) +#define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13) struct btrfs_ioctl_feature_flags { __u64 compat_flags; __u64 compat_ro_flags; @@ -461,6 +462,29 @@ struct btrfs_ioctl_get_subvol_rootref_args { __u8 num_items; __u8 align[7]; }; +struct btrfs_ioctl_encoded_io_args { + const struct iovec __user * iov; + unsigned long iovcnt; + __s64 offset; + __u64 flags; + __u64 len; + __u64 unencoded_len; + __u64 unencoded_offset; + __u32 compression; + __u32 encryption; + __u8 reserved[64]; +}; +#define BTRFS_ENCODED_IO_COMPRESSION_NONE 0 +#define BTRFS_ENCODED_IO_COMPRESSION_ZLIB 1 +#define BTRFS_ENCODED_IO_COMPRESSION_ZSTD 2 +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_4K 3 +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_8K 4 +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_16K 5 +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_32K 6 +#define BTRFS_ENCODED_IO_COMPRESSION_LZO_64K 7 +#define BTRFS_ENCODED_IO_COMPRESSION_TYPES 8 +#define BTRFS_ENCODED_IO_ENCRYPTION_NONE 0 +#define BTRFS_ENCODED_IO_ENCRYPTION_TYPES 1 enum btrfs_err_code { BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET = 1, BTRFS_ERROR_DEV_RAID10_MIN_NOT_MET, @@ -534,4 +558,6 @@ enum btrfs_err_code { #define BTRFS_IOC_GET_SUBVOL_ROOTREF _IOWR(BTRFS_IOCTL_MAGIC, 61, struct btrfs_ioctl_get_subvol_rootref_args) #define BTRFS_IOC_INO_LOOKUP_USER _IOWR(BTRFS_IOCTL_MAGIC, 62, struct btrfs_ioctl_ino_lookup_user_args) #define BTRFS_IOC_SNAP_DESTROY_V2 _IOW(BTRFS_IOCTL_MAGIC, 63, struct btrfs_ioctl_vol_args_v2) +#define BTRFS_IOC_ENCODED_READ _IOR(BTRFS_IOCTL_MAGIC, 64, struct btrfs_ioctl_encoded_io_args) +#define BTRFS_IOC_ENCODED_WRITE _IOW(BTRFS_IOCTL_MAGIC, 64, struct btrfs_ioctl_encoded_io_args) #endif diff --git a/libc/kernel/uapi/linux/btrfs_tree.h b/libc/kernel/uapi/linux/btrfs_tree.h index 047673359..8e3c6fe9f 100644 --- a/libc/kernel/uapi/linux/btrfs_tree.h +++ b/libc/kernel/uapi/linux/btrfs_tree.h @@ -31,6 +31,7 @@ #define BTRFS_QUOTA_TREE_OBJECTID 8ULL #define BTRFS_UUID_TREE_OBJECTID 9ULL #define BTRFS_FREE_SPACE_TREE_OBJECTID 10ULL +#define BTRFS_BLOCK_GROUP_TREE_OBJECTID 11ULL #define BTRFS_DEV_STATS_OBJECTID 0ULL #define BTRFS_BALANCE_OBJECTID - 4ULL #define BTRFS_ORPHAN_OBJECTID - 5ULL diff --git a/libc/kernel/uapi/linux/can/isotp.h b/libc/kernel/uapi/linux/can/isotp.h index dd5e4f532..57d300179 100644 --- a/libc/kernel/uapi/linux/can/isotp.h +++ b/libc/kernel/uapi/linux/can/isotp.h @@ -59,11 +59,12 @@ struct can_isotp_ll_options { #define CAN_ISOTP_DEFAULT_FLAGS 0 #define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00 #define CAN_ISOTP_DEFAULT_PAD_CONTENT 0xCC -#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 0 +#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 50000 #define CAN_ISOTP_DEFAULT_RECV_BS 0 #define CAN_ISOTP_DEFAULT_RECV_STMIN 0x00 #define CAN_ISOTP_DEFAULT_RECV_WFTMAX 0 #define CAN_ISOTP_DEFAULT_LL_MTU CAN_MTU #define CAN_ISOTP_DEFAULT_LL_TX_DL CAN_MAX_DLEN #define CAN_ISOTP_DEFAULT_LL_TX_FLAGS 0 +#define CAN_ISOTP_FRAME_TXTIME_ZERO 0xFFFFFFFF #endif diff --git a/libc/kernel/uapi/linux/counter.h b/libc/kernel/uapi/linux/counter.h index 091e33df2..4b86b28cb 100644 --- a/libc/kernel/uapi/linux/counter.h +++ b/libc/kernel/uapi/linux/counter.h @@ -45,6 +45,7 @@ enum counter_event_type { COUNTER_EVENT_OVERFLOW_UNDERFLOW, COUNTER_EVENT_THRESHOLD, COUNTER_EVENT_INDEX, + COUNTER_EVENT_CHANGE_OF_STATE, }; struct counter_watch { struct counter_component component; diff --git a/libc/kernel/uapi/linux/dm-ioctl.h b/libc/kernel/uapi/linux/dm-ioctl.h index 09f8a98fc..98cbc1fed 100644 --- a/libc/kernel/uapi/linux/dm-ioctl.h +++ b/libc/kernel/uapi/linux/dm-ioctl.h @@ -106,9 +106,9 @@ enum { #define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl) #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) #define DM_VERSION_MAJOR 4 -#define DM_VERSION_MINOR 45 +#define DM_VERSION_MINOR 46 #define DM_VERSION_PATCHLEVEL 0 -#define DM_VERSION_EXTRA "-ioctl(2021-03-22)" +#define DM_VERSION_EXTRA "-ioctl(2022-02-22)" #define DM_READONLY_FLAG (1 << 0) #define DM_SUSPEND_FLAG (1 << 1) #define DM_PERSISTENT_DEV_FLAG (1 << 3) diff --git a/libc/kernel/uapi/linux/dma-buf.h b/libc/kernel/uapi/linux/dma-buf.h index 221c20f80..4e31379e4 100644 --- a/libc/kernel/uapi/linux/dma-buf.h +++ b/libc/kernel/uapi/linux/dma-buf.h @@ -32,6 +32,6 @@ struct dma_buf_sync { #define DMA_BUF_BASE 'b' #define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync) #define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *) -#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32) -#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64) +#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, __u32) +#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, __u64) #endif diff --git a/libc/kernel/uapi/linux/elf.h b/libc/kernel/uapi/linux/elf.h index 7655f1266..65ab245d0 100644 --- a/libc/kernel/uapi/linux/elf.h +++ b/libc/kernel/uapi/linux/elf.h @@ -45,9 +45,11 @@ typedef __s64 Elf64_Sxword; #define PT_HIOS 0x6fffffff #define PT_LOPROC 0x70000000 #define PT_HIPROC 0x7fffffff -#define PT_GNU_EH_FRAME 0x6474e550 -#define PT_GNU_PROPERTY 0x6474e553 +#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) #define PT_GNU_STACK (PT_LOOS + 0x474e551) +#define PT_GNU_RELRO (PT_LOOS + 0x474e552) +#define PT_GNU_PROPERTY (PT_LOOS + 0x474e553) +#define PT_AARCH64_MEMTAG_MTE (PT_LOPROC + 0x2) #define PN_XNUM 0xffff #define ET_NONE 0 #define ET_REL 1 diff --git a/libc/kernel/uapi/linux/ethtool_netlink.h b/libc/kernel/uapi/linux/ethtool_netlink.h index 7dcae22b4..8e1f38f6c 100644 --- a/libc/kernel/uapi/linux/ethtool_netlink.h +++ b/libc/kernel/uapi/linux/ethtool_netlink.h @@ -239,6 +239,11 @@ enum { __ETHTOOL_A_PRIVFLAGS_CNT, ETHTOOL_A_PRIVFLAGS_MAX = __ETHTOOL_A_PRIVFLAGS_CNT - 1 }; +enum { + ETHTOOL_TCP_DATA_SPLIT_UNKNOWN = 0, + ETHTOOL_TCP_DATA_SPLIT_DISABLED, + ETHTOOL_TCP_DATA_SPLIT_ENABLED, +}; enum { ETHTOOL_A_RINGS_UNSPEC, ETHTOOL_A_RINGS_HEADER, @@ -251,6 +256,8 @@ enum { ETHTOOL_A_RINGS_RX_JUMBO, ETHTOOL_A_RINGS_TX, ETHTOOL_A_RINGS_RX_BUF_LEN, + ETHTOOL_A_RINGS_TCP_DATA_SPLIT, + ETHTOOL_A_RINGS_CQE_SIZE, __ETHTOOL_A_RINGS_CNT, ETHTOOL_A_RINGS_MAX = (__ETHTOOL_A_RINGS_CNT - 1) }; diff --git a/libc/kernel/uapi/linux/fsi.h b/libc/kernel/uapi/linux/fsi.h index fc88464d6..b080c2128 100644 --- a/libc/kernel/uapi/linux/fsi.h +++ b/libc/kernel/uapi/linux/fsi.h @@ -48,4 +48,5 @@ struct scom_access { #define FSI_SCOM_READ _IOWR('s', 0x01, struct scom_access) #define FSI_SCOM_WRITE _IOWR('s', 0x02, struct scom_access) #define FSI_SCOM_RESET _IOW('s', 0x03, __u32) +#define FSI_SBEFIFO_READ_TIMEOUT_SECONDS _IOW('s', 0x00, __u32) #endif diff --git a/libc/kernel/uapi/linux/gtp.h b/libc/kernel/uapi/linux/gtp.h index 3b9416ebf..20bc3d600 100644 --- a/libc/kernel/uapi/linux/gtp.h +++ b/libc/kernel/uapi/linux/gtp.h @@ -23,6 +23,7 @@ enum gtp_genl_cmds { GTP_CMD_NEWPDP, GTP_CMD_DELPDP, GTP_CMD_GETPDP, + GTP_CMD_ECHOREQ, GTP_CMD_MAX, }; enum gtp_version { diff --git a/libc/kernel/uapi/linux/if_addr.h b/libc/kernel/uapi/linux/if_addr.h index 6a6b64036..a225e69a5 100644 --- a/libc/kernel/uapi/linux/if_addr.h +++ b/libc/kernel/uapi/linux/if_addr.h @@ -39,6 +39,7 @@ enum { IFA_FLAGS, IFA_RT_PRIORITY, IFA_TARGET_NETNSID, + IFA_PROTO, __IFA_MAX, }; #define IFA_MAX (__IFA_MAX - 1) @@ -63,4 +64,8 @@ struct ifa_cacheinfo { }; #define IFA_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifaddrmsg)) +#define IFAPROT_UNSPEC 0 +#define IFAPROT_KERNEL_LO 1 +#define IFAPROT_KERNEL_RA 2 +#define IFAPROT_KERNEL_LL 3 #endif diff --git a/libc/kernel/uapi/linux/if_bridge.h b/libc/kernel/uapi/linux/if_bridge.h index 2054fb3c9..0f088664b 100644 --- a/libc/kernel/uapi/linux/if_bridge.h +++ b/libc/kernel/uapi/linux/if_bridge.h @@ -108,6 +108,7 @@ enum { IFLA_BRIDGE_VLAN_TUNNEL_INFO, IFLA_BRIDGE_MRP, IFLA_BRIDGE_CFM, + IFLA_BRIDGE_MST, __IFLA_BRIDGE_MAX, }; #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) @@ -384,6 +385,19 @@ enum { __IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX, }; #define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1) +enum { + IFLA_BRIDGE_MST_UNSPEC, + IFLA_BRIDGE_MST_ENTRY, + __IFLA_BRIDGE_MST_MAX, +}; +#define IFLA_BRIDGE_MST_MAX (__IFLA_BRIDGE_MST_MAX - 1) +enum { + IFLA_BRIDGE_MST_ENTRY_UNSPEC, + IFLA_BRIDGE_MST_ENTRY_MSTI, + IFLA_BRIDGE_MST_ENTRY_STATE, + __IFLA_BRIDGE_MST_ENTRY_MAX, +}; +#define IFLA_BRIDGE_MST_ENTRY_MAX (__IFLA_BRIDGE_MST_ENTRY_MAX - 1) struct bridge_stp_xstats { __u64 transition_blk; __u64 transition_fwd; @@ -460,6 +474,7 @@ enum { BRIDGE_VLANDB_GOPTS_MCAST_QUERIER, BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS, BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE, + BRIDGE_VLANDB_GOPTS_MSTI, __BRIDGE_VLANDB_GOPTS_MAX }; #define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1) @@ -599,6 +614,7 @@ struct br_mcast_stats { enum br_boolopt_id { BR_BOOLOPT_NO_LL_LEARN, BR_BOOLOPT_MCAST_VLAN_SNOOPING, + BR_BOOLOPT_MST_ENABLE, BR_BOOLOPT_MAX }; struct br_boolopt_multi { diff --git a/libc/kernel/uapi/linux/if_ether.h b/libc/kernel/uapi/linux/if_ether.h index 1f7f8f25f..bd8e04573 100644 --- a/libc/kernel/uapi/linux/if_ether.h +++ b/libc/kernel/uapi/linux/if_ether.h @@ -67,8 +67,10 @@ #define ETH_P_LINK_CTL 0x886c #define ETH_P_ATMFATE 0x8884 #define ETH_P_PAE 0x888E +#define ETH_P_PROFINET 0x8892 #define ETH_P_REALTEK 0x8899 #define ETH_P_AOE 0x88A2 +#define ETH_P_ETHERCAT 0x88A4 #define ETH_P_8021AD 0x88A8 #define ETH_P_802_EX1 0x88B5 #define ETH_P_PREAUTH 0x88C7 diff --git a/libc/kernel/uapi/linux/if_link.h b/libc/kernel/uapi/linux/if_link.h index 7e413ae3c..640fa5032 100644 --- a/libc/kernel/uapi/linux/if_link.h +++ b/libc/kernel/uapi/linux/if_link.h @@ -72,6 +72,17 @@ struct rtnl_link_stats64 { __u64 tx_compressed; __u64 rx_nohandler; }; +struct rtnl_hw_stats64 { + __u64 rx_packets; + __u64 tx_packets; + __u64 rx_bytes; + __u64 tx_bytes; + __u64 rx_errors; + __u64 tx_errors; + __u64 rx_dropped; + __u64 tx_dropped; + __u64 multicast; +}; struct rtnl_link_ifmap { __u64 mem_start; __u64 mem_end; @@ -289,6 +300,7 @@ enum { IFLA_BRPORT_MRP_IN_OPEN, IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT, IFLA_BRPORT_MCAST_EHT_HOSTS_CNT, + IFLA_BRPORT_LOCKED, __IFLA_BRPORT_MAX }; #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) @@ -428,6 +440,44 @@ enum ipvlan_mode { }; #define IPVLAN_F_PRIVATE 0x01 #define IPVLAN_F_VEPA 0x02 +struct tunnel_msg { + __u8 family; + __u8 flags; + __u16 reserved2; + __u32 ifindex; +}; +#define TUNNEL_MSG_FLAG_STATS 0x01 +#define TUNNEL_MSG_VALID_USER_FLAGS TUNNEL_MSG_FLAG_STATS +enum { + VNIFILTER_ENTRY_STATS_UNSPEC, + VNIFILTER_ENTRY_STATS_RX_BYTES, + VNIFILTER_ENTRY_STATS_RX_PKTS, + VNIFILTER_ENTRY_STATS_RX_DROPS, + VNIFILTER_ENTRY_STATS_RX_ERRORS, + VNIFILTER_ENTRY_STATS_TX_BYTES, + VNIFILTER_ENTRY_STATS_TX_PKTS, + VNIFILTER_ENTRY_STATS_TX_DROPS, + VNIFILTER_ENTRY_STATS_TX_ERRORS, + VNIFILTER_ENTRY_STATS_PAD, + __VNIFILTER_ENTRY_STATS_MAX +}; +#define VNIFILTER_ENTRY_STATS_MAX (__VNIFILTER_ENTRY_STATS_MAX - 1) +enum { + VXLAN_VNIFILTER_ENTRY_UNSPEC, + VXLAN_VNIFILTER_ENTRY_START, + VXLAN_VNIFILTER_ENTRY_END, + VXLAN_VNIFILTER_ENTRY_GROUP, + VXLAN_VNIFILTER_ENTRY_GROUP6, + VXLAN_VNIFILTER_ENTRY_STATS, + __VXLAN_VNIFILTER_ENTRY_MAX +}; +#define VXLAN_VNIFILTER_ENTRY_MAX (__VXLAN_VNIFILTER_ENTRY_MAX - 1) +enum { + VXLAN_VNIFILTER_UNSPEC, + VXLAN_VNIFILTER_ENTRY, + __VXLAN_VNIFILTER_MAX +}; +#define VXLAN_VNIFILTER_MAX (__VXLAN_VNIFILTER_MAX - 1) enum { IFLA_VXLAN_UNSPEC, IFLA_VXLAN_ID, @@ -459,6 +509,7 @@ enum { IFLA_VXLAN_GPE, IFLA_VXLAN_TTL_INHERIT, IFLA_VXLAN_DF, + IFLA_VXLAN_VNIFILTER, __IFLA_VXLAN_MAX }; #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) @@ -488,6 +539,7 @@ enum { IFLA_GENEVE_LABEL, IFLA_GENEVE_TTL_INHERIT, IFLA_GENEVE_DF, + IFLA_GENEVE_INNER_PROTO_INHERIT, __IFLA_GENEVE_MAX }; #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) @@ -523,6 +575,8 @@ enum { IFLA_GTP_FD1, IFLA_GTP_PDP_HASHSIZE, IFLA_GTP_ROLE, + IFLA_GTP_CREATE_SOCKETS, + IFLA_GTP_RESTART_COUNT, __IFLA_GTP_MAX, }; #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) @@ -558,6 +612,7 @@ enum { IFLA_BOND_PEER_NOTIF_DELAY, IFLA_BOND_AD_LACP_ACTIVE, IFLA_BOND_MISSED_MAX, + IFLA_BOND_NS_IP6_TARGET, __IFLA_BOND_MAX, }; #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1) @@ -776,6 +831,13 @@ enum { }; #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1) #define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1)) +enum { + IFLA_STATS_GETSET_UNSPEC, + IFLA_STATS_GET_FILTERS, + IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, + __IFLA_STATS_GETSET_MAX, +}; +#define IFLA_STATS_GETSET_MAX (__IFLA_STATS_GETSET_MAX - 1) enum { LINK_XSTATS_TYPE_UNSPEC, LINK_XSTATS_TYPE_BRIDGE, @@ -786,9 +848,18 @@ enum { enum { IFLA_OFFLOAD_XSTATS_UNSPEC, IFLA_OFFLOAD_XSTATS_CPU_HIT, + IFLA_OFFLOAD_XSTATS_HW_S_INFO, + IFLA_OFFLOAD_XSTATS_L3_STATS, __IFLA_OFFLOAD_XSTATS_MAX }; #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1) +enum { + IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC, + IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST, + IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED, + __IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX, +}; +#define IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX (__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX - 1) #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0) #define XDP_FLAGS_SKB_MODE (1U << 1) #define XDP_FLAGS_DRV_MODE (1U << 2) diff --git a/libc/kernel/uapi/linux/if_tunnel.h b/libc/kernel/uapi/linux/if_tunnel.h index 8e1847fba..01c2dc93a 100644 --- a/libc/kernel/uapi/linux/if_tunnel.h +++ b/libc/kernel/uapi/linux/if_tunnel.h @@ -169,5 +169,6 @@ enum { #define TUNNEL_VXLAN_OPT __cpu_to_be16(0x1000) #define TUNNEL_NOCACHE __cpu_to_be16(0x2000) #define TUNNEL_ERSPAN_OPT __cpu_to_be16(0x4000) -#define TUNNEL_OPTIONS_PRESENT (TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT) +#define TUNNEL_GTP_OPT __cpu_to_be16(0x8000) +#define TUNNEL_OPTIONS_PRESENT (TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT | TUNNEL_GTP_OPT) #endif diff --git a/libc/kernel/uapi/linux/iio/types.h b/libc/kernel/uapi/linux/iio/types.h index 22409a76f..aa66d5063 100644 --- a/libc/kernel/uapi/linux/iio/types.h +++ b/libc/kernel/uapi/linux/iio/types.h @@ -109,6 +109,7 @@ enum iio_event_type { IIO_EV_TYPE_THRESH_ADAPTIVE, IIO_EV_TYPE_MAG_ADAPTIVE, IIO_EV_TYPE_CHANGE, + IIO_EV_TYPE_MAG_REFERENCED, }; enum iio_event_direction { IIO_EV_DIR_EITHER, diff --git a/libc/kernel/uapi/linux/input-event-codes.h b/libc/kernel/uapi/linux/input-event-codes.h index 34cd23c5c..4b251df76 100644 --- a/libc/kernel/uapi/linux/input-event-codes.h +++ b/libc/kernel/uapi/linux/input-event-codes.h @@ -580,6 +580,21 @@ #define KEY_ONSCREEN_KEYBOARD 0x278 #define KEY_PRIVACY_SCREEN_TOGGLE 0x279 #define KEY_SELECTIVE_SCREENSHOT 0x27a +#define KEY_NEXT_ELEMENT 0x27b +#define KEY_PREVIOUS_ELEMENT 0x27c +#define KEY_AUTOPILOT_ENGAGE_TOGGLE 0x27d +#define KEY_MARK_WAYPOINT 0x27e +#define KEY_SOS 0x27f +#define KEY_NAV_CHART 0x280 +#define KEY_FISHING_CHART 0x281 +#define KEY_SINGLE_RANGE_RADAR 0x282 +#define KEY_DUAL_RANGE_RADAR 0x283 +#define KEY_RADAR_OVERLAY 0x284 +#define KEY_TRADITIONAL_SONAR 0x285 +#define KEY_CLEARVU_SONAR 0x286 +#define KEY_SIDEVU_SONAR 0x287 +#define KEY_NAV_INFO 0x288 +#define KEY_BRIGHTNESS_MENU 0x289 #define KEY_MACRO1 0x290 #define KEY_MACRO2 0x291 #define KEY_MACRO3 0x292 diff --git a/libc/kernel/uapi/linux/io_uring.h b/libc/kernel/uapi/linux/io_uring.h index 96944f863..2f599aa68 100644 --- a/libc/kernel/uapi/linux/io_uring.h +++ b/libc/kernel/uapi/linux/io_uring.h @@ -87,6 +87,7 @@ enum { #define IORING_SETUP_CLAMP (1U << 4) #define IORING_SETUP_ATTACH_WQ (1U << 5) #define IORING_SETUP_R_DISABLED (1U << 6) +#define IORING_SETUP_SUBMIT_ALL (1U << 7) enum { IORING_OP_NOP, IORING_OP_READV, @@ -128,6 +129,7 @@ enum { IORING_OP_MKDIRAT, IORING_OP_SYMLINKAT, IORING_OP_LINKAT, + IORING_OP_MSG_RING, IORING_OP_LAST, }; #define IORING_FSYNC_DATASYNC (1U << 0) @@ -185,6 +187,7 @@ struct io_cqring_offsets { #define IORING_ENTER_SQ_WAKEUP (1U << 1) #define IORING_ENTER_SQ_WAIT (1U << 2) #define IORING_ENTER_EXT_ARG (1U << 3) +#define IORING_ENTER_REGISTERED_RING (1U << 4) struct io_uring_params { __u32 sq_entries; __u32 cq_entries; @@ -209,6 +212,7 @@ struct io_uring_params { #define IORING_FEAT_NATIVE_WORKERS (1U << 9) #define IORING_FEAT_RSRC_TAGS (1U << 10) #define IORING_FEAT_CQE_SKIP (1U << 11) +#define IORING_FEAT_LINKED_FILE (1U << 12) enum { IORING_REGISTER_BUFFERS = 0, IORING_UNREGISTER_BUFFERS = 1, @@ -230,6 +234,8 @@ enum { IORING_REGISTER_IOWQ_AFF = 17, IORING_UNREGISTER_IOWQ_AFF = 18, IORING_REGISTER_IOWQ_MAX_WORKERS = 19, + IORING_REGISTER_RING_FDS = 20, + IORING_UNREGISTER_RING_FDS = 21, IORING_REGISTER_LAST }; enum { diff --git a/libc/kernel/uapi/linux/ioam6_iptunnel.h b/libc/kernel/uapi/linux/ioam6_iptunnel.h index 742622587..ec1a6a86b 100644 --- a/libc/kernel/uapi/linux/ioam6_iptunnel.h +++ b/libc/kernel/uapi/linux/ioam6_iptunnel.h @@ -32,6 +32,10 @@ enum { IOAM6_IPTUNNEL_MODE, IOAM6_IPTUNNEL_DST, IOAM6_IPTUNNEL_TRACE, +#define IOAM6_IPTUNNEL_FREQ_MIN 1 +#define IOAM6_IPTUNNEL_FREQ_MAX 1000000 + IOAM6_IPTUNNEL_FREQ_K, + IOAM6_IPTUNNEL_FREQ_N, __IOAM6_IPTUNNEL_MAX, }; #define IOAM6_IPTUNNEL_MAX (__IOAM6_IPTUNNEL_MAX - 1) diff --git a/libc/kernel/uapi/linux/iommu.h b/libc/kernel/uapi/linux/iommu.h index 0a0af9232..0304a32bb 100644 --- a/libc/kernel/uapi/linux/iommu.h +++ b/libc/kernel/uapi/linux/iommu.h @@ -85,76 +85,4 @@ struct iommu_page_response { __u32 grpid; __u32 code; }; -enum iommu_inv_granularity { - IOMMU_INV_GRANU_DOMAIN, - IOMMU_INV_GRANU_PASID, - IOMMU_INV_GRANU_ADDR, - IOMMU_INV_GRANU_NR, -}; -struct iommu_inv_addr_info { -#define IOMMU_INV_ADDR_FLAGS_PASID (1 << 0) -#define IOMMU_INV_ADDR_FLAGS_ARCHID (1 << 1) -#define IOMMU_INV_ADDR_FLAGS_LEAF (1 << 2) - __u32 flags; - __u32 archid; - __u64 pasid; - __u64 addr; - __u64 granule_size; - __u64 nb_granules; -}; -struct iommu_inv_pasid_info { -#define IOMMU_INV_PASID_FLAGS_PASID (1 << 0) -#define IOMMU_INV_PASID_FLAGS_ARCHID (1 << 1) - __u32 flags; - __u32 archid; - __u64 pasid; -}; -struct iommu_cache_invalidate_info { - __u32 argsz; -#define IOMMU_CACHE_INVALIDATE_INFO_VERSION_1 1 - __u32 version; -#define IOMMU_CACHE_INV_TYPE_IOTLB (1 << 0) -#define IOMMU_CACHE_INV_TYPE_DEV_IOTLB (1 << 1) -#define IOMMU_CACHE_INV_TYPE_PASID (1 << 2) -#define IOMMU_CACHE_INV_TYPE_NR (3) - __u8 cache; - __u8 granularity; - __u8 padding[6]; - union { - struct iommu_inv_pasid_info pasid_info; - struct iommu_inv_addr_info addr_info; - } granu; -}; -struct iommu_gpasid_bind_data_vtd { -#define IOMMU_SVA_VTD_GPASID_SRE (1 << 0) -#define IOMMU_SVA_VTD_GPASID_EAFE (1 << 1) -#define IOMMU_SVA_VTD_GPASID_PCD (1 << 2) -#define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) -#define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) -#define IOMMU_SVA_VTD_GPASID_CD (1 << 5) -#define IOMMU_SVA_VTD_GPASID_WPE (1 << 6) -#define IOMMU_SVA_VTD_GPASID_LAST (1 << 7) - __u64 flags; - __u32 pat; - __u32 emt; -}; -#define IOMMU_SVA_VTD_GPASID_MTS_MASK (IOMMU_SVA_VTD_GPASID_CD | IOMMU_SVA_VTD_GPASID_EMTE | IOMMU_SVA_VTD_GPASID_PCD | IOMMU_SVA_VTD_GPASID_PWT) -struct iommu_gpasid_bind_data { - __u32 argsz; -#define IOMMU_GPASID_BIND_VERSION_1 1 - __u32 version; -#define IOMMU_PASID_FORMAT_INTEL_VTD 1 -#define IOMMU_PASID_FORMAT_LAST 2 - __u32 format; - __u32 addr_width; -#define IOMMU_SVA_GPASID_VAL (1 << 0) - __u64 flags; - __u64 gpgd; - __u64 hpasid; - __u64 gpasid; - __u8 padding[8]; - union { - struct iommu_gpasid_bind_data_vtd vtd; - } vendor; -}; #endif diff --git a/libc/kernel/uapi/linux/kexec.h b/libc/kernel/uapi/linux/kexec.h index 2e3bd0c8c..7dbc87e90 100644 --- a/libc/kernel/uapi/linux/kexec.h +++ b/libc/kernel/uapi/linux/kexec.h @@ -43,8 +43,8 @@ #define KEXEC_SEGMENT_MAX 16 struct kexec_segment { const void * buf; - size_t bufsz; + __kernel_size_t bufsz; const void * mem; - size_t memsz; + __kernel_size_t memsz; }; #endif diff --git a/libc/kernel/uapi/linux/kfd_ioctl.h b/libc/kernel/uapi/linux/kfd_ioctl.h index c52ac6447..8ec47f404 100644 --- a/libc/kernel/uapi/linux/kfd_ioctl.h +++ b/libc/kernel/uapi/linux/kfd_ioctl.h @@ -21,7 +21,7 @@ #include #include #define KFD_IOCTL_MAJOR_VERSION 1 -#define KFD_IOCTL_MINOR_VERSION 6 +#define KFD_IOCTL_MINOR_VERSION 8 struct kfd_ioctl_get_version_args { __u32 major_version; __u32 minor_version; @@ -132,6 +132,7 @@ struct kfd_ioctl_dbg_wave_control_args { __u32 gpu_id; __u32 buf_size_in_bytes; }; +#define KFD_INVALID_FD 0xffffffff #define KFD_IOC_EVENT_SIGNAL 0 #define KFD_IOC_EVENT_NODECHANGE 1 #define KFD_IOC_EVENT_DEVICESTATECHANGE 2 @@ -296,10 +297,45 @@ enum kfd_smi_event { KFD_SMI_EVENT_GPU_POST_RESET = 4, }; #define KFD_SMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1)) +#define KFD_SMI_EVENT_MSG_SIZE 96 struct kfd_ioctl_smi_events_args { __u32 gpuid; __u32 anon_fd; }; +enum kfd_criu_op { + KFD_CRIU_OP_PROCESS_INFO, + KFD_CRIU_OP_CHECKPOINT, + KFD_CRIU_OP_UNPAUSE, + KFD_CRIU_OP_RESTORE, + KFD_CRIU_OP_RESUME, +}; +struct kfd_ioctl_criu_args { + __u64 devices; + __u64 bos; + __u64 priv_data; + __u64 priv_data_size; + __u32 num_devices; + __u32 num_bos; + __u32 num_objects; + __u32 pid; + __u32 op; +}; +struct kfd_criu_device_bucket { + __u32 user_gpu_id; + __u32 actual_gpu_id; + __u32 drm_fd; + __u32 pad; +}; +struct kfd_criu_bo_bucket { + __u64 addr; + __u64 size; + __u64 offset; + __u64 restored_offset; + __u32 gpu_id; + __u32 alloc_flags; + __u32 dmabuf_fd; + __u32 pad; +}; enum kfd_mmio_remap { KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL = 0, KFD_MMIO_REMAP_HDP_REG_FLUSH_CNTL = 4, @@ -337,7 +373,7 @@ struct kfd_ioctl_svm_args { __u64 size; __u32 op; __u32 nattr; - struct kfd_ioctl_svm_attribute attrs[0]; + struct kfd_ioctl_svm_attribute attrs[]; }; struct kfd_ioctl_set_xnack_mode_args { __s32 xnack_enabled; @@ -359,10 +395,10 @@ struct kfd_ioctl_set_xnack_mode_args { #define AMDKFD_IOC_SET_EVENT AMDKFD_IOW(0x0A, struct kfd_ioctl_set_event_args) #define AMDKFD_IOC_RESET_EVENT AMDKFD_IOW(0x0B, struct kfd_ioctl_reset_event_args) #define AMDKFD_IOC_WAIT_EVENTS AMDKFD_IOWR(0x0C, struct kfd_ioctl_wait_events_args) -#define AMDKFD_IOC_DBG_REGISTER AMDKFD_IOW(0x0D, struct kfd_ioctl_dbg_register_args) -#define AMDKFD_IOC_DBG_UNREGISTER AMDKFD_IOW(0x0E, struct kfd_ioctl_dbg_unregister_args) -#define AMDKFD_IOC_DBG_ADDRESS_WATCH AMDKFD_IOW(0x0F, struct kfd_ioctl_dbg_address_watch_args) -#define AMDKFD_IOC_DBG_WAVE_CONTROL AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args) +#define AMDKFD_IOC_DBG_REGISTER_DEPRECATED AMDKFD_IOW(0x0D, struct kfd_ioctl_dbg_register_args) +#define AMDKFD_IOC_DBG_UNREGISTER_DEPRECATED AMDKFD_IOW(0x0E, struct kfd_ioctl_dbg_unregister_args) +#define AMDKFD_IOC_DBG_ADDRESS_WATCH_DEPRECATED AMDKFD_IOW(0x0F, struct kfd_ioctl_dbg_address_watch_args) +#define AMDKFD_IOC_DBG_WAVE_CONTROL_DEPRECATED AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args) #define AMDKFD_IOC_SET_SCRATCH_BACKING_VA AMDKFD_IOWR(0x11, struct kfd_ioctl_set_scratch_backing_va_args) #define AMDKFD_IOC_GET_TILE_CONFIG AMDKFD_IOWR(0x12, struct kfd_ioctl_get_tile_config_args) #define AMDKFD_IOC_SET_TRAP_HANDLER AMDKFD_IOW(0x13, struct kfd_ioctl_set_trap_handler_args) @@ -380,6 +416,7 @@ struct kfd_ioctl_set_xnack_mode_args { #define AMDKFD_IOC_SMI_EVENTS AMDKFD_IOWR(0x1F, struct kfd_ioctl_smi_events_args) #define AMDKFD_IOC_SVM AMDKFD_IOWR(0x20, struct kfd_ioctl_svm_args) #define AMDKFD_IOC_SET_XNACK_MODE AMDKFD_IOWR(0x21, struct kfd_ioctl_set_xnack_mode_args) +#define AMDKFD_IOC_CRIU_OP AMDKFD_IOWR(0x22, struct kfd_ioctl_criu_args) #define AMDKFD_COMMAND_START 0x01 -#define AMDKFD_COMMAND_END 0x22 +#define AMDKFD_COMMAND_END 0x23 #endif diff --git a/libc/kernel/uapi/linux/kvm.h b/libc/kernel/uapi/linux/kvm.h index 1cf71827c..5cc9905d5 100644 --- a/libc/kernel/uapi/linux/kvm.h +++ b/libc/kernel/uapi/linux/kvm.h @@ -337,7 +337,11 @@ struct kvm_run { #define KVM_SYSTEM_EVENT_RESET 2 #define KVM_SYSTEM_EVENT_CRASH 3 __u32 type; - __u64 flags; + __u32 ndata; + union { + __u64 flags; + __u64 data[16]; + }; } system_event; struct { __u64 addr; @@ -419,7 +423,10 @@ struct kvm_s390_mem_op { __u32 op; __u64 buf; union { - __u8 ar; + struct { + __u8 ar; + __u8 key; + }; __u32 sida_offset; __u8 reserved[32]; }; @@ -428,8 +435,11 @@ struct kvm_s390_mem_op { #define KVM_S390_MEMOP_LOGICAL_WRITE 1 #define KVM_S390_MEMOP_SIDA_READ 2 #define KVM_S390_MEMOP_SIDA_WRITE 3 +#define KVM_S390_MEMOP_ABSOLUTE_READ 4 +#define KVM_S390_MEMOP_ABSOLUTE_WRITE 5 #define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0) #define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1) +#define KVM_S390_MEMOP_F_SKEY_PROTECTION (1ULL << 2) struct kvm_interrupt { __u32 irq; }; @@ -890,6 +900,10 @@ struct kvm_ppc_resize_hpt { #define KVM_CAP_XSAVE2 208 #define KVM_CAP_SYS_ATTRIBUTES 209 #define KVM_CAP_PPC_AIL_MODE_3 210 +#define KVM_CAP_S390_MEM_OP_EXTENSION 211 +#define KVM_CAP_PMU_CAPABILITY 212 +#define KVM_CAP_DISABLE_QUIRKS2 213 +#define KVM_CAP_SYSTEM_EVENT_DATA 215 #ifdef KVM_CAP_IRQ_ROUTING struct kvm_irq_routing_irqchip { __u32 irqchip; @@ -1480,6 +1494,7 @@ struct kvm_dirty_gfn { }; #define KVM_BUS_LOCK_DETECTION_OFF (1 << 0) #define KVM_BUS_LOCK_DETECTION_EXIT (1 << 1) +#define KVM_PMU_CAP_DISABLE (1 << 0) struct kvm_stats_header { __u32 flags; __u32 name_size; diff --git a/libc/kernel/uapi/linux/lirc.h b/libc/kernel/uapi/linux/lirc.h index a0ac24ac9..ea4550660 100644 --- a/libc/kernel/uapi/linux/lirc.h +++ b/libc/kernel/uapi/linux/lirc.h @@ -26,18 +26,21 @@ #define LIRC_MODE2_PULSE 0x01000000 #define LIRC_MODE2_FREQUENCY 0x02000000 #define LIRC_MODE2_TIMEOUT 0x03000000 +#define LIRC_MODE2_OVERFLOW 0x04000000 #define LIRC_VALUE_MASK 0x00FFFFFF #define LIRC_MODE2_MASK 0xFF000000 #define LIRC_SPACE(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_SPACE) #define LIRC_PULSE(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_PULSE) #define LIRC_FREQUENCY(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_FREQUENCY) #define LIRC_TIMEOUT(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_TIMEOUT) +#define LIRC_OVERFLOW(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_OVERFLOW) #define LIRC_VALUE(val) ((val) & LIRC_VALUE_MASK) #define LIRC_MODE2(val) ((val) & LIRC_MODE2_MASK) #define LIRC_IS_SPACE(val) (LIRC_MODE2(val) == LIRC_MODE2_SPACE) #define LIRC_IS_PULSE(val) (LIRC_MODE2(val) == LIRC_MODE2_PULSE) #define LIRC_IS_FREQUENCY(val) (LIRC_MODE2(val) == LIRC_MODE2_FREQUENCY) #define LIRC_IS_TIMEOUT(val) (LIRC_MODE2(val) == LIRC_MODE2_TIMEOUT) +#define LIRC_IS_OVERFLOW(val) (LIRC_MODE2(val) == LIRC_MODE2_OVERFLOW) #define lirc_t int #define LIRC_MODE2SEND(x) (x) #define LIRC_SEND2MODE(x) (x) @@ -63,17 +66,13 @@ #define LIRC_CAN_REC_LIRCCODE LIRC_MODE2REC(LIRC_MODE_LIRCCODE) #define LIRC_CAN_REC_MASK LIRC_MODE2REC(LIRC_CAN_SEND_MASK) #define LIRC_CAN_SET_REC_CARRIER (LIRC_CAN_SET_SEND_CARRIER << 16) -#define LIRC_CAN_SET_REC_DUTY_CYCLE (LIRC_CAN_SET_SEND_DUTY_CYCLE << 16) -#define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE 0x40000000 #define LIRC_CAN_SET_REC_CARRIER_RANGE 0x80000000 #define LIRC_CAN_GET_REC_RESOLUTION 0x20000000 #define LIRC_CAN_SET_REC_TIMEOUT 0x10000000 -#define LIRC_CAN_SET_REC_FILTER 0x08000000 #define LIRC_CAN_MEASURE_CARRIER 0x02000000 #define LIRC_CAN_USE_WIDEBAND_RECEIVER 0x04000000 #define LIRC_CAN_SEND(x) ((x) & LIRC_CAN_SEND_MASK) #define LIRC_CAN_REC(x) ((x) & LIRC_CAN_REC_MASK) -#define LIRC_CAN_NOTIFY_DECODE 0x01000000 #define LIRC_GET_FEATURES _IOR('i', 0x00000000, __u32) #define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32) #define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32) diff --git a/libc/kernel/uapi/linux/mctp.h b/libc/kernel/uapi/linux/mctp.h index 21a9a14fb..f02c12f87 100644 --- a/libc/kernel/uapi/linux/mctp.h +++ b/libc/kernel/uapi/linux/mctp.h @@ -46,5 +46,13 @@ struct sockaddr_mctp_ext { #define MCTP_ADDR_ANY 0xff #define MCTP_TAG_MASK 0x07 #define MCTP_TAG_OWNER 0x08 +#define MCTP_TAG_PREALLOC 0x10 #define MCTP_OPT_ADDR_EXT 1 +#define SIOCMCTPALLOCTAG (SIOCPROTOPRIVATE + 0) +#define SIOCMCTPDROPTAG (SIOCPROTOPRIVATE + 1) +struct mctp_ioc_tag_ctl { + mctp_eid_t peer_addr; + __u8 tag; + __u16 flags; +}; #endif diff --git a/libc/kernel/uapi/linux/mptcp.h b/libc/kernel/uapi/linux/mptcp.h index 67b0ce305..7b3acd526 100644 --- a/libc/kernel/uapi/linux/mptcp.h +++ b/libc/kernel/uapi/linux/mptcp.h @@ -77,6 +77,7 @@ enum { #define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1) #define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2) #define MPTCP_PM_ADDR_FLAG_FULLMESH (1 << 3) +#define MPTCP_PM_ADDR_FLAG_IMPLICIT (1 << 4) enum { MPTCP_PM_CMD_UNSPEC, MPTCP_PM_CMD_ADD_ADDR, diff --git a/libc/kernel/uapi/linux/mroute6.h b/libc/kernel/uapi/linux/mroute6.h index c73765c44..68480de3f 100644 --- a/libc/kernel/uapi/linux/mroute6.h +++ b/libc/kernel/uapi/linux/mroute6.h @@ -93,6 +93,7 @@ struct mrt6msg { #define MRT6MSG_NOCACHE 1 #define MRT6MSG_WRONGMIF 2 #define MRT6MSG_WHOLEPKT 3 +#define MRT6MSG_WRMIFWHOLE 4 __u8 im6_mbz; __u8 im6_msgtype; __u16 im6_mif; diff --git a/libc/kernel/uapi/linux/ndctl.h b/libc/kernel/uapi/linux/ndctl.h index 53f8ba4d2..0fd3ac4f2 100644 --- a/libc/kernel/uapi/linux/ndctl.h +++ b/libc/kernel/uapi/linux/ndctl.h @@ -129,7 +129,6 @@ enum { #define ND_DEVICE_REGION_BLK 3 #define ND_DEVICE_NAMESPACE_IO 4 #define ND_DEVICE_NAMESPACE_PMEM 5 -#define ND_DEVICE_NAMESPACE_BLK 6 #define ND_DEVICE_DAX_PMEM 7 enum nd_driver_flags { ND_DRIVER_DIMM = 1 << ND_DEVICE_DIMM, @@ -137,7 +136,6 @@ enum nd_driver_flags { ND_DRIVER_REGION_BLK = 1 << ND_DEVICE_REGION_BLK, ND_DRIVER_NAMESPACE_IO = 1 << ND_DEVICE_NAMESPACE_IO, ND_DRIVER_NAMESPACE_PMEM = 1 << ND_DEVICE_NAMESPACE_PMEM, - ND_DRIVER_NAMESPACE_BLK = 1 << ND_DEVICE_NAMESPACE_BLK, ND_DRIVER_DAX_PMEM = 1 << ND_DEVICE_DAX_PMEM, }; enum ars_masks { diff --git a/libc/kernel/uapi/linux/net_dropmon.h b/libc/kernel/uapi/linux/net_dropmon.h index 01b76cb10..35f70a565 100644 --- a/libc/kernel/uapi/linux/net_dropmon.h +++ b/libc/kernel/uapi/linux/net_dropmon.h @@ -87,6 +87,7 @@ enum net_dm_attr { NET_DM_ATTR_SW_DROPS, NET_DM_ATTR_HW_DROPS, NET_DM_ATTR_FLOW_ACTION_COOKIE, + NET_DM_ATTR_REASON, __NET_DM_ATTR_MAX, NET_DM_ATTR_MAX = __NET_DM_ATTR_MAX - 1 }; diff --git a/libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h b/libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h index 75fa359da..d100deced 100644 --- a/libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h +++ b/libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h @@ -70,6 +70,7 @@ enum nfqnl_attr_type { NFQA_SECCTX, NFQA_VLAN, NFQA_L2HDR, + NFQA_PRIORITY, __NFQA_MAX }; #define NFQA_MAX (__NFQA_MAX - 1) diff --git a/libc/kernel/uapi/linux/nfs4.h b/libc/kernel/uapi/linux/nfs4.h index 9d614ced2..ef860e251 100644 --- a/libc/kernel/uapi/linux/nfs4.h +++ b/libc/kernel/uapi/linux/nfs4.h @@ -45,6 +45,7 @@ #define NFS4_FH_VOL_RENAME 0x0008 #define NFS4_OPEN_RESULT_CONFIRM 0x0002 #define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004 +#define NFS4_OPEN_RESULT_PRESERVE_UNLINKED 0x0008 #define NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK 0x0020 #define NFS4_SHARE_ACCESS_MASK 0x000F #define NFS4_SHARE_ACCESS_READ 0x0001 diff --git a/libc/kernel/uapi/linux/nl80211.h b/libc/kernel/uapi/linux/nl80211.h index e9021789f..61de3914d 100644 --- a/libc/kernel/uapi/linux/nl80211.h +++ b/libc/kernel/uapi/linux/nl80211.h @@ -511,6 +511,7 @@ enum nl80211_attrs { NL80211_ATTR_MBSSID_ELEMS, NL80211_ATTR_RADAR_BACKGROUND, NL80211_ATTR_AP_SETTINGS_FLAGS, + NL80211_ATTR_EHT_CAPABILITY, __NL80211_ATTR_AFTER_LAST, NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST, NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 @@ -555,6 +556,8 @@ enum nl80211_attrs { #define NL80211_HE_MAX_CAPABILITY_LEN 54 #define NL80211_MAX_NR_CIPHER_SUITES 5 #define NL80211_MAX_NR_AKM_SUITES 2 +#define NL80211_EHT_MIN_CAPABILITY_LEN 13 +#define NL80211_EHT_MAX_CAPABILITY_LEN 51 #define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10 #define NL80211_SCAN_RSSI_THOLD_OFF - 300 #define NL80211_CQM_TXE_MAX_INTVL 1800 @@ -616,6 +619,29 @@ enum nl80211_he_ru_alloc { NL80211_RATE_INFO_HE_RU_ALLOC_996, NL80211_RATE_INFO_HE_RU_ALLOC_2x996, }; +enum nl80211_eht_gi { + NL80211_RATE_INFO_EHT_GI_0_8, + NL80211_RATE_INFO_EHT_GI_1_6, + NL80211_RATE_INFO_EHT_GI_3_2, +}; +enum nl80211_eht_ru_alloc { + NL80211_RATE_INFO_EHT_RU_ALLOC_26, + NL80211_RATE_INFO_EHT_RU_ALLOC_52, + NL80211_RATE_INFO_EHT_RU_ALLOC_52P26, + NL80211_RATE_INFO_EHT_RU_ALLOC_106, + NL80211_RATE_INFO_EHT_RU_ALLOC_106P26, + NL80211_RATE_INFO_EHT_RU_ALLOC_242, + NL80211_RATE_INFO_EHT_RU_ALLOC_484, + NL80211_RATE_INFO_EHT_RU_ALLOC_484P242, + NL80211_RATE_INFO_EHT_RU_ALLOC_996, + NL80211_RATE_INFO_EHT_RU_ALLOC_996P484, + NL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242, + NL80211_RATE_INFO_EHT_RU_ALLOC_2x996, + NL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484, + NL80211_RATE_INFO_EHT_RU_ALLOC_3x996, + NL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484, + NL80211_RATE_INFO_EHT_RU_ALLOC_4x996, +}; enum nl80211_rate_info { __NL80211_RATE_INFO_INVALID, NL80211_RATE_INFO_BITRATE, @@ -635,6 +661,11 @@ enum nl80211_rate_info { NL80211_RATE_INFO_HE_GI, NL80211_RATE_INFO_HE_DCM, NL80211_RATE_INFO_HE_RU_ALLOC, + NL80211_RATE_INFO_320_MHZ_WIDTH, + NL80211_RATE_INFO_EHT_MCS, + NL80211_RATE_INFO_EHT_NSS, + NL80211_RATE_INFO_EHT_GI, + NL80211_RATE_INFO_EHT_RU_ALLOC, __NL80211_RATE_INFO_AFTER_LAST, NL80211_RATE_INFO_MAX = __NL80211_RATE_INFO_AFTER_LAST - 1 }; @@ -754,6 +785,10 @@ enum nl80211_band_iftype_attr { NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE, NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA, NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS, + NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC, + NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY, + NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET, + NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE, __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST, NL80211_BAND_IFTYPE_ATTR_MAX = __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST - 1 }; @@ -810,6 +845,8 @@ enum nl80211_frequency_attr { NL80211_FREQUENCY_ATTR_4MHZ, NL80211_FREQUENCY_ATTR_8MHZ, NL80211_FREQUENCY_ATTR_16MHZ, + NL80211_FREQUENCY_ATTR_NO_320MHZ, + NL80211_FREQUENCY_ATTR_NO_EHT, __NL80211_FREQUENCY_ATTR_AFTER_LAST, NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1 }; @@ -878,6 +915,7 @@ enum nl80211_reg_rule_flags { NL80211_RRF_NO_80MHZ = 1 << 15, NL80211_RRF_NO_160MHZ = 1 << 16, NL80211_RRF_NO_HE = 1 << 17, + NL80211_RRF_NO_320MHZ = 1 << 18, }; #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR #define NL80211_RRF_NO_IBSS NL80211_RRF_NO_IR @@ -1033,6 +1071,7 @@ enum nl80211_chan_width { NL80211_CHAN_WIDTH_4, NL80211_CHAN_WIDTH_8, NL80211_CHAN_WIDTH_16, + NL80211_CHAN_WIDTH_320, }; enum nl80211_bss_scan_width { NL80211_BSS_CHAN_WIDTH_20, diff --git a/libc/kernel/uapi/linux/nvme_ioctl.h b/libc/kernel/uapi/linux/nvme_ioctl.h index f2a328e2d..a2f99148c 100644 --- a/libc/kernel/uapi/linux/nvme_ioctl.h +++ b/libc/kernel/uapi/linux/nvme_ioctl.h @@ -63,7 +63,10 @@ struct nvme_passthru_cmd64 { __u64 metadata; __u64 addr; __u32 metadata_len; - __u32 data_len; + union { + __u32 data_len; + __u32 vec_cnt; + }; __u32 cdw10; __u32 cdw11; __u32 cdw12; @@ -84,4 +87,5 @@ struct nvme_passthru_cmd64 { #define NVME_IOCTL_RESCAN _IO('N', 0x46) #define NVME_IOCTL_ADMIN64_CMD _IOWR('N', 0x47, struct nvme_passthru_cmd64) #define NVME_IOCTL_IO64_CMD _IOWR('N', 0x48, struct nvme_passthru_cmd64) +#define NVME_IOCTL_IO64_CMD_VEC _IOWR('N', 0x49, struct nvme_passthru_cmd64) #endif diff --git a/libc/kernel/uapi/linux/omap3isp.h b/libc/kernel/uapi/linux/omap3isp.h index d2eceb740..53345e3f6 100644 --- a/libc/kernel/uapi/linux/omap3isp.h +++ b/libc/kernel/uapi/linux/omap3isp.h @@ -89,10 +89,11 @@ struct omap3isp_h3a_aewb_config { struct omap3isp_stat_data { struct timeval ts; void __user * buf; - __u32 buf_size; + __struct_group(, frame,, __u32 buf_size; __u16 frame_number; __u16 cur_frame; __u16 config_counter; + ); }; #define OMAP3ISP_HIST_BINS_32 0 #define OMAP3ISP_HIST_BINS_64 1 diff --git a/libc/kernel/uapi/linux/openvswitch.h b/libc/kernel/uapi/linux/openvswitch.h index 1f8ae17ba..c7d719c76 100644 --- a/libc/kernel/uapi/linux/openvswitch.h +++ b/libc/kernel/uapi/linux/openvswitch.h @@ -190,6 +190,10 @@ enum ovs_key_attr { OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4, OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6, OVS_KEY_ATTR_NSH, + OVS_KEY_ATTR_PACKET_TYPE, + OVS_KEY_ATTR_ND_EXTENSIONS, + OVS_KEY_ATTR_TUNNEL_INFO, + OVS_KEY_ATTR_IPV6_EXTHDRS, __OVS_KEY_ATTR_MAX }; #define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1) @@ -245,6 +249,9 @@ struct ovs_key_ipv6 { __u8 ipv6_hlimit; __u8 ipv6_frag; }; +struct ovs_key_ipv6_exthdrs { + __u16 hdrs; +}; struct ovs_key_tcp { __be16 tcp_src; __be16 tcp_dst; diff --git a/libc/kernel/uapi/linux/perf_event.h b/libc/kernel/uapi/linux/perf_event.h index b02258615..bcc4e9721 100644 --- a/libc/kernel/uapi/linux/perf_event.h +++ b/libc/kernel/uapi/linux/perf_event.h @@ -165,6 +165,8 @@ enum { PERF_BR_SYSRET = 8, PERF_BR_COND_CALL = 9, PERF_BR_COND_RET = 10, + PERF_BR_ERET = 11, + PERF_BR_IRQ = 12, PERF_BR_MAX, }; #define PERF_SAMPLE_BRANCH_PLM_ALL (PERF_SAMPLE_BRANCH_USER | PERF_SAMPLE_BRANCH_KERNEL | PERF_SAMPLE_BRANCH_HV) diff --git a/libc/kernel/uapi/linux/pkt_cls.h b/libc/kernel/uapi/linux/pkt_cls.h index 9fd89e0b8..58d82053f 100644 --- a/libc/kernel/uapi/linux/pkt_cls.h +++ b/libc/kernel/uapi/linux/pkt_cls.h @@ -476,6 +476,7 @@ enum { TCA_FLOWER_KEY_ENC_OPTS_GENEVE, TCA_FLOWER_KEY_ENC_OPTS_VXLAN, TCA_FLOWER_KEY_ENC_OPTS_ERSPAN, + TCA_FLOWER_KEY_ENC_OPTS_GTP, __TCA_FLOWER_KEY_ENC_OPTS_MAX, }; #define TCA_FLOWER_KEY_ENC_OPTS_MAX (__TCA_FLOWER_KEY_ENC_OPTS_MAX - 1) @@ -502,6 +503,13 @@ enum { __TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX, }; #define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX (__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1) +enum { + TCA_FLOWER_KEY_ENC_OPT_GTP_UNSPEC, + TCA_FLOWER_KEY_ENC_OPT_GTP_PDU_TYPE, + TCA_FLOWER_KEY_ENC_OPT_GTP_QFI, + __TCA_FLOWER_KEY_ENC_OPT_GTP_MAX, +}; +#define TCA_FLOWER_KEY_ENC_OPT_GTP_MAX (__TCA_FLOWER_KEY_ENC_OPT_GTP_MAX - 1) enum { TCA_FLOWER_KEY_MPLS_OPTS_UNSPEC, TCA_FLOWER_KEY_MPLS_OPTS_LSE, diff --git a/libc/kernel/uapi/linux/psci.h b/libc/kernel/uapi/linux/psci.h index bc522e78f..31e746562 100644 --- a/libc/kernel/uapi/linux/psci.h +++ b/libc/kernel/uapi/linux/psci.h @@ -60,6 +60,8 @@ #define PSCI_0_2_TOS_UP_MIGRATE 0 #define PSCI_0_2_TOS_UP_NO_MIGRATE 1 #define PSCI_0_2_TOS_MP 2 +#define PSCI_1_1_RESET_TYPE_SYSTEM_WARM_RESET 0 +#define PSCI_1_1_RESET_TYPE_VENDOR_START 0x80000000U #define PSCI_VERSION_MAJOR_SHIFT 16 #define PSCI_VERSION_MINOR_MASK ((1U << PSCI_VERSION_MAJOR_SHIFT) - 1) #define PSCI_VERSION_MAJOR_MASK ~PSCI_VERSION_MINOR_MASK diff --git a/libc/kernel/uapi/linux/reiserfs_xattr.h b/libc/kernel/uapi/linux/reiserfs_xattr.h index 36d31f6ef..16a7a0853 100644 --- a/libc/kernel/uapi/linux/reiserfs_xattr.h +++ b/libc/kernel/uapi/linux/reiserfs_xattr.h @@ -27,6 +27,6 @@ struct reiserfs_xattr_header { struct reiserfs_security_handle { const char * name; void * value; - size_t length; + __kernel_size_t length; }; #endif diff --git a/libc/kernel/uapi/linux/rfkill.h b/libc/kernel/uapi/linux/rfkill.h index 6020bafaf..b90e67c5c 100644 --- a/libc/kernel/uapi/linux/rfkill.h +++ b/libc/kernel/uapi/linux/rfkill.h @@ -63,4 +63,6 @@ struct rfkill_event_ext { #define RFKILL_IOC_MAGIC 'R' #define RFKILL_IOC_NOINPUT 1 #define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT) +#define RFKILL_IOC_MAX_SIZE 2 +#define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_MAX_SIZE, __u32) #endif diff --git a/libc/kernel/uapi/linux/rpmsg.h b/libc/kernel/uapi/linux/rpmsg.h index c5b5a7667..9ceccddf4 100644 --- a/libc/kernel/uapi/linux/rpmsg.h +++ b/libc/kernel/uapi/linux/rpmsg.h @@ -28,4 +28,6 @@ struct rpmsg_endpoint_info { }; #define RPMSG_CREATE_EPT_IOCTL _IOW(0xb5, 0x1, struct rpmsg_endpoint_info) #define RPMSG_DESTROY_EPT_IOCTL _IO(0xb5, 0x2) +#define RPMSG_CREATE_DEV_IOCTL _IOW(0xb5, 0x3, struct rpmsg_endpoint_info) +#define RPMSG_RELEASE_DEV_IOCTL _IOW(0xb5, 0x4, struct rpmsg_endpoint_info) #endif diff --git a/libc/kernel/uapi/linux/rseq.h b/libc/kernel/uapi/linux/rseq.h index ba0ceb187..29a9457bd 100644 --- a/libc/kernel/uapi/linux/rseq.h +++ b/libc/kernel/uapi/linux/rseq.h @@ -47,22 +47,7 @@ struct rseq_cs { struct rseq { __u32 cpu_id_start; __u32 cpu_id; - union { - __u64 ptr64; -#ifdef __LP64__ - __u64 ptr; -#else - struct { -#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || defined(__BIG_ENDIAN) - __u32 padding; - __u32 ptr32; -#else - __u32 ptr32; - __u32 padding; -#endif - } ptr; -#endif - } rseq_cs; + __u64 rseq_cs; __u32 flags; } __attribute__((aligned(4 * sizeof(__u64)))); #endif diff --git a/libc/kernel/uapi/linux/rtc.h b/libc/kernel/uapi/linux/rtc.h index cf5f22a9a..d75bc45ea 100644 --- a/libc/kernel/uapi/linux/rtc.h +++ b/libc/kernel/uapi/linux/rtc.h @@ -96,7 +96,8 @@ struct rtc_param { #define RTC_FEATURE_UPDATE_INTERRUPT 4 #define RTC_FEATURE_CORRECTION 5 #define RTC_FEATURE_BACKUP_SWITCH_MODE 6 -#define RTC_FEATURE_CNT 7 +#define RTC_FEATURE_ALARM_WAKEUP_ONLY 7 +#define RTC_FEATURE_CNT 8 #define RTC_PARAM_FEATURES 0 #define RTC_PARAM_CORRECTION 1 #define RTC_PARAM_BACKUP_SWITCH_MODE 2 diff --git a/libc/kernel/uapi/linux/rtnetlink.h b/libc/kernel/uapi/linux/rtnetlink.h index 91c3ee4b8..321e4877f 100644 --- a/libc/kernel/uapi/linux/rtnetlink.h +++ b/libc/kernel/uapi/linux/rtnetlink.h @@ -131,6 +131,8 @@ enum { #define RTM_NEWSTATS RTM_NEWSTATS RTM_GETSTATS = 94, #define RTM_GETSTATS RTM_GETSTATS + RTM_SETSTATS, +#define RTM_SETSTATS RTM_SETSTATS RTM_NEWCACHEREPORT = 96, #define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT RTM_NEWCHAIN = 100, @@ -163,6 +165,12 @@ enum { #define RTM_DELNEXTHOPBUCKET RTM_DELNEXTHOPBUCKET RTM_GETNEXTHOPBUCKET, #define RTM_GETNEXTHOPBUCKET RTM_GETNEXTHOPBUCKET + RTM_NEWTUNNEL = 120, +#define RTM_NEWTUNNEL RTM_NEWTUNNEL + RTM_DELTUNNEL, +#define RTM_DELTUNNEL RTM_DELTUNNEL + RTM_GETTUNNEL, +#define RTM_GETTUNNEL RTM_GETTUNNEL __RTM_MAX, #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) }; @@ -561,6 +569,10 @@ enum rtnetlink_groups { #define RTNLGRP_BRVLAN RTNLGRP_BRVLAN RTNLGRP_MCTP_IFADDR, #define RTNLGRP_MCTP_IFADDR RTNLGRP_MCTP_IFADDR + RTNLGRP_TUNNEL, +#define RTNLGRP_TUNNEL RTNLGRP_TUNNEL + RTNLGRP_STATS, +#define RTNLGRP_STATS RTNLGRP_STATS __RTNLGRP_MAX }; #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) @@ -592,4 +604,5 @@ enum { #define RTEXT_FILTER_MRP (1 << 4) #define RTEXT_FILTER_CFM_CONFIG (1 << 5) #define RTEXT_FILTER_CFM_STATUS (1 << 6) +#define RTEXT_FILTER_MST (1 << 7) #endif diff --git a/libc/kernel/uapi/linux/serial_core.h b/libc/kernel/uapi/linux/serial_core.h index 0caf698ea..b99c7d4db 100644 --- a/libc/kernel/uapi/linux/serial_core.h +++ b/libc/kernel/uapi/linux/serial_core.h @@ -47,6 +47,7 @@ #define PORT_SUNSAB 39 #define PORT_NPCM 40 #define PORT_TEGRA_TCU 41 +#define PORT_ASPEED_VUART 42 #define PORT_PCH_8LINE 44 #define PORT_PCH_2LINE 45 #define PORT_DZ 46 @@ -122,4 +123,5 @@ #define PORT_SIFIVE_V0 120 #define PORT_SUNIX 121 #define PORT_LINFLEXUART 122 +#define PORT_SUNPLUS 123 #endif diff --git a/libc/kernel/uapi/linux/smc.h b/libc/kernel/uapi/linux/smc.h index 01494da37..be6b71faa 100644 --- a/libc/kernel/uapi/linux/smc.h +++ b/libc/kernel/uapi/linux/smc.h @@ -57,6 +57,9 @@ enum { SMC_NETLINK_DUMP_SEID, SMC_NETLINK_ENABLE_SEID, SMC_NETLINK_DISABLE_SEID, + SMC_NETLINK_DUMP_HS_LIMITATION, + SMC_NETLINK_ENABLE_HS_LIMITATION, + SMC_NETLINK_DISABLE_HS_LIMITATION, }; enum { SMC_GEN_UNSPEC, @@ -249,4 +252,11 @@ enum { __SMC_NLA_SEID_TABLE_MAX, SMC_NLA_SEID_TABLE_MAX = __SMC_NLA_SEID_TABLE_MAX - 1 }; +enum { + SMC_NLA_HS_LIMITATION_UNSPEC, + SMC_NLA_HS_LIMITATION_ENABLED, + __SMC_NLA_HS_LIMITATION_MAX, + SMC_NLA_HS_LIMITATION_MAX = __SMC_NLA_HS_LIMITATION_MAX - 1 +}; +#define SMC_LIMIT_HS 1 #endif diff --git a/libc/kernel/uapi/linux/socket.h b/libc/kernel/uapi/linux/socket.h index be165482d..49dce4567 100644 --- a/libc/kernel/uapi/linux/socket.h +++ b/libc/kernel/uapi/linux/socket.h @@ -32,4 +32,7 @@ struct __kernel_sockaddr_storage { #define SOCK_SNDBUF_LOCK 1 #define SOCK_RCVBUF_LOCK 2 #define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK) +#define SOCK_TXREHASH_DEFAULT ((u8) - 1) +#define SOCK_TXREHASH_DISABLED 0 +#define SOCK_TXREHASH_ENABLED 1 #endif diff --git a/libc/kernel/uapi/linux/stddef.h b/libc/kernel/uapi/linux/stddef.h index d5cdf801d..6bc6925ff 100644 --- a/libc/kernel/uapi/linux/stddef.h +++ b/libc/kernel/uapi/linux/stddef.h @@ -16,9 +16,12 @@ *** **************************************************************************** ****************************************************************************/ +#ifndef _UAPI_LINUX_STDDEF_H +#define _UAPI_LINUX_STDDEF_H #include #ifndef __always_inline #define __always_inline inline #endif #define __struct_group(TAG,NAME,ATTRS,MEMBERS...) union { struct { MEMBERS } ATTRS; struct TAG { MEMBERS } ATTRS NAME; } #define __DECLARE_FLEX_ARRAY(TYPE,NAME) struct { struct { } __empty_ ##NAME; TYPE NAME[]; } +#endif diff --git a/libc/kernel/uapi/linux/thermal.h b/libc/kernel/uapi/linux/thermal.h index 72ea378c6..2f9dccbdb 100644 --- a/libc/kernel/uapi/linux/thermal.h +++ b/libc/kernel/uapi/linux/thermal.h @@ -54,6 +54,10 @@ enum thermal_genl_attr { THERMAL_GENL_ATTR_CDEV_MAX_STATE, THERMAL_GENL_ATTR_CDEV_NAME, THERMAL_GENL_ATTR_GOV_NAME, + THERMAL_GENL_ATTR_CPU_CAPABILITY, + THERMAL_GENL_ATTR_CPU_CAPABILITY_ID, + THERMAL_GENL_ATTR_CPU_CAPABILITY_PERFORMANCE, + THERMAL_GENL_ATTR_CPU_CAPABILITY_EFFICIENCY, __THERMAL_GENL_ATTR_MAX, }; #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1) @@ -77,6 +81,7 @@ enum thermal_genl_event { THERMAL_GENL_EVENT_CDEV_DELETE, THERMAL_GENL_EVENT_CDEV_STATE_UPDATE, THERMAL_GENL_EVENT_TZ_GOV_CHANGE, + THERMAL_GENL_EVENT_CPU_CAPABILITY_CHANGE, __THERMAL_GENL_EVENT_MAX, }; #define THERMAL_GENL_EVENT_MAX (__THERMAL_GENL_EVENT_MAX - 1) diff --git a/libc/kernel/uapi/linux/tipc_config.h b/libc/kernel/uapi/linux/tipc_config.h index a371e37ef..c6ee1d142 100644 --- a/libc/kernel/uapi/linux/tipc_config.h +++ b/libc/kernel/uapi/linux/tipc_config.h @@ -22,7 +22,6 @@ #include #include #include -#include #define TIPC_CMD_NOOP 0x0000 #define TIPC_CMD_GET_NODES 0x0001 #define TIPC_CMD_GET_MEDIA_NAMES 0x0002 diff --git a/libc/kernel/uapi/linux/tty.h b/libc/kernel/uapi/linux/tty.h index dcce572ce..fb2379eaf 100644 --- a/libc/kernel/uapi/linux/tty.h +++ b/libc/kernel/uapi/linux/tty.h @@ -18,7 +18,6 @@ ****************************************************************************/ #ifndef _UAPI_LINUX_TTY_H #define _UAPI_LINUX_TTY_H -#define NR_LDISCS 30 #define N_TTY 0 #define N_SLIP 1 #define N_MOUSE 2 @@ -48,4 +47,6 @@ #define N_SPEAKUP 26 #define N_NULL 27 #define N_MCTP 28 +#define N_DEVELOPMENT 29 +#define NR_LDISCS 30 #endif diff --git a/libc/kernel/uapi/linux/types.h b/libc/kernel/uapi/linux/types.h index 9145e669c..ce82a2488 100644 --- a/libc/kernel/uapi/linux/types.h +++ b/libc/kernel/uapi/linux/types.h @@ -21,8 +21,7 @@ #include #ifndef __ASSEMBLY__ #include -#define __bitwise__ -#define __bitwise __bitwise__ +#define __bitwise typedef __u16 __bitwise __le16; typedef __u16 __bitwise __be16; typedef __u32 __bitwise __le32; diff --git a/libc/kernel/uapi/linux/userfaultfd.h b/libc/kernel/uapi/linux/userfaultfd.h index ca7b7a59e..3727d0a0e 100644 --- a/libc/kernel/uapi/linux/userfaultfd.h +++ b/libc/kernel/uapi/linux/userfaultfd.h @@ -21,7 +21,7 @@ #include #define UFFD_API ((__u64) 0xAA) #define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | UFFDIO_REGISTER_MODE_WP | UFFDIO_REGISTER_MODE_MINOR) -#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_EVENT_REMAP | UFFD_FEATURE_EVENT_REMOVE | UFFD_FEATURE_EVENT_UNMAP | UFFD_FEATURE_MISSING_HUGETLBFS | UFFD_FEATURE_MISSING_SHMEM | UFFD_FEATURE_SIGBUS | UFFD_FEATURE_THREAD_ID | UFFD_FEATURE_MINOR_HUGETLBFS | UFFD_FEATURE_MINOR_SHMEM) +#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_EVENT_REMAP | UFFD_FEATURE_EVENT_REMOVE | UFFD_FEATURE_EVENT_UNMAP | UFFD_FEATURE_MISSING_HUGETLBFS | UFFD_FEATURE_MISSING_SHMEM | UFFD_FEATURE_SIGBUS | UFFD_FEATURE_THREAD_ID | UFFD_FEATURE_MINOR_HUGETLBFS | UFFD_FEATURE_MINOR_SHMEM | UFFD_FEATURE_EXACT_ADDRESS) #define UFFD_API_IOCTLS ((__u64) 1 << _UFFDIO_REGISTER | (__u64) 1 << _UFFDIO_UNREGISTER | (__u64) 1 << _UFFDIO_API) #define UFFD_API_RANGE_IOCTLS ((__u64) 1 << _UFFDIO_WAKE | (__u64) 1 << _UFFDIO_COPY | (__u64) 1 << _UFFDIO_ZEROPAGE | (__u64) 1 << _UFFDIO_WRITEPROTECT | (__u64) 1 << _UFFDIO_CONTINUE) #define UFFD_API_RANGE_IOCTLS_BASIC ((__u64) 1 << _UFFDIO_WAKE | (__u64) 1 << _UFFDIO_COPY | (__u64) 1 << _UFFDIO_CONTINUE) @@ -95,6 +95,7 @@ struct uffdio_api { #define UFFD_FEATURE_THREAD_ID (1 << 8) #define UFFD_FEATURE_MINOR_HUGETLBFS (1 << 9) #define UFFD_FEATURE_MINOR_SHMEM (1 << 10) +#define UFFD_FEATURE_EXACT_ADDRESS (1 << 11) __u64 features; __u64 ioctls; }; diff --git a/libc/kernel/uapi/linux/v4l2-controls.h b/libc/kernel/uapi/linux/v4l2-controls.h index 1a11355b0..43014ef0b 100644 --- a/libc/kernel/uapi/linux/v4l2-controls.h +++ b/libc/kernel/uapi/linux/v4l2-controls.h @@ -119,6 +119,7 @@ enum v4l2_colorfx { #define V4L2_CID_USER_CODA_BASE (V4L2_CID_USER_BASE + 0x10e0) #define V4L2_CID_USER_CCS_BASE (V4L2_CID_USER_BASE + 0x10f0) #define V4L2_CID_USER_ALLEGRO_BASE (V4L2_CID_USER_BASE + 0x1170) +#define V4L2_CID_USER_ISL7998X_BASE (V4L2_CID_USER_BASE + 0x1180) #define V4L2_CID_CODEC_BASE (V4L2_CTRL_CLASS_CODEC | 0x900) #define V4L2_CID_CODEC_CLASS (V4L2_CTRL_CLASS_CODEC | 1) #define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_CODEC_BASE + 0) @@ -1153,6 +1154,8 @@ struct v4l2_h264_dpb_entry { #define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC 0x01 #define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC 0x02 #define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD 0x04 +#define V4L2_H264_DECODE_PARAM_FLAG_PFRAME 0x08 +#define V4L2_H264_DECODE_PARAM_FLAG_BFRAME 0x10 #define V4L2_CID_STATELESS_H264_DECODE_PARAMS (V4L2_CID_CODEC_STATELESS_BASE + 7) struct v4l2_ctrl_h264_decode_params { struct v4l2_h264_dpb_entry dpb[V4L2_H264_NUM_DPB_ENTRIES]; diff --git a/libc/kernel/uapi/linux/version.h b/libc/kernel/uapi/linux/version.h index 2dfd69657..2677406b6 100644 --- a/libc/kernel/uapi/linux/version.h +++ b/libc/kernel/uapi/linux/version.h @@ -16,8 +16,8 @@ *** **************************************************************************** ****************************************************************************/ -#define LINUX_VERSION_CODE 332032 +#define LINUX_VERSION_CODE 332288 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) #define LINUX_VERSION_MAJOR 5 -#define LINUX_VERSION_PATCHLEVEL 17 +#define LINUX_VERSION_PATCHLEVEL 18 #define LINUX_VERSION_SUBLEVEL 0 diff --git a/libc/kernel/uapi/linux/vfio.h b/libc/kernel/uapi/linux/vfio.h index e0f322bb0..807540841 100644 --- a/libc/kernel/uapi/linux/vfio.h +++ b/libc/kernel/uapi/linux/vfio.h @@ -110,7 +110,7 @@ struct vfio_region_info_cap_type { #define VFIO_REGION_TYPE_PCI_VENDOR_MASK (0xffff) #define VFIO_REGION_TYPE_GFX (1) #define VFIO_REGION_TYPE_CCW (2) -#define VFIO_REGION_TYPE_MIGRATION (3) +#define VFIO_REGION_TYPE_MIGRATION_DEPRECATED (3) #define VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION (1) #define VFIO_REGION_SUBTYPE_INTEL_IGD_HOST_CFG (2) #define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3) @@ -130,17 +130,17 @@ struct vfio_region_gfx_edid { #define VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD (1) #define VFIO_REGION_SUBTYPE_CCW_SCHIB (2) #define VFIO_REGION_SUBTYPE_CCW_CRW (3) -#define VFIO_REGION_SUBTYPE_MIGRATION (1) +#define VFIO_REGION_SUBTYPE_MIGRATION_DEPRECATED (1) struct vfio_device_migration_info { __u32 device_state; -#define VFIO_DEVICE_STATE_STOP (0) -#define VFIO_DEVICE_STATE_RUNNING (1 << 0) -#define VFIO_DEVICE_STATE_SAVING (1 << 1) -#define VFIO_DEVICE_STATE_RESUMING (1 << 2) -#define VFIO_DEVICE_STATE_MASK (VFIO_DEVICE_STATE_RUNNING | VFIO_DEVICE_STATE_SAVING | VFIO_DEVICE_STATE_RESUMING) -#define VFIO_DEVICE_STATE_VALID(state) (state & VFIO_DEVICE_STATE_RESUMING ? (state & VFIO_DEVICE_STATE_MASK) == VFIO_DEVICE_STATE_RESUMING : 1) -#define VFIO_DEVICE_STATE_IS_ERROR(state) ((state & VFIO_DEVICE_STATE_MASK) == (VFIO_DEVICE_STATE_SAVING | VFIO_DEVICE_STATE_RESUMING)) -#define VFIO_DEVICE_STATE_SET_ERROR(state) ((state & ~VFIO_DEVICE_STATE_MASK) | VFIO_DEVICE_SATE_SAVING | VFIO_DEVICE_STATE_RESUMING) +#define VFIO_DEVICE_STATE_V1_STOP (0) +#define VFIO_DEVICE_STATE_V1_RUNNING (1 << 0) +#define VFIO_DEVICE_STATE_V1_SAVING (1 << 1) +#define VFIO_DEVICE_STATE_V1_RESUMING (1 << 2) +#define VFIO_DEVICE_STATE_MASK (VFIO_DEVICE_STATE_V1_RUNNING | VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RESUMING) +#define VFIO_DEVICE_STATE_VALID(state) (state & VFIO_DEVICE_STATE_V1_RESUMING ? (state & VFIO_DEVICE_STATE_MASK) == VFIO_DEVICE_STATE_V1_RESUMING : 1) +#define VFIO_DEVICE_STATE_IS_ERROR(state) ((state & VFIO_DEVICE_STATE_MASK) == (VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RESUMING)) +#define VFIO_DEVICE_STATE_SET_ERROR(state) ((state & ~VFIO_DEVICE_STATE_MASK) | VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RESUMING) __u32 reserved; __u64 pending_bytes; __u64 data_offset; @@ -285,6 +285,25 @@ struct vfio_device_feature { }; #define VFIO_DEVICE_FEATURE _IO(VFIO_TYPE, VFIO_BASE + 17) #define VFIO_DEVICE_FEATURE_PCI_VF_TOKEN (0) +struct vfio_device_feature_migration { + __aligned_u64 flags; +#define VFIO_MIGRATION_STOP_COPY (1 << 0) +#define VFIO_MIGRATION_P2P (1 << 1) +}; +#define VFIO_DEVICE_FEATURE_MIGRATION 1 +struct vfio_device_feature_mig_state { + __u32 device_state; + __s32 data_fd; +}; +#define VFIO_DEVICE_FEATURE_MIG_DEVICE_STATE 2 +enum vfio_device_mig_state { + VFIO_DEVICE_STATE_ERROR = 0, + VFIO_DEVICE_STATE_STOP = 1, + VFIO_DEVICE_STATE_RUNNING = 2, + VFIO_DEVICE_STATE_STOP_COPY = 3, + VFIO_DEVICE_STATE_RESUMING = 4, + VFIO_DEVICE_STATE_RUNNING_P2P = 5, +}; struct vfio_iommu_type1_info { __u32 argsz; __u32 flags; diff --git a/libc/kernel/uapi/linux/vhost.h b/libc/kernel/uapi/linux/vhost.h index 53b01c415..7769bebc2 100644 --- a/libc/kernel/uapi/linux/vhost.h +++ b/libc/kernel/uapi/linux/vhost.h @@ -64,4 +64,6 @@ #define VHOST_VDPA_GET_VRING_NUM _IOR(VHOST_VIRTIO, 0x76, __u16) #define VHOST_VDPA_SET_CONFIG_CALL _IOW(VHOST_VIRTIO, 0x77, int) #define VHOST_VDPA_GET_IOVA_RANGE _IOR(VHOST_VIRTIO, 0x78, struct vhost_vdpa_iova_range) +#define VHOST_VDPA_GET_CONFIG_SIZE _IOR(VHOST_VIRTIO, 0x79, __u32) +#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32) #endif diff --git a/libc/kernel/uapi/linux/videodev2.h b/libc/kernel/uapi/linux/videodev2.h index 74bd32891..55c1a95a7 100644 --- a/libc/kernel/uapi/linux/videodev2.h +++ b/libc/kernel/uapi/linux/videodev2.h @@ -24,12 +24,7 @@ #include #include #include -/* --------------------------------------------------- - * This value manually changed due to b/228783882. - * Next kernel update should keep this value as is. - */ #define VIDEO_MAX_FRAME 64 -/* --------------------------------------------------- */ #define VIDEO_MAX_PLANES 8 #define v4l2_fourcc(a,b,c,d) ((__u32) (a) | ((__u32) (b) << 8) | ((__u32) (c) << 16) | ((__u32) (d) << 24)) #define v4l2_fourcc_be(a,b,c,d) (v4l2_fourcc(a, b, c, d) | (1U << 31)) @@ -305,6 +300,8 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') +#define V4L2_PIX_FMT_NV12M_8L128 v4l2_fourcc('N', 'A', '1', '2') +#define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') #define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') diff --git a/libc/kernel/uapi/linux/virtio_config.h b/libc/kernel/uapi/linux/virtio_config.h index 6198fd170..30e552b66 100644 --- a/libc/kernel/uapi/linux/virtio_config.h +++ b/libc/kernel/uapi/linux/virtio_config.h @@ -35,6 +35,7 @@ #define VIRTIO_F_ACCESS_PLATFORM 33 #define VIRTIO_F_IOMMU_PLATFORM VIRTIO_F_ACCESS_PLATFORM #define VIRTIO_F_RING_PACKED 34 +#define VIRTIO_F_IN_ORDER 35 #define VIRTIO_F_ORDER_PLATFORM 36 #define VIRTIO_F_SR_IOV 37 #endif diff --git a/libc/kernel/uapi/linux/virtio_crypto.h b/libc/kernel/uapi/linux/virtio_crypto.h index 2ce760fe2..7d7561d1d 100644 --- a/libc/kernel/uapi/linux/virtio_crypto.h +++ b/libc/kernel/uapi/linux/virtio_crypto.h @@ -26,6 +26,7 @@ #define VIRTIO_CRYPTO_SERVICE_HASH 1 #define VIRTIO_CRYPTO_SERVICE_MAC 2 #define VIRTIO_CRYPTO_SERVICE_AEAD 3 +#define VIRTIO_CRYPTO_SERVICE_AKCIPHER 4 #define VIRTIO_CRYPTO_OPCODE(service,op) (((service) << 8) | (op)) struct virtio_crypto_ctrl_header { #define VIRTIO_CRYPTO_CIPHER_CREATE_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_CIPHER, 0x02) @@ -36,6 +37,8 @@ struct virtio_crypto_ctrl_header { #define VIRTIO_CRYPTO_MAC_DESTROY_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_MAC, 0x03) #define VIRTIO_CRYPTO_AEAD_CREATE_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x02) #define VIRTIO_CRYPTO_AEAD_DESTROY_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x03) +#define VIRTIO_CRYPTO_AKCIPHER_CREATE_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x04) +#define VIRTIO_CRYPTO_AKCIPHER_DESTROY_SESSION VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x05) __le32 opcode; __le32 algo; __le32 flag; @@ -137,6 +140,51 @@ struct virtio_crypto_aead_create_session_req { struct virtio_crypto_aead_session_para para; __u8 padding[32]; }; +struct virtio_crypto_rsa_session_para { +#define VIRTIO_CRYPTO_RSA_RAW_PADDING 0 +#define VIRTIO_CRYPTO_RSA_PKCS1_PADDING 1 + __le32 padding_algo; +#define VIRTIO_CRYPTO_RSA_NO_HASH 0 +#define VIRTIO_CRYPTO_RSA_MD2 1 +#define VIRTIO_CRYPTO_RSA_MD3 2 +#define VIRTIO_CRYPTO_RSA_MD4 3 +#define VIRTIO_CRYPTO_RSA_MD5 4 +#define VIRTIO_CRYPTO_RSA_SHA1 5 +#define VIRTIO_CRYPTO_RSA_SHA256 6 +#define VIRTIO_CRYPTO_RSA_SHA384 7 +#define VIRTIO_CRYPTO_RSA_SHA512 8 +#define VIRTIO_CRYPTO_RSA_SHA224 9 + __le32 hash_algo; +}; +struct virtio_crypto_ecdsa_session_para { +#define VIRTIO_CRYPTO_CURVE_UNKNOWN 0 +#define VIRTIO_CRYPTO_CURVE_NIST_P192 1 +#define VIRTIO_CRYPTO_CURVE_NIST_P224 2 +#define VIRTIO_CRYPTO_CURVE_NIST_P256 3 +#define VIRTIO_CRYPTO_CURVE_NIST_P384 4 +#define VIRTIO_CRYPTO_CURVE_NIST_P521 5 + __le32 curve_id; + __le32 padding; +}; +struct virtio_crypto_akcipher_session_para { +#define VIRTIO_CRYPTO_NO_AKCIPHER 0 +#define VIRTIO_CRYPTO_AKCIPHER_RSA 1 +#define VIRTIO_CRYPTO_AKCIPHER_DSA 2 +#define VIRTIO_CRYPTO_AKCIPHER_ECDSA 3 + __le32 algo; +#define VIRTIO_CRYPTO_AKCIPHER_KEY_TYPE_PUBLIC 1 +#define VIRTIO_CRYPTO_AKCIPHER_KEY_TYPE_PRIVATE 2 + __le32 keytype; + __le32 keylen; + union { + struct virtio_crypto_rsa_session_para rsa; + struct virtio_crypto_ecdsa_session_para ecdsa; + } u; +}; +struct virtio_crypto_akcipher_create_session_req { + struct virtio_crypto_akcipher_session_para para; + __u8 padding[36]; +}; struct virtio_crypto_alg_chain_session_para { #define VIRTIO_CRYPTO_SYM_ALG_CHAIN_ORDER_HASH_THEN_CIPHER 1 #define VIRTIO_CRYPTO_SYM_ALG_CHAIN_ORDER_CIPHER_THEN_HASH 2 @@ -180,6 +228,7 @@ struct virtio_crypto_op_ctrl_req { struct virtio_crypto_hash_create_session_req hash_create_session; struct virtio_crypto_mac_create_session_req mac_create_session; struct virtio_crypto_aead_create_session_req aead_create_session; + struct virtio_crypto_akcipher_create_session_req akcipher_create_session; struct virtio_crypto_destroy_session_req destroy_session; __u8 padding[56]; } u; @@ -191,6 +240,10 @@ struct virtio_crypto_op_header { #define VIRTIO_CRYPTO_MAC VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_MAC, 0x00) #define VIRTIO_CRYPTO_AEAD_ENCRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x00) #define VIRTIO_CRYPTO_AEAD_DECRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AEAD, 0x01) +#define VIRTIO_CRYPTO_AKCIPHER_ENCRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x00) +#define VIRTIO_CRYPTO_AKCIPHER_DECRYPT VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x01) +#define VIRTIO_CRYPTO_AKCIPHER_SIGN VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x02) +#define VIRTIO_CRYPTO_AKCIPHER_VERIFY VIRTIO_CRYPTO_OPCODE(VIRTIO_CRYPTO_SERVICE_AKCIPHER, 0x03) __le32 opcode; __le32 algo; __le64 session_id; @@ -256,6 +309,14 @@ struct virtio_crypto_aead_data_req { struct virtio_crypto_aead_para para; __u8 padding[32]; }; +struct virtio_crypto_akcipher_para { + __le32 src_data_len; + __le32 dst_data_len; +}; +struct virtio_crypto_akcipher_data_req { + struct virtio_crypto_akcipher_para para; + __u8 padding[40]; +}; struct virtio_crypto_op_data_req { struct virtio_crypto_op_header header; union { @@ -263,6 +324,7 @@ struct virtio_crypto_op_data_req { struct virtio_crypto_hash_data_req hash_req; struct virtio_crypto_mac_data_req mac_req; struct virtio_crypto_aead_data_req aead_req; + struct virtio_crypto_akcipher_data_req akcipher_req; __u8 padding[48]; } u; }; @@ -271,6 +333,8 @@ struct virtio_crypto_op_data_req { #define VIRTIO_CRYPTO_BADMSG 2 #define VIRTIO_CRYPTO_NOTSUPP 3 #define VIRTIO_CRYPTO_INVSESS 4 +#define VIRTIO_CRYPTO_NOSPC 5 +#define VIRTIO_CRYPTO_KEY_REJECTED 6 #define VIRTIO_CRYPTO_S_HW_READY (1 << 0) struct virtio_crypto_config { __le32 status; @@ -284,7 +348,7 @@ struct virtio_crypto_config { __le32 aead_algo; __le32 max_cipher_key_len; __le32 max_auth_key_len; - __le32 reserve; + __le32 akcipher_algo; __le64 max_size; }; struct virtio_crypto_inhdr { diff --git a/libc/kernel/uapi/linux/virtio_ids.h b/libc/kernel/uapi/linux/virtio_ids.h index 289470071..b31ed93ea 100644 --- a/libc/kernel/uapi/linux/virtio_ids.h +++ b/libc/kernel/uapi/linux/virtio_ids.h @@ -57,11 +57,11 @@ #define VIRTIO_ID_AUDIO_POLICY 39 #define VIRTIO_ID_BT 40 #define VIRTIO_ID_GPIO 41 -#define VIRTIO_TRANS_ID_NET 1000 -#define VIRTIO_TRANS_ID_BLOCK 1001 -#define VIRTIO_TRANS_ID_BALLOON 1002 -#define VIRTIO_TRANS_ID_CONSOLE 1003 -#define VIRTIO_TRANS_ID_SCSI 1004 -#define VIRTIO_TRANS_ID_RNG 1005 -#define VIRTIO_TRANS_ID_9P 1009 +#define VIRTIO_TRANS_ID_NET 0x1000 +#define VIRTIO_TRANS_ID_BLOCK 0x1001 +#define VIRTIO_TRANS_ID_BALLOON 0x1002 +#define VIRTIO_TRANS_ID_CONSOLE 0x1003 +#define VIRTIO_TRANS_ID_SCSI 0x1004 +#define VIRTIO_TRANS_ID_RNG 0x1005 +#define VIRTIO_TRANS_ID_9P 0x1009 #endif diff --git a/libc/kernel/uapi/misc/fastrpc.h b/libc/kernel/uapi/misc/fastrpc.h index 62955ec6c..e82b961ae 100644 --- a/libc/kernel/uapi/misc/fastrpc.h +++ b/libc/kernel/uapi/misc/fastrpc.h @@ -27,11 +27,32 @@ #define FASTRPC_IOCTL_MMAP _IOWR('R', 6, struct fastrpc_req_mmap) #define FASTRPC_IOCTL_MUNMAP _IOWR('R', 7, struct fastrpc_req_munmap) #define FASTRPC_IOCTL_INIT_ATTACH_SNS _IO('R', 8) +#define FASTRPC_IOCTL_MEM_MAP _IOWR('R', 10, struct fastrpc_mem_map) +#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap) +#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability) +enum fastrpc_map_flags { + FASTRPC_MAP_STATIC = 0, + FASTRPC_MAP_RESERVED, + FASTRPC_MAP_FD = 2, + FASTRPC_MAP_FD_DELAYED, + FASTRPC_MAP_FD_NOMAP = 16, + FASTRPC_MAP_MAX, +}; +enum fastrpc_proc_attr { + FASTRPC_MODE_DEBUG = (1 << 0), + FASTRPC_MODE_PTRACE = (1 << 1), + FASTRPC_MODE_CRC = (1 << 2), + FASTRPC_MODE_UNSIGNED_MODULE = (1 << 3), + FASTRPC_MODE_ADAPTIVE_QOS = (1 << 4), + FASTRPC_MODE_SYSTEM_PROCESS = (1 << 5), + FASTRPC_MODE_PRIVILEGED = (1 << 6), +}; +#define FASTRPC_ATTR_SECUREMAP (1) struct fastrpc_invoke_args { __u64 ptr; __u64 length; __s32 fd; - __u32 reserved; + __u32 attr; }; struct fastrpc_invoke { __u32 handle; @@ -57,8 +78,32 @@ struct fastrpc_req_mmap { __u64 size; __u64 vaddrout; }; +struct fastrpc_mem_map { + __s32 version; + __s32 fd; + __s32 offset; + __u32 flags; + __u64 vaddrin; + __u64 length; + __u64 vaddrout; + __s32 attrs; + __s32 reserved[4]; +}; struct fastrpc_req_munmap { __u64 vaddrout; __u64 size; }; +struct fastrpc_mem_unmap { + __s32 vesion; + __s32 fd; + __u64 vaddr; + __u64 length; + __s32 reserved[5]; +}; +struct fastrpc_ioctl_capability { + __u32 domain; + __u32 attribute_id; + __u32 capability; + __u32 reserved[4]; +}; #endif diff --git a/libc/kernel/uapi/misc/habanalabs.h b/libc/kernel/uapi/misc/habanalabs.h index 6e3439ab7..f9e1bb999 100644 --- a/libc/kernel/uapi/misc/habanalabs.h +++ b/libc/kernel/uapi/misc/habanalabs.h @@ -24,6 +24,7 @@ #define GAUDI_DRIVER_SRAM_RESERVED_SIZE_FROM_START 0x80 #define GAUDI_FIRST_AVAILABLE_W_S_SYNC_OBJECT 144 #define GAUDI_FIRST_AVAILABLE_W_S_MONITOR 72 +#define TS_MAX_ELEMENTS_NUM (1 << 20) enum goya_queue_id { GOYA_QUEUE_ID_DMA_0 = 0, GOYA_QUEUE_ID_DMA_1 = 1, @@ -294,6 +295,9 @@ struct hl_info_hw_ip_info { __u8 card_name[HL_INFO_CARD_NAME_MAX_LEN]; __u64 reserved2; __u64 dram_page_size; + __u32 reserved3; + __u16 number_of_user_interrupts; + __u16 pad2; }; struct hl_info_dram_usage { __u64 dram_free_mem; @@ -512,6 +516,7 @@ union hl_cs_args { #define HL_WAIT_CS_FLAGS_INTERRUPT_MASK 0xFFF00000 #define HL_WAIT_CS_FLAGS_MULTI_CS 0x4 #define HL_WAIT_CS_FLAGS_INTERRUPT_KERNEL_CQ 0x10 +#define HL_WAIT_CS_FLAGS_REGISTER_INTERRUPT 0x20 #define HL_WAIT_MULTI_CS_LIST_MAX_LEN 32 struct hl_wait_cs_in { union { @@ -537,6 +542,8 @@ struct hl_wait_cs_in { __u64 interrupt_timeout_us; }; __u64 cq_counters_offset; + __u64 timestamp_handle; + __u64 timestamp_offset; }; #define HL_WAIT_CS_STATUS_COMPLETED 0 #define HL_WAIT_CS_STATUS_BUSY 1 @@ -561,6 +568,7 @@ union hl_wait_cs_args { #define HL_MEM_OP_UNMAP 3 #define HL_MEM_OP_MAP_BLOCK 4 #define HL_MEM_OP_EXPORT_DMABUF_FD 5 +#define HL_MEM_OP_TS_ALLOC 6 #define HL_MEM_CONTIGUOUS 0x1 #define HL_MEM_SHARED 0x2 #define HL_MEM_USERPTR 0x4 @@ -569,6 +577,7 @@ struct hl_mem_in { union { struct { __u64 mem_size; + __u64 page_size; } alloc; struct { __u64 handle; @@ -596,7 +605,7 @@ struct hl_mem_in { __u32 op; __u32 flags; __u32 ctx_id; - __u32 pad; + __u32 num_of_elements; }; struct hl_mem_out { union { diff --git a/libc/kernel/uapi/sound/sof/abi.h b/libc/kernel/uapi/sound/sof/abi.h index 3af3c9d60..810a0b45a 100644 --- a/libc/kernel/uapi/sound/sof/abi.h +++ b/libc/kernel/uapi/sound/sof/abi.h @@ -19,8 +19,8 @@ #ifndef __INCLUDE_UAPI_SOUND_SOF_ABI_H__ #define __INCLUDE_UAPI_SOUND_SOF_ABI_H__ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 18 -#define SOF_ABI_PATCH 0 +#define SOF_ABI_MINOR 19 +#define SOF_ABI_PATCH 1 #define SOF_ABI_MAJOR_SHIFT 24 #define SOF_ABI_MAJOR_MASK 0xff #define SOF_ABI_MINOR_SHIFT 12