History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Cross-merge networking fixes after downstream PR. No conflicts. Adjacent changes: drivers/net/ethernet/stmicro/stmmac/common.h 38cc3c6dcc09 ("net: stmmac: protect updates of 64-bit statistics counters") fd5a6a71313e ("net: stmmac: est: Per Tx-queue error count for HLBF") c5c3e1bfc9e0 ("net: stmmac: Offload queueMaxSDU from tc-taprio") drivers/net/wireless/microchip/wilc1000/netdev.c c9013880284d ("wifi: fill in MODULE_DESCRIPTION()s for wilc1000") 328efda22af8 ("wifi: wilc1000: do not realloc workqueue everytime an interface is added") net/unix/garbage.c 11498715f266 ("af_unix: Remove io_uring code for GC.") 1279f9d9dec2 ("af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC.")

Jakub Kicinski committed 2 years ago

Commit 3be042c2 parents b6b6145 1f719a2427 files · +4973 −3032Browse files

Showing the changes to tools/include/uapi/linux (4 of 427 files). Show all

Unified · Split

4 files
  1. tools/include/uapi/linux/fcntl.h +3 −0
  2. tools/include/uapi/linux/kvm.h +50 −90
  3. tools/include/uapi/linux/mount.h +70 −0
  4. tools/include/uapi/linux/stat.h +1 −0
