History

Merge branches 'for-4.20/upstream-fixes', 'for-4.21/core', 'for-4.21/hid-asus', 'for-4.21/hid-core', 'for-4.21/hid-cougar', 'for-4.21/hidraw', 'for-4.21/highres-wheel' and 'for-4.21/ish' into for-linus

Jiri Kosina committed 7 years ago

Commit bd8879f8 parents f8f8074 8c32d47 0e1f37d 7f55927 aeed35f 31a8b3e 1676722 74fbc7d1847 files · +37230 −12355Browse files

Showing the changes to include/uapi/linux (11 of 1847 files). Show all

Unified · Split

11 files
  1. include/uapi/linux/bpf.h +37 −19
  2. include/uapi/linux/input-event-codes.h +2 −0
  3. include/uapi/linux/keyctl.h +30 −0
  4. include/uapi/linux/kfd_ioctl.h +9 −9
  5. include/uapi/linux/netfilter/nf_tables.h +2 −2
  6. include/uapi/linux/netfilter_bridge.h +4 −0
  7. include/uapi/linux/perf_event.h +2 −0
  8. include/uapi/linux/prctl.h +1 −0
  9. include/uapi/linux/sctp.h +3 −0
  10. include/uapi/linux/v4l2-controls.h +5 −0
  11. include/uapi/linux/virtio_balloon.h +8 −0
