History

Merge remote-tracking branch 'wireless/main' into wireless-next

Pull in wireless/main content since some new code would otherwise conflict with it.

Johannes Berg committed 4 years ago

Commit dfd2d872 parents a790cc3 10d5ea51238 files · +50310 −13759Browse files

Showing the changes to include/uapi (8 of 1238 files). Show all

Unified · Split

8 files
  1. include/uapi/linux/bpf.h +60 −6
  2. include/uapi/linux/dlm.h +0 −1
  3. include/uapi/linux/ethtool.h +45 −0
  4. include/uapi/linux/ethtool_netlink.h +16 −0
  5. include/uapi/linux/if_link.h +1 −0
  6. include/uapi/linux/landlock.h +5 −5
  7. include/uapi/linux/lwtunnel.h +10 −0
  8. include/uapi/linux/stat.h +3 −1
include/uapi/linux/bpf.h+60−6
@@ -110,6 +110,12 @@ union bpf_iter_link_info { · 109 unmodified lines
110 __u32 cgroup_fd;110 __u32 cgroup_fd;
111 __u64 cgroup_id;111 __u64 cgroup_id;
112 } cgroup;112 } cgroup;
113 /* Parameters of task iterators. */
114 struct {
115 __u32 tid;
116 __u32 pid;
117 __u32 pid_fd;
118 } task;
113};119};
114 120
115/* BPF syscall commands, see bpf(2) man-page for more details. */121/* BPF syscall commands, see bpf(2) man-page for more details. */
@@ -928,6 +934,7 @@ enum bpf_map_type { · 812 unmodified lines
928 BPF_MAP_TYPE_INODE_STORAGE,934 BPF_MAP_TYPE_INODE_STORAGE,
929 BPF_MAP_TYPE_TASK_STORAGE,935 BPF_MAP_TYPE_TASK_STORAGE,
930 BPF_MAP_TYPE_BLOOM_FILTER,936 BPF_MAP_TYPE_BLOOM_FILTER,
937 BPF_MAP_TYPE_USER_RINGBUF,
931};938};
932 939
933/* Note that tracing related programs such as940/* Note that tracing related programs such as
@@ -1252,7 +1259,7 @@ enum { · 318 unmodified lines
1252 1259
1253/* Query effective (directly attached + inherited from ancestor cgroups)1260/* Query effective (directly attached + inherited from ancestor cgroups)
1254 * programs that will be executed for events within a cgroup.1261 * programs that will be executed for events within a cgroup.
1255 * attach_flags with this flag are returned only for directly attached programs.1262 * attach_flags with this flag are always returned 0.
1256 */1263 */
1257#define BPF_F_QUERY_EFFECTIVE (1U << 0)1264#define BPF_F_QUERY_EFFECTIVE (1U << 0)
1258 1265
@@ -1451,7 +1458,10 @@ union bpf_attr { · 192 unmodified lines
1451 __u32 attach_flags;1458 __u32 attach_flags;
1452 __aligned_u64 prog_ids;1459 __aligned_u64 prog_ids;
1453 __u32 prog_cnt;1460 __u32 prog_cnt;
1454 __aligned_u64 prog_attach_flags; /* output: per-program attach_flags */1461 /* output: per-program attach_flags.
1462 * not allowed to be set during effective query.
1463 */
1464 __aligned_u64 prog_attach_flags;
1455 } query;1465 } query;
1456 1466
1457 struct { /* anonymous struct used by BPF_RAW_TRACEPOINT_OPEN command */1467 struct { /* anonymous struct used by BPF_RAW_TRACEPOINT_OPEN command */
@@ -4950,6 +4960,7 @@ union bpf_attr { · 3492 unmodified lines
4950 * Get address of the traced function (for tracing and kprobe programs).4960 * Get address of the traced function (for tracing and kprobe programs).
4951 * Return4961 * Return
4952 * Address of the traced function.4962 * Address of the traced function.
4963 * 0 for kprobes placed within the function (not at the entry).
4953 *4964 *
4954 * u64 bpf_get_attach_cookie(void *ctx)4965 * u64 bpf_get_attach_cookie(void *ctx)
4955 * Description4966 * Description
@@ -5079,12 +5090,12 @@ union bpf_attr { · 123 unmodified lines
5079 *5090 *
5080 * long bpf_get_func_arg(void *ctx, u32 n, u64 *value)5091 * long bpf_get_func_arg(void *ctx, u32 n, u64 *value)
5081 * Description5092 * Description
5082 * Get **n**-th argument (zero based) of the traced function (for tracing programs)5093 * Get **n**-th argument register (zero based) of the traced function (for tracing programs)
5083 * returned in **value**.5094 * returned in **value**.
5084 *5095 *
5085 * Return5096 * Return
5086 * 0 on success.5097 * 0 on success.
5087 * **-EINVAL** if n >= arguments count of traced function.5098 * **-EINVAL** if n >= argument register count of traced function.
5088 *5099 *
5089 * long bpf_get_func_ret(void *ctx, u64 *value)5100 * long bpf_get_func_ret(void *ctx, u64 *value)
5090 * Description5101 * Description
@@ -5097,10 +5108,11 @@ union bpf_attr { · 6 unmodified lines
5097 *5108 *
5098 * long bpf_get_func_arg_cnt(void *ctx)5109 * long bpf_get_func_arg_cnt(void *ctx)
5099 * Description5110 * Description
5100 * Get number of arguments of the traced function (for tracing programs).5111 * Get number of registers of the traced function (for tracing programs) where
5112 * function arguments are stored in these registers.
5101 *5113 *
5102 * Return5114 * Return
5103 * The number of arguments of the traced function.5115 * The number of argument registers of the traced function.
5104 *5116 *
5105 * int bpf_get_retval(void)5117 * int bpf_get_retval(void)
5106 * Description5118 * Description
@@ -5386,6 +5398,43 @@ union bpf_attr { · 279 unmodified lines
5386 * Return5398 * Return
5387 * Current *ktime*.5399 * Current *ktime*.
5388 *5400 *
5401 * long bpf_user_ringbuf_drain(struct bpf_map *map, void *callback_fn, void *ctx, u64 flags)
5402 * Description
5403 * Drain samples from the specified user ring buffer, and invoke
5404 * the provided callback for each such sample:
5405 *
5406 * long (\*callback_fn)(struct bpf_dynptr \*dynptr, void \*ctx);
5407 *
5408 * If **callback_fn** returns 0, the helper will continue to try
5409 * and drain the next sample, up to a maximum of
5410 * BPF_MAX_USER_RINGBUF_SAMPLES samples. If the return value is 1,
5411 * the helper will skip the rest of the samples and return. Other
5412 * return values are not used now, and will be rejected by the
5413 * verifier.
5414 * Return
5415 * The number of drained samples if no error was encountered while
5416 * draining samples, or 0 if no samples were present in the ring
5417 * buffer. If a user-space producer was epoll-waiting on this map,
5418 * and at least one sample was drained, they will receive an event
5419 * notification notifying them of available space in the ring
5420 * buffer. If the BPF_RB_NO_WAKEUP flag is passed to this
5421 * function, no wakeup notification will be sent. If the
5422 * BPF_RB_FORCE_WAKEUP flag is passed, a wakeup notification will
5423 * be sent even if no sample was drained.
5424 *
5425 * On failure, the returned value is one of the following:
5426 *
5427 * **-EBUSY** if the ring buffer is contended, and another calling
5428 * context was concurrently draining the ring buffer.
5429 *
5430 * **-EINVAL** if user-space is not properly tracking the ring
5431 * buffer due to the producer position not being aligned to 8
5432 * bytes, a sample not being aligned to 8 bytes, or the producer
5433 * position not matching the advertised length of a sample.
5434 *
5435 * **-E2BIG** if user-space has tried to publish a sample which is
5436 * larger than the size of the ring buffer, or which cannot fit
5437 * within a struct bpf_dynptr.
5389 */5438 */
5390#define __BPF_FUNC_MAPPER(FN) \5439#define __BPF_FUNC_MAPPER(FN) \
5391 FN(unspec), \5440 FN(unspec), \
@@ -5597,6 +5646,7 @@ union bpf_attr { · 205 unmodified lines
5597 FN(tcp_raw_check_syncookie_ipv4), \5646 FN(tcp_raw_check_syncookie_ipv4), \
5598 FN(tcp_raw_check_syncookie_ipv6), \5647 FN(tcp_raw_check_syncookie_ipv6), \
5599 FN(ktime_get_tai_ns), \5648 FN(ktime_get_tai_ns), \
5649 FN(user_ringbuf_drain), \
5600 /* */5650 /* */
5601 5651
5602/* integer value in 'imm' field of BPF_CALL instruction selects which helper5652/* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -6218,6 +6268,10 @@ struct bpf_link_info { · 615 unmodified lines
6218 __u64 cgroup_id;6268 __u64 cgroup_id;
6219 __u32 order;6269 __u32 order;
6220 } cgroup;6270 } cgroup;
6271 struct {
6272 __u32 tid;
6273 __u32 pid;
6274 } task;
6221 };6275 };
6222 } iter;6276 } iter;
6223 struct {6277 struct {
include/uapi/linux/dlm.h+0−1
@@ -69,7 +69,6 @@ struct dlm_lksb { · 68 unmodified lines
69/* dlm_new_lockspace() flags */69/* dlm_new_lockspace() flags */
70 70
71#define DLM_LSFL_TIMEWARN 0x0000000271#define DLM_LSFL_TIMEWARN 0x00000002
72#define DLM_LSFL_FS 0x00000004
73#define DLM_LSFL_NEWEXCL 0x0000000872#define DLM_LSFL_NEWEXCL 0x00000008
74 73
75 74
include/uapi/linux/ethtool.h+45−0
@@ -736,6 +736,51 @@ enum ethtool_module_power_mode { · 735 unmodified lines
736 ETHTOOL_MODULE_POWER_MODE_HIGH,736 ETHTOOL_MODULE_POWER_MODE_HIGH,
737};737};
738 738
739/**
740 * enum ethtool_podl_pse_admin_state - operational state of the PoDL PSE
741 * functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState
742 * @ETHTOOL_PODL_PSE_ADMIN_STATE_UNKNOWN: state of PoDL PSE functions are
743 * unknown
744 * @ETHTOOL_PODL_PSE_ADMIN_STATE_DISABLED: PoDL PSE functions are disabled
745 * @ETHTOOL_PODL_PSE_ADMIN_STATE_ENABLED: PoDL PSE functions are enabled
746 */
747enum ethtool_podl_pse_admin_state {
748 ETHTOOL_PODL_PSE_ADMIN_STATE_UNKNOWN = 1,
749 ETHTOOL_PODL_PSE_ADMIN_STATE_DISABLED,
750 ETHTOOL_PODL_PSE_ADMIN_STATE_ENABLED,
751};
752
753/**
754 * enum ethtool_podl_pse_pw_d_status - power detection status of the PoDL PSE.
755 * IEEE 802.3-2018 30.15.1.1.3 aPoDLPSEPowerDetectionStatus:
756 * @ETHTOOL_PODL_PSE_PW_D_STATUS_UNKNOWN: PoDL PSE
757 * @ETHTOOL_PODL_PSE_PW_D_STATUS_DISABLED: "The enumeration “disabled” is
758 * asserted true when the PoDL PSE state diagram variable mr_pse_enable is
759 * false"
760 * @ETHTOOL_PODL_PSE_PW_D_STATUS_SEARCHING: "The enumeration “searching” is
761 * asserted true when either of the PSE state diagram variables
762 * pi_detecting or pi_classifying is true."
763 * @ETHTOOL_PODL_PSE_PW_D_STATUS_DELIVERING: "The enumeration “deliveringPower”
764 * is asserted true when the PoDL PSE state diagram variable pi_powered is
765 * true."
766 * @ETHTOOL_PODL_PSE_PW_D_STATUS_SLEEP: "The enumeration “sleep” is asserted
767 * true when the PoDL PSE state diagram variable pi_sleeping is true."
768 * @ETHTOOL_PODL_PSE_PW_D_STATUS_IDLE: "The enumeration “idle” is asserted true
769 * when the logical combination of the PoDL PSE state diagram variables
770 * pi_prebiased*!pi_sleeping is true."
771 * @ETHTOOL_PODL_PSE_PW_D_STATUS_ERROR: "The enumeration “error” is asserted
772 * true when the PoDL PSE state diagram variable overload_held is true."
773 */
774enum ethtool_podl_pse_pw_d_status {
775 ETHTOOL_PODL_PSE_PW_D_STATUS_UNKNOWN = 1,
776 ETHTOOL_PODL_PSE_PW_D_STATUS_DISABLED,
777 ETHTOOL_PODL_PSE_PW_D_STATUS_SEARCHING,
778 ETHTOOL_PODL_PSE_PW_D_STATUS_DELIVERING,
779 ETHTOOL_PODL_PSE_PW_D_STATUS_SLEEP,
780 ETHTOOL_PODL_PSE_PW_D_STATUS_IDLE,
781 ETHTOOL_PODL_PSE_PW_D_STATUS_ERROR,
782};
783
739/**784/**
740 * struct ethtool_gstrings - string set for data tagging785 * struct ethtool_gstrings - string set for data tagging
741 * @cmd: Command number = %ETHTOOL_GSTRINGS786 * @cmd: Command number = %ETHTOOL_GSTRINGS
include/uapi/linux/ethtool_netlink.h+16−0
@@ -49,6 +49,8 @@ enum { · 48 unmodified lines
49 ETHTOOL_MSG_PHC_VCLOCKS_GET,49 ETHTOOL_MSG_PHC_VCLOCKS_GET,
50 ETHTOOL_MSG_MODULE_GET,50 ETHTOOL_MSG_MODULE_GET,
51 ETHTOOL_MSG_MODULE_SET,51 ETHTOOL_MSG_MODULE_SET,
52 ETHTOOL_MSG_PSE_GET,
53 ETHTOOL_MSG_PSE_SET,
52 54
53 /* add new constants above here */55 /* add new constants above here */
54 __ETHTOOL_MSG_USER_CNT,56 __ETHTOOL_MSG_USER_CNT,
@@ -94,6 +96,7 @@ enum { · 39 unmodified lines
94 ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY,96 ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY,
95 ETHTOOL_MSG_MODULE_GET_REPLY,97 ETHTOOL_MSG_MODULE_GET_REPLY,
96 ETHTOOL_MSG_MODULE_NTF,98 ETHTOOL_MSG_MODULE_NTF,
99 ETHTOOL_MSG_PSE_GET_REPLY,
97 100
98 /* add new constants above here */101 /* add new constants above here */
99 __ETHTOOL_MSG_KERNEL_CNT,102 __ETHTOOL_MSG_KERNEL_CNT,
@@ -863,6 +866,19 @@ enum { · 763 unmodified lines
863 ETHTOOL_A_MODULE_MAX = (__ETHTOOL_A_MODULE_CNT - 1)866 ETHTOOL_A_MODULE_MAX = (__ETHTOOL_A_MODULE_CNT - 1)
864};867};
865 868
869/* Power Sourcing Equipment */
870enum {
871 ETHTOOL_A_PSE_UNSPEC,
872 ETHTOOL_A_PSE_HEADER, /* nest - _A_HEADER_* */
873 ETHTOOL_A_PODL_PSE_ADMIN_STATE, /* u32 */
874 ETHTOOL_A_PODL_PSE_ADMIN_CONTROL, /* u32 */
875 ETHTOOL_A_PODL_PSE_PW_D_STATUS, /* u32 */
876
877 /* add new constants above here */
878 __ETHTOOL_A_PSE_CNT,
879 ETHTOOL_A_PSE_MAX = (__ETHTOOL_A_PSE_CNT - 1)
880};
881
866/* generic netlink info */882/* generic netlink info */
867#define ETHTOOL_GENL_NAME "ethtool"883#define ETHTOOL_GENL_NAME "ethtool"
868#define ETHTOOL_GENL_VERSION 1884#define ETHTOOL_GENL_VERSION 1
include/uapi/linux/if_link.h+1−0
@@ -695,6 +695,7 @@ enum { · 694 unmodified lines
695 IFLA_XFRM_UNSPEC,695 IFLA_XFRM_UNSPEC,
696 IFLA_XFRM_LINK,696 IFLA_XFRM_LINK,
697 IFLA_XFRM_IF_ID,697 IFLA_XFRM_IF_ID,
698 IFLA_XFRM_COLLECT_METADATA,
698 __IFLA_XFRM_MAX699 __IFLA_XFRM_MAX
699};700};
700 701
include/uapi/linux/landlock.h+5−5
@@ -26,7 +26,7 @@ struct landlock_ruleset_attr { · 25 unmodified lines
26 * Landlock filesystem access rights that are not part of26 * Landlock filesystem access rights that are not part of
27 * handled_access_fs are allowed. This is needed for backward27 * handled_access_fs are allowed. This is needed for backward
28 * compatibility reasons. One exception is the28 * compatibility reasons. One exception is the
29 * LANDLOCK_ACCESS_FS_REFER access right, which is always implicitly29 * %LANDLOCK_ACCESS_FS_REFER access right, which is always implicitly
30 * handled, but must still be explicitly handled to add new rules with30 * handled, but must still be explicitly handled to add new rules with
31 * this access right.31 * this access right.
32 */32 */
@@ -128,11 +128,11 @@ struct landlock_path_beneath_attr { · 95 unmodified lines
128 * hierarchy must also always have the same or a superset of restrictions of128 * hierarchy must also always have the same or a superset of restrictions of
129 * the source hierarchy. If it is not the case, or if the domain doesn't129 * the source hierarchy. If it is not the case, or if the domain doesn't
130 * handle this access right, such actions are denied by default with errno130 * handle this access right, such actions are denied by default with errno
131 * set to EXDEV. Linking also requires a LANDLOCK_ACCESS_FS_MAKE_* access131 * set to ``EXDEV``. Linking also requires a ``LANDLOCK_ACCESS_FS_MAKE_*``
132 * right on the destination directory, and renaming also requires a132 * access right on the destination directory, and renaming also requires a
133 * LANDLOCK_ACCESS_FS_REMOVE_* access right on the source's (file or133 * ``LANDLOCK_ACCESS_FS_REMOVE_*`` access right on the source's (file or
134 * directory) parent. Otherwise, such actions are denied with errno set to134 * directory) parent. Otherwise, such actions are denied with errno set to
135 * EACCES. The EACCES errno prevails over EXDEV to let user space135 * ``EACCES``. The ``EACCES`` errno prevails over ``EXDEV`` to let user space
136 * efficiently deal with an unrecoverable error.136 * efficiently deal with an unrecoverable error.
137 *137 *
138 * .. warning::138 * .. warning::
include/uapi/linux/lwtunnel.h+10−0
@@ -15,6 +15,7 @@ enum lwtunnel_encap_types { · 14 unmodified lines
15 LWTUNNEL_ENCAP_SEG6_LOCAL,15 LWTUNNEL_ENCAP_SEG6_LOCAL,
16 LWTUNNEL_ENCAP_RPL,16 LWTUNNEL_ENCAP_RPL,
17 LWTUNNEL_ENCAP_IOAM6,17 LWTUNNEL_ENCAP_IOAM6,
18 LWTUNNEL_ENCAP_XFRM,
18 __LWTUNNEL_ENCAP_MAX,19 __LWTUNNEL_ENCAP_MAX,
19};20};
20 21
@@ -111,4 +112,13 @@ enum { · 90 unmodified lines
111 112
112#define LWT_BPF_MAX_HEADROOM 256113#define LWT_BPF_MAX_HEADROOM 256
113 114
115enum {
116 LWT_XFRM_UNSPEC,
117 LWT_XFRM_IF_ID,
118 LWT_XFRM_LINK,
119 __LWT_XFRM_MAX,
120};
121
122#define LWT_XFRM_MAX (__LWT_XFRM_MAX - 1)
123
114#endif /* _UAPI_LWTUNNEL_H_ */124#endif /* _UAPI_LWTUNNEL_H_ */
include/uapi/linux/stat.h+3−1
@@ -124,7 +124,8 @@ struct statx { · 123 unmodified lines
124 __u32 stx_dev_minor;124 __u32 stx_dev_minor;
125 /* 0x90 */125 /* 0x90 */
126 __u64 stx_mnt_id;126 __u64 stx_mnt_id;
127 __u64 __spare2;127 __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */
128 __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */
128 /* 0xa0 */129 /* 0xa0 */
129 __u64 __spare3[12]; /* Spare space for future expansion */130 __u64 __spare3[12]; /* Spare space for future expansion */
130 /* 0x100 */131 /* 0x100 */
@@ -152,6 +153,7 @@ struct statx { · 21 unmodified lines
152#define STATX_BASIC_STATS 0x000007ffU /* The stuff in the normal stat struct */153#define STATX_BASIC_STATS 0x000007ffU /* The stuff in the normal stat struct */
153#define STATX_BTIME 0x00000800U /* Want/got stx_btime */154#define STATX_BTIME 0x00000800U /* Want/got stx_btime */
154#define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */155#define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
156#define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */
155 157
156#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */158#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
157 159