tools/include/uapi/linux/fcntl.h+3−0
@@ -116,5 +116,8 @@ · 115 unmodified lines
116116 #define AT_HANDLE_FID AT_REMOVEDIR /* file handle is needed to
117117 compare object identity and may not
118118 be usable to open_by_handle_at(2) */
119+#if defined(__KERNEL__)
120+#define AT_GETATTR_NOSEC 0x80000000
121+#endif
119122
120123 #endif /* _UAPI_LINUX_FCNTL_H */
tools/include/uapi/linux/kvm.h+50−90
@@ -16,76 +16,6 @@ · 15 unmodified lines
1616
1717 #define KVM_API_VERSION 12
1818
19−/* *** Deprecated interfaces *** */
20−
21−#define KVM_TRC_SHIFT 16
22−
23−#define KVM_TRC_ENTRYEXIT (1 << KVM_TRC_SHIFT)
24−#define KVM_TRC_HANDLER (1 << (KVM_TRC_SHIFT + 1))
25−
26−#define KVM_TRC_VMENTRY (KVM_TRC_ENTRYEXIT + 0x01)
27−#define KVM_TRC_VMEXIT (KVM_TRC_ENTRYEXIT + 0x02)
28−#define KVM_TRC_PAGE_FAULT (KVM_TRC_HANDLER + 0x01)
29−
30−#define KVM_TRC_HEAD_SIZE 12
31−#define KVM_TRC_CYCLE_SIZE 8
32−#define KVM_TRC_EXTRA_MAX 7
33−
34−#define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02)
35−#define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03)
36−#define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04)
37−#define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05)
38−#define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06)
39−#define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07)
40−#define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08)
41−#define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09)
42−#define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A)
43−#define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B)
44−#define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C)
45−#define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D)
46−#define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E)
47−#define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F)
48−#define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10)
49−#define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11)
50−#define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12)
51−#define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13)
52−#define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14)
53−#define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15)
54−#define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16)
55−#define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17)
56−#define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18)
57−#define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19)
58−
59−struct kvm_user_trace_setup {
60− __u32 buf_size;
61− __u32 buf_nr;
62−};
63−
64−#define __KVM_DEPRECATED_MAIN_W_0x06 \
65− _IOW(KVMIO, 0x06, struct kvm_user_trace_setup)
66−#define __KVM_DEPRECATED_MAIN_0x07 _IO(KVMIO, 0x07)
67−#define __KVM_DEPRECATED_MAIN_0x08 _IO(KVMIO, 0x08)
68−
69−#define __KVM_DEPRECATED_VM_R_0x70 _IOR(KVMIO, 0x70, struct kvm_assigned_irq)
70−
71−struct kvm_breakpoint {
72− __u32 enabled;
73− __u32 padding;
74− __u64 address;
75−};
76−
77−struct kvm_debug_guest {
78− __u32 enabled;
79− __u32 pad;
80− struct kvm_breakpoint breakpoints[4];
81− __u32 singlestep;
82−};
83−
84−#define __KVM_DEPRECATED_VCPU_W_0x87 _IOW(KVMIO, 0x87, struct kvm_debug_guest)
85−
86−/* *** End of deprecated interfaces *** */
87−
88−
8919 /* for KVM_SET_USER_MEMORY_REGION */
9020 struct kvm_userspace_memory_region {
9121 __u32 slot;
@@ -95,6 +25,19 @@ struct kvm_userspace_memory_region { · 3 unmodified lines
9525 __u64 userspace_addr; /* start of the userspace allocated memory */
9626 };
9727
28+/* for KVM_SET_USER_MEMORY_REGION2 */
29+struct kvm_userspace_memory_region2 {
30+ __u32 slot;
31+ __u32 flags;
32+ __u64 guest_phys_addr;
33+ __u64 memory_size;
34+ __u64 userspace_addr;
35+ __u64 guest_memfd_offset;
36+ __u32 guest_memfd;
37+ __u32 pad1;
38+ __u64 pad2[14];
39+};
40+
9841 /*
9942 * The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for
10043 * userspace, other bits are reserved for kvm internal use which are defined
@@ -102,6 +45,7 @@ struct kvm_userspace_memory_region { · 1 unmodified line
10245 */
10346 #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0)
10447 #define KVM_MEM_READONLY (1UL << 1)
48+#define KVM_MEM_GUEST_MEMFD (1UL << 2)
10549
10650 /* for KVM_IRQ_LINE */
10751 struct kvm_irq_level {
@@ -265,6 +209,7 @@ struct kvm_xen_exit { · 157 unmodified lines
265209 #define KVM_EXIT_RISCV_CSR 36
266210 #define KVM_EXIT_NOTIFY 37
267211 #define KVM_EXIT_LOONGARCH_IOCSR 38
212+#define KVM_EXIT_MEMORY_FAULT 39
268213
269214 /* For KVM_EXIT_INTERNAL_ERROR */
270215 /* Emulate instruction failed. */
@@ -518,6 +463,13 @@ struct kvm_run { · 247 unmodified lines
518463 #define KVM_NOTIFY_CONTEXT_INVALID (1 << 0)
519464 __u32 flags;
520465 } notify;
466+ /* KVM_EXIT_MEMORY_FAULT */
467+ struct {
468+#define KVM_MEMORY_EXIT_FLAG_PRIVATE (1ULL << 3)
469+ __u64 flags;
470+ __u64 gpa;
471+ __u64 size;
472+ } memory_fault;
521473 /* Fix the size of the union. */
522474 char padding[256];
523475 };
@@ -945,9 +897,6 @@ struct kvm_ppc_resize_hpt { · 421 unmodified lines
945897 */
946898 #define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */
947899 #define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2)
948−#define KVM_TRACE_ENABLE __KVM_DEPRECATED_MAIN_W_0x06
949−#define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07
950−#define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08
951900 #define KVM_GET_EMULATED_CPUID _IOWR(KVMIO, 0x09, struct kvm_cpuid2)
952901 #define KVM_GET_MSR_FEATURE_INDEX_LIST _IOWR(KVMIO, 0x0a, struct kvm_msr_list)
953902
@@ -1201,6 +1150,11 @@ struct kvm_ppc_resize_hpt { · 247 unmodified lines
12011150 #define KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE 228
12021151 #define KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES 229
12031152 #define KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES 230
1153+#define KVM_CAP_USER_MEMORY2 231
1154+#define KVM_CAP_MEMORY_FAULT_INFO 232
1155+#define KVM_CAP_MEMORY_ATTRIBUTES 233
1156+#define KVM_CAP_GUEST_MEMFD 234
1157+#define KVM_CAP_VM_TYPES 235
12041158
12051159 #ifdef KVM_CAP_IRQ_ROUTING
12061160
@@ -1291,6 +1245,7 @@ struct kvm_x86_mce { · 84 unmodified lines
12911245 #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4)
12921246 #define KVM_XEN_HVM_CONFIG_EVTCHN_SEND (1 << 5)
12931247 #define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG (1 << 6)
1248+#define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE (1 << 7)
12941249
12951250 struct kvm_xen_hvm_config {
12961251 __u32 flags;
@@ -1483,6 +1438,8 @@ struct kvm_vfio_spapr_tce { · 186 unmodified lines
14831438 struct kvm_userspace_memory_region)
14841439 #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47)
14851440 #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64)
1441+#define KVM_SET_USER_MEMORY_REGION2 _IOW(KVMIO, 0x49, \
1442+ struct kvm_userspace_memory_region2)
14861443
14871444 /* enable ucontrol for s390 */
14881445 struct kvm_s390_ucas_mapping {
@@ -1507,20 +1464,8 @@ struct kvm_s390_ucas_mapping { · 18 unmodified lines
15071464 _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone)
15081465 #define KVM_UNREGISTER_COALESCED_MMIO \
15091466 _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone)
1510−#define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \
1511− struct kvm_assigned_pci_dev)
15121467 #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing)
1513−/* deprecated, replaced by KVM_ASSIGN_DEV_IRQ */
1514−#define KVM_ASSIGN_IRQ __KVM_DEPRECATED_VM_R_0x70
1515−#define KVM_ASSIGN_DEV_IRQ _IOW(KVMIO, 0x70, struct kvm_assigned_irq)
15161468 #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71)
1517−#define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \
1518− struct kvm_assigned_pci_dev)
1519−#define KVM_ASSIGN_SET_MSIX_NR _IOW(KVMIO, 0x73, \
1520− struct kvm_assigned_msix_nr)
1521−#define KVM_ASSIGN_SET_MSIX_ENTRY _IOW(KVMIO, 0x74, \
1522− struct kvm_assigned_msix_entry)
1523−#define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq)
15241469 #define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd)
15251470 #define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config)
15261471 #define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78)
@@ -1537,9 +1482,6 @@ struct kvm_s390_ucas_mapping { · 10 unmodified lines
15371482 * KVM_CAP_VM_TSC_CONTROL to set defaults for a VM */
15381483 #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2)
15391484 #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3)
1540−/* Available with KVM_CAP_PCI_2_3 */
1541−#define KVM_ASSIGN_SET_INTX_MASK _IOW(KVMIO, 0xa4, \
1542− struct kvm_assigned_pci_dev)
15431485 /* Available with KVM_CAP_SIGNAL_MSI */
15441486 #define KVM_SIGNAL_MSI _IOW(KVMIO, 0xa5, struct kvm_msi)
15451487 /* Available with KVM_CAP_PPC_GET_SMMU_INFO */
@@ -1592,8 +1534,6 @@ struct kvm_s390_ucas_mapping { · 46 unmodified lines
15921534 #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs)
15931535 #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation)
15941536 #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt)
1595−/* KVM_DEBUG_GUEST is no longer supported, use KVM_SET_GUEST_DEBUG instead */
1596−#define KVM_DEBUG_GUEST __KVM_DEPRECATED_VCPU_W_0x87
15971537 #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs)
15981538 #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs)
15991539 #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid)
@@ -2267,4 +2207,24 @@ struct kvm_s390_zpci_op { · 667 unmodified lines
22672207 /* flags for kvm_s390_zpci_op->u.reg_aen.flags */
22682208 #define KVM_S390_ZPCIOP_REGAEN_HOST (1 << 0)
22692209
2210+/* Available with KVM_CAP_MEMORY_ATTRIBUTES */
2211+#define KVM_SET_MEMORY_ATTRIBUTES _IOW(KVMIO, 0xd2, struct kvm_memory_attributes)
2212+
2213+struct kvm_memory_attributes {
2214+ __u64 address;
2215+ __u64 size;
2216+ __u64 attributes;
2217+ __u64 flags;
2218+};
2219+
2220+#define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3)
2221+
2222+#define KVM_CREATE_GUEST_MEMFD _IOWR(KVMIO, 0xd4, struct kvm_create_guest_memfd)
2223+
2224+struct kvm_create_guest_memfd {
2225+ __u64 size;
2226+ __u64 flags;
2227+ __u64 reserved[6];
2228+};
2229+
22702230 #endif /* __LINUX_KVM_H */
tools/include/uapi/linux/mount.h+70−0
@@ -138,4 +138,74 @@ struct mount_attr { · 137 unmodified lines
138138 /* List of all mount_attr versions. */
139139 #define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */
140140
141+
142+/*
143+ * Structure for getting mount/superblock/filesystem info with statmount(2).
144+ *
145+ * The interface is similar to statx(2): individual fields or groups can be
146+ * selected with the @mask argument of statmount(). Kernel will set the @mask
147+ * field according to the supported fields.
148+ *
149+ * If string fields are selected, then the caller needs to pass a buffer that
150+ * has space after the fixed part of the structure. Nul terminated strings are
151+ * copied there and offsets relative to @str are stored in the relevant fields.
152+ * If the buffer is too small, then EOVERFLOW is returned. The actually used
153+ * size is returned in @size.
154+ */
155+struct statmount {
156+ __u32 size; /* Total size, including strings */
157+ __u32 __spare1;
158+ __u64 mask; /* What results were written */
159+ __u32 sb_dev_major; /* Device ID */
160+ __u32 sb_dev_minor;
161+ __u64 sb_magic; /* ..._SUPER_MAGIC */
162+ __u32 sb_flags; /* SB_{RDONLY,SYNCHRONOUS,DIRSYNC,LAZYTIME} */
163+ __u32 fs_type; /* [str] Filesystem type */
164+ __u64 mnt_id; /* Unique ID of mount */
165+ __u64 mnt_parent_id; /* Unique ID of parent (for root == mnt_id) */
166+ __u32 mnt_id_old; /* Reused IDs used in proc/.../mountinfo */
167+ __u32 mnt_parent_id_old;
168+ __u64 mnt_attr; /* MOUNT_ATTR_... */
169+ __u64 mnt_propagation; /* MS_{SHARED,SLAVE,PRIVATE,UNBINDABLE} */
170+ __u64 mnt_peer_group; /* ID of shared peer group */
171+ __u64 mnt_master; /* Mount receives propagation from this ID */
172+ __u64 propagate_from; /* Propagation from in current namespace */
173+ __u32 mnt_root; /* [str] Root of mount relative to root of fs */
174+ __u32 mnt_point; /* [str] Mountpoint relative to current root */
175+ __u64 __spare2[50];
176+ char str[]; /* Variable size part containing strings */
177+};
178+
179+/*
180+ * Structure for passing mount ID and miscellaneous parameters to statmount(2)
181+ * and listmount(2).
182+ *
183+ * For statmount(2) @param represents the request mask.
184+ * For listmount(2) @param represents the last listed mount id (or zero).
185+ */
186+struct mnt_id_req {
187+ __u32 size;
188+ __u32 spare;
189+ __u64 mnt_id;
190+ __u64 param;
191+};
192+
193+/* List of all mnt_id_req versions. */
194+#define MNT_ID_REQ_SIZE_VER0 24 /* sizeof first published struct */
195+
196+/*
197+ * @mask bits for statmount(2)
198+ */
199+#define STATMOUNT_SB_BASIC 0x00000001U /* Want/got sb_... */
200+#define STATMOUNT_MNT_BASIC 0x00000002U /* Want/got mnt_... */
201+#define STATMOUNT_PROPAGATE_FROM 0x00000004U /* Want/got propagate_from */
202+#define STATMOUNT_MNT_ROOT 0x00000008U /* Want/got mnt_root */
203+#define STATMOUNT_MNT_POINT 0x00000010U /* Want/got mnt_point */
204+#define STATMOUNT_FS_TYPE 0x00000020U /* Want/got fs_type */
205+
206+/*
207+ * Special @mnt_id values that can be passed to listmount
208+ */
209+#define LSMT_ROOT 0xffffffffffffffff /* root mount */
210+
141211 #endif /* _UAPI_LINUX_MOUNT_H */
tools/include/uapi/linux/stat.h+1−0
@@ -154,6 +154,7 @@ struct statx { · 153 unmodified lines
154154 #define STATX_BTIME 0x00000800U /* Want/got stx_btime */
155155 #define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
156156 #define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */
157+#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
157158
158159 #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
159160