include/uapi/linux/bpf.h+37−19
@@ -2170,7 +2170,7 @@ union bpf_attr { · 2169 unmodified lines
21702170 * Return
21712171 * 0 on success, or a negative error in case of failure.
21722172 *
2173− * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)
2173+ * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
21742174 * Description
21752175 * Look for TCP socket matching *tuple*, optionally in a child
21762176 * network namespace *netns*. The return value must be checked,
@@ -2187,12 +2187,14 @@ union bpf_attr { · 10 unmodified lines
21872187 * **sizeof**\ (*tuple*\ **->ipv6**)
21882188 * Look for an IPv6 socket.
21892189 *
2190− * If the *netns* is zero, then the socket lookup table in the
2191− * netns associated with the *ctx* will be used. For the TC hooks,
2192− * this in the netns of the device in the skb. For socket hooks,
2193− * this in the netns of the socket. If *netns* is non-zero, then
2194− * it specifies the ID of the netns relative to the netns
2195− * associated with the *ctx*.
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.
21962198 *
21972199 * All values for *flags* are reserved for future usage, and must
21982200 * be left at zero.
@@ -2201,8 +2203,10 @@ union bpf_attr { · 2 unmodified lines
22012203 * **CONFIG_NET** configuration option.
22022204 * Return
22032205 * 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.
22042208 *
2205− * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)
2209+ * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
22062210 * Description
22072211 * Look for UDP socket matching *tuple*, optionally in a child
22082212 * network namespace *netns*. The return value must be checked,
@@ -2219,12 +2223,14 @@ union bpf_attr { · 10 unmodified lines
22192223 * **sizeof**\ (*tuple*\ **->ipv6**)
22202224 * Look for an IPv6 socket.
22212225 *
2222− * If the *netns* is zero, then the socket lookup table in the
2223− * netns associated with the *ctx* will be used. For the TC hooks,
2224− * this in the netns of the device in the skb. For socket hooks,
2225− * this in the netns of the socket. If *netns* is non-zero, then
2226− * it specifies the ID of the netns relative to the netns
2227− * associated with the *ctx*.
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.
22282234 *
22292235 * All values for *flags* are reserved for future usage, and must
22302236 * be left at zero.
@@ -2233,6 +2239,8 @@ union bpf_attr { · 2 unmodified lines
22332239 * **CONFIG_NET** configuration option.
22342240 * Return
22352241 * 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.
22362244 *
22372245 * int bpf_sk_release(struct bpf_sock *sk)
22382246 * Description
@@ -2405,6 +2413,9 @@ enum bpf_func_id { · 166 unmodified lines
24052413 /* BPF_FUNC_perf_event_output for sk_buff input context. */
24062414 #define BPF_F_CTXLEN_MASK (0xfffffULL << 32)
24072415
2416+/* Current network namespace */
2417+#define BPF_F_CURRENT_NETNS (-1L)
2418+
24082419 /* Mode for BPF_FUNC_skb_adjust_room helper. */
24092420 enum bpf_adj_room_mode {
24102421 BPF_ADJ_ROOM_NET,
@@ -2422,6 +2433,12 @@ enum bpf_lwt_encap_mode { · 11 unmodified lines
24222433 BPF_LWT_ENCAP_SEG6_INLINE
24232434 };
24242435
2436+#define __bpf_md_ptr(type, name) \
2437+union { \
2438+ type name; \
2439+ __u64 :64; \
2440+} __attribute__((aligned(8)))
2441+
24252442 /* user accessible mirror of in-kernel sk_buff.
24262443 * new fields can only be added to the end of this structure
24272444 */
@@ -2456,7 +2473,7 @@ struct __sk_buff { · 28 unmodified lines
24562473 /* ... here. */
24572474
24582475 __u32 data_meta;
2459− struct bpf_flow_keys *flow_keys;
2476+ __bpf_md_ptr(struct bpf_flow_keys *, flow_keys);
24602477 };
24612478
24622479 struct bpf_tunnel_key {
@@ -2572,8 +2589,8 @@ enum sk_action { · 109 unmodified lines
25722589 * be added to the end of this structure
25732590 */
25742591 struct sk_msg_md {
2575− void *data;
2576− void *data_end;
2592+ __bpf_md_ptr(void *, data);
2593+ __bpf_md_ptr(void *, data_end);
25772594
25782595 __u32 family;
25792596 __u32 remote_ip4; /* Stored in network byte order */
@@ -2589,8 +2606,9 @@ struct sk_reuseport_md { · 9 unmodified lines
25892606 * Start of directly accessible data. It begins from
25902607 * the tcp/udp header.
25912608 */
2592− void *data;
2593− void *data_end; /* End of directly accessible data */
2609+ __bpf_md_ptr(void *, data);
2610+ /* End of directly accessible data */
2611+ __bpf_md_ptr(void *, data_end);
25942612 /*
25952613 * Total length of packet (starting from the tcp/udp header).
25962614 * Note that the directly accessible bytes (data_end - data)
include/uapi/linux/input-event-codes.h+2−0
@@ -716,6 +716,8 @@ · 715 unmodified lines
716716 * the situation described above.
717717 */
718718 #define REL_RESERVED 0x0a
719+#define REL_WHEEL_HI_RES 0x0b
720+#define REL_HWHEEL_HI_RES 0x0c
719721 #define REL_MAX 0x0f
720722 #define REL_CNT (REL_MAX+1)
721723
include/uapi/linux/keyctl.h+30−0
@@ -61,6 +61,11 @@ · 60 unmodified lines
6161 #define KEYCTL_INVALIDATE 21 /* invalidate a key */
6262 #define KEYCTL_GET_PERSISTENT 22 /* get a user's persistent keyring */
6363 #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 */
6469 #define KEYCTL_RESTRICT_KEYRING 29 /* Restrict keys allowed to link to a keyring */
6570
6671 /* keyctl structures */
@@ -82,4 +87,29 @@ struct keyctl_kdf_params { · 15 unmodified lines
8287 __u32 __spare[8];
8388 };
8489
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+
95+struct 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+
105+struct 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+
85115 #endif /* _LINUX_KEYCTL_H */
include/uapi/linux/kfd_ioctl.h+9−9
@@ -83,11 +83,11 @@ struct kfd_ioctl_set_cu_mask_args { · 82 unmodified lines
8383 };
8484
8585 struct kfd_ioctl_get_queue_wave_state_args {
86− uint64_t ctl_stack_address; /* to KFD */
87− uint32_t ctl_stack_used_size; /* from KFD */
88− uint32_t save_area_used_size; /* from KFD */
89− uint32_t queue_id; /* to KFD */
90− uint32_t pad;
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;
9191 };
9292
9393 /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
@@ -255,10 +255,10 @@ struct kfd_hsa_memory_exception_data { · 161 unmodified lines
255255
256256 /* hw exception data */
257257 struct kfd_hsa_hw_exception_data {
258− uint32_t reset_type;
259− uint32_t reset_cause;
260− uint32_t memory_lost;
261− uint32_t gpu_id;
258+ __u32 reset_type;
259+ __u32 reset_cause;
260+ __u32 memory_lost;
261+ __u32 gpu_id;
262262 };
263263
264264 /* Event data */
include/uapi/linux/netfilter/nf_tables.h+2−2
@@ -1635,8 +1635,8 @@ enum nft_ng_attributes { · 1634 unmodified lines
16351635 NFTA_NG_MODULUS,
16361636 NFTA_NG_TYPE,
16371637 NFTA_NG_OFFSET,
1638− NFTA_NG_SET_NAME,
1639− NFTA_NG_SET_ID,
1638+ NFTA_NG_SET_NAME, /* deprecated */
1639+ NFTA_NG_SET_ID, /* deprecated */
16401640 __NFTA_NG_MAX
16411641 };
16421642 #define NFTA_NG_MAX (__NFTA_NG_MAX - 1)
include/uapi/linux/netfilter_bridge.h+4−0
@@ -11,6 +11,10 @@ · 10 unmodified lines
1111 #include <linux/if_vlan.h>
1212 #include <linux/if_pppox.h>
1313
14+#ifndef __KERNEL__
15+#include <limits.h> /* for INT_MIN, INT_MAX */
16+#endif
17+
1418 /* Bridge Hooks */
1519 /* After promisc drops, checksum checks. */
1620 #define NF_BR_PRE_ROUTING 0
include/uapi/linux/perf_event.h+2−0
@@ -646,10 +646,12 @@ struct perf_event_mmap_page { · 645 unmodified lines
646646 *
647647 * PERF_RECORD_MISC_MMAP_DATA - PERF_RECORD_MMAP* events
648648 * PERF_RECORD_MISC_COMM_EXEC - PERF_RECORD_COMM event
649+ * PERF_RECORD_MISC_FORK_EXEC - PERF_RECORD_FORK event (perf internal)
649650 * PERF_RECORD_MISC_SWITCH_OUT - PERF_RECORD_SWITCH* events
650651 */
651652 #define PERF_RECORD_MISC_MMAP_DATA (1 << 13)
652653 #define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
654+#define PERF_RECORD_MISC_FORK_EXEC (1 << 13)
653655 #define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)
654656 /*
655657 * These PERF_RECORD_MISC_* flags below are safely reused
include/uapi/linux/prctl.h+1−0
@@ -212,6 +212,7 @@ struct prctl_mm_map { · 211 unmodified lines
212212 #define PR_SET_SPECULATION_CTRL 53
213213 /* Speculation control variants */
214214 # define PR_SPEC_STORE_BYPASS 0
215+# define PR_SPEC_INDIRECT_BRANCH 1
215216 /* Return and control values for PR_SET/GET_SPECULATION_CTRL */
216217 # define PR_SPEC_NOT_AFFECTED 0
217218 # define PR_SPEC_PRCTL (1UL << 0)
include/uapi/linux/sctp.h+3−0
@@ -568,6 +568,8 @@ struct sctp_assoc_reset_event { · 567 unmodified lines
568568
569569 #define SCTP_ASSOC_CHANGE_DENIED 0x0004
570570 #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
571573 struct sctp_stream_change_event {
572574 __u16 strchange_type;
573575 __u16 strchange_flags;
@@ -1151,6 +1153,7 @@ struct sctp_add_streams { · 577 unmodified lines
11511153 /* SCTP Stream schedulers */
11521154 enum sctp_sched_type {
11531155 SCTP_SS_FCFS,
1156+ SCTP_SS_DEFAULT = SCTP_SS_FCFS,
11541157 SCTP_SS_PRIO,
11551158 SCTP_SS_RR,
11561159 SCTP_SS_MAX = SCTP_SS_RR
include/uapi/linux/v4l2-controls.h+5−0
@@ -50,6 +50,8 @@ · 49 unmodified lines
5050 #ifndef __LINUX_V4L2_CONTROLS_H
5151 #define __LINUX_V4L2_CONTROLS_H
5252
53+#include <linux/types.h>
54+
5355 /* Control classes */
5456 #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
5557 #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
@@ -1110,6 +1112,7 @@ struct v4l2_mpeg2_sequence { · 1054 unmodified lines
11101112 __u8 profile_and_level_indication;
11111113 __u8 progressive_sequence;
11121114 __u8 chroma_format;
1115+ __u8 pad;
11131116 };
11141117
11151118 struct v4l2_mpeg2_picture {
@@ -1128,6 +1131,7 @@ struct v4l2_mpeg2_picture { · 12 unmodified lines
11281131 __u8 alternate_scan;
11291132 __u8 repeat_first_field;
11301133 __u8 progressive_frame;
1134+ __u8 pad;
11311135 };
11321136
11331137 struct v4l2_ctrl_mpeg2_slice_params {
@@ -1142,6 +1146,7 @@ struct v4l2_ctrl_mpeg2_slice_params { · 8 unmodified lines
11421146
11431147 __u8 backward_ref_index;
11441148 __u8 forward_ref_index;
1149+ __u8 pad;
11451150 };
11461151
11471152 struct v4l2_ctrl_mpeg2_quantization {
include/uapi/linux/virtio_balloon.h+8−0
@@ -34,15 +34,23 @@ · 33 unmodified lines
3434 #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
3535 #define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */
3636 #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 */
3739
3840 /* Size of a PFN in the balloon interface. */
3941 #define VIRTIO_BALLOON_PFN_SHIFT 12
4042
43+#define VIRTIO_BALLOON_CMD_ID_STOP 0
44+#define VIRTIO_BALLOON_CMD_ID_DONE 1
4145 struct virtio_balloon_config {
4246 /* Number of pages host wants Guest to give up. */
4347 __u32 num_pages;
4448 /* Number of pages we've actually got in balloon. */
4549 __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;
4654 };
4755
4856 #define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */