aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-12-20 09:35:07 -0500
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-12-20 09:35:07 -0500
commit31d1b7710262fba12282b24083f20dc76e0efc93 (patch)
tree9666047c389333b0706b61ae77645aa50af1dc81 /include/uapi/linux
parent217188d9f985bd3ce8c9a0cd50ca35be62d0f8c6 (diff)
parent7566ec393f4161572ba6f11ad5171fd5d59b0fbd (diff)
Merge tag 'v4.20-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Linux 4.20-rc7 Sync with upstream (which now contains fbdev-v4.20 changes) to prepare a base for fbdev-v4.21 changes.
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/android/binder.h10
-rw-r--r--include/uapi/linux/blkzoned.h3
-rw-r--r--include/uapi/linux/bpf.h194
-rw-r--r--include/uapi/linux/cec.h3
-rw-r--r--include/uapi/linux/cryptouser.h52
-rw-r--r--include/uapi/linux/dns_resolver.h116
-rw-r--r--include/uapi/linux/elf-em.h1
-rw-r--r--include/uapi/linux/ethtool.h15
-rw-r--r--include/uapi/linux/fanotify.h25
-rw-r--r--include/uapi/linux/firewire-cdev.h22
-rw-r--r--include/uapi/linux/fs.h4
-rw-r--r--include/uapi/linux/fuse.h119
-rw-r--r--include/uapi/linux/gen_stats.h1
-rw-r--r--include/uapi/linux/gpio.h2
-rw-r--r--include/uapi/linux/if_addr.h1
-rw-r--r--include/uapi/linux/if_arp.h18
-rw-r--r--include/uapi/linux/if_fddi.h21
-rw-r--r--include/uapi/linux/if_link.h3
-rw-r--r--include/uapi/linux/if_packet.h1
-rw-r--r--include/uapi/linux/in6.h1
-rw-r--r--include/uapi/linux/input-event-codes.h17
-rw-r--r--include/uapi/linux/keyctl.h37
-rw-r--r--include/uapi/linux/kfd_ioctl.h21
-rw-r--r--include/uapi/linux/kvm.h26
-rw-r--r--include/uapi/linux/magic.h1
-rw-r--r--include/uapi/linux/media.h8
-rw-r--r--include/uapi/linux/ncsi.h6
-rw-r--r--include/uapi/linux/ndctl.h52
-rw-r--r--include/uapi/linux/neighbour.h1
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h60
-rw-r--r--include/uapi/linux/netfilter/xt_cgroup.h16
-rw-r--r--include/uapi/linux/netfilter_bridge.h4
-rw-r--r--include/uapi/linux/netlink.h1
-rw-r--r--include/uapi/linux/nl80211.h124
-rw-r--r--include/uapi/linux/pci_regs.h1
-rw-r--r--include/uapi/linux/perf_event.h2
-rw-r--r--include/uapi/linux/pkt_cls.h2
-rw-r--r--include/uapi/linux/pkt_sched.h52
-rw-r--r--include/uapi/linux/prctl.h1
-rw-r--r--include/uapi/linux/sctp.h4
-rw-r--r--include/uapi/linux/serial.h17
-rw-r--r--include/uapi/linux/smc_diag.h25
-rw-r--r--include/uapi/linux/taskstats.h6
-rw-r--r--include/uapi/linux/udmabuf.h33
-rw-r--r--include/uapi/linux/udp.h1
-rw-r--r--include/uapi/linux/usb/tmc.h41
-rw-r--r--include/uapi/linux/usb/video.h304
-rw-r--r--include/uapi/linux/v4l2-controls.h2
-rw-r--r--include/uapi/linux/vfio.h52
-rw-r--r--include/uapi/linux/videodev2.h60
-rw-r--r--include/uapi/linux/virtio_balloon.h8
51 files changed, 1275 insertions, 322 deletions
diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
index bfaec6903b8b..b9ba520f7e4b 100644
--- a/include/uapi/linux/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@ -200,6 +200,15 @@ struct binder_node_debug_info {
200 __u32 has_weak_ref; 200 __u32 has_weak_ref;
201}; 201};
202 202
203struct binder_node_info_for_ref {
204 __u32 handle;
205 __u32 strong_count;
206 __u32 weak_count;
207 __u32 reserved1;
208 __u32 reserved2;
209 __u32 reserved3;
210};
211
203#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) 212#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
204#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) 213#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64)
205#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) 214#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32)
@@ -208,6 +217,7 @@ struct binder_node_debug_info {
208#define BINDER_THREAD_EXIT _IOW('b', 8, __s32) 217#define BINDER_THREAD_EXIT _IOW('b', 8, __s32)
209#define BINDER_VERSION _IOWR('b', 9, struct binder_version) 218#define BINDER_VERSION _IOWR('b', 9, struct binder_version)
210#define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) 219#define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info)
220#define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref)
211 221
212/* 222/*
213 * NOTE: Two special error codes you should check for when calling 223 * NOTE: Two special error codes you should check for when calling
diff --git a/include/uapi/linux/blkzoned.h b/include/uapi/linux/blkzoned.h
index ff5a5db8906a..8f08ff9bdea0 100644
--- a/include/uapi/linux/blkzoned.h
+++ b/include/uapi/linux/blkzoned.h
@@ -137,8 +137,11 @@ struct blk_zone_range {
137 * sector specified in the report request structure. 137 * sector specified in the report request structure.
138 * @BLKRESETZONE: Reset the write pointer of the zones in the specified 138 * @BLKRESETZONE: Reset the write pointer of the zones in the specified
139 * sector range. The sector range must be zone aligned. 139 * sector range. The sector range must be zone aligned.
140 * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.
140 */ 141 */
141#define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report) 142#define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report)
142#define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range) 143#define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range)
144#define BLKGETZONESZ _IOW(0x12, 132, __u32)
145#define BLKGETNRZONES _IOW(0x12, 133, __u32)
143 146
144#endif /* _UAPI_BLKZONED_H */ 147#endif /* _UAPI_BLKZONED_H */
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 66917a4eba27..72c453a8bf50 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -103,6 +103,7 @@ enum bpf_cmd {
103 BPF_BTF_LOAD, 103 BPF_BTF_LOAD,
104 BPF_BTF_GET_FD_BY_ID, 104 BPF_BTF_GET_FD_BY_ID,
105 BPF_TASK_FD_QUERY, 105 BPF_TASK_FD_QUERY,
106 BPF_MAP_LOOKUP_AND_DELETE_ELEM,
106}; 107};
107 108
108enum bpf_map_type { 109enum bpf_map_type {
@@ -127,6 +128,9 @@ enum bpf_map_type {
127 BPF_MAP_TYPE_SOCKHASH, 128 BPF_MAP_TYPE_SOCKHASH,
128 BPF_MAP_TYPE_CGROUP_STORAGE, 129 BPF_MAP_TYPE_CGROUP_STORAGE,
129 BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, 130 BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,
131 BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,
132 BPF_MAP_TYPE_QUEUE,
133 BPF_MAP_TYPE_STACK,
130}; 134};
131 135
132enum bpf_prog_type { 136enum bpf_prog_type {
@@ -152,6 +156,7 @@ enum bpf_prog_type {
152 BPF_PROG_TYPE_LWT_SEG6LOCAL, 156 BPF_PROG_TYPE_LWT_SEG6LOCAL,
153 BPF_PROG_TYPE_LIRC_MODE2, 157 BPF_PROG_TYPE_LIRC_MODE2,
154 BPF_PROG_TYPE_SK_REUSEPORT, 158 BPF_PROG_TYPE_SK_REUSEPORT,
159 BPF_PROG_TYPE_FLOW_DISSECTOR,
155}; 160};
156 161
157enum bpf_attach_type { 162enum bpf_attach_type {
@@ -172,6 +177,7 @@ enum bpf_attach_type {
172 BPF_CGROUP_UDP4_SENDMSG, 177 BPF_CGROUP_UDP4_SENDMSG,
173 BPF_CGROUP_UDP6_SENDMSG, 178 BPF_CGROUP_UDP6_SENDMSG,
174 BPF_LIRC_MODE2, 179 BPF_LIRC_MODE2,
180 BPF_FLOW_DISSECTOR,
175 __MAX_BPF_ATTACH_TYPE 181 __MAX_BPF_ATTACH_TYPE
176}; 182};
177 183
@@ -459,6 +465,28 @@ union bpf_attr {
459 * Return 465 * Return
460 * 0 on success, or a negative error in case of failure. 466 * 0 on success, or a negative error in case of failure.
461 * 467 *
468 * int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags)
469 * Description
470 * Push an element *value* in *map*. *flags* is one of:
471 *
472 * **BPF_EXIST**
473 * If the queue/stack is full, the oldest element is removed to
474 * make room for this.
475 * Return
476 * 0 on success, or a negative error in case of failure.
477 *
478 * int bpf_map_pop_elem(struct bpf_map *map, void *value)
479 * Description
480 * Pop an element from *map*.
481 * Return
482 * 0 on success, or a negative error in case of failure.
483 *
484 * int bpf_map_peek_elem(struct bpf_map *map, void *value)
485 * Description
486 * Get an element from *map* without removing it.
487 * Return
488 * 0 on success, or a negative error in case of failure.
489 *
462 * int bpf_probe_read(void *dst, u32 size, const void *src) 490 * int bpf_probe_read(void *dst, u32 size, const void *src)
463 * Description 491 * Description
464 * For tracing programs, safely attempt to read *size* bytes from 492 * For tracing programs, safely attempt to read *size* bytes from
@@ -1430,7 +1458,7 @@ union bpf_attr {
1430 * Return 1458 * Return
1431 * 0 on success, or a negative error in case of failure. 1459 * 0 on success, or a negative error in case of failure.
1432 * 1460 *
1433 * int bpf_skb_adjust_room(struct sk_buff *skb, u32 len_diff, u32 mode, u64 flags) 1461 * int bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags)
1434 * Description 1462 * Description
1435 * Grow or shrink the room for data in the packet associated to 1463 * Grow or shrink the room for data in the packet associated to
1436 * *skb* by *len_diff*, and according to the selected *mode*. 1464 * *skb* by *len_diff*, and according to the selected *mode*.
@@ -2141,6 +2169,102 @@ union bpf_attr {
2141 * request in the skb. 2169 * request in the skb.
2142 * Return 2170 * Return
2143 * 0 on success, or a negative error in case of failure. 2171 * 0 on success, or a negative error in case of failure.
2172 *
2173 * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2174 * Description
2175 * Look for TCP socket matching *tuple*, optionally in a child
2176 * network namespace *netns*. The return value must be checked,
2177 * and if non-NULL, released via **bpf_sk_release**\ ().
2178 *
2179 * The *ctx* should point to the context of the program, such as
2180 * the skb or socket (depending on the hook in use). This is used
2181 * to determine the base network namespace for the lookup.
2182 *
2183 * *tuple_size* must be one of:
2184 *
2185 * **sizeof**\ (*tuple*\ **->ipv4**)
2186 * Look for an IPv4 socket.
2187 * **sizeof**\ (*tuple*\ **->ipv6**)
2188 * Look for an IPv6 socket.
2189 *
2190 * If the *netns* is a negative signed 32-bit integer, then the
2191 * socket lookup table in the netns associated with the *ctx* will
2192 * will be used. For the TC hooks, this is the netns of the device
2193 * in the skb. For socket hooks, this is the netns of the socket.
2194 * If *netns* is any other signed 32-bit value greater than or
2195 * equal to zero then it specifies the ID of the netns relative to
2196 * the netns associated with the *ctx*. *netns* values beyond the
2197 * range of 32-bit integers are reserved for future use.
2198 *
2199 * All values for *flags* are reserved for future usage, and must
2200 * be left at zero.
2201 *
2202 * This helper is available only if the kernel was compiled with
2203 * **CONFIG_NET** configuration option.
2204 * Return
2205 * Pointer to *struct bpf_sock*, or NULL in case of failure.
2206 * For sockets with reuseport option, the *struct bpf_sock*
2207 * result is from reuse->socks[] using the hash of the tuple.
2208 *
2209 * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2210 * Description
2211 * Look for UDP socket matching *tuple*, optionally in a child
2212 * network namespace *netns*. The return value must be checked,
2213 * and if non-NULL, released via **bpf_sk_release**\ ().
2214 *
2215 * The *ctx* should point to the context of the program, such as
2216 * the skb or socket (depending on the hook in use). This is used
2217 * to determine the base network namespace for the lookup.
2218 *
2219 * *tuple_size* must be one of:
2220 *
2221 * **sizeof**\ (*tuple*\ **->ipv4**)
2222 * Look for an IPv4 socket.
2223 * **sizeof**\ (*tuple*\ **->ipv6**)
2224 * Look for an IPv6 socket.
2225 *
2226 * If the *netns* is a negative signed 32-bit integer, then the
2227 * socket lookup table in the netns associated with the *ctx* will
2228 * will be used. For the TC hooks, this is the netns of the device
2229 * in the skb. For socket hooks, this is the netns of the socket.
2230 * If *netns* is any other signed 32-bit value greater than or
2231 * equal to zero then it specifies the ID of the netns relative to
2232 * the netns associated with the *ctx*. *netns* values beyond the
2233 * range of 32-bit integers are reserved for future use.
2234 *
2235 * All values for *flags* are reserved for future usage, and must
2236 * be left at zero.
2237 *
2238 * This helper is available only if the kernel was compiled with
2239 * **CONFIG_NET** configuration option.
2240 * Return
2241 * Pointer to *struct bpf_sock*, or NULL in case of failure.
2242 * For sockets with reuseport option, the *struct bpf_sock*
2243 * result is from reuse->socks[] using the hash of the tuple.
2244 *
2245 * int bpf_sk_release(struct bpf_sock *sk)
2246 * Description
2247 * Release the reference held by *sock*. *sock* must be a non-NULL
2248 * pointer that was returned from bpf_sk_lookup_xxx\ ().
2249 * Return
2250 * 0 on success, or a negative error in case of failure.
2251 *
2252 * int bpf_msg_push_data(struct sk_buff *skb, u32 start, u32 len, u64 flags)
2253 * Description
2254 * For socket policies, insert *len* bytes into msg at offset
2255 * *start*.
2256 *
2257 * If a program of type **BPF_PROG_TYPE_SK_MSG** is run on a
2258 * *msg* it may want to insert metadata or options into the msg.
2259 * This can later be read and used by any of the lower layer BPF
2260 * hooks.
2261 *
2262 * This helper may fail if under memory pressure (a malloc
2263 * fails) in these cases BPF programs will get an appropriate
2264 * error and BPF programs will need to handle them.
2265 *
2266 * Return
2267 * 0 on success, or a negative error in case of failure.
2144 */ 2268 */
2145#define __BPF_FUNC_MAPPER(FN) \ 2269#define __BPF_FUNC_MAPPER(FN) \
2146 FN(unspec), \ 2270 FN(unspec), \
@@ -2226,7 +2350,14 @@ union bpf_attr {
2226 FN(get_current_cgroup_id), \ 2350 FN(get_current_cgroup_id), \
2227 FN(get_local_storage), \ 2351 FN(get_local_storage), \
2228 FN(sk_select_reuseport), \ 2352 FN(sk_select_reuseport), \
2229 FN(skb_ancestor_cgroup_id), 2353 FN(skb_ancestor_cgroup_id), \
2354 FN(sk_lookup_tcp), \
2355 FN(sk_lookup_udp), \
2356 FN(sk_release), \
2357 FN(map_push_elem), \
2358 FN(map_pop_elem), \
2359 FN(map_peek_elem), \
2360 FN(msg_push_data),
2230 2361
2231/* integer value in 'imm' field of BPF_CALL instruction selects which helper 2362/* integer value in 'imm' field of BPF_CALL instruction selects which helper
2232 * function eBPF program intends to call 2363 * function eBPF program intends to call
@@ -2282,6 +2413,9 @@ enum bpf_func_id {
2282/* BPF_FUNC_perf_event_output for sk_buff input context. */ 2413/* BPF_FUNC_perf_event_output for sk_buff input context. */
2283#define BPF_F_CTXLEN_MASK (0xfffffULL << 32) 2414#define BPF_F_CTXLEN_MASK (0xfffffULL << 32)
2284 2415
2416/* Current network namespace */
2417#define BPF_F_CURRENT_NETNS (-1L)
2418
2285/* Mode for BPF_FUNC_skb_adjust_room helper. */ 2419/* Mode for BPF_FUNC_skb_adjust_room helper. */
2286enum bpf_adj_room_mode { 2420enum bpf_adj_room_mode {
2287 BPF_ADJ_ROOM_NET, 2421 BPF_ADJ_ROOM_NET,
@@ -2299,6 +2433,12 @@ enum bpf_lwt_encap_mode {
2299 BPF_LWT_ENCAP_SEG6_INLINE 2433 BPF_LWT_ENCAP_SEG6_INLINE
2300}; 2434};
2301 2435
2436#define __bpf_md_ptr(type, name) \
2437union { \
2438 type name; \
2439 __u64 :64; \
2440} __attribute__((aligned(8)))
2441
2302/* user accessible mirror of in-kernel sk_buff. 2442/* user accessible mirror of in-kernel sk_buff.
2303 * new fields can only be added to the end of this structure 2443 * new fields can only be added to the end of this structure
2304 */ 2444 */
@@ -2333,6 +2473,7 @@ struct __sk_buff {
2333 /* ... here. */ 2473 /* ... here. */
2334 2474
2335 __u32 data_meta; 2475 __u32 data_meta;
2476 __bpf_md_ptr(struct bpf_flow_keys *, flow_keys);
2336}; 2477};
2337 2478
2338struct bpf_tunnel_key { 2479struct bpf_tunnel_key {
@@ -2395,6 +2536,23 @@ struct bpf_sock {
2395 */ 2536 */
2396}; 2537};
2397 2538
2539struct bpf_sock_tuple {
2540 union {
2541 struct {
2542 __be32 saddr;
2543 __be32 daddr;
2544 __be16 sport;
2545 __be16 dport;
2546 } ipv4;
2547 struct {
2548 __be32 saddr[4];
2549 __be32 daddr[4];
2550 __be16 sport;
2551 __be16 dport;
2552 } ipv6;
2553 };
2554};
2555
2398#define XDP_PACKET_HEADROOM 256 2556#define XDP_PACKET_HEADROOM 256
2399 2557
2400/* User return codes for XDP prog type. 2558/* User return codes for XDP prog type.
@@ -2431,8 +2589,8 @@ enum sk_action {
2431 * be added to the end of this structure 2589 * be added to the end of this structure
2432 */ 2590 */
2433struct sk_msg_md { 2591struct sk_msg_md {
2434 void *data; 2592 __bpf_md_ptr(void *, data);
2435 void *data_end; 2593 __bpf_md_ptr(void *, data_end);
2436 2594
2437 __u32 family; 2595 __u32 family;
2438 __u32 remote_ip4; /* Stored in network byte order */ 2596 __u32 remote_ip4; /* Stored in network byte order */
@@ -2448,8 +2606,9 @@ struct sk_reuseport_md {
2448 * Start of directly accessible data. It begins from 2606 * Start of directly accessible data. It begins from
2449 * the tcp/udp header. 2607 * the tcp/udp header.
2450 */ 2608 */
2451 void *data; 2609 __bpf_md_ptr(void *, data);
2452 void *data_end; /* End of directly accessible data */ 2610 /* End of directly accessible data */
2611 __bpf_md_ptr(void *, data_end);
2453 /* 2612 /*
2454 * Total length of packet (starting from the tcp/udp header). 2613 * Total length of packet (starting from the tcp/udp header).
2455 * Note that the directly accessible bytes (data_end - data) 2614 * Note that the directly accessible bytes (data_end - data)
@@ -2778,4 +2937,27 @@ enum bpf_task_fd_type {
2778 BPF_FD_TYPE_URETPROBE, /* filename + offset */ 2937 BPF_FD_TYPE_URETPROBE, /* filename + offset */
2779}; 2938};
2780 2939
2940struct bpf_flow_keys {
2941 __u16 nhoff;
2942 __u16 thoff;
2943 __u16 addr_proto; /* ETH_P_* of valid addrs */
2944 __u8 is_frag;
2945 __u8 is_first_frag;
2946 __u8 is_encap;
2947 __u8 ip_proto;
2948 __be16 n_proto;
2949 __be16 sport;
2950 __be16 dport;
2951 union {
2952 struct {
2953 __be32 ipv4_src;
2954 __be32 ipv4_dst;
2955 };
2956 struct {
2957 __u32 ipv6_src[4]; /* in6_addr; network order */
2958 __u32 ipv6_dst[4]; /* in6_addr; network order */
2959 };
2960 };
2961};
2962
2781#endif /* _UAPI__LINUX_BPF_H__ */ 2963#endif /* _UAPI__LINUX_BPF_H__ */
diff --git a/include/uapi/linux/cec.h b/include/uapi/linux/cec.h
index 097fcd812471..3094af68b6e7 100644
--- a/include/uapi/linux/cec.h
+++ b/include/uapi/linux/cec.h
@@ -152,10 +152,13 @@ static inline void cec_msg_set_reply_to(struct cec_msg *msg,
152#define CEC_TX_STATUS_LOW_DRIVE (1 << 3) 152#define CEC_TX_STATUS_LOW_DRIVE (1 << 3)
153#define CEC_TX_STATUS_ERROR (1 << 4) 153#define CEC_TX_STATUS_ERROR (1 << 4)
154#define CEC_TX_STATUS_MAX_RETRIES (1 << 5) 154#define CEC_TX_STATUS_MAX_RETRIES (1 << 5)
155#define CEC_TX_STATUS_ABORTED (1 << 6)
156#define CEC_TX_STATUS_TIMEOUT (1 << 7)
155 157
156#define CEC_RX_STATUS_OK (1 << 0) 158#define CEC_RX_STATUS_OK (1 << 0)
157#define CEC_RX_STATUS_TIMEOUT (1 << 1) 159#define CEC_RX_STATUS_TIMEOUT (1 << 1)
158#define CEC_RX_STATUS_FEATURE_ABORT (1 << 2) 160#define CEC_RX_STATUS_FEATURE_ABORT (1 << 2)
161#define CEC_RX_STATUS_ABORTED (1 << 3)
159 162
160static inline int cec_msg_status_is_ok(const struct cec_msg *msg) 163static inline int cec_msg_status_is_ok(const struct cec_msg *msg)
161{ 164{
diff --git a/include/uapi/linux/cryptouser.h b/include/uapi/linux/cryptouser.h
index 19bf0ca6d635..6dafbc3e4414 100644
--- a/include/uapi/linux/cryptouser.h
+++ b/include/uapi/linux/cryptouser.h
@@ -29,6 +29,7 @@ enum {
29 CRYPTO_MSG_UPDATEALG, 29 CRYPTO_MSG_UPDATEALG,
30 CRYPTO_MSG_GETALG, 30 CRYPTO_MSG_GETALG,
31 CRYPTO_MSG_DELRNG, 31 CRYPTO_MSG_DELRNG,
32 CRYPTO_MSG_GETSTAT,
32 __CRYPTO_MSG_MAX 33 __CRYPTO_MSG_MAX
33}; 34};
34#define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1) 35#define CRYPTO_MSG_MAX (__CRYPTO_MSG_MAX - 1)
@@ -50,6 +51,16 @@ enum crypto_attr_type_t {
50 CRYPTOCFGA_REPORT_AKCIPHER, /* struct crypto_report_akcipher */ 51 CRYPTOCFGA_REPORT_AKCIPHER, /* struct crypto_report_akcipher */
51 CRYPTOCFGA_REPORT_KPP, /* struct crypto_report_kpp */ 52 CRYPTOCFGA_REPORT_KPP, /* struct crypto_report_kpp */
52 CRYPTOCFGA_REPORT_ACOMP, /* struct crypto_report_acomp */ 53 CRYPTOCFGA_REPORT_ACOMP, /* struct crypto_report_acomp */
54 CRYPTOCFGA_STAT_LARVAL, /* struct crypto_stat */
55 CRYPTOCFGA_STAT_HASH, /* struct crypto_stat */
56 CRYPTOCFGA_STAT_BLKCIPHER, /* struct crypto_stat */
57 CRYPTOCFGA_STAT_AEAD, /* struct crypto_stat */
58 CRYPTOCFGA_STAT_COMPRESS, /* struct crypto_stat */
59 CRYPTOCFGA_STAT_RNG, /* struct crypto_stat */
60 CRYPTOCFGA_STAT_CIPHER, /* struct crypto_stat */
61 CRYPTOCFGA_STAT_AKCIPHER, /* struct crypto_stat */
62 CRYPTOCFGA_STAT_KPP, /* struct crypto_stat */
63 CRYPTOCFGA_STAT_ACOMP, /* struct crypto_stat */
53 __CRYPTOCFGA_MAX 64 __CRYPTOCFGA_MAX
54 65
55#define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1) 66#define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1)
@@ -65,6 +76,47 @@ struct crypto_user_alg {
65 __u32 cru_flags; 76 __u32 cru_flags;
66}; 77};
67 78
79struct crypto_stat {
80 char type[CRYPTO_MAX_NAME];
81 union {
82 __u32 stat_encrypt_cnt;
83 __u32 stat_compress_cnt;
84 __u32 stat_generate_cnt;
85 __u32 stat_hash_cnt;
86 __u32 stat_setsecret_cnt;
87 };
88 union {
89 __u64 stat_encrypt_tlen;
90 __u64 stat_compress_tlen;
91 __u64 stat_generate_tlen;
92 __u64 stat_hash_tlen;
93 };
94 union {
95 __u32 stat_akcipher_err_cnt;
96 __u32 stat_cipher_err_cnt;
97 __u32 stat_compress_err_cnt;
98 __u32 stat_aead_err_cnt;
99 __u32 stat_hash_err_cnt;
100 __u32 stat_rng_err_cnt;
101 __u32 stat_kpp_err_cnt;
102 };
103 union {
104 __u32 stat_decrypt_cnt;
105 __u32 stat_decompress_cnt;
106 __u32 stat_seed_cnt;
107 __u32 stat_generate_public_key_cnt;
108 };
109 union {
110 __u64 stat_decrypt_tlen;
111 __u64 stat_decompress_tlen;
112 };
113 union {
114 __u32 stat_verify_cnt;
115 __u32 stat_compute_shared_secret_cnt;
116 };
117 __u32 stat_sign_cnt;
118};
119
68struct crypto_report_larval { 120struct crypto_report_larval {
69 char type[CRYPTO_MAX_NAME]; 121 char type[CRYPTO_MAX_NAME];
70}; 122};
diff --git a/include/uapi/linux/dns_resolver.h b/include/uapi/linux/dns_resolver.h
new file mode 100644
index 000000000000..129745f9c794
--- /dev/null
+++ b/include/uapi/linux/dns_resolver.h
@@ -0,0 +1,116 @@
1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2/* DNS resolver interface definitions.
3 *
4 * Copyright (C) 2018 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public Licence
9 * as published by the Free Software Foundation; either version
10 * 2 of the Licence, or (at your option) any later version.
11 */
12
13#ifndef _UAPI_LINUX_DNS_RESOLVER_H
14#define _UAPI_LINUX_DNS_RESOLVER_H
15
16#include <linux/types.h>
17
18/*
19 * Type of payload.
20 */
21enum dns_payload_content_type {
22 DNS_PAYLOAD_IS_SERVER_LIST = 0, /* List of servers, requested by srv=1 */
23};
24
25/*
26 * Type of address that might be found in an address record.
27 */
28enum dns_payload_address_type {
29 DNS_ADDRESS_IS_IPV4 = 0, /* 4-byte AF_INET address */
30 DNS_ADDRESS_IS_IPV6 = 1, /* 16-byte AF_INET6 address */
31};
32
33/*
34 * Type of protocol used to access a server.
35 */
36enum dns_payload_protocol_type {
37 DNS_SERVER_PROTOCOL_UNSPECIFIED = 0,
38 DNS_SERVER_PROTOCOL_UDP = 1, /* Use UDP to talk to the server */
39 DNS_SERVER_PROTOCOL_TCP = 2, /* Use TCP to talk to the server */
40};
41
42/*
43 * Source of record included in DNS resolver payload.
44 */
45enum dns_record_source {
46 DNS_RECORD_UNAVAILABLE = 0, /* No source available (empty record) */
47 DNS_RECORD_FROM_CONFIG = 1, /* From local configuration data */
48 DNS_RECORD_FROM_DNS_A = 2, /* From DNS A or AAAA record */
49 DNS_RECORD_FROM_DNS_AFSDB = 3, /* From DNS AFSDB record */
50 DNS_RECORD_FROM_DNS_SRV = 4, /* From DNS SRV record */
51 DNS_RECORD_FROM_NSS = 5, /* From NSS */
52 NR__dns_record_source
53};
54
55/*
56 * Status of record included in DNS resolver payload.
57 */
58enum dns_lookup_status {
59 DNS_LOOKUP_NOT_DONE = 0, /* No lookup has been made */
60 DNS_LOOKUP_GOOD = 1, /* Good records obtained */
61 DNS_LOOKUP_GOOD_WITH_BAD = 2, /* Good records, some decoding errors */
62 DNS_LOOKUP_BAD = 3, /* Couldn't decode results */
63 DNS_LOOKUP_GOT_NOT_FOUND = 4, /* Got a "Not Found" result */
64 DNS_LOOKUP_GOT_LOCAL_FAILURE = 5, /* Local failure during lookup */
65 DNS_LOOKUP_GOT_TEMP_FAILURE = 6, /* Temporary failure during lookup */
66 DNS_LOOKUP_GOT_NS_FAILURE = 7, /* Name server failure */
67 NR__dns_lookup_status
68};
69
70/*
71 * Header at the beginning of binary format payload.
72 */
73struct dns_payload_header {
74 __u8 zero; /* Zero byte: marks this as not being text */
75 __u8 content; /* enum dns_payload_content_type */
76 __u8 version; /* Encoding version */
77} __packed;
78
79/*
80 * Header at the beginning of a V1 server list. This is followed directly by
81 * the server records. Each server records begins with a struct of type
82 * dns_server_list_v1_server.
83 */
84struct dns_server_list_v1_header {
85 struct dns_payload_header hdr;
86 __u8 source; /* enum dns_record_source */
87 __u8 status; /* enum dns_lookup_status */
88 __u8 nr_servers; /* Number of server records following this */
89} __packed;
90
91/*
92 * Header at the beginning of each V1 server record. This is followed by the
93 * characters of the name with no NUL-terminator, followed by the address
94 * records for that server. Each address record begins with a struct of type
95 * struct dns_server_list_v1_address.
96 */
97struct dns_server_list_v1_server {
98 __u16 name_len; /* Length of name (LE) */
99 __u16 priority; /* Priority (as SRV record) (LE) */
100 __u16 weight; /* Weight (as SRV record) (LE) */
101 __u16 port; /* UDP/TCP port number (LE) */
102 __u8 source; /* enum dns_record_source */
103 __u8 status; /* enum dns_lookup_status */
104 __u8 protocol; /* enum dns_payload_protocol_type */
105 __u8 nr_addrs;
106} __packed;
107
108/*
109 * Header at the beginning of each V1 address record. This is followed by the
110 * bytes of the address, 4 for IPV4 and 16 for IPV6.
111 */
112struct dns_server_list_v1_address {
113 __u8 address_type; /* enum dns_payload_address_type */
114} __packed;
115
116#endif /* _UAPI_LINUX_DNS_RESOLVER_H */
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h
index 31aa10178335..93722e60204c 100644
--- a/include/uapi/linux/elf-em.h
+++ b/include/uapi/linux/elf-em.h
@@ -41,6 +41,7 @@
41#define EM_TILEPRO 188 /* Tilera TILEPro */ 41#define EM_TILEPRO 188 /* Tilera TILEPro */
42#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */ 42#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
43#define EM_TILEGX 191 /* Tilera TILE-Gx */ 43#define EM_TILEGX 191 /* Tilera TILE-Gx */
44#define EM_RISCV 243 /* RISC-V */
44#define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */ 45#define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */
45#define EM_FRV 0x5441 /* Fujitsu FR-V */ 46#define EM_FRV 0x5441 /* Fujitsu FR-V */
46 47
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index dc69391d2bba..c8f8e2455bf3 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -91,10 +91,6 @@
91 * %ETHTOOL_GSET to get the current values before making specific 91 * %ETHTOOL_GSET to get the current values before making specific
92 * changes and then applying them with %ETHTOOL_SSET. 92 * changes and then applying them with %ETHTOOL_SSET.
93 * 93 *
94 * Drivers that implement set_settings() should validate all fields
95 * other than @cmd that are not described as read-only or deprecated,
96 * and must ignore all fields described as read-only.
97 *
98 * Deprecated fields should be ignored by both users and drivers. 94 * Deprecated fields should be ignored by both users and drivers.
99 */ 95 */
100struct ethtool_cmd { 96struct ethtool_cmd {
@@ -1800,14 +1796,9 @@ enum ethtool_reset_flags {
1800 * rejected. 1796 * rejected.
1801 * 1797 *
1802 * Deprecated %ethtool_cmd fields transceiver, maxtxpkt and maxrxpkt 1798 * Deprecated %ethtool_cmd fields transceiver, maxtxpkt and maxrxpkt
1803 * are not available in %ethtool_link_settings. Until all drivers are 1799 * are not available in %ethtool_link_settings. These fields will be
1804 * converted to ignore them or to the new %ethtool_link_settings API, 1800 * always set to zero in %ETHTOOL_GSET reply and %ETHTOOL_SSET will
1805 * for both queries and changes, users should always try 1801 * fail if any of them is set to non-zero value.
1806 * %ETHTOOL_GLINKSETTINGS first, and if it fails with -ENOTSUPP stick
1807 * only to %ETHTOOL_GSET and %ETHTOOL_SSET consistently. If it
1808 * succeeds, then users should stick to %ETHTOOL_GLINKSETTINGS and
1809 * %ETHTOOL_SLINKSETTINGS (which would support drivers implementing
1810 * either %ethtool_cmd or %ethtool_link_settings).
1811 * 1802 *
1812 * Users should assume that all fields not marked read-only are 1803 * Users should assume that all fields not marked read-only are
1813 * writable and subject to validation by the driver. They should use 1804 * writable and subject to validation by the driver. They should use
diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h
index 74247917de04..b86740d1c50a 100644
--- a/include/uapi/linux/fanotify.h
+++ b/include/uapi/linux/fanotify.h
@@ -27,10 +27,12 @@
27#define FAN_CLOEXEC 0x00000001 27#define FAN_CLOEXEC 0x00000001
28#define FAN_NONBLOCK 0x00000002 28#define FAN_NONBLOCK 0x00000002
29 29
30/* These are NOT bitwise flags. Both bits are used togther. */ 30/* These are NOT bitwise flags. Both bits are used together. */
31#define FAN_CLASS_NOTIF 0x00000000 31#define FAN_CLASS_NOTIF 0x00000000
32#define FAN_CLASS_CONTENT 0x00000004 32#define FAN_CLASS_CONTENT 0x00000004
33#define FAN_CLASS_PRE_CONTENT 0x00000008 33#define FAN_CLASS_PRE_CONTENT 0x00000008
34
35/* Deprecated - do not use this in programs and do not add new flags here! */
34#define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \ 36#define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \
35 FAN_CLASS_PRE_CONTENT) 37 FAN_CLASS_PRE_CONTENT)
36 38
@@ -38,6 +40,10 @@
38#define FAN_UNLIMITED_MARKS 0x00000020 40#define FAN_UNLIMITED_MARKS 0x00000020
39#define FAN_ENABLE_AUDIT 0x00000040 41#define FAN_ENABLE_AUDIT 0x00000040
40 42
43/* Flags to determine fanotify event format */
44#define FAN_REPORT_TID 0x00000100 /* event->pid is thread id */
45
46/* Deprecated - do not use this in programs and do not add new flags here! */
41#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \ 47#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \
42 FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\ 48 FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\
43 FAN_UNLIMITED_MARKS) 49 FAN_UNLIMITED_MARKS)
@@ -47,11 +53,18 @@
47#define FAN_MARK_REMOVE 0x00000002 53#define FAN_MARK_REMOVE 0x00000002
48#define FAN_MARK_DONT_FOLLOW 0x00000004 54#define FAN_MARK_DONT_FOLLOW 0x00000004
49#define FAN_MARK_ONLYDIR 0x00000008 55#define FAN_MARK_ONLYDIR 0x00000008
50#define FAN_MARK_MOUNT 0x00000010 56/* FAN_MARK_MOUNT is 0x00000010 */
51#define FAN_MARK_IGNORED_MASK 0x00000020 57#define FAN_MARK_IGNORED_MASK 0x00000020
52#define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040 58#define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040
53#define FAN_MARK_FLUSH 0x00000080 59#define FAN_MARK_FLUSH 0x00000080
60/* FAN_MARK_FILESYSTEM is 0x00000100 */
54 61
62/* These are NOT bitwise flags. Both bits can be used togther. */
63#define FAN_MARK_INODE 0x00000000
64#define FAN_MARK_MOUNT 0x00000010
65#define FAN_MARK_FILESYSTEM 0x00000100
66
67/* Deprecated - do not use this in programs and do not add new flags here! */
55#define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\ 68#define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\
56 FAN_MARK_REMOVE |\ 69 FAN_MARK_REMOVE |\
57 FAN_MARK_DONT_FOLLOW |\ 70 FAN_MARK_DONT_FOLLOW |\
@@ -61,11 +74,7 @@
61 FAN_MARK_IGNORED_SURV_MODIFY |\ 74 FAN_MARK_IGNORED_SURV_MODIFY |\
62 FAN_MARK_FLUSH) 75 FAN_MARK_FLUSH)
63 76
64/* 77/* Deprecated - do not use this in programs and do not add new flags here! */
65 * All of the events - we build the list by hand so that we can add flags in
66 * the future and not break backward compatibility. Apps will get only the
67 * events that they originally wanted. Be sure to add new events here!
68 */
69#define FAN_ALL_EVENTS (FAN_ACCESS |\ 78#define FAN_ALL_EVENTS (FAN_ACCESS |\
70 FAN_MODIFY |\ 79 FAN_MODIFY |\
71 FAN_CLOSE |\ 80 FAN_CLOSE |\
@@ -74,9 +83,11 @@
74/* 83/*
75 * All events which require a permission response from userspace 84 * All events which require a permission response from userspace
76 */ 85 */
86/* Deprecated - do not use this in programs and do not add new flags here! */
77#define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\ 87#define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\
78 FAN_ACCESS_PERM) 88 FAN_ACCESS_PERM)
79 89
90/* Deprecated - do not use this in programs and do not add new flags here! */
80#define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\ 91#define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\
81 FAN_ALL_PERM_EVENTS |\ 92 FAN_ALL_PERM_EVENTS |\
82 FAN_Q_OVERFLOW) 93 FAN_Q_OVERFLOW)
diff --git a/include/uapi/linux/firewire-cdev.h b/include/uapi/linux/firewire-cdev.h
index 1db453e4b550..1acd2b179aef 100644
--- a/include/uapi/linux/firewire-cdev.h
+++ b/include/uapi/linux/firewire-cdev.h
@@ -47,11 +47,11 @@
47#define FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL 0x09 47#define FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL 0x09
48 48
49/** 49/**
50 * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types 50 * struct fw_cdev_event_common - Common part of all fw_cdev_event_* types
51 * @closure: For arbitrary use by userspace 51 * @closure: For arbitrary use by userspace
52 * @type: Discriminates the fw_cdev_event_ types 52 * @type: Discriminates the fw_cdev_event_* types
53 * 53 *
54 * This struct may be used to access generic members of all fw_cdev_event_ 54 * This struct may be used to access generic members of all fw_cdev_event_*
55 * types regardless of the specific type. 55 * types regardless of the specific type.
56 * 56 *
57 * Data passed in the @closure field for a request will be returned in the 57 * Data passed in the @closure field for a request will be returned in the
@@ -123,7 +123,13 @@ struct fw_cdev_event_response {
123 123
124/** 124/**
125 * struct fw_cdev_event_request - Old version of &fw_cdev_event_request2 125 * struct fw_cdev_event_request - Old version of &fw_cdev_event_request2
126 * @closure: See &fw_cdev_event_common; set by %FW_CDEV_IOC_ALLOCATE ioctl
126 * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST 127 * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_REQUEST
128 * @tcode: Transaction code of the incoming request
129 * @offset: The offset into the 48-bit per-node address space
130 * @handle: Reference to the kernel-side pending request
131 * @length: Data length, i.e. the request's payload size in bytes
132 * @data: Incoming data, if any
127 * 133 *
128 * This event is sent instead of &fw_cdev_event_request2 if the kernel or 134 * This event is sent instead of &fw_cdev_event_request2 if the kernel or
129 * the client implements ABI version <= 3. &fw_cdev_event_request lacks 135 * the client implements ABI version <= 3. &fw_cdev_event_request lacks
@@ -353,7 +359,7 @@ struct fw_cdev_event_phy_packet {
353}; 359};
354 360
355/** 361/**
356 * union fw_cdev_event - Convenience union of fw_cdev_event_ types 362 * union fw_cdev_event - Convenience union of fw_cdev_event_* types
357 * @common: Valid for all types 363 * @common: Valid for all types
358 * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET 364 * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET
359 * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE 365 * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE
@@ -735,7 +741,7 @@ struct fw_cdev_set_iso_channels {
735 * @header: Header and payload in case of a transmit context. 741 * @header: Header and payload in case of a transmit context.
736 * 742 *
737 * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. 743 * &struct fw_cdev_iso_packet is used to describe isochronous packet queues.
738 * Use the FW_CDEV_ISO_ macros to fill in @control. 744 * Use the FW_CDEV_ISO_* macros to fill in @control.
739 * The @header array is empty in case of receive contexts. 745 * The @header array is empty in case of receive contexts.
740 * 746 *
741 * Context type %FW_CDEV_ISO_CONTEXT_TRANSMIT: 747 * Context type %FW_CDEV_ISO_CONTEXT_TRANSMIT:
@@ -842,7 +848,7 @@ struct fw_cdev_queue_iso {
842 * the %FW_CDEV_ISO_SYNC bit set 848 * the %FW_CDEV_ISO_SYNC bit set
843 * @tags: Tag filter bit mask. Only valid for isochronous reception. 849 * @tags: Tag filter bit mask. Only valid for isochronous reception.
844 * Determines the tag values for which packets will be accepted. 850 * Determines the tag values for which packets will be accepted.
845 * Use FW_CDEV_ISO_CONTEXT_MATCH_ macros to set @tags. 851 * Use FW_CDEV_ISO_CONTEXT_MATCH_* macros to set @tags.
846 * @handle: Isochronous context handle within which to transmit or receive 852 * @handle: Isochronous context handle within which to transmit or receive
847 */ 853 */
848struct fw_cdev_start_iso { 854struct fw_cdev_start_iso {
@@ -1009,8 +1015,8 @@ struct fw_cdev_send_stream_packet {
1009 * on the same card as this device. After transmission, an 1015 * on the same card as this device. After transmission, an
1010 * %FW_CDEV_EVENT_PHY_PACKET_SENT event is generated. 1016 * %FW_CDEV_EVENT_PHY_PACKET_SENT event is generated.
1011 * 1017 *
1012 * The payload @data[] shall be specified in host byte order. Usually, 1018 * The payload @data\[\] shall be specified in host byte order. Usually,
1013 * @data[1] needs to be the bitwise inverse of @data[0]. VersaPHY packets 1019 * @data\[1\] needs to be the bitwise inverse of @data\[0\]. VersaPHY packets
1014 * are an exception to this rule. 1020 * are an exception to this rule.
1015 * 1021 *
1016 * The ioctl is only permitted on device files which represent a local node. 1022 * The ioctl is only permitted on device files which represent a local node.
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index 73e01918f996..a441ea1bfe6d 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -279,8 +279,8 @@ struct fsxattr {
279#define FS_ENCRYPTION_MODE_AES_256_CTS 4 279#define FS_ENCRYPTION_MODE_AES_256_CTS 4
280#define FS_ENCRYPTION_MODE_AES_128_CBC 5 280#define FS_ENCRYPTION_MODE_AES_128_CBC 5
281#define FS_ENCRYPTION_MODE_AES_128_CTS 6 281#define FS_ENCRYPTION_MODE_AES_128_CTS 6
282#define FS_ENCRYPTION_MODE_SPECK128_256_XTS 7 282#define FS_ENCRYPTION_MODE_SPECK128_256_XTS 7 /* Removed, do not use. */
283#define FS_ENCRYPTION_MODE_SPECK128_256_CTS 8 283#define FS_ENCRYPTION_MODE_SPECK128_256_CTS 8 /* Removed, do not use. */
284 284
285struct fscrypt_policy { 285struct fscrypt_policy {
286 __u8 version; 286 __u8 version;
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 92fa24c24c92..b4967d48bfda 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -116,6 +116,12 @@
116 * 116 *
117 * 7.27 117 * 7.27
118 * - add FUSE_ABORT_ERROR 118 * - add FUSE_ABORT_ERROR
119 *
120 * 7.28
121 * - add FUSE_COPY_FILE_RANGE
122 * - add FOPEN_CACHE_DIR
123 * - add FUSE_MAX_PAGES, add max_pages to init_out
124 * - add FUSE_CACHE_SYMLINKS
119 */ 125 */
120 126
121#ifndef _LINUX_FUSE_H 127#ifndef _LINUX_FUSE_H
@@ -151,7 +157,7 @@
151#define FUSE_KERNEL_VERSION 7 157#define FUSE_KERNEL_VERSION 7
152 158
153/** Minor version number of this interface */ 159/** Minor version number of this interface */
154#define FUSE_KERNEL_MINOR_VERSION 27 160#define FUSE_KERNEL_MINOR_VERSION 28
155 161
156/** The node ID of the root inode */ 162/** The node ID of the root inode */
157#define FUSE_ROOT_ID 1 163#define FUSE_ROOT_ID 1
@@ -219,10 +225,12 @@ struct fuse_file_lock {
219 * FOPEN_DIRECT_IO: bypass page cache for this open file 225 * FOPEN_DIRECT_IO: bypass page cache for this open file
220 * FOPEN_KEEP_CACHE: don't invalidate the data cache on open 226 * FOPEN_KEEP_CACHE: don't invalidate the data cache on open
221 * FOPEN_NONSEEKABLE: the file is not seekable 227 * FOPEN_NONSEEKABLE: the file is not seekable
228 * FOPEN_CACHE_DIR: allow caching this directory
222 */ 229 */
223#define FOPEN_DIRECT_IO (1 << 0) 230#define FOPEN_DIRECT_IO (1 << 0)
224#define FOPEN_KEEP_CACHE (1 << 1) 231#define FOPEN_KEEP_CACHE (1 << 1)
225#define FOPEN_NONSEEKABLE (1 << 2) 232#define FOPEN_NONSEEKABLE (1 << 2)
233#define FOPEN_CACHE_DIR (1 << 3)
226 234
227/** 235/**
228 * INIT request/reply flags 236 * INIT request/reply flags
@@ -249,6 +257,8 @@ struct fuse_file_lock {
249 * FUSE_HANDLE_KILLPRIV: fs handles killing suid/sgid/cap on write/chown/trunc 257 * FUSE_HANDLE_KILLPRIV: fs handles killing suid/sgid/cap on write/chown/trunc
250 * FUSE_POSIX_ACL: filesystem supports posix acls 258 * FUSE_POSIX_ACL: filesystem supports posix acls
251 * FUSE_ABORT_ERROR: reading the device after abort returns ECONNABORTED 259 * FUSE_ABORT_ERROR: reading the device after abort returns ECONNABORTED
260 * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages
261 * FUSE_CACHE_SYMLINKS: cache READLINK responses
252 */ 262 */
253#define FUSE_ASYNC_READ (1 << 0) 263#define FUSE_ASYNC_READ (1 << 0)
254#define FUSE_POSIX_LOCKS (1 << 1) 264#define FUSE_POSIX_LOCKS (1 << 1)
@@ -272,6 +282,8 @@ struct fuse_file_lock {
272#define FUSE_HANDLE_KILLPRIV (1 << 19) 282#define FUSE_HANDLE_KILLPRIV (1 << 19)
273#define FUSE_POSIX_ACL (1 << 20) 283#define FUSE_POSIX_ACL (1 << 20)
274#define FUSE_ABORT_ERROR (1 << 21) 284#define FUSE_ABORT_ERROR (1 << 21)
285#define FUSE_MAX_PAGES (1 << 22)
286#define FUSE_CACHE_SYMLINKS (1 << 23)
275 287
276/** 288/**
277 * CUSE INIT request/reply flags 289 * CUSE INIT request/reply flags
@@ -337,53 +349,54 @@ struct fuse_file_lock {
337#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) 349#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
338 350
339enum fuse_opcode { 351enum fuse_opcode {
340 FUSE_LOOKUP = 1, 352 FUSE_LOOKUP = 1,
341 FUSE_FORGET = 2, /* no reply */ 353 FUSE_FORGET = 2, /* no reply */
342 FUSE_GETATTR = 3, 354 FUSE_GETATTR = 3,
343 FUSE_SETATTR = 4, 355 FUSE_SETATTR = 4,
344 FUSE_READLINK = 5, 356 FUSE_READLINK = 5,
345 FUSE_SYMLINK = 6, 357 FUSE_SYMLINK = 6,
346 FUSE_MKNOD = 8, 358 FUSE_MKNOD = 8,
347 FUSE_MKDIR = 9, 359 FUSE_MKDIR = 9,
348 FUSE_UNLINK = 10, 360 FUSE_UNLINK = 10,
349 FUSE_RMDIR = 11, 361 FUSE_RMDIR = 11,
350 FUSE_RENAME = 12, 362 FUSE_RENAME = 12,
351 FUSE_LINK = 13, 363 FUSE_LINK = 13,
352 FUSE_OPEN = 14, 364 FUSE_OPEN = 14,
353 FUSE_READ = 15, 365 FUSE_READ = 15,
354 FUSE_WRITE = 16, 366 FUSE_WRITE = 16,
355 FUSE_STATFS = 17, 367 FUSE_STATFS = 17,
356 FUSE_RELEASE = 18, 368 FUSE_RELEASE = 18,
357 FUSE_FSYNC = 20, 369 FUSE_FSYNC = 20,
358 FUSE_SETXATTR = 21, 370 FUSE_SETXATTR = 21,
359 FUSE_GETXATTR = 22, 371 FUSE_GETXATTR = 22,
360 FUSE_LISTXATTR = 23, 372 FUSE_LISTXATTR = 23,
361 FUSE_REMOVEXATTR = 24, 373 FUSE_REMOVEXATTR = 24,
362 FUSE_FLUSH = 25, 374 FUSE_FLUSH = 25,
363 FUSE_INIT = 26, 375 FUSE_INIT = 26,
364 FUSE_OPENDIR = 27, 376 FUSE_OPENDIR = 27,
365 FUSE_READDIR = 28, 377 FUSE_READDIR = 28,
366 FUSE_RELEASEDIR = 29, 378 FUSE_RELEASEDIR = 29,
367 FUSE_FSYNCDIR = 30, 379 FUSE_FSYNCDIR = 30,
368 FUSE_GETLK = 31, 380 FUSE_GETLK = 31,
369 FUSE_SETLK = 32, 381 FUSE_SETLK = 32,
370 FUSE_SETLKW = 33, 382 FUSE_SETLKW = 33,
371 FUSE_ACCESS = 34, 383 FUSE_ACCESS = 34,
372 FUSE_CREATE = 35, 384 FUSE_CREATE = 35,
373 FUSE_INTERRUPT = 36, 385 FUSE_INTERRUPT = 36,
374 FUSE_BMAP = 37, 386 FUSE_BMAP = 37,
375 FUSE_DESTROY = 38, 387 FUSE_DESTROY = 38,
376 FUSE_IOCTL = 39, 388 FUSE_IOCTL = 39,
377 FUSE_POLL = 40, 389 FUSE_POLL = 40,
378 FUSE_NOTIFY_REPLY = 41, 390 FUSE_NOTIFY_REPLY = 41,
379 FUSE_BATCH_FORGET = 42, 391 FUSE_BATCH_FORGET = 42,
380 FUSE_FALLOCATE = 43, 392 FUSE_FALLOCATE = 43,
381 FUSE_READDIRPLUS = 44, 393 FUSE_READDIRPLUS = 44,
382 FUSE_RENAME2 = 45, 394 FUSE_RENAME2 = 45,
383 FUSE_LSEEK = 46, 395 FUSE_LSEEK = 46,
396 FUSE_COPY_FILE_RANGE = 47,
384 397
385 /* CUSE specific operations */ 398 /* CUSE specific operations */
386 CUSE_INIT = 4096, 399 CUSE_INIT = 4096,
387}; 400};
388 401
389enum fuse_notify_code { 402enum fuse_notify_code {
@@ -610,7 +623,9 @@ struct fuse_init_out {
610 uint16_t congestion_threshold; 623 uint16_t congestion_threshold;
611 uint32_t max_write; 624 uint32_t max_write;
612 uint32_t time_gran; 625 uint32_t time_gran;
613 uint32_t unused[9]; 626 uint16_t max_pages;
627 uint16_t padding;
628 uint32_t unused[8];
614}; 629};
615 630
616#define CUSE_INIT_INFO_MAX 4096 631#define CUSE_INIT_INFO_MAX 4096
@@ -792,4 +807,14 @@ struct fuse_lseek_out {
792 uint64_t offset; 807 uint64_t offset;
793}; 808};
794 809
810struct fuse_copy_file_range_in {
811 uint64_t fh_in;
812 uint64_t off_in;
813 uint64_t nodeid_out;
814 uint64_t fh_out;
815 uint64_t off_out;
816 uint64_t len;
817 uint64_t flags;
818};
819
795#endif /* _LINUX_FUSE_H */ 820#endif /* _LINUX_FUSE_H */
diff --git a/include/uapi/linux/gen_stats.h b/include/uapi/linux/gen_stats.h
index 24a861c0d29d..065408e16a80 100644
--- a/include/uapi/linux/gen_stats.h
+++ b/include/uapi/linux/gen_stats.h
@@ -12,6 +12,7 @@ enum {
12 TCA_STATS_APP, 12 TCA_STATS_APP,
13 TCA_STATS_RATE_EST64, 13 TCA_STATS_RATE_EST64,
14 TCA_STATS_PAD, 14 TCA_STATS_PAD,
15 TCA_STATS_BASIC_HW,
15 __TCA_STATS_MAX, 16 __TCA_STATS_MAX,
16}; 17};
17#define TCA_STATS_MAX (__TCA_STATS_MAX - 1) 18#define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h
index 1bf6e6df084b..4ebfe0ac6c5b 100644
--- a/include/uapi/linux/gpio.h
+++ b/include/uapi/linux/gpio.h
@@ -65,7 +65,7 @@ struct gpioline_info {
65 65
66/** 66/**
67 * struct gpiohandle_request - Information about a GPIO handle request 67 * struct gpiohandle_request - Information about a GPIO handle request
68 * @lineoffsets: an array desired lines, specified by offset index for the 68 * @lineoffsets: an array of desired lines, specified by offset index for the
69 * associated GPIO device 69 * associated GPIO device
70 * @flags: desired flags for the desired GPIO lines, such as 70 * @flags: desired flags for the desired GPIO lines, such as
71 * GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed 71 * GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed
diff --git a/include/uapi/linux/if_addr.h b/include/uapi/linux/if_addr.h
index ebaf5701c9db..dfcf3ce0097f 100644
--- a/include/uapi/linux/if_addr.h
+++ b/include/uapi/linux/if_addr.h
@@ -34,6 +34,7 @@ enum {
34 IFA_MULTICAST, 34 IFA_MULTICAST,
35 IFA_FLAGS, 35 IFA_FLAGS,
36 IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */ 36 IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */
37 IFA_TARGET_NETNSID,
37 __IFA_MAX, 38 __IFA_MAX,
38}; 39};
39 40
diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h
index 4605527ca41b..c3cc5a9e5eaf 100644
--- a/include/uapi/linux/if_arp.h
+++ b/include/uapi/linux/if_arp.h
@@ -114,18 +114,18 @@
114 114
115/* ARP ioctl request. */ 115/* ARP ioctl request. */
116struct arpreq { 116struct arpreq {
117 struct sockaddr arp_pa; /* protocol address */ 117 struct sockaddr arp_pa; /* protocol address */
118 struct sockaddr arp_ha; /* hardware address */ 118 struct sockaddr arp_ha; /* hardware address */
119 int arp_flags; /* flags */ 119 int arp_flags; /* flags */
120 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ 120 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
121 char arp_dev[16]; 121 char arp_dev[IFNAMSIZ];
122}; 122};
123 123
124struct arpreq_old { 124struct arpreq_old {
125 struct sockaddr arp_pa; /* protocol address */ 125 struct sockaddr arp_pa; /* protocol address */
126 struct sockaddr arp_ha; /* hardware address */ 126 struct sockaddr arp_ha; /* hardware address */
127 int arp_flags; /* flags */ 127 int arp_flags; /* flags */
128 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ 128 struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
129}; 129};
130 130
131/* ARP Flag values. */ 131/* ARP Flag values. */
diff --git a/include/uapi/linux/if_fddi.h b/include/uapi/linux/if_fddi.h
index 75eed8b62823..7239aa9c0766 100644
--- a/include/uapi/linux/if_fddi.h
+++ b/include/uapi/linux/if_fddi.h
@@ -6,9 +6,10 @@
6 * 6 *
7 * Global definitions for the ANSI FDDI interface. 7 * Global definitions for the ANSI FDDI interface.
8 * 8 *
9 * Version: @(#)if_fddi.h 1.0.2 Sep 29 2004 9 * Version: @(#)if_fddi.h 1.0.3 Oct 6 2018
10 * 10 *
11 * Author: Lawrence V. Stefani, <stefani@lkg.dec.com> 11 * Author: Lawrence V. Stefani, <stefani@yahoo.com>
12 * Maintainer: Maciej W. Rozycki, <macro@linux-mips.org>
12 * 13 *
13 * if_fddi.h is based on previous if_ether.h and if_tr.h work by 14 * if_fddi.h is based on previous if_ether.h and if_tr.h work by
14 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 15 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -45,7 +46,21 @@
45#define FDDI_K_OUI_LEN 3 /* Octets in OUI in 802.2 SNAP 46#define FDDI_K_OUI_LEN 3 /* Octets in OUI in 802.2 SNAP
46 header */ 47 header */
47 48
48/* Define FDDI Frame Control (FC) Byte values */ 49/* Define FDDI Frame Control (FC) Byte masks */
50#define FDDI_FC_K_CLASS_MASK 0x80 /* class bit */
51#define FDDI_FC_K_CLASS_SYNC 0x80
52#define FDDI_FC_K_CLASS_ASYNC 0x00
53#define FDDI_FC_K_ALEN_MASK 0x40 /* address length bit */
54#define FDDI_FC_K_ALEN_48 0x40
55#define FDDI_FC_K_ALEN_16 0x00
56#define FDDI_FC_K_FORMAT_MASK 0x30 /* format bits */
57#define FDDI_FC_K_FORMAT_FUTURE 0x30
58#define FDDI_FC_K_FORMAT_IMPLEMENTOR 0x20
59#define FDDI_FC_K_FORMAT_LLC 0x10
60#define FDDI_FC_K_FORMAT_MANAGEMENT 0x00
61#define FDDI_FC_K_CONTROL_MASK 0x0f /* control bits */
62
63/* Define FDDI Frame Control (FC) Byte specific values */
49#define FDDI_FC_K_VOID 0x00 64#define FDDI_FC_K_VOID 0x00
50#define FDDI_FC_K_NON_RESTRICTED_TOKEN 0x80 65#define FDDI_FC_K_NON_RESTRICTED_TOKEN 0x80
51#define FDDI_FC_K_RESTRICTED_TOKEN 0xC0 66#define FDDI_FC_K_RESTRICTED_TOKEN 0xC0
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 43391e2d1153..1debfa42cba1 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -161,6 +161,7 @@ enum {
161 IFLA_EVENT, 161 IFLA_EVENT,
162 IFLA_NEW_NETNSID, 162 IFLA_NEW_NETNSID,
163 IFLA_IF_NETNSID, 163 IFLA_IF_NETNSID,
164 IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, /* new alias */
164 IFLA_CARRIER_UP_COUNT, 165 IFLA_CARRIER_UP_COUNT,
165 IFLA_CARRIER_DOWN_COUNT, 166 IFLA_CARRIER_DOWN_COUNT,
166 IFLA_NEW_IFINDEX, 167 IFLA_NEW_IFINDEX,
@@ -286,6 +287,7 @@ enum {
286 IFLA_BR_MCAST_STATS_ENABLED, 287 IFLA_BR_MCAST_STATS_ENABLED,
287 IFLA_BR_MCAST_IGMP_VERSION, 288 IFLA_BR_MCAST_IGMP_VERSION,
288 IFLA_BR_MCAST_MLD_VERSION, 289 IFLA_BR_MCAST_MLD_VERSION,
290 IFLA_BR_VLAN_STATS_PER_PORT,
289 __IFLA_BR_MAX, 291 __IFLA_BR_MAX,
290}; 292};
291 293
@@ -554,6 +556,7 @@ enum {
554 IFLA_GENEVE_UDP_ZERO_CSUM6_TX, 556 IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
555 IFLA_GENEVE_UDP_ZERO_CSUM6_RX, 557 IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
556 IFLA_GENEVE_LABEL, 558 IFLA_GENEVE_LABEL,
559 IFLA_GENEVE_TTL_INHERIT,
557 __IFLA_GENEVE_MAX 560 __IFLA_GENEVE_MAX
558}; 561};
559#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) 562#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
index 67b61d91d89b..467b654bd4c7 100644
--- a/include/uapi/linux/if_packet.h
+++ b/include/uapi/linux/if_packet.h
@@ -57,6 +57,7 @@ struct sockaddr_ll {
57#define PACKET_QDISC_BYPASS 20 57#define PACKET_QDISC_BYPASS 20
58#define PACKET_ROLLOVER_STATS 21 58#define PACKET_ROLLOVER_STATS 21
59#define PACKET_FANOUT_DATA 22 59#define PACKET_FANOUT_DATA 22
60#define PACKET_IGNORE_OUTGOING 23
60 61
61#define PACKET_FANOUT_HASH 0 62#define PACKET_FANOUT_HASH 0
62#define PACKET_FANOUT_LB 1 63#define PACKET_FANOUT_LB 1
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h
index ed291e55f024..71d82fe15b03 100644
--- a/include/uapi/linux/in6.h
+++ b/include/uapi/linux/in6.h
@@ -177,6 +177,7 @@ struct in6_flowlabel_req {
177#define IPV6_V6ONLY 26 177#define IPV6_V6ONLY 26
178#define IPV6_JOIN_ANYCAST 27 178#define IPV6_JOIN_ANYCAST 27
179#define IPV6_LEAVE_ANYCAST 28 179#define IPV6_LEAVE_ANYCAST 28
180#define IPV6_MULTICAST_ALL 29
180 181
181/* IPV6_MTU_DISCOVER values */ 182/* IPV6_MTU_DISCOVER values */
182#define IPV6_PMTUDISC_DONT 0 183#define IPV6_PMTUDISC_DONT 0
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 53fbae27b280..ae366b87426a 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -708,6 +708,14 @@
708#define REL_DIAL 0x07 708#define REL_DIAL 0x07
709#define REL_WHEEL 0x08 709#define REL_WHEEL 0x08
710#define REL_MISC 0x09 710#define REL_MISC 0x09
711/*
712 * 0x0a is reserved and should not be used in input drivers.
713 * It was used by HID as REL_MISC+1 and userspace needs to detect if
714 * the next REL_* event is correct or is just REL_MISC + n.
715 * We define here REL_RESERVED so userspace can rely on it and detect
716 * the situation described above.
717 */
718#define REL_RESERVED 0x0a
711#define REL_MAX 0x0f 719#define REL_MAX 0x0f
712#define REL_CNT (REL_MAX+1) 720#define REL_CNT (REL_MAX+1)
713 721
@@ -744,6 +752,15 @@
744 752
745#define ABS_MISC 0x28 753#define ABS_MISC 0x28
746 754
755/*
756 * 0x2e is reserved and should not be used in input drivers.
757 * It was used by HID as ABS_MISC+6 and userspace needs to detect if
758 * the next ABS_* event is correct or is just ABS_MISC + n.
759 * We define here ABS_RESERVED so userspace can rely on it and detect
760 * the situation described above.
761 */
762#define ABS_RESERVED 0x2e
763
747#define ABS_MT_SLOT 0x2f /* MT slot being modified */ 764#define ABS_MT_SLOT 0x2f /* MT slot being modified */
748#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ 765#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */
749#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ 766#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */
diff --git a/include/uapi/linux/keyctl.h b/include/uapi/linux/keyctl.h
index 7b8c9e19bad1..f45ee0f69c0c 100644
--- a/include/uapi/linux/keyctl.h
+++ b/include/uapi/linux/keyctl.h
@@ -61,11 +61,21 @@
61#define KEYCTL_INVALIDATE 21 /* invalidate a key */ 61#define KEYCTL_INVALIDATE 21 /* invalidate a key */
62#define KEYCTL_GET_PERSISTENT 22 /* get a user's persistent keyring */ 62#define KEYCTL_GET_PERSISTENT 22 /* get a user's persistent keyring */
63#define KEYCTL_DH_COMPUTE 23 /* Compute Diffie-Hellman values */ 63#define KEYCTL_DH_COMPUTE 23 /* Compute Diffie-Hellman values */
64#define KEYCTL_PKEY_QUERY 24 /* Query public key parameters */
65#define KEYCTL_PKEY_ENCRYPT 25 /* Encrypt a blob using a public key */
66#define KEYCTL_PKEY_DECRYPT 26 /* Decrypt a blob using a public key */
67#define KEYCTL_PKEY_SIGN 27 /* Create a public key signature */
68#define KEYCTL_PKEY_VERIFY 28 /* Verify a public key signature */
64#define KEYCTL_RESTRICT_KEYRING 29 /* Restrict keys allowed to link to a keyring */ 69#define KEYCTL_RESTRICT_KEYRING 29 /* Restrict keys allowed to link to a keyring */
65 70
66/* keyctl structures */ 71/* keyctl structures */
67struct keyctl_dh_params { 72struct keyctl_dh_params {
68 __s32 private; 73 union {
74#ifndef __cplusplus
75 __s32 private;
76#endif
77 __s32 priv;
78 };
69 __s32 prime; 79 __s32 prime;
70 __s32 base; 80 __s32 base;
71}; 81};
@@ -77,4 +87,29 @@ struct keyctl_kdf_params {
77 __u32 __spare[8]; 87 __u32 __spare[8];
78}; 88};
79 89
90#define KEYCTL_SUPPORTS_ENCRYPT 0x01
91#define KEYCTL_SUPPORTS_DECRYPT 0x02
92#define KEYCTL_SUPPORTS_SIGN 0x04
93#define KEYCTL_SUPPORTS_VERIFY 0x08
94
95struct keyctl_pkey_query {
96 __u32 supported_ops; /* Which ops are supported */
97 __u32 key_size; /* Size of the key in bits */
98 __u16 max_data_size; /* Maximum size of raw data to sign in bytes */
99 __u16 max_sig_size; /* Maximum size of signature in bytes */
100 __u16 max_enc_size; /* Maximum size of encrypted blob in bytes */
101 __u16 max_dec_size; /* Maximum size of decrypted blob in bytes */
102 __u32 __spare[10];
103};
104
105struct keyctl_pkey_params {
106 __s32 key_id; /* Serial no. of public key to use */
107 __u32 in_len; /* Input data size */
108 union {
109 __u32 out_len; /* Output buffer size (encrypt/decrypt/sign) */
110 __u32 in2_len; /* 2nd input data size (verify) */
111 };
112 __u32 __spare[7];
113};
114
80#endif /* _LINUX_KEYCTL_H */ 115#endif /* _LINUX_KEYCTL_H */
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index 01674b56e14f..b01eb502d49c 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -82,6 +82,14 @@ struct kfd_ioctl_set_cu_mask_args {
82 __u64 cu_mask_ptr; /* to KFD */ 82 __u64 cu_mask_ptr; /* to KFD */
83}; 83};
84 84
85struct kfd_ioctl_get_queue_wave_state_args {
86 __u64 ctl_stack_address; /* to KFD */
87 __u32 ctl_stack_used_size; /* from KFD */
88 __u32 save_area_used_size; /* from KFD */
89 __u32 queue_id; /* to KFD */
90 __u32 pad;
91};
92
85/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ 93/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
86#define KFD_IOC_CACHE_POLICY_COHERENT 0 94#define KFD_IOC_CACHE_POLICY_COHERENT 0
87#define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 95#define KFD_IOC_CACHE_POLICY_NONCOHERENT 1
@@ -247,10 +255,10 @@ struct kfd_hsa_memory_exception_data {
247 255
248/* hw exception data */ 256/* hw exception data */
249struct kfd_hsa_hw_exception_data { 257struct kfd_hsa_hw_exception_data {
250 uint32_t reset_type; 258 __u32 reset_type;
251 uint32_t reset_cause; 259 __u32 reset_cause;
252 uint32_t memory_lost; 260 __u32 memory_lost;
253 uint32_t gpu_id; 261 __u32 gpu_id;
254}; 262};
255 263
256/* Event data */ 264/* Event data */
@@ -475,7 +483,10 @@ struct kfd_ioctl_unmap_memory_from_gpu_args {
475#define AMDKFD_IOC_SET_CU_MASK \ 483#define AMDKFD_IOC_SET_CU_MASK \
476 AMDKFD_IOW(0x1A, struct kfd_ioctl_set_cu_mask_args) 484 AMDKFD_IOW(0x1A, struct kfd_ioctl_set_cu_mask_args)
477 485
486#define AMDKFD_IOC_GET_QUEUE_WAVE_STATE \
487 AMDKFD_IOWR(0x1B, struct kfd_ioctl_get_queue_wave_state_args)
488
478#define AMDKFD_COMMAND_START 0x01 489#define AMDKFD_COMMAND_START 0x01
479#define AMDKFD_COMMAND_END 0x1B 490#define AMDKFD_COMMAND_END 0x1C
480 491
481#endif 492#endif
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 251be353f950..2b7a652c9fa4 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -420,13 +420,19 @@ struct kvm_run {
420struct kvm_coalesced_mmio_zone { 420struct kvm_coalesced_mmio_zone {
421 __u64 addr; 421 __u64 addr;
422 __u32 size; 422 __u32 size;
423 __u32 pad; 423 union {
424 __u32 pad;
425 __u32 pio;
426 };
424}; 427};
425 428
426struct kvm_coalesced_mmio { 429struct kvm_coalesced_mmio {
427 __u64 phys_addr; 430 __u64 phys_addr;
428 __u32 len; 431 __u32 len;
429 __u32 pad; 432 union {
433 __u32 pad;
434 __u32 pio;
435 };
430 __u8 data[8]; 436 __u8 data[8];
431}; 437};
432 438
@@ -719,6 +725,7 @@ struct kvm_ppc_one_seg_page_size {
719 725
720#define KVM_PPC_PAGE_SIZES_REAL 0x00000001 726#define KVM_PPC_PAGE_SIZES_REAL 0x00000001
721#define KVM_PPC_1T_SEGMENTS 0x00000002 727#define KVM_PPC_1T_SEGMENTS 0x00000002
728#define KVM_PPC_NO_HASH 0x00000004
722 729
723struct kvm_ppc_smmu_info { 730struct kvm_ppc_smmu_info {
724 __u64 flags; 731 __u64 flags;
@@ -751,6 +758,15 @@ struct kvm_ppc_resize_hpt {
751#define KVM_S390_SIE_PAGE_OFFSET 1 758#define KVM_S390_SIE_PAGE_OFFSET 1
752 759
753/* 760/*
761 * On arm64, machine type can be used to request the physical
762 * address size for the VM. Bits[7-0] are reserved for the guest
763 * PA size shift (i.e, log2(PA_Size)). For backward compatibility,
764 * value 0 implies the default IPA size, 40bits.
765 */
766#define KVM_VM_TYPE_ARM_IPA_SIZE_MASK 0xffULL
767#define KVM_VM_TYPE_ARM_IPA_SIZE(x) \
768 ((x) & KVM_VM_TYPE_ARM_IPA_SIZE_MASK)
769/*
754 * ioctls for /dev/kvm fds: 770 * ioctls for /dev/kvm fds:
755 */ 771 */
756#define KVM_GET_API_VERSION _IO(KVMIO, 0x00) 772#define KVM_GET_API_VERSION _IO(KVMIO, 0x00)
@@ -953,6 +969,12 @@ struct kvm_ppc_resize_hpt {
953#define KVM_CAP_NESTED_STATE 157 969#define KVM_CAP_NESTED_STATE 157
954#define KVM_CAP_ARM_INJECT_SERROR_ESR 158 970#define KVM_CAP_ARM_INJECT_SERROR_ESR 158
955#define KVM_CAP_MSR_PLATFORM_INFO 159 971#define KVM_CAP_MSR_PLATFORM_INFO 159
972#define KVM_CAP_PPC_NESTED_HV 160
973#define KVM_CAP_HYPERV_SEND_IPI 161
974#define KVM_CAP_COALESCED_PIO 162
975#define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163
976#define KVM_CAP_EXCEPTION_PAYLOAD 164
977#define KVM_CAP_ARM_VM_IPA_SIZE 165
956 978
957#ifdef KVM_CAP_IRQ_ROUTING 979#ifdef KVM_CAP_IRQ_ROUTING
958 980
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index 1a6fee974116..96c24478d8ce 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -29,6 +29,7 @@
29#define HPFS_SUPER_MAGIC 0xf995e849 29#define HPFS_SUPER_MAGIC 0xf995e849
30#define ISOFS_SUPER_MAGIC 0x9660 30#define ISOFS_SUPER_MAGIC 0x9660
31#define JFFS2_SUPER_MAGIC 0x72b6 31#define JFFS2_SUPER_MAGIC 0x72b6
32#define XFS_SUPER_MAGIC 0x58465342 /* "XFSB" */
32#define PSTOREFS_MAGIC 0x6165676C 33#define PSTOREFS_MAGIC 0x6165676C
33#define EFIVARFS_MAGIC 0xde5e81e4 34#define EFIVARFS_MAGIC 0xde5e81e4
34#define HOSTFS_SUPER_MAGIC 0x00c0ffee 35#define HOSTFS_SUPER_MAGIC 0x00c0ffee
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 36f76e777ef9..e5d0c5c611b5 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -369,6 +369,14 @@ struct media_v2_topology {
369#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) 369#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
370#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) 370#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
371#define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) 371#define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology)
372#define MEDIA_IOC_REQUEST_ALLOC _IOR ('|', 0x05, int)
373
374/*
375 * These ioctls are called on the request file descriptor as returned
376 * by MEDIA_IOC_REQUEST_ALLOC.
377 */
378#define MEDIA_REQUEST_IOC_QUEUE _IO('|', 0x80)
379#define MEDIA_REQUEST_IOC_REINIT _IO('|', 0x81)
372 380
373#ifndef __KERNEL__ 381#ifndef __KERNEL__
374 382
diff --git a/include/uapi/linux/ncsi.h b/include/uapi/linux/ncsi.h
index 4c292ecbb748..0a26a5576645 100644
--- a/include/uapi/linux/ncsi.h
+++ b/include/uapi/linux/ncsi.h
@@ -23,6 +23,9 @@
23 * optionally the preferred NCSI_ATTR_CHANNEL_ID. 23 * optionally the preferred NCSI_ATTR_CHANNEL_ID.
24 * @NCSI_CMD_CLEAR_INTERFACE: clear any preferred package/channel combination. 24 * @NCSI_CMD_CLEAR_INTERFACE: clear any preferred package/channel combination.
25 * Requires NCSI_ATTR_IFINDEX. 25 * Requires NCSI_ATTR_IFINDEX.
26 * @NCSI_CMD_SEND_CMD: send NC-SI command to network card.
27 * Requires NCSI_ATTR_IFINDEX, NCSI_ATTR_PACKAGE_ID
28 * and NCSI_ATTR_CHANNEL_ID.
26 * @NCSI_CMD_MAX: highest command number 29 * @NCSI_CMD_MAX: highest command number
27 */ 30 */
28enum ncsi_nl_commands { 31enum ncsi_nl_commands {
@@ -30,6 +33,7 @@ enum ncsi_nl_commands {
30 NCSI_CMD_PKG_INFO, 33 NCSI_CMD_PKG_INFO,
31 NCSI_CMD_SET_INTERFACE, 34 NCSI_CMD_SET_INTERFACE,
32 NCSI_CMD_CLEAR_INTERFACE, 35 NCSI_CMD_CLEAR_INTERFACE,
36 NCSI_CMD_SEND_CMD,
33 37
34 __NCSI_CMD_AFTER_LAST, 38 __NCSI_CMD_AFTER_LAST,
35 NCSI_CMD_MAX = __NCSI_CMD_AFTER_LAST - 1 39 NCSI_CMD_MAX = __NCSI_CMD_AFTER_LAST - 1
@@ -43,6 +47,7 @@ enum ncsi_nl_commands {
43 * @NCSI_ATTR_PACKAGE_LIST: nested array of NCSI_PKG_ATTR attributes 47 * @NCSI_ATTR_PACKAGE_LIST: nested array of NCSI_PKG_ATTR attributes
44 * @NCSI_ATTR_PACKAGE_ID: package ID 48 * @NCSI_ATTR_PACKAGE_ID: package ID
45 * @NCSI_ATTR_CHANNEL_ID: channel ID 49 * @NCSI_ATTR_CHANNEL_ID: channel ID
50 * @NCSI_ATTR_DATA: command payload
46 * @NCSI_ATTR_MAX: highest attribute number 51 * @NCSI_ATTR_MAX: highest attribute number
47 */ 52 */
48enum ncsi_nl_attrs { 53enum ncsi_nl_attrs {
@@ -51,6 +56,7 @@ enum ncsi_nl_attrs {
51 NCSI_ATTR_PACKAGE_LIST, 56 NCSI_ATTR_PACKAGE_LIST,
52 NCSI_ATTR_PACKAGE_ID, 57 NCSI_ATTR_PACKAGE_ID,
53 NCSI_ATTR_CHANNEL_ID, 58 NCSI_ATTR_CHANNEL_ID,
59 NCSI_ATTR_DATA,
54 60
55 __NCSI_ATTR_AFTER_LAST, 61 __NCSI_ATTR_AFTER_LAST,
56 NCSI_ATTR_MAX = __NCSI_ATTR_AFTER_LAST - 1 62 NCSI_ATTR_MAX = __NCSI_ATTR_AFTER_LAST - 1
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index 7e27070b9440..f57c9e434d2d 100644
--- a/include/uapi/linux/ndctl.h
+++ b/include/uapi/linux/ndctl.h
@@ -128,37 +128,31 @@ enum {
128 128
129static inline const char *nvdimm_bus_cmd_name(unsigned cmd) 129static inline const char *nvdimm_bus_cmd_name(unsigned cmd)
130{ 130{
131 static const char * const names[] = { 131 switch (cmd) {
132 [ND_CMD_ARS_CAP] = "ars_cap", 132 case ND_CMD_ARS_CAP: return "ars_cap";
133 [ND_CMD_ARS_START] = "ars_start", 133 case ND_CMD_ARS_START: return "ars_start";
134 [ND_CMD_ARS_STATUS] = "ars_status", 134 case ND_CMD_ARS_STATUS: return "ars_status";
135 [ND_CMD_CLEAR_ERROR] = "clear_error", 135 case ND_CMD_CLEAR_ERROR: return "clear_error";
136 [ND_CMD_CALL] = "cmd_call", 136 case ND_CMD_CALL: return "cmd_call";
137 }; 137 default: return "unknown";
138 138 }
139 if (cmd < ARRAY_SIZE(names) && names[cmd])
140 return names[cmd];
141 return "unknown";
142} 139}
143 140
144static inline const char *nvdimm_cmd_name(unsigned cmd) 141static inline const char *nvdimm_cmd_name(unsigned cmd)
145{ 142{
146 static const char * const names[] = { 143 switch (cmd) {
147 [ND_CMD_SMART] = "smart", 144 case ND_CMD_SMART: return "smart";
148 [ND_CMD_SMART_THRESHOLD] = "smart_thresh", 145 case ND_CMD_SMART_THRESHOLD: return "smart_thresh";
149 [ND_CMD_DIMM_FLAGS] = "flags", 146 case ND_CMD_DIMM_FLAGS: return "flags";
150 [ND_CMD_GET_CONFIG_SIZE] = "get_size", 147 case ND_CMD_GET_CONFIG_SIZE: return "get_size";
151 [ND_CMD_GET_CONFIG_DATA] = "get_data", 148 case ND_CMD_GET_CONFIG_DATA: return "get_data";
152 [ND_CMD_SET_CONFIG_DATA] = "set_data", 149 case ND_CMD_SET_CONFIG_DATA: return "set_data";
153 [ND_CMD_VENDOR_EFFECT_LOG_SIZE] = "effect_size", 150 case ND_CMD_VENDOR_EFFECT_LOG_SIZE: return "effect_size";
154 [ND_CMD_VENDOR_EFFECT_LOG] = "effect_log", 151 case ND_CMD_VENDOR_EFFECT_LOG: return "effect_log";
155 [ND_CMD_VENDOR] = "vendor", 152 case ND_CMD_VENDOR: return "vendor";
156 [ND_CMD_CALL] = "cmd_call", 153 case ND_CMD_CALL: return "cmd_call";
157 }; 154 default: return "unknown";
158 155 }
159 if (cmd < ARRAY_SIZE(names) && names[cmd])
160 return names[cmd];
161 return "unknown";
162} 156}
163 157
164#define ND_IOCTL 'N' 158#define ND_IOCTL 'N'
@@ -208,10 +202,6 @@ enum nd_driver_flags {
208 ND_DRIVER_DAX_PMEM = 1 << ND_DEVICE_DAX_PMEM, 202 ND_DRIVER_DAX_PMEM = 1 << ND_DEVICE_DAX_PMEM,
209}; 203};
210 204
211enum {
212 ND_MIN_NAMESPACE_SIZE = PAGE_SIZE,
213};
214
215enum ars_masks { 205enum ars_masks {
216 ARS_STATUS_MASK = 0x0000FFFF, 206 ARS_STATUS_MASK = 0x0000FFFF,
217 ARS_EXT_STATUS_SHIFT = 16, 207 ARS_EXT_STATUS_SHIFT = 16,
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h
index 904db6148476..998155444e0d 100644
--- a/include/uapi/linux/neighbour.h
+++ b/include/uapi/linux/neighbour.h
@@ -43,6 +43,7 @@ enum {
43#define NTF_PROXY 0x08 /* == ATF_PUBL */ 43#define NTF_PROXY 0x08 /* == ATF_PUBL */
44#define NTF_EXT_LEARNED 0x10 44#define NTF_EXT_LEARNED 0x10
45#define NTF_OFFLOADED 0x20 45#define NTF_OFFLOADED 0x20
46#define NTF_STICKY 0x40
46#define NTF_ROUTER 0x80 47#define NTF_ROUTER 0x80
47 48
48/* 49/*
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index e23290ffdc77..7de4f1bdaf06 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -826,12 +826,14 @@ enum nft_meta_keys {
826 * @NFT_RT_NEXTHOP4: routing nexthop for IPv4 826 * @NFT_RT_NEXTHOP4: routing nexthop for IPv4
827 * @NFT_RT_NEXTHOP6: routing nexthop for IPv6 827 * @NFT_RT_NEXTHOP6: routing nexthop for IPv6
828 * @NFT_RT_TCPMSS: fetch current path tcp mss 828 * @NFT_RT_TCPMSS: fetch current path tcp mss
829 * @NFT_RT_XFRM: boolean, skb->dst->xfrm != NULL
829 */ 830 */
830enum nft_rt_keys { 831enum nft_rt_keys {
831 NFT_RT_CLASSID, 832 NFT_RT_CLASSID,
832 NFT_RT_NEXTHOP4, 833 NFT_RT_NEXTHOP4,
833 NFT_RT_NEXTHOP6, 834 NFT_RT_NEXTHOP6,
834 NFT_RT_TCPMSS, 835 NFT_RT_TCPMSS,
836 NFT_RT_XFRM,
835 __NFT_RT_MAX 837 __NFT_RT_MAX
836}; 838};
837#define NFT_RT_MAX (__NFT_RT_MAX - 1) 839#define NFT_RT_MAX (__NFT_RT_MAX - 1)
@@ -1175,6 +1177,21 @@ enum nft_quota_attributes {
1175#define NFTA_QUOTA_MAX (__NFTA_QUOTA_MAX - 1) 1177#define NFTA_QUOTA_MAX (__NFTA_QUOTA_MAX - 1)
1176 1178
1177/** 1179/**
1180 * enum nft_secmark_attributes - nf_tables secmark object netlink attributes
1181 *
1182 * @NFTA_SECMARK_CTX: security context (NLA_STRING)
1183 */
1184enum nft_secmark_attributes {
1185 NFTA_SECMARK_UNSPEC,
1186 NFTA_SECMARK_CTX,
1187 __NFTA_SECMARK_MAX,
1188};
1189#define NFTA_SECMARK_MAX (__NFTA_SECMARK_MAX - 1)
1190
1191/* Max security context length */
1192#define NFT_SECMARK_CTX_MAXLEN 256
1193
1194/**
1178 * enum nft_reject_types - nf_tables reject expression reject types 1195 * enum nft_reject_types - nf_tables reject expression reject types
1179 * 1196 *
1180 * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable 1197 * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable
@@ -1430,7 +1447,8 @@ enum nft_ct_timeout_timeout_attributes {
1430#define NFT_OBJECT_CONNLIMIT 5 1447#define NFT_OBJECT_CONNLIMIT 5
1431#define NFT_OBJECT_TUNNEL 6 1448#define NFT_OBJECT_TUNNEL 6
1432#define NFT_OBJECT_CT_TIMEOUT 7 1449#define NFT_OBJECT_CT_TIMEOUT 7
1433#define __NFT_OBJECT_MAX 8 1450#define NFT_OBJECT_SECMARK 8
1451#define __NFT_OBJECT_MAX 9
1434#define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1) 1452#define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1)
1435 1453
1436/** 1454/**
@@ -1493,9 +1511,16 @@ enum nft_flowtable_hook_attributes {
1493}; 1511};
1494#define NFTA_FLOWTABLE_HOOK_MAX (__NFTA_FLOWTABLE_HOOK_MAX - 1) 1512#define NFTA_FLOWTABLE_HOOK_MAX (__NFTA_FLOWTABLE_HOOK_MAX - 1)
1495 1513
1514/**
1515 * enum nft_osf_attributes - nftables osf expression netlink attributes
1516 *
1517 * @NFTA_OSF_DREG: destination register (NLA_U32: nft_registers)
1518 * @NFTA_OSF_TTL: Value of the TTL osf option (NLA_U8)
1519 */
1496enum nft_osf_attributes { 1520enum nft_osf_attributes {
1497 NFTA_OSF_UNSPEC, 1521 NFTA_OSF_UNSPEC,
1498 NFTA_OSF_DREG, 1522 NFTA_OSF_DREG,
1523 NFTA_OSF_TTL,
1499 __NFTA_OSF_MAX, 1524 __NFTA_OSF_MAX,
1500}; 1525};
1501#define NFTA_OSF_MAX (__NFTA_OSF_MAX - 1) 1526#define NFTA_OSF_MAX (__NFTA_OSF_MAX - 1)
@@ -1512,6 +1537,35 @@ enum nft_devices_attributes {
1512}; 1537};
1513#define NFTA_DEVICE_MAX (__NFTA_DEVICE_MAX - 1) 1538#define NFTA_DEVICE_MAX (__NFTA_DEVICE_MAX - 1)
1514 1539
1540/*
1541 * enum nft_xfrm_attributes - nf_tables xfrm expr netlink attributes
1542 *
1543 * @NFTA_XFRM_DREG: destination register (NLA_U32)
1544 * @NFTA_XFRM_KEY: enum nft_xfrm_keys (NLA_U32)
1545 * @NFTA_XFRM_DIR: direction (NLA_U8)
1546 * @NFTA_XFRM_SPNUM: index in secpath array (NLA_U32)
1547 */
1548enum nft_xfrm_attributes {
1549 NFTA_XFRM_UNSPEC,
1550 NFTA_XFRM_DREG,
1551 NFTA_XFRM_KEY,
1552 NFTA_XFRM_DIR,
1553 NFTA_XFRM_SPNUM,
1554 __NFTA_XFRM_MAX
1555};
1556#define NFTA_XFRM_MAX (__NFTA_XFRM_MAX - 1)
1557
1558enum nft_xfrm_keys {
1559 NFT_XFRM_KEY_UNSPEC,
1560 NFT_XFRM_KEY_DADDR_IP4,
1561 NFT_XFRM_KEY_DADDR_IP6,
1562 NFT_XFRM_KEY_SADDR_IP4,
1563 NFT_XFRM_KEY_SADDR_IP6,
1564 NFT_XFRM_KEY_REQID,
1565 NFT_XFRM_KEY_SPI,
1566 __NFT_XFRM_KEY_MAX,
1567};
1568#define NFT_XFRM_KEY_MAX (__NFT_XFRM_KEY_MAX - 1)
1515 1569
1516/** 1570/**
1517 * enum nft_trace_attributes - nf_tables trace netlink attributes 1571 * enum nft_trace_attributes - nf_tables trace netlink attributes
@@ -1581,8 +1635,8 @@ enum nft_ng_attributes {
1581 NFTA_NG_MODULUS, 1635 NFTA_NG_MODULUS,
1582 NFTA_NG_TYPE, 1636 NFTA_NG_TYPE,
1583 NFTA_NG_OFFSET, 1637 NFTA_NG_OFFSET,
1584 NFTA_NG_SET_NAME, 1638 NFTA_NG_SET_NAME, /* deprecated */
1585 NFTA_NG_SET_ID, 1639 NFTA_NG_SET_ID, /* deprecated */
1586 __NFTA_NG_MAX 1640 __NFTA_NG_MAX
1587}; 1641};
1588#define NFTA_NG_MAX (__NFTA_NG_MAX - 1) 1642#define NFTA_NG_MAX (__NFTA_NG_MAX - 1)
diff --git a/include/uapi/linux/netfilter/xt_cgroup.h b/include/uapi/linux/netfilter/xt_cgroup.h
index e96dfa1b34f7..b74e370d6133 100644
--- a/include/uapi/linux/netfilter/xt_cgroup.h
+++ b/include/uapi/linux/netfilter/xt_cgroup.h
@@ -22,4 +22,20 @@ struct xt_cgroup_info_v1 {
22 void *priv __attribute__((aligned(8))); 22 void *priv __attribute__((aligned(8)));
23}; 23};
24 24
25#define XT_CGROUP_PATH_MAX 512
26
27struct xt_cgroup_info_v2 {
28 __u8 has_path;
29 __u8 has_classid;
30 __u8 invert_path;
31 __u8 invert_classid;
32 union {
33 char path[XT_CGROUP_PATH_MAX];
34 __u32 classid;
35 };
36
37 /* kernel internal data */
38 void *priv __attribute__((aligned(8)));
39};
40
25#endif /* _UAPI_XT_CGROUP_H */ 41#endif /* _UAPI_XT_CGROUP_H */
diff --git a/include/uapi/linux/netfilter_bridge.h b/include/uapi/linux/netfilter_bridge.h
index 156ccd089df1..1610fdbab98d 100644
--- a/include/uapi/linux/netfilter_bridge.h
+++ b/include/uapi/linux/netfilter_bridge.h
@@ -11,6 +11,10 @@
11#include <linux/if_vlan.h> 11#include <linux/if_vlan.h>
12#include <linux/if_pppox.h> 12#include <linux/if_pppox.h>
13 13
14#ifndef __KERNEL__
15#include <limits.h> /* for INT_MIN, INT_MAX */
16#endif
17
14/* Bridge Hooks */ 18/* Bridge Hooks */
15/* After promisc drops, checksum checks. */ 19/* After promisc drops, checksum checks. */
16#define NF_BR_PRE_ROUTING 0 20#define NF_BR_PRE_ROUTING 0
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index 776bc92e9118..486ed1f0c0bc 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -155,6 +155,7 @@ enum nlmsgerr_attrs {
155#define NETLINK_LIST_MEMBERSHIPS 9 155#define NETLINK_LIST_MEMBERSHIPS 9
156#define NETLINK_CAP_ACK 10 156#define NETLINK_CAP_ACK 10
157#define NETLINK_EXT_ACK 11 157#define NETLINK_EXT_ACK 11
158#define NETLINK_DUMP_STRICT_CHK 12
158 159
159struct nl_pktinfo { 160struct nl_pktinfo {
160 __u32 group; 161 __u32 group;
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 7acc16f34942..6d610bae30a9 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1033,6 +1033,9 @@
1033 * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its 1033 * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its
1034 * address(specified in %NL80211_ATTR_MAC). 1034 * address(specified in %NL80211_ATTR_MAC).
1035 * 1035 *
1036 * @NL80211_CMD_GET_FTM_RESPONDER_STATS: Retrieve FTM responder statistics, in
1037 * the %NL80211_ATTR_FTM_RESPONDER_STATS attribute.
1038 *
1036 * @NL80211_CMD_MAX: highest used command number 1039 * @NL80211_CMD_MAX: highest used command number
1037 * @__NL80211_CMD_AFTER_LAST: internal use 1040 * @__NL80211_CMD_AFTER_LAST: internal use
1038 */ 1041 */
@@ -1245,6 +1248,8 @@ enum nl80211_commands {
1245 1248
1246 NL80211_CMD_CONTROL_PORT_FRAME, 1249 NL80211_CMD_CONTROL_PORT_FRAME,
1247 1250
1251 NL80211_CMD_GET_FTM_RESPONDER_STATS,
1252
1248 /* add new commands above here */ 1253 /* add new commands above here */
1249 1254
1250 /* used to define NL80211_CMD_MAX below */ 1255 /* used to define NL80211_CMD_MAX below */
@@ -2241,6 +2246,14 @@ enum nl80211_commands {
2241 * association request when used with NL80211_CMD_NEW_STATION). Can be set 2246 * association request when used with NL80211_CMD_NEW_STATION). Can be set
2242 * only if %NL80211_STA_FLAG_WME is set. 2247 * only if %NL80211_STA_FLAG_WME is set.
2243 * 2248 *
2249 * @NL80211_ATTR_FTM_RESPONDER: nested attribute which user-space can include
2250 * in %NL80211_CMD_START_AP or %NL80211_CMD_SET_BEACON for fine timing
2251 * measurement (FTM) responder functionality and containing parameters as
2252 * possible, see &enum nl80211_ftm_responder_attr
2253 *
2254 * @NL80211_ATTR_FTM_RESPONDER_STATS: Nested attribute with FTM responder
2255 * statistics, see &enum nl80211_ftm_responder_stats.
2256 *
2244 * @NUM_NL80211_ATTR: total number of nl80211_attrs available 2257 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
2245 * @NL80211_ATTR_MAX: highest attribute number currently defined 2258 * @NL80211_ATTR_MAX: highest attribute number currently defined
2246 * @__NL80211_ATTR_AFTER_LAST: internal use 2259 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2682,6 +2695,10 @@ enum nl80211_attrs {
2682 2695
2683 NL80211_ATTR_HE_CAPABILITY, 2696 NL80211_ATTR_HE_CAPABILITY,
2684 2697
2698 NL80211_ATTR_FTM_RESPONDER,
2699
2700 NL80211_ATTR_FTM_RESPONDER_STATS,
2701
2685 /* add attributes here, update the policy in nl80211.c */ 2702 /* add attributes here, update the policy in nl80211.c */
2686 2703
2687 __NL80211_ATTR_AFTER_LAST, 2704 __NL80211_ATTR_AFTER_LAST,
@@ -3050,8 +3067,13 @@ enum nl80211_sta_bss_param {
3050 * received from the station (u64, usec) 3067 * received from the station (u64, usec)
3051 * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment 3068 * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment
3052 * @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm) 3069 * @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm)
3053 * @NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG: avg signal strength of (data) 3070 * @NL80211_STA_INFO_ACK_SIGNAL_AVG: avg signal strength of ACK frames (s8, dBm)
3054 * ACK frame (s8, dBm) 3071 * @NL80211_STA_INFO_RX_MPDUS: total number of received packets (MPDUs)
3072 * (u32, from this station)
3073 * @NL80211_STA_INFO_FCS_ERROR_COUNT: total number of packets (MPDUs) received
3074 * with an FCS error (u32, from this station). This count may not include
3075 * some packets with an FCS error due to TA corruption. Hence this counter
3076 * might not be fully accurate.
3055 * @__NL80211_STA_INFO_AFTER_LAST: internal 3077 * @__NL80211_STA_INFO_AFTER_LAST: internal
3056 * @NL80211_STA_INFO_MAX: highest possible station info attribute 3078 * @NL80211_STA_INFO_MAX: highest possible station info attribute
3057 */ 3079 */
@@ -3091,13 +3113,19 @@ enum nl80211_sta_info {
3091 NL80211_STA_INFO_RX_DURATION, 3113 NL80211_STA_INFO_RX_DURATION,
3092 NL80211_STA_INFO_PAD, 3114 NL80211_STA_INFO_PAD,
3093 NL80211_STA_INFO_ACK_SIGNAL, 3115 NL80211_STA_INFO_ACK_SIGNAL,
3094 NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG, 3116 NL80211_STA_INFO_ACK_SIGNAL_AVG,
3117 NL80211_STA_INFO_RX_MPDUS,
3118 NL80211_STA_INFO_FCS_ERROR_COUNT,
3095 3119
3096 /* keep last */ 3120 /* keep last */
3097 __NL80211_STA_INFO_AFTER_LAST, 3121 __NL80211_STA_INFO_AFTER_LAST,
3098 NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1 3122 NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1
3099}; 3123};
3100 3124
3125/* we renamed this - stay compatible */
3126#define NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG NL80211_STA_INFO_ACK_SIGNAL_AVG
3127
3128
3101/** 3129/**
3102 * enum nl80211_tid_stats - per TID statistics attributes 3130 * enum nl80211_tid_stats - per TID statistics attributes
3103 * @__NL80211_TID_STATS_INVALID: attribute number 0 is reserved 3131 * @__NL80211_TID_STATS_INVALID: attribute number 0 is reserved
@@ -4338,7 +4366,7 @@ enum nl80211_txrate_gi {
4338 * enum nl80211_band - Frequency band 4366 * enum nl80211_band - Frequency band
4339 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band 4367 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
4340 * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) 4368 * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
4341 * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz) 4369 * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)
4342 * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace 4370 * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
4343 * since newer kernel versions may support more bands 4371 * since newer kernel versions may support more bands
4344 */ 4372 */
@@ -5213,9 +5241,8 @@ enum nl80211_feature_flags {
5213 * "radar detected" event. 5241 * "radar detected" event.
5214 * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and 5242 * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and
5215 * receiving control port frames over nl80211 instead of the netdevice. 5243 * receiving control port frames over nl80211 instead of the netdevice.
5216 * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack 5244 * @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This driver/device supports
5217 * rssi if firmware support, this flag is to intimate about ack rssi 5245 * (average) ACK signal strength reporting.
5218 * support to nl80211.
5219 * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate 5246 * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate
5220 * TXQs. 5247 * TXQs.
5221 * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the 5248 * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the
@@ -5223,6 +5250,13 @@ enum nl80211_feature_flags {
5223 * @NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT: Driver/device can omit all data 5250 * @NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT: Driver/device can omit all data
5224 * except for supported rates from the probe request content if requested 5251 * except for supported rates from the probe request content if requested
5225 * by the %NL80211_SCAN_FLAG_MIN_PREQ_CONTENT flag. 5252 * by the %NL80211_SCAN_FLAG_MIN_PREQ_CONTENT flag.
5253 * @NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER: Driver supports enabling fine
5254 * timing measurement responder role.
5255 *
5256 * @NL80211_EXT_FEATURE_CAN_REPLACE_PTK0: Driver/device confirm that they are
5257 * able to rekey an in-use key correctly. Userspace must not rekey PTK keys
5258 * if this flag is not set. Ignoring this can leak clear text packets and/or
5259 * freeze the connection.
5226 * 5260 *
5227 * @NUM_NL80211_EXT_FEATURES: number of extended features. 5261 * @NUM_NL80211_EXT_FEATURES: number of extended features.
5228 * @MAX_NL80211_EXT_FEATURES: highest extended feature index. 5262 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -5255,10 +5289,14 @@ enum nl80211_ext_feature_index {
5255 NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN, 5289 NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN,
5256 NL80211_EXT_FEATURE_DFS_OFFLOAD, 5290 NL80211_EXT_FEATURE_DFS_OFFLOAD,
5257 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211, 5291 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211,
5258 NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT, 5292 NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT,
5293 /* we renamed this - stay compatible */
5294 NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT,
5259 NL80211_EXT_FEATURE_TXQS, 5295 NL80211_EXT_FEATURE_TXQS,
5260 NL80211_EXT_FEATURE_SCAN_RANDOM_SN, 5296 NL80211_EXT_FEATURE_SCAN_RANDOM_SN,
5261 NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT, 5297 NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT,
5298 NL80211_EXT_FEATURE_CAN_REPLACE_PTK0,
5299 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER,
5262 5300
5263 /* add new features before the definition below */ 5301 /* add new features before the definition below */
5264 NUM_NL80211_EXT_FEATURES, 5302 NUM_NL80211_EXT_FEATURES,
@@ -5798,4 +5836,74 @@ enum nl80211_external_auth_action {
5798 NL80211_EXTERNAL_AUTH_ABORT, 5836 NL80211_EXTERNAL_AUTH_ABORT,
5799}; 5837};
5800 5838
5839/**
5840 * enum nl80211_ftm_responder_attributes - fine timing measurement
5841 * responder attributes
5842 * @__NL80211_FTM_RESP_ATTR_INVALID: Invalid
5843 * @NL80211_FTM_RESP_ATTR_ENABLED: FTM responder is enabled
5844 * @NL80211_FTM_RESP_ATTR_LCI: The content of Measurement Report Element
5845 * (9.4.2.22 in 802.11-2016) with type 8 - LCI (9.4.2.22.10)
5846 * @NL80211_FTM_RESP_ATTR_CIVIC: The content of Measurement Report Element
5847 * (9.4.2.22 in 802.11-2016) with type 11 - Civic (Section 9.4.2.22.13)
5848 * @__NL80211_FTM_RESP_ATTR_LAST: Internal
5849 * @NL80211_FTM_RESP_ATTR_MAX: highest FTM responder attribute.
5850 */
5851enum nl80211_ftm_responder_attributes {
5852 __NL80211_FTM_RESP_ATTR_INVALID,
5853
5854 NL80211_FTM_RESP_ATTR_ENABLED,
5855 NL80211_FTM_RESP_ATTR_LCI,
5856 NL80211_FTM_RESP_ATTR_CIVICLOC,
5857
5858 /* keep last */
5859 __NL80211_FTM_RESP_ATTR_LAST,
5860 NL80211_FTM_RESP_ATTR_MAX = __NL80211_FTM_RESP_ATTR_LAST - 1,
5861};
5862
5863/*
5864 * enum nl80211_ftm_responder_stats - FTM responder statistics
5865 *
5866 * These attribute types are used with %NL80211_ATTR_FTM_RESPONDER_STATS
5867 * when getting FTM responder statistics.
5868 *
5869 * @__NL80211_FTM_STATS_INVALID: attribute number 0 is reserved
5870 * @NL80211_FTM_STATS_SUCCESS_NUM: number of FTM sessions in which all frames
5871 * were ssfully answered (u32)
5872 * @NL80211_FTM_STATS_PARTIAL_NUM: number of FTM sessions in which part of the
5873 * frames were successfully answered (u32)
5874 * @NL80211_FTM_STATS_FAILED_NUM: number of failed FTM sessions (u32)
5875 * @NL80211_FTM_STATS_ASAP_NUM: number of ASAP sessions (u32)
5876 * @NL80211_FTM_STATS_NON_ASAP_NUM: number of non-ASAP sessions (u32)
5877 * @NL80211_FTM_STATS_TOTAL_DURATION_MSEC: total sessions durations - gives an
5878 * indication of how much time the responder was busy (u64, msec)
5879 * @NL80211_FTM_STATS_UNKNOWN_TRIGGERS_NUM: number of unknown FTM triggers -
5880 * triggers from initiators that didn't finish successfully the negotiation
5881 * phase with the responder (u32)
5882 * @NL80211_FTM_STATS_RESCHEDULE_REQUESTS_NUM: number of FTM reschedule requests
5883 * - initiator asks for a new scheduling although it already has scheduled
5884 * FTM slot (u32)
5885 * @NL80211_FTM_STATS_OUT_OF_WINDOW_TRIGGERS_NUM: number of FTM triggers out of
5886 * scheduled window (u32)
5887 * @NL80211_FTM_STATS_PAD: used for padding, ignore
5888 * @__NL80211_TXQ_ATTR_AFTER_LAST: Internal
5889 * @NL80211_FTM_STATS_MAX: highest possible FTM responder stats attribute
5890 */
5891enum nl80211_ftm_responder_stats {
5892 __NL80211_FTM_STATS_INVALID,
5893 NL80211_FTM_STATS_SUCCESS_NUM,
5894 NL80211_FTM_STATS_PARTIAL_NUM,
5895 NL80211_FTM_STATS_FAILED_NUM,
5896 NL80211_FTM_STATS_ASAP_NUM,
5897 NL80211_FTM_STATS_NON_ASAP_NUM,
5898 NL80211_FTM_STATS_TOTAL_DURATION_MSEC,
5899 NL80211_FTM_STATS_UNKNOWN_TRIGGERS_NUM,
5900 NL80211_FTM_STATS_RESCHEDULE_REQUESTS_NUM,
5901 NL80211_FTM_STATS_OUT_OF_WINDOW_TRIGGERS_NUM,
5902 NL80211_FTM_STATS_PAD,
5903
5904 /* keep last */
5905 __NL80211_FTM_STATS_AFTER_LAST,
5906 NL80211_FTM_STATS_MAX = __NL80211_FTM_STATS_AFTER_LAST - 1
5907};
5908
5801#endif /* __LINUX_NL80211_H */ 5909#endif /* __LINUX_NL80211_H */
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index ee556ccc93f4..e1e9888c85e6 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -52,6 +52,7 @@
52#define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */ 52#define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */
53 53
54#define PCI_STATUS 0x06 /* 16 bits */ 54#define PCI_STATUS 0x06 /* 16 bits */
55#define PCI_STATUS_IMM_READY 0x01 /* Immediate Readiness */
55#define PCI_STATUS_INTERRUPT 0x08 /* Interrupt status */ 56#define PCI_STATUS_INTERRUPT 0x08 /* Interrupt status */
56#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ 57#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */
57#define PCI_STATUS_66MHZ 0x20 /* Support 66 MHz PCI 2.1 bus */ 58#define PCI_STATUS_66MHZ 0x20 /* Support 66 MHz PCI 2.1 bus */
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index f35eb72739c0..9de8780ac8d9 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -646,10 +646,12 @@ struct perf_event_mmap_page {
646 * 646 *
647 * PERF_RECORD_MISC_MMAP_DATA - PERF_RECORD_MMAP* events 647 * PERF_RECORD_MISC_MMAP_DATA - PERF_RECORD_MMAP* events
648 * PERF_RECORD_MISC_COMM_EXEC - PERF_RECORD_COMM event 648 * PERF_RECORD_MISC_COMM_EXEC - PERF_RECORD_COMM event
649 * PERF_RECORD_MISC_FORK_EXEC - PERF_RECORD_FORK event (perf internal)
649 * PERF_RECORD_MISC_SWITCH_OUT - PERF_RECORD_SWITCH* events 650 * PERF_RECORD_MISC_SWITCH_OUT - PERF_RECORD_SWITCH* events
650 */ 651 */
651#define PERF_RECORD_MISC_MMAP_DATA (1 << 13) 652#define PERF_RECORD_MISC_MMAP_DATA (1 << 13)
652#define PERF_RECORD_MISC_COMM_EXEC (1 << 13) 653#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
654#define PERF_RECORD_MISC_FORK_EXEC (1 << 13)
653#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13) 655#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)
654/* 656/*
655 * These PERF_RECORD_MISC_* flags below are safely reused 657 * These PERF_RECORD_MISC_* flags below are safely reused
diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
index be382fb0592d..401d0c1e612d 100644
--- a/include/uapi/linux/pkt_cls.h
+++ b/include/uapi/linux/pkt_cls.h
@@ -483,6 +483,8 @@ enum {
483 TCA_FLOWER_KEY_ENC_OPTS, 483 TCA_FLOWER_KEY_ENC_OPTS,
484 TCA_FLOWER_KEY_ENC_OPTS_MASK, 484 TCA_FLOWER_KEY_ENC_OPTS_MASK,
485 485
486 TCA_FLOWER_IN_HW_COUNT,
487
486 __TCA_FLOWER_MAX, 488 __TCA_FLOWER_MAX,
487}; 489};
488 490
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 8975fd1a1421..89ee47c2f17d 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -395,9 +395,9 @@ enum {
395struct tc_htb_xstats { 395struct tc_htb_xstats {
396 __u32 lends; 396 __u32 lends;
397 __u32 borrows; 397 __u32 borrows;
398 __u32 giants; /* too big packets (rate will not be accurate) */ 398 __u32 giants; /* unused since 'Make HTB scheduler work with TSO.' */
399 __u32 tokens; 399 __s32 tokens;
400 __u32 ctokens; 400 __s32 ctokens;
401}; 401};
402 402
403/* HFSC section */ 403/* HFSC section */
@@ -1084,4 +1084,50 @@ enum {
1084 CAKE_ATM_MAX 1084 CAKE_ATM_MAX
1085}; 1085};
1086 1086
1087
1088/* TAPRIO */
1089enum {
1090 TC_TAPRIO_CMD_SET_GATES = 0x00,
1091 TC_TAPRIO_CMD_SET_AND_HOLD = 0x01,
1092 TC_TAPRIO_CMD_SET_AND_RELEASE = 0x02,
1093};
1094
1095enum {
1096 TCA_TAPRIO_SCHED_ENTRY_UNSPEC,
1097 TCA_TAPRIO_SCHED_ENTRY_INDEX, /* u32 */
1098 TCA_TAPRIO_SCHED_ENTRY_CMD, /* u8 */
1099 TCA_TAPRIO_SCHED_ENTRY_GATE_MASK, /* u32 */
1100 TCA_TAPRIO_SCHED_ENTRY_INTERVAL, /* u32 */
1101 __TCA_TAPRIO_SCHED_ENTRY_MAX,
1102};
1103#define TCA_TAPRIO_SCHED_ENTRY_MAX (__TCA_TAPRIO_SCHED_ENTRY_MAX - 1)
1104
1105/* The format for schedule entry list is:
1106 * [TCA_TAPRIO_SCHED_ENTRY_LIST]
1107 * [TCA_TAPRIO_SCHED_ENTRY]
1108 * [TCA_TAPRIO_SCHED_ENTRY_CMD]
1109 * [TCA_TAPRIO_SCHED_ENTRY_GATES]
1110 * [TCA_TAPRIO_SCHED_ENTRY_INTERVAL]
1111 */
1112enum {
1113 TCA_TAPRIO_SCHED_UNSPEC,
1114 TCA_TAPRIO_SCHED_ENTRY,
1115 __TCA_TAPRIO_SCHED_MAX,
1116};
1117
1118#define TCA_TAPRIO_SCHED_MAX (__TCA_TAPRIO_SCHED_MAX - 1)
1119
1120enum {
1121 TCA_TAPRIO_ATTR_UNSPEC,
1122 TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */
1123 TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST, /* nested of entry */
1124 TCA_TAPRIO_ATTR_SCHED_BASE_TIME, /* s64 */
1125 TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, /* single entry */
1126 TCA_TAPRIO_ATTR_SCHED_CLOCKID, /* s32 */
1127 TCA_TAPRIO_PAD,
1128 __TCA_TAPRIO_ATTR_MAX,
1129};
1130
1131#define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1)
1132
1087#endif 1133#endif
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h
index c0d7ea0bf5b6..b17201edfa09 100644
--- a/include/uapi/linux/prctl.h
+++ b/include/uapi/linux/prctl.h
@@ -212,6 +212,7 @@ struct prctl_mm_map {
212#define PR_SET_SPECULATION_CTRL 53 212#define PR_SET_SPECULATION_CTRL 53
213/* Speculation control variants */ 213/* Speculation control variants */
214# define PR_SPEC_STORE_BYPASS 0 214# define PR_SPEC_STORE_BYPASS 0
215# define PR_SPEC_INDIRECT_BRANCH 1
215/* Return and control values for PR_SET/GET_SPECULATION_CTRL */ 216/* Return and control values for PR_SET/GET_SPECULATION_CTRL */
216# define PR_SPEC_NOT_AFFECTED 0 217# define PR_SPEC_NOT_AFFECTED 0
217# define PR_SPEC_PRCTL (1UL << 0) 218# define PR_SPEC_PRCTL (1UL << 0)
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index b479db5c71d9..c81feb373d3e 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -301,6 +301,7 @@ enum sctp_sinfo_flags {
301 SCTP_SACK_IMMEDIATELY = (1 << 3), /* SACK should be sent without delay. */ 301 SCTP_SACK_IMMEDIATELY = (1 << 3), /* SACK should be sent without delay. */
302 /* 2 bits here have been used by SCTP_PR_SCTP_MASK */ 302 /* 2 bits here have been used by SCTP_PR_SCTP_MASK */
303 SCTP_SENDALL = (1 << 6), 303 SCTP_SENDALL = (1 << 6),
304 SCTP_PR_SCTP_ALL = (1 << 7),
304 SCTP_NOTIFICATION = MSG_NOTIFICATION, /* Next message is not user msg but notification. */ 305 SCTP_NOTIFICATION = MSG_NOTIFICATION, /* Next message is not user msg but notification. */
305 SCTP_EOF = MSG_FIN, /* Initiate graceful shutdown process. */ 306 SCTP_EOF = MSG_FIN, /* Initiate graceful shutdown process. */
306}; 307};
@@ -567,6 +568,8 @@ struct sctp_assoc_reset_event {
567 568
568#define SCTP_ASSOC_CHANGE_DENIED 0x0004 569#define SCTP_ASSOC_CHANGE_DENIED 0x0004
569#define SCTP_ASSOC_CHANGE_FAILED 0x0008 570#define SCTP_ASSOC_CHANGE_FAILED 0x0008
571#define SCTP_STREAM_CHANGE_DENIED SCTP_ASSOC_CHANGE_DENIED
572#define SCTP_STREAM_CHANGE_FAILED SCTP_ASSOC_CHANGE_FAILED
570struct sctp_stream_change_event { 573struct sctp_stream_change_event {
571 __u16 strchange_type; 574 __u16 strchange_type;
572 __u16 strchange_flags; 575 __u16 strchange_flags;
@@ -1150,6 +1153,7 @@ struct sctp_add_streams {
1150/* SCTP Stream schedulers */ 1153/* SCTP Stream schedulers */
1151enum sctp_sched_type { 1154enum sctp_sched_type {
1152 SCTP_SS_FCFS, 1155 SCTP_SS_FCFS,
1156 SCTP_SS_DEFAULT = SCTP_SS_FCFS,
1153 SCTP_SS_PRIO, 1157 SCTP_SS_PRIO,
1154 SCTP_SS_RR, 1158 SCTP_SS_RR,
1155 SCTP_SS_MAX = SCTP_SS_RR 1159 SCTP_SS_MAX = SCTP_SS_RR
diff --git a/include/uapi/linux/serial.h b/include/uapi/linux/serial.h
index 3fdd0dee8b41..93eb3c496ff1 100644
--- a/include/uapi/linux/serial.h
+++ b/include/uapi/linux/serial.h
@@ -132,4 +132,21 @@ struct serial_rs485 {
132 are a royal PITA .. */ 132 are a royal PITA .. */
133}; 133};
134 134
135/*
136 * Serial interface for controlling ISO7816 settings on chips with suitable
137 * support. Set with TIOCSISO7816 and get with TIOCGISO7816 if supported by
138 * your platform.
139 */
140struct serial_iso7816 {
141 __u32 flags; /* ISO7816 feature flags */
142#define SER_ISO7816_ENABLED (1 << 0)
143#define SER_ISO7816_T_PARAM (0x0f << 4)
144#define SER_ISO7816_T(t) (((t) & 0x0f) << 4)
145 __u32 tg;
146 __u32 sc_fi;
147 __u32 sc_di;
148 __u32 clk;
149 __u32 reserved[5];
150};
151
135#endif /* _UAPI_LINUX_SERIAL_H */ 152#endif /* _UAPI_LINUX_SERIAL_H */
diff --git a/include/uapi/linux/smc_diag.h b/include/uapi/linux/smc_diag.h
index ac9e8c96d9bd..8cb3a6fef553 100644
--- a/include/uapi/linux/smc_diag.h
+++ b/include/uapi/linux/smc_diag.h
@@ -18,14 +18,17 @@ struct smc_diag_req {
18 * on the internal clcsock, and more SMC-related socket data 18 * on the internal clcsock, and more SMC-related socket data
19 */ 19 */
20struct smc_diag_msg { 20struct smc_diag_msg {
21 __u8 diag_family; 21 __u8 diag_family;
22 __u8 diag_state; 22 __u8 diag_state;
23 __u8 diag_mode; 23 union {
24 __u8 diag_shutdown; 24 __u8 diag_mode;
25 __u8 diag_fallback; /* the old name of the field */
26 };
27 __u8 diag_shutdown;
25 struct inet_diag_sockid id; 28 struct inet_diag_sockid id;
26 29
27 __u32 diag_uid; 30 __u32 diag_uid;
28 __u64 diag_inode; 31 __aligned_u64 diag_inode;
29}; 32};
30 33
31/* Mode of a connection */ 34/* Mode of a connection */
@@ -99,11 +102,11 @@ struct smc_diag_fallback {
99}; 102};
100 103
101struct smcd_diag_dmbinfo { /* SMC-D Socket internals */ 104struct smcd_diag_dmbinfo { /* SMC-D Socket internals */
102 __u32 linkid; /* Link identifier */ 105 __u32 linkid; /* Link identifier */
103 __u64 peer_gid; /* Peer GID */ 106 __aligned_u64 peer_gid; /* Peer GID */
104 __u64 my_gid; /* My GID */ 107 __aligned_u64 my_gid; /* My GID */
105 __u64 token; /* Token of DMB */ 108 __aligned_u64 token; /* Token of DMB */
106 __u64 peer_token; /* Token of remote DMBE */ 109 __aligned_u64 peer_token; /* Token of remote DMBE */
107}; 110};
108 111
109#endif /* _UAPI_SMC_DIAG_H_ */ 112#endif /* _UAPI_SMC_DIAG_H_ */
diff --git a/include/uapi/linux/taskstats.h b/include/uapi/linux/taskstats.h
index b7aa7bb2349f..5e8ca16a9079 100644
--- a/include/uapi/linux/taskstats.h
+++ b/include/uapi/linux/taskstats.h
@@ -34,7 +34,7 @@
34 */ 34 */
35 35
36 36
37#define TASKSTATS_VERSION 8 37#define TASKSTATS_VERSION 9
38#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN 38#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
39 * in linux/sched.h */ 39 * in linux/sched.h */
40 40
@@ -164,6 +164,10 @@ struct taskstats {
164 /* Delay waiting for memory reclaim */ 164 /* Delay waiting for memory reclaim */
165 __u64 freepages_count; 165 __u64 freepages_count;
166 __u64 freepages_delay_total; 166 __u64 freepages_delay_total;
167
168 /* Delay waiting for thrashing page */
169 __u64 thrashing_count;
170 __u64 thrashing_delay_total;
167}; 171};
168 172
169 173
diff --git a/include/uapi/linux/udmabuf.h b/include/uapi/linux/udmabuf.h
new file mode 100644
index 000000000000..46b6532ed855
--- /dev/null
+++ b/include/uapi/linux/udmabuf.h
@@ -0,0 +1,33 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _UAPI_LINUX_UDMABUF_H
3#define _UAPI_LINUX_UDMABUF_H
4
5#include <linux/types.h>
6#include <linux/ioctl.h>
7
8#define UDMABUF_FLAGS_CLOEXEC 0x01
9
10struct udmabuf_create {
11 __u32 memfd;
12 __u32 flags;
13 __u64 offset;
14 __u64 size;
15};
16
17struct udmabuf_create_item {
18 __u32 memfd;
19 __u32 __pad;
20 __u64 offset;
21 __u64 size;
22};
23
24struct udmabuf_create_list {
25 __u32 flags;
26 __u32 count;
27 struct udmabuf_create_item list[];
28};
29
30#define UDMABUF_CREATE _IOW('u', 0x42, struct udmabuf_create)
31#define UDMABUF_CREATE_LIST _IOW('u', 0x43, struct udmabuf_create_list)
32
33#endif /* _UAPI_LINUX_UDMABUF_H */
diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h
index 09d00f8c442b..09502de447f5 100644
--- a/include/uapi/linux/udp.h
+++ b/include/uapi/linux/udp.h
@@ -40,5 +40,6 @@ struct udphdr {
40#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ 40#define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */
41#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */ 41#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */
42#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ 42#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */
43#define UDP_ENCAP_RXRPC 6
43 44
44#endif /* _UAPI_LINUX_UDP_H */ 45#endif /* _UAPI_LINUX_UDP_H */
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index 729af2f861a4..fdd4d88a7b95 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -4,6 +4,7 @@
4 * Copyright (C) 2008 Novell, Inc. 4 * Copyright (C) 2008 Novell, Inc.
5 * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de> 5 * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
6 * Copyright (C) 2015 Dave Penkler <dpenkler@gmail.com> 6 * Copyright (C) 2015 Dave Penkler <dpenkler@gmail.com>
7 * Copyright (C) 2018 IVI Foundation, Inc.
7 * 8 *
8 * This file holds USB constants defined by the USB Device Class 9 * This file holds USB constants defined by the USB Device Class
9 * and USB488 Subclass Definitions for Test and Measurement devices 10 * and USB488 Subclass Definitions for Test and Measurement devices
@@ -40,11 +41,38 @@
40#define USBTMC488_REQUEST_GOTO_LOCAL 161 41#define USBTMC488_REQUEST_GOTO_LOCAL 161
41#define USBTMC488_REQUEST_LOCAL_LOCKOUT 162 42#define USBTMC488_REQUEST_LOCAL_LOCKOUT 162
42 43
44struct usbtmc_request {
45 __u8 bRequestType;
46 __u8 bRequest;
47 __u16 wValue;
48 __u16 wIndex;
49 __u16 wLength;
50} __attribute__ ((packed));
51
52struct usbtmc_ctrlrequest {
53 struct usbtmc_request req;
54 void __user *data; /* pointer to user space */
55} __attribute__ ((packed));
56
43struct usbtmc_termchar { 57struct usbtmc_termchar {
44 __u8 term_char; 58 __u8 term_char;
45 __u8 term_char_enabled; 59 __u8 term_char_enabled;
46} __attribute__ ((packed)); 60} __attribute__ ((packed));
47 61
62/*
63 * usbtmc_message->flags:
64 */
65#define USBTMC_FLAG_ASYNC 0x0001
66#define USBTMC_FLAG_APPEND 0x0002
67#define USBTMC_FLAG_IGNORE_TRAILER 0x0004
68
69struct usbtmc_message {
70 __u32 transfer_size; /* size of bytes to transfer */
71 __u32 transferred; /* size of received/written bytes */
72 __u32 flags; /* bit 0: 0 = synchronous; 1 = asynchronous */
73 void __user *message; /* pointer to header and data in user space */
74} __attribute__ ((packed));
75
48/* Request values for USBTMC driver's ioctl entry point */ 76/* Request values for USBTMC driver's ioctl entry point */
49#define USBTMC_IOC_NR 91 77#define USBTMC_IOC_NR 91
50#define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1) 78#define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)
@@ -53,10 +81,15 @@ struct usbtmc_termchar {
53#define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4) 81#define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4)
54#define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6) 82#define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6)
55#define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7) 83#define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7)
84#define USBTMC_IOCTL_CTRL_REQUEST _IOWR(USBTMC_IOC_NR, 8, struct usbtmc_ctrlrequest)
56#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32) 85#define USBTMC_IOCTL_GET_TIMEOUT _IOR(USBTMC_IOC_NR, 9, __u32)
57#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32) 86#define USBTMC_IOCTL_SET_TIMEOUT _IOW(USBTMC_IOC_NR, 10, __u32)
58#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8) 87#define USBTMC_IOCTL_EOM_ENABLE _IOW(USBTMC_IOC_NR, 11, __u8)
59#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar) 88#define USBTMC_IOCTL_CONFIG_TERMCHAR _IOW(USBTMC_IOC_NR, 12, struct usbtmc_termchar)
89#define USBTMC_IOCTL_WRITE _IOWR(USBTMC_IOC_NR, 13, struct usbtmc_message)
90#define USBTMC_IOCTL_READ _IOWR(USBTMC_IOC_NR, 14, struct usbtmc_message)
91#define USBTMC_IOCTL_WRITE_RESULT _IOWR(USBTMC_IOC_NR, 15, __u32)
92#define USBTMC_IOCTL_API_VERSION _IOR(USBTMC_IOC_NR, 16, __u32)
60 93
61#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char) 94#define USBTMC488_IOCTL_GET_CAPS _IOR(USBTMC_IOC_NR, 17, unsigned char)
62#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char) 95#define USBTMC488_IOCTL_READ_STB _IOR(USBTMC_IOC_NR, 18, unsigned char)
@@ -64,6 +97,14 @@ struct usbtmc_termchar {
64#define USBTMC488_IOCTL_GOTO_LOCAL _IO(USBTMC_IOC_NR, 20) 97#define USBTMC488_IOCTL_GOTO_LOCAL _IO(USBTMC_IOC_NR, 20)
65#define USBTMC488_IOCTL_LOCAL_LOCKOUT _IO(USBTMC_IOC_NR, 21) 98#define USBTMC488_IOCTL_LOCAL_LOCKOUT _IO(USBTMC_IOC_NR, 21)
66#define USBTMC488_IOCTL_TRIGGER _IO(USBTMC_IOC_NR, 22) 99#define USBTMC488_IOCTL_TRIGGER _IO(USBTMC_IOC_NR, 22)
100#define USBTMC488_IOCTL_WAIT_SRQ _IOW(USBTMC_IOC_NR, 23, __u32)
101
102#define USBTMC_IOCTL_MSG_IN_ATTR _IOR(USBTMC_IOC_NR, 24, __u8)
103#define USBTMC_IOCTL_AUTO_ABORT _IOW(USBTMC_IOC_NR, 25, __u8)
104
105/* Cancel and cleanup asynchronous calls */
106#define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35)
107#define USBTMC_IOCTL_CLEANUP_IO _IO(USBTMC_IOC_NR, 36)
67 108
68/* Driver encoded usb488 capabilities */ 109/* Driver encoded usb488 capabilities */
69#define USBTMC488_CAPABILITY_TRIGGER 1 110#define USBTMC488_CAPABILITY_TRIGGER 1
diff --git a/include/uapi/linux/usb/video.h b/include/uapi/linux/usb/video.h
index ff6cc6cb4227..d854cb19c42c 100644
--- a/include/uapi/linux/usb/video.h
+++ b/include/uapi/linux/usb/video.h
@@ -192,14 +192,14 @@ struct uvc_descriptor_header {
192 192
193/* 3.7.2. Video Control Interface Header Descriptor */ 193/* 3.7.2. Video Control Interface Header Descriptor */
194struct uvc_header_descriptor { 194struct uvc_header_descriptor {
195 __u8 bLength; 195 __u8 bLength;
196 __u8 bDescriptorType; 196 __u8 bDescriptorType;
197 __u8 bDescriptorSubType; 197 __u8 bDescriptorSubType;
198 __u16 bcdUVC; 198 __le16 bcdUVC;
199 __u16 wTotalLength; 199 __le16 wTotalLength;
200 __u32 dwClockFrequency; 200 __le32 dwClockFrequency;
201 __u8 bInCollection; 201 __u8 bInCollection;
202 __u8 baInterfaceNr[]; 202 __u8 baInterfaceNr[];
203} __attribute__((__packed__)); 203} __attribute__((__packed__));
204 204
205#define UVC_DT_HEADER_SIZE(n) (12+(n)) 205#define UVC_DT_HEADER_SIZE(n) (12+(n))
@@ -209,57 +209,57 @@ struct uvc_header_descriptor {
209 209
210#define DECLARE_UVC_HEADER_DESCRIPTOR(n) \ 210#define DECLARE_UVC_HEADER_DESCRIPTOR(n) \
211struct UVC_HEADER_DESCRIPTOR(n) { \ 211struct UVC_HEADER_DESCRIPTOR(n) { \
212 __u8 bLength; \ 212 __u8 bLength; \
213 __u8 bDescriptorType; \ 213 __u8 bDescriptorType; \
214 __u8 bDescriptorSubType; \ 214 __u8 bDescriptorSubType; \
215 __u16 bcdUVC; \ 215 __le16 bcdUVC; \
216 __u16 wTotalLength; \ 216 __le16 wTotalLength; \
217 __u32 dwClockFrequency; \ 217 __le32 dwClockFrequency; \
218 __u8 bInCollection; \ 218 __u8 bInCollection; \
219 __u8 baInterfaceNr[n]; \ 219 __u8 baInterfaceNr[n]; \
220} __attribute__ ((packed)) 220} __attribute__ ((packed))
221 221
222/* 3.7.2.1. Input Terminal Descriptor */ 222/* 3.7.2.1. Input Terminal Descriptor */
223struct uvc_input_terminal_descriptor { 223struct uvc_input_terminal_descriptor {
224 __u8 bLength; 224 __u8 bLength;
225 __u8 bDescriptorType; 225 __u8 bDescriptorType;
226 __u8 bDescriptorSubType; 226 __u8 bDescriptorSubType;
227 __u8 bTerminalID; 227 __u8 bTerminalID;
228 __u16 wTerminalType; 228 __le16 wTerminalType;
229 __u8 bAssocTerminal; 229 __u8 bAssocTerminal;
230 __u8 iTerminal; 230 __u8 iTerminal;
231} __attribute__((__packed__)); 231} __attribute__((__packed__));
232 232
233#define UVC_DT_INPUT_TERMINAL_SIZE 8 233#define UVC_DT_INPUT_TERMINAL_SIZE 8
234 234
235/* 3.7.2.2. Output Terminal Descriptor */ 235/* 3.7.2.2. Output Terminal Descriptor */
236struct uvc_output_terminal_descriptor { 236struct uvc_output_terminal_descriptor {
237 __u8 bLength; 237 __u8 bLength;
238 __u8 bDescriptorType; 238 __u8 bDescriptorType;
239 __u8 bDescriptorSubType; 239 __u8 bDescriptorSubType;
240 __u8 bTerminalID; 240 __u8 bTerminalID;
241 __u16 wTerminalType; 241 __le16 wTerminalType;
242 __u8 bAssocTerminal; 242 __u8 bAssocTerminal;
243 __u8 bSourceID; 243 __u8 bSourceID;
244 __u8 iTerminal; 244 __u8 iTerminal;
245} __attribute__((__packed__)); 245} __attribute__((__packed__));
246 246
247#define UVC_DT_OUTPUT_TERMINAL_SIZE 9 247#define UVC_DT_OUTPUT_TERMINAL_SIZE 9
248 248
249/* 3.7.2.3. Camera Terminal Descriptor */ 249/* 3.7.2.3. Camera Terminal Descriptor */
250struct uvc_camera_terminal_descriptor { 250struct uvc_camera_terminal_descriptor {
251 __u8 bLength; 251 __u8 bLength;
252 __u8 bDescriptorType; 252 __u8 bDescriptorType;
253 __u8 bDescriptorSubType; 253 __u8 bDescriptorSubType;
254 __u8 bTerminalID; 254 __u8 bTerminalID;
255 __u16 wTerminalType; 255 __le16 wTerminalType;
256 __u8 bAssocTerminal; 256 __u8 bAssocTerminal;
257 __u8 iTerminal; 257 __u8 iTerminal;
258 __u16 wObjectiveFocalLengthMin; 258 __le16 wObjectiveFocalLengthMin;
259 __u16 wObjectiveFocalLengthMax; 259 __le16 wObjectiveFocalLengthMax;
260 __u16 wOcularFocalLength; 260 __le16 wOcularFocalLength;
261 __u8 bControlSize; 261 __u8 bControlSize;
262 __u8 bmControls[3]; 262 __u8 bmControls[3];
263} __attribute__((__packed__)); 263} __attribute__((__packed__));
264 264
265#define UVC_DT_CAMERA_TERMINAL_SIZE(n) (15+(n)) 265#define UVC_DT_CAMERA_TERMINAL_SIZE(n) (15+(n))
@@ -293,15 +293,15 @@ struct UVC_SELECTOR_UNIT_DESCRIPTOR(n) { \
293 293
294/* 3.7.2.5. Processing Unit Descriptor */ 294/* 3.7.2.5. Processing Unit Descriptor */
295struct uvc_processing_unit_descriptor { 295struct uvc_processing_unit_descriptor {
296 __u8 bLength; 296 __u8 bLength;
297 __u8 bDescriptorType; 297 __u8 bDescriptorType;
298 __u8 bDescriptorSubType; 298 __u8 bDescriptorSubType;
299 __u8 bUnitID; 299 __u8 bUnitID;
300 __u8 bSourceID; 300 __u8 bSourceID;
301 __u16 wMaxMultiplier; 301 __le16 wMaxMultiplier;
302 __u8 bControlSize; 302 __u8 bControlSize;
303 __u8 bmControls[2]; 303 __u8 bmControls[2];
304 __u8 iProcessing; 304 __u8 iProcessing;
305} __attribute__((__packed__)); 305} __attribute__((__packed__));
306 306
307#define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n)) 307#define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n))
@@ -343,29 +343,29 @@ struct UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) { \
343 343
344/* 3.8.2.2. Video Control Interrupt Endpoint Descriptor */ 344/* 3.8.2.2. Video Control Interrupt Endpoint Descriptor */
345struct uvc_control_endpoint_descriptor { 345struct uvc_control_endpoint_descriptor {
346 __u8 bLength; 346 __u8 bLength;
347 __u8 bDescriptorType; 347 __u8 bDescriptorType;
348 __u8 bDescriptorSubType; 348 __u8 bDescriptorSubType;
349 __u16 wMaxTransferSize; 349 __le16 wMaxTransferSize;
350} __attribute__((__packed__)); 350} __attribute__((__packed__));
351 351
352#define UVC_DT_CONTROL_ENDPOINT_SIZE 5 352#define UVC_DT_CONTROL_ENDPOINT_SIZE 5
353 353
354/* 3.9.2.1. Input Header Descriptor */ 354/* 3.9.2.1. Input Header Descriptor */
355struct uvc_input_header_descriptor { 355struct uvc_input_header_descriptor {
356 __u8 bLength; 356 __u8 bLength;
357 __u8 bDescriptorType; 357 __u8 bDescriptorType;
358 __u8 bDescriptorSubType; 358 __u8 bDescriptorSubType;
359 __u8 bNumFormats; 359 __u8 bNumFormats;
360 __u16 wTotalLength; 360 __le16 wTotalLength;
361 __u8 bEndpointAddress; 361 __u8 bEndpointAddress;
362 __u8 bmInfo; 362 __u8 bmInfo;
363 __u8 bTerminalLink; 363 __u8 bTerminalLink;
364 __u8 bStillCaptureMethod; 364 __u8 bStillCaptureMethod;
365 __u8 bTriggerSupport; 365 __u8 bTriggerSupport;
366 __u8 bTriggerUsage; 366 __u8 bTriggerUsage;
367 __u8 bControlSize; 367 __u8 bControlSize;
368 __u8 bmaControls[]; 368 __u8 bmaControls[];
369} __attribute__((__packed__)); 369} __attribute__((__packed__));
370 370
371#define UVC_DT_INPUT_HEADER_SIZE(n, p) (13+(n*p)) 371#define UVC_DT_INPUT_HEADER_SIZE(n, p) (13+(n*p))
@@ -375,32 +375,32 @@ struct uvc_input_header_descriptor {
375 375
376#define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p) \ 376#define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p) \
377struct UVC_INPUT_HEADER_DESCRIPTOR(n, p) { \ 377struct UVC_INPUT_HEADER_DESCRIPTOR(n, p) { \
378 __u8 bLength; \ 378 __u8 bLength; \
379 __u8 bDescriptorType; \ 379 __u8 bDescriptorType; \
380 __u8 bDescriptorSubType; \ 380 __u8 bDescriptorSubType; \
381 __u8 bNumFormats; \ 381 __u8 bNumFormats; \
382 __u16 wTotalLength; \ 382 __le16 wTotalLength; \
383 __u8 bEndpointAddress; \ 383 __u8 bEndpointAddress; \
384 __u8 bmInfo; \ 384 __u8 bmInfo; \
385 __u8 bTerminalLink; \ 385 __u8 bTerminalLink; \
386 __u8 bStillCaptureMethod; \ 386 __u8 bStillCaptureMethod; \
387 __u8 bTriggerSupport; \ 387 __u8 bTriggerSupport; \
388 __u8 bTriggerUsage; \ 388 __u8 bTriggerUsage; \
389 __u8 bControlSize; \ 389 __u8 bControlSize; \
390 __u8 bmaControls[p][n]; \ 390 __u8 bmaControls[p][n]; \
391} __attribute__ ((packed)) 391} __attribute__ ((packed))
392 392
393/* 3.9.2.2. Output Header Descriptor */ 393/* 3.9.2.2. Output Header Descriptor */
394struct uvc_output_header_descriptor { 394struct uvc_output_header_descriptor {
395 __u8 bLength; 395 __u8 bLength;
396 __u8 bDescriptorType; 396 __u8 bDescriptorType;
397 __u8 bDescriptorSubType; 397 __u8 bDescriptorSubType;
398 __u8 bNumFormats; 398 __u8 bNumFormats;
399 __u16 wTotalLength; 399 __le16 wTotalLength;
400 __u8 bEndpointAddress; 400 __u8 bEndpointAddress;
401 __u8 bTerminalLink; 401 __u8 bTerminalLink;
402 __u8 bControlSize; 402 __u8 bControlSize;
403 __u8 bmaControls[]; 403 __u8 bmaControls[];
404} __attribute__((__packed__)); 404} __attribute__((__packed__));
405 405
406#define UVC_DT_OUTPUT_HEADER_SIZE(n, p) (9+(n*p)) 406#define UVC_DT_OUTPUT_HEADER_SIZE(n, p) (9+(n*p))
@@ -410,15 +410,15 @@ struct uvc_output_header_descriptor {
410 410
411#define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \ 411#define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \
412struct UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) { \ 412struct UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) { \
413 __u8 bLength; \ 413 __u8 bLength; \
414 __u8 bDescriptorType; \ 414 __u8 bDescriptorType; \
415 __u8 bDescriptorSubType; \ 415 __u8 bDescriptorSubType; \
416 __u8 bNumFormats; \ 416 __u8 bNumFormats; \
417 __u16 wTotalLength; \ 417 __le16 wTotalLength; \
418 __u8 bEndpointAddress; \ 418 __u8 bEndpointAddress; \
419 __u8 bTerminalLink; \ 419 __u8 bTerminalLink; \
420 __u8 bControlSize; \ 420 __u8 bControlSize; \
421 __u8 bmaControls[p][n]; \ 421 __u8 bmaControls[p][n]; \
422} __attribute__ ((packed)) 422} __attribute__ ((packed))
423 423
424/* 3.9.2.6. Color matching descriptor */ 424/* 3.9.2.6. Color matching descriptor */
@@ -473,19 +473,19 @@ struct uvc_format_uncompressed {
473 473
474/* Uncompressed Payload - 3.1.2. Uncompressed Video Frame Descriptor */ 474/* Uncompressed Payload - 3.1.2. Uncompressed Video Frame Descriptor */
475struct uvc_frame_uncompressed { 475struct uvc_frame_uncompressed {
476 __u8 bLength; 476 __u8 bLength;
477 __u8 bDescriptorType; 477 __u8 bDescriptorType;
478 __u8 bDescriptorSubType; 478 __u8 bDescriptorSubType;
479 __u8 bFrameIndex; 479 __u8 bFrameIndex;
480 __u8 bmCapabilities; 480 __u8 bmCapabilities;
481 __u16 wWidth; 481 __le16 wWidth;
482 __u16 wHeight; 482 __le16 wHeight;
483 __u32 dwMinBitRate; 483 __le32 dwMinBitRate;
484 __u32 dwMaxBitRate; 484 __le32 dwMaxBitRate;
485 __u32 dwMaxVideoFrameBufferSize; 485 __le32 dwMaxVideoFrameBufferSize;
486 __u32 dwDefaultFrameInterval; 486 __le32 dwDefaultFrameInterval;
487 __u8 bFrameIntervalType; 487 __u8 bFrameIntervalType;
488 __u32 dwFrameInterval[]; 488 __le32 dwFrameInterval[];
489} __attribute__((__packed__)); 489} __attribute__((__packed__));
490 490
491#define UVC_DT_FRAME_UNCOMPRESSED_SIZE(n) (26+4*(n)) 491#define UVC_DT_FRAME_UNCOMPRESSED_SIZE(n) (26+4*(n))
@@ -495,19 +495,19 @@ struct uvc_frame_uncompressed {
495 495
496#define DECLARE_UVC_FRAME_UNCOMPRESSED(n) \ 496#define DECLARE_UVC_FRAME_UNCOMPRESSED(n) \
497struct UVC_FRAME_UNCOMPRESSED(n) { \ 497struct UVC_FRAME_UNCOMPRESSED(n) { \
498 __u8 bLength; \ 498 __u8 bLength; \
499 __u8 bDescriptorType; \ 499 __u8 bDescriptorType; \
500 __u8 bDescriptorSubType; \ 500 __u8 bDescriptorSubType; \
501 __u8 bFrameIndex; \ 501 __u8 bFrameIndex; \
502 __u8 bmCapabilities; \ 502 __u8 bmCapabilities; \
503 __u16 wWidth; \ 503 __le16 wWidth; \
504 __u16 wHeight; \ 504 __le16 wHeight; \
505 __u32 dwMinBitRate; \ 505 __le32 dwMinBitRate; \
506 __u32 dwMaxBitRate; \ 506 __le32 dwMaxBitRate; \
507 __u32 dwMaxVideoFrameBufferSize; \ 507 __le32 dwMaxVideoFrameBufferSize; \
508 __u32 dwDefaultFrameInterval; \ 508 __le32 dwDefaultFrameInterval; \
509 __u8 bFrameIntervalType; \ 509 __u8 bFrameIntervalType; \
510 __u32 dwFrameInterval[n]; \ 510 __le32 dwFrameInterval[n]; \
511} __attribute__ ((packed)) 511} __attribute__ ((packed))
512 512
513/* MJPEG Payload - 3.1.1. MJPEG Video Format Descriptor */ 513/* MJPEG Payload - 3.1.1. MJPEG Video Format Descriptor */
@@ -529,19 +529,19 @@ struct uvc_format_mjpeg {
529 529
530/* MJPEG Payload - 3.1.2. MJPEG Video Frame Descriptor */ 530/* MJPEG Payload - 3.1.2. MJPEG Video Frame Descriptor */
531struct uvc_frame_mjpeg { 531struct uvc_frame_mjpeg {
532 __u8 bLength; 532 __u8 bLength;
533 __u8 bDescriptorType; 533 __u8 bDescriptorType;
534 __u8 bDescriptorSubType; 534 __u8 bDescriptorSubType;
535 __u8 bFrameIndex; 535 __u8 bFrameIndex;
536 __u8 bmCapabilities; 536 __u8 bmCapabilities;
537 __u16 wWidth; 537 __le16 wWidth;
538 __u16 wHeight; 538 __le16 wHeight;
539 __u32 dwMinBitRate; 539 __le32 dwMinBitRate;
540 __u32 dwMaxBitRate; 540 __le32 dwMaxBitRate;
541 __u32 dwMaxVideoFrameBufferSize; 541 __le32 dwMaxVideoFrameBufferSize;
542 __u32 dwDefaultFrameInterval; 542 __le32 dwDefaultFrameInterval;
543 __u8 bFrameIntervalType; 543 __u8 bFrameIntervalType;
544 __u32 dwFrameInterval[]; 544 __le32 dwFrameInterval[];
545} __attribute__((__packed__)); 545} __attribute__((__packed__));
546 546
547#define UVC_DT_FRAME_MJPEG_SIZE(n) (26+4*(n)) 547#define UVC_DT_FRAME_MJPEG_SIZE(n) (26+4*(n))
@@ -551,19 +551,19 @@ struct uvc_frame_mjpeg {
551 551
552#define DECLARE_UVC_FRAME_MJPEG(n) \ 552#define DECLARE_UVC_FRAME_MJPEG(n) \
553struct UVC_FRAME_MJPEG(n) { \ 553struct UVC_FRAME_MJPEG(n) { \
554 __u8 bLength; \ 554 __u8 bLength; \
555 __u8 bDescriptorType; \ 555 __u8 bDescriptorType; \
556 __u8 bDescriptorSubType; \ 556 __u8 bDescriptorSubType; \
557 __u8 bFrameIndex; \ 557 __u8 bFrameIndex; \
558 __u8 bmCapabilities; \ 558 __u8 bmCapabilities; \
559 __u16 wWidth; \ 559 __le16 wWidth; \
560 __u16 wHeight; \ 560 __le16 wHeight; \
561 __u32 dwMinBitRate; \ 561 __le32 dwMinBitRate; \
562 __u32 dwMaxBitRate; \ 562 __le32 dwMaxBitRate; \
563 __u32 dwMaxVideoFrameBufferSize; \ 563 __le32 dwMaxVideoFrameBufferSize; \
564 __u32 dwDefaultFrameInterval; \ 564 __le32 dwDefaultFrameInterval; \
565 __u8 bFrameIntervalType; \ 565 __u8 bFrameIntervalType; \
566 __u32 dwFrameInterval[n]; \ 566 __le32 dwFrameInterval[n]; \
567} __attribute__ ((packed)) 567} __attribute__ ((packed))
568 568
569#endif /* __LINUX_USB_VIDEO_H */ 569#endif /* __LINUX_USB_VIDEO_H */
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index e4ee10ee917d..3dcfc6148f99 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -50,6 +50,8 @@
50#ifndef __LINUX_V4L2_CONTROLS_H 50#ifndef __LINUX_V4L2_CONTROLS_H
51#define __LINUX_V4L2_CONTROLS_H 51#define __LINUX_V4L2_CONTROLS_H
52 52
53#include <linux/types.h>
54
53/* Control classes */ 55/* Control classes */
54#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ 56#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
55#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ 57#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 1aa7b82e8169..813102810f53 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -200,6 +200,7 @@ struct vfio_device_info {
200#define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2) /* vfio-platform device */ 200#define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2) /* vfio-platform device */
201#define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */ 201#define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */
202#define VFIO_DEVICE_FLAGS_CCW (1 << 4) /* vfio-ccw device */ 202#define VFIO_DEVICE_FLAGS_CCW (1 << 4) /* vfio-ccw device */
203#define VFIO_DEVICE_FLAGS_AP (1 << 5) /* vfio-ap device */
203 __u32 num_regions; /* Max region index + 1 */ 204 __u32 num_regions; /* Max region index + 1 */
204 __u32 num_irqs; /* Max IRQ index + 1 */ 205 __u32 num_irqs; /* Max IRQ index + 1 */
205}; 206};
@@ -215,6 +216,7 @@ struct vfio_device_info {
215#define VFIO_DEVICE_API_PLATFORM_STRING "vfio-platform" 216#define VFIO_DEVICE_API_PLATFORM_STRING "vfio-platform"
216#define VFIO_DEVICE_API_AMBA_STRING "vfio-amba" 217#define VFIO_DEVICE_API_AMBA_STRING "vfio-amba"
217#define VFIO_DEVICE_API_CCW_STRING "vfio-ccw" 218#define VFIO_DEVICE_API_CCW_STRING "vfio-ccw"
219#define VFIO_DEVICE_API_AP_STRING "vfio-ap"
218 220
219/** 221/**
220 * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8, 222 * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8,
@@ -301,6 +303,56 @@ struct vfio_region_info_cap_type {
301#define VFIO_REGION_SUBTYPE_INTEL_IGD_HOST_CFG (2) 303#define VFIO_REGION_SUBTYPE_INTEL_IGD_HOST_CFG (2)
302#define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3) 304#define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3)
303 305
306#define VFIO_REGION_TYPE_GFX (1)
307#define VFIO_REGION_SUBTYPE_GFX_EDID (1)
308
309/**
310 * struct vfio_region_gfx_edid - EDID region layout.
311 *
312 * Set display link state and EDID blob.
313 *
314 * The EDID blob has monitor information such as brand, name, serial
315 * number, physical size, supported video modes and more.
316 *
317 * This special region allows userspace (typically qemu) set a virtual
318 * EDID for the virtual monitor, which allows a flexible display
319 * configuration.
320 *
321 * For the edid blob spec look here:
322 * https://en.wikipedia.org/wiki/Extended_Display_Identification_Data
323 *
324 * On linux systems you can find the EDID blob in sysfs:
325 * /sys/class/drm/${card}/${connector}/edid
326 *
327 * You can use the edid-decode ulility (comes with xorg-x11-utils) to
328 * decode the EDID blob.
329 *
330 * @edid_offset: location of the edid blob, relative to the
331 * start of the region (readonly).
332 * @edid_max_size: max size of the edid blob (readonly).
333 * @edid_size: actual edid size (read/write).
334 * @link_state: display link state (read/write).
335 * VFIO_DEVICE_GFX_LINK_STATE_UP: Monitor is turned on.
336 * VFIO_DEVICE_GFX_LINK_STATE_DOWN: Monitor is turned off.
337 * @max_xres: max display width (0 == no limitation, readonly).
338 * @max_yres: max display height (0 == no limitation, readonly).
339 *
340 * EDID update protocol:
341 * (1) set link-state to down.
342 * (2) update edid blob and size.
343 * (3) set link-state to up.
344 */
345struct vfio_region_gfx_edid {
346 __u32 edid_offset;
347 __u32 edid_max_size;
348 __u32 edid_size;
349 __u32 max_xres;
350 __u32 max_yres;
351 __u32 link_state;
352#define VFIO_DEVICE_GFX_LINK_STATE_UP 1
353#define VFIO_DEVICE_GFX_LINK_STATE_DOWN 2
354};
355
304/* 356/*
305 * The MSIX mappable capability informs that MSIX data of a BAR can be mmapped 357 * The MSIX mappable capability informs that MSIX data of a BAR can be mmapped
306 * which allows direct access to non-MSIX registers which happened to be within 358 * which allows direct access to non-MSIX registers which happened to be within
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 5d1a3685bea9..2ba2ad0e23fb 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -225,8 +225,8 @@ enum v4l2_colorspace {
225 /* For RGB colorspaces such as produces by most webcams. */ 225 /* For RGB colorspaces such as produces by most webcams. */
226 V4L2_COLORSPACE_SRGB = 8, 226 V4L2_COLORSPACE_SRGB = 8,
227 227
228 /* AdobeRGB colorspace */ 228 /* opRGB colorspace */
229 V4L2_COLORSPACE_ADOBERGB = 9, 229 V4L2_COLORSPACE_OPRGB = 9,
230 230
231 /* BT.2020 colorspace, used for UHDTV. */ 231 /* BT.2020 colorspace, used for UHDTV. */
232 V4L2_COLORSPACE_BT2020 = 10, 232 V4L2_COLORSPACE_BT2020 = 10,
@@ -258,7 +258,7 @@ enum v4l2_xfer_func {
258 * 258 *
259 * V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB 259 * V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB
260 * 260 *
261 * V4L2_COLORSPACE_ADOBERGB: V4L2_XFER_FUNC_ADOBERGB 261 * V4L2_COLORSPACE_OPRGB: V4L2_XFER_FUNC_OPRGB
262 * 262 *
263 * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M 263 * V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M
264 * 264 *
@@ -269,7 +269,7 @@ enum v4l2_xfer_func {
269 V4L2_XFER_FUNC_DEFAULT = 0, 269 V4L2_XFER_FUNC_DEFAULT = 0,
270 V4L2_XFER_FUNC_709 = 1, 270 V4L2_XFER_FUNC_709 = 1,
271 V4L2_XFER_FUNC_SRGB = 2, 271 V4L2_XFER_FUNC_SRGB = 2,
272 V4L2_XFER_FUNC_ADOBERGB = 3, 272 V4L2_XFER_FUNC_OPRGB = 3,
273 V4L2_XFER_FUNC_SMPTE240M = 4, 273 V4L2_XFER_FUNC_SMPTE240M = 4,
274 V4L2_XFER_FUNC_NONE = 5, 274 V4L2_XFER_FUNC_NONE = 5,
275 V4L2_XFER_FUNC_DCI_P3 = 6, 275 V4L2_XFER_FUNC_DCI_P3 = 6,
@@ -281,7 +281,7 @@ enum v4l2_xfer_func {
281 * This depends on the colorspace. 281 * This depends on the colorspace.
282 */ 282 */
283#define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \ 283#define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \
284 ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \ 284 ((colsp) == V4L2_COLORSPACE_OPRGB ? V4L2_XFER_FUNC_OPRGB : \
285 ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \ 285 ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \
286 ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 : \ 286 ((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 : \
287 ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \ 287 ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \
@@ -295,7 +295,7 @@ enum v4l2_ycbcr_encoding {
295 * 295 *
296 * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M, 296 * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
297 * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_SRGB, 297 * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_SRGB,
298 * V4L2_COLORSPACE_ADOBERGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 298 * V4L2_COLORSPACE_OPRGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601
299 * 299 *
300 * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709 300 * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709
301 * 301 *
@@ -382,6 +382,17 @@ enum v4l2_quantization {
382 (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \ 382 (((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \
383 V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE)) 383 V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))
384 384
385/*
386 * Deprecated names for opRGB colorspace (IEC 61966-2-5)
387 *
388 * WARNING: Please don't use these deprecated defines in your code, as
389 * there is a chance we have to remove them in the future.
390 */
391#ifndef __KERNEL__
392#define V4L2_COLORSPACE_ADOBERGB V4L2_COLORSPACE_OPRGB
393#define V4L2_XFER_FUNC_ADOBERGB V4L2_XFER_FUNC_OPRGB
394#endif
395
385enum v4l2_priority { 396enum v4l2_priority {
386 V4L2_PRIORITY_UNSET = 0, /* not initialized */ 397 V4L2_PRIORITY_UNSET = 0, /* not initialized */
387 V4L2_PRIORITY_BACKGROUND = 1, 398 V4L2_PRIORITY_BACKGROUND = 1,
@@ -635,6 +646,7 @@ struct v4l2_pix_format {
635#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ 646#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */
636#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ 647#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
637#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ 648#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */
649#define V4L2_PIX_FMT_MPEG2_SLICE v4l2_fourcc('M', 'G', '2', 'S') /* MPEG-2 parsed slice data */
638#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 part 2 ES */ 650#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 part 2 ES */
639#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ 651#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
640#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ 652#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
@@ -676,6 +688,7 @@ struct v4l2_pix_format {
676#define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */ 688#define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
677#define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ 689#define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */
678#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ 690#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
691#define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */
679 692
680/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ 693/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */
681#define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */ 694#define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */
@@ -703,6 +716,7 @@ struct v4l2_pix_format {
703#define V4L2_META_FMT_VSP1_HGO v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */ 716#define V4L2_META_FMT_VSP1_HGO v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */
704#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */ 717#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */
705#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */ 718#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */
719#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
706 720
707/* priv field value to indicates that subsequent fields are valid. */ 721/* priv field value to indicates that subsequent fields are valid. */
708#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe 722#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
@@ -856,9 +870,16 @@ struct v4l2_requestbuffers {
856 __u32 count; 870 __u32 count;
857 __u32 type; /* enum v4l2_buf_type */ 871 __u32 type; /* enum v4l2_buf_type */
858 __u32 memory; /* enum v4l2_memory */ 872 __u32 memory; /* enum v4l2_memory */
859 __u32 reserved[2]; 873 __u32 capabilities;
874 __u32 reserved[1];
860}; 875};
861 876
877/* capabilities for struct v4l2_requestbuffers and v4l2_create_buffers */
878#define V4L2_BUF_CAP_SUPPORTS_MMAP (1 << 0)
879#define V4L2_BUF_CAP_SUPPORTS_USERPTR (1 << 1)
880#define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
881#define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3)
882
862/** 883/**
863 * struct v4l2_plane - plane info for multi-planar buffers 884 * struct v4l2_plane - plane info for multi-planar buffers
864 * @bytesused: number of bytes occupied by data in the plane (payload) 885 * @bytesused: number of bytes occupied by data in the plane (payload)
@@ -917,6 +938,7 @@ struct v4l2_plane {
917 * @length: size in bytes of the buffer (NOT its payload) for single-plane 938 * @length: size in bytes of the buffer (NOT its payload) for single-plane
918 * buffers (when type != *_MPLANE); number of elements in the 939 * buffers (when type != *_MPLANE); number of elements in the
919 * planes array for multi-plane buffers 940 * planes array for multi-plane buffers
941 * @request_fd: fd of the request that this buffer should use
920 * 942 *
921 * Contains data exchanged by application and driver using one of the Streaming 943 * Contains data exchanged by application and driver using one of the Streaming
922 * I/O methods. 944 * I/O methods.
@@ -941,7 +963,10 @@ struct v4l2_buffer {
941 } m; 963 } m;
942 __u32 length; 964 __u32 length;
943 __u32 reserved2; 965 __u32 reserved2;
944 __u32 reserved; 966 union {
967 __s32 request_fd;
968 __u32 reserved;
969 };
945}; 970};
946 971
947/* Flags for 'flags' field */ 972/* Flags for 'flags' field */
@@ -959,6 +984,8 @@ struct v4l2_buffer {
959#define V4L2_BUF_FLAG_BFRAME 0x00000020 984#define V4L2_BUF_FLAG_BFRAME 0x00000020
960/* Buffer is ready, but the data contained within is corrupted. */ 985/* Buffer is ready, but the data contained within is corrupted. */
961#define V4L2_BUF_FLAG_ERROR 0x00000040 986#define V4L2_BUF_FLAG_ERROR 0x00000040
987/* Buffer is added to an unqueued request */
988#define V4L2_BUF_FLAG_IN_REQUEST 0x00000080
962/* timecode field is valid */ 989/* timecode field is valid */
963#define V4L2_BUF_FLAG_TIMECODE 0x00000100 990#define V4L2_BUF_FLAG_TIMECODE 0x00000100
964/* Buffer is prepared for queuing */ 991/* Buffer is prepared for queuing */
@@ -977,6 +1004,8 @@ struct v4l2_buffer {
977#define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000 1004#define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000
978/* mem2mem encoder/decoder */ 1005/* mem2mem encoder/decoder */
979#define V4L2_BUF_FLAG_LAST 0x00100000 1006#define V4L2_BUF_FLAG_LAST 0x00100000
1007/* request_fd is valid */
1008#define V4L2_BUF_FLAG_REQUEST_FD 0x00800000
980 1009
981/** 1010/**
982 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor 1011 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor
@@ -1400,6 +1429,13 @@ struct v4l2_bt_timings {
1400 * InfoFrame). 1429 * InfoFrame).
1401 */ 1430 */
1402#define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8) 1431#define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8)
1432/*
1433 * CEA-861 specific: only valid for video receivers.
1434 * If set, then HW can detect the difference between regular FPS and
1435 * 1000/1001 FPS. Note: This flag is only valid for HDMI VIC codes with
1436 * the V4L2_DV_FL_CAN_REDUCE_FPS flag set.
1437 */
1438#define V4L2_DV_FL_CAN_DETECT_REDUCED_FPS (1 << 9)
1403 1439
1404/* A few useful defines to calculate the total blanking and frame sizes */ 1440/* A few useful defines to calculate the total blanking and frame sizes */
1405#define V4L2_DV_BT_BLANKING_WIDTH(bt) \ 1441#define V4L2_DV_BT_BLANKING_WIDTH(bt) \
@@ -1599,7 +1635,8 @@ struct v4l2_ext_controls {
1599 }; 1635 };
1600 __u32 count; 1636 __u32 count;
1601 __u32 error_idx; 1637 __u32 error_idx;
1602 __u32 reserved[2]; 1638 __s32 request_fd;
1639 __u32 reserved[1];
1603 struct v4l2_ext_control *controls; 1640 struct v4l2_ext_control *controls;
1604}; 1641};
1605 1642
@@ -1612,6 +1649,7 @@ struct v4l2_ext_controls {
1612#define V4L2_CTRL_MAX_DIMS (4) 1649#define V4L2_CTRL_MAX_DIMS (4)
1613#define V4L2_CTRL_WHICH_CUR_VAL 0 1650#define V4L2_CTRL_WHICH_CUR_VAL 0
1614#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 1651#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000
1652#define V4L2_CTRL_WHICH_REQUEST_VAL 0x0f010000
1615 1653
1616enum v4l2_ctrl_type { 1654enum v4l2_ctrl_type {
1617 V4L2_CTRL_TYPE_INTEGER = 1, 1655 V4L2_CTRL_TYPE_INTEGER = 1,
@@ -2302,6 +2340,7 @@ struct v4l2_dbg_chip_info {
2302 * return: number of created buffers 2340 * return: number of created buffers
2303 * @memory: enum v4l2_memory; buffer memory type 2341 * @memory: enum v4l2_memory; buffer memory type
2304 * @format: frame format, for which buffers are requested 2342 * @format: frame format, for which buffers are requested
2343 * @capabilities: capabilities of this buffer type.
2305 * @reserved: future extensions 2344 * @reserved: future extensions
2306 */ 2345 */
2307struct v4l2_create_buffers { 2346struct v4l2_create_buffers {
@@ -2309,7 +2348,8 @@ struct v4l2_create_buffers {
2309 __u32 count; 2348 __u32 count;
2310 __u32 memory; 2349 __u32 memory;
2311 struct v4l2_format format; 2350 struct v4l2_format format;
2312 __u32 reserved[8]; 2351 __u32 capabilities;
2352 __u32 reserved[7];
2313}; 2353};
2314 2354
2315/* 2355/*
diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
index 13b8cb563892..a1966cd7b677 100644
--- a/include/uapi/linux/virtio_balloon.h
+++ b/include/uapi/linux/virtio_balloon.h
@@ -34,15 +34,23 @@
34#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ 34#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
35#define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */ 35#define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */
36#define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */ 36#define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */
37#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */
38#define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */
37 39
38/* Size of a PFN in the balloon interface. */ 40/* Size of a PFN in the balloon interface. */
39#define VIRTIO_BALLOON_PFN_SHIFT 12 41#define VIRTIO_BALLOON_PFN_SHIFT 12
40 42
43#define VIRTIO_BALLOON_CMD_ID_STOP 0
44#define VIRTIO_BALLOON_CMD_ID_DONE 1
41struct virtio_balloon_config { 45struct virtio_balloon_config {
42 /* Number of pages host wants Guest to give up. */ 46 /* Number of pages host wants Guest to give up. */
43 __u32 num_pages; 47 __u32 num_pages;
44 /* Number of pages we've actually got in balloon. */ 48 /* Number of pages we've actually got in balloon. */
45 __u32 actual; 49 __u32 actual;
50 /* Free page report command id, readonly by guest */
51 __u32 free_page_report_cmd_id;
52 /* Stores PAGE_POISON if page poisoning is in use */
53 __u32 poison_val;
46}; 54};
47 55
48#define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */ 56#define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */