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
110110 __u32 cgroup_fd;
111111 __u64 cgroup_id;
112112 } cgroup;
113+ /* Parameters of task iterators. */
114+ struct {
115+ __u32 tid;
116+ __u32 pid;
117+ __u32 pid_fd;
118+ } task;
113119 };
114120
115121 /* BPF syscall commands, see bpf(2) man-page for more details. */
@@ -928,6 +934,7 @@ enum bpf_map_type { · 812 unmodified lines
928934 BPF_MAP_TYPE_INODE_STORAGE,
929935 BPF_MAP_TYPE_TASK_STORAGE,
930936 BPF_MAP_TYPE_BLOOM_FILTER,
937+ BPF_MAP_TYPE_USER_RINGBUF,
931938 };
932939
933940 /* Note that tracing related programs such as
@@ -1252,7 +1259,7 @@ enum { · 318 unmodified lines
12521259
12531260 /* Query effective (directly attached + inherited from ancestor cgroups)
12541261 * 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.
12561263 */
12571264 #define BPF_F_QUERY_EFFECTIVE (1U << 0)
12581265
@@ -1451,7 +1458,10 @@ union bpf_attr { · 192 unmodified lines
14511458 __u32 attach_flags;
14521459 __aligned_u64 prog_ids;
14531460 __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;
14551465 } query;
14561466
14571467 struct { /* anonymous struct used by BPF_RAW_TRACEPOINT_OPEN command */
@@ -4950,6 +4960,7 @@ union bpf_attr { · 3492 unmodified lines
49504960 * Get address of the traced function (for tracing and kprobe programs).
49514961 * Return
49524962 * Address of the traced function.
4963+ * 0 for kprobes placed within the function (not at the entry).
49534964 *
49544965 * u64 bpf_get_attach_cookie(void *ctx)
49554966 * Description
@@ -5079,12 +5090,12 @@ union bpf_attr { · 123 unmodified lines
50795090 *
50805091 * long bpf_get_func_arg(void *ctx, u32 n, u64 *value)
50815092 * 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)
50835094 * returned in **value**.
50845095 *
50855096 * Return
50865097 * 0 on success.
5087− * **-EINVAL** if n >= arguments count of traced function.
5098+ * **-EINVAL** if n >= argument register count of traced function.
50885099 *
50895100 * long bpf_get_func_ret(void *ctx, u64 *value)
50905101 * Description
@@ -5097,10 +5108,11 @@ union bpf_attr { · 6 unmodified lines
50975108 *
50985109 * long bpf_get_func_arg_cnt(void *ctx)
50995110 * 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.
51015113 *
51025114 * Return
5103− * The number of arguments of the traced function.
5115+ * The number of argument registers of the traced function.
51045116 *
51055117 * int bpf_get_retval(void)
51065118 * Description
@@ -5386,6 +5398,43 @@ union bpf_attr { · 279 unmodified lines
53865398 * Return
53875399 * Current *ktime*.
53885400 *
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.
53895438 */
53905439 #define __BPF_FUNC_MAPPER(FN) \
53915440 FN(unspec), \
@@ -5597,6 +5646,7 @@ union bpf_attr { · 205 unmodified lines
55975646 FN(tcp_raw_check_syncookie_ipv4), \
55985647 FN(tcp_raw_check_syncookie_ipv6), \
55995648 FN(ktime_get_tai_ns), \
5649+ FN(user_ringbuf_drain), \
56005650 /* */
56015651
56025652 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -6218,6 +6268,10 @@ struct bpf_link_info { · 615 unmodified lines
62186268 __u64 cgroup_id;
62196269 __u32 order;
62206270 } cgroup;
6271+ struct {
6272+ __u32 tid;
6273+ __u32 pid;
6274+ } task;
62216275 };
62226276 } iter;
62236277 struct {
include/uapi/linux/dlm.h+0−1
@@ -69,7 +69,6 @@ struct dlm_lksb { · 68 unmodified lines
6969 /* dlm_new_lockspace() flags */
7070
7171 #define DLM_LSFL_TIMEWARN 0x00000002
72−#define DLM_LSFL_FS 0x00000004
7372 #define DLM_LSFL_NEWEXCL 0x00000008
7473
7574
include/uapi/linux/ethtool.h+45−0
@@ -736,6 +736,51 @@ enum ethtool_module_power_mode { · 735 unmodified lines
736736 ETHTOOL_MODULE_POWER_MODE_HIGH,
737737 };
738738
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+ */
747+enum 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+ */
774+enum 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+
739784 /**
740785 * struct ethtool_gstrings - string set for data tagging
741786 * @cmd: Command number = %ETHTOOL_GSTRINGS
include/uapi/linux/ethtool_netlink.h+16−0
@@ -49,6 +49,8 @@ enum { · 48 unmodified lines
4949 ETHTOOL_MSG_PHC_VCLOCKS_GET,
5050 ETHTOOL_MSG_MODULE_GET,
5151 ETHTOOL_MSG_MODULE_SET,
52+ ETHTOOL_MSG_PSE_GET,
53+ ETHTOOL_MSG_PSE_SET,
5254
5355 /* add new constants above here */
5456 __ETHTOOL_MSG_USER_CNT,
@@ -94,6 +96,7 @@ enum { · 39 unmodified lines
9496 ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY,
9597 ETHTOOL_MSG_MODULE_GET_REPLY,
9698 ETHTOOL_MSG_MODULE_NTF,
99+ ETHTOOL_MSG_PSE_GET_REPLY,
97100
98101 /* add new constants above here */
99102 __ETHTOOL_MSG_KERNEL_CNT,
@@ -863,6 +866,19 @@ enum { · 763 unmodified lines
863866 ETHTOOL_A_MODULE_MAX = (__ETHTOOL_A_MODULE_CNT - 1)
864867 };
865868
869+/* Power Sourcing Equipment */
870+enum {
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+
866882 /* generic netlink info */
867883 #define ETHTOOL_GENL_NAME "ethtool"
868884 #define ETHTOOL_GENL_VERSION 1
include/uapi/linux/if_link.h+1−0
@@ -695,6 +695,7 @@ enum { · 694 unmodified lines
695695 IFLA_XFRM_UNSPEC,
696696 IFLA_XFRM_LINK,
697697 IFLA_XFRM_IF_ID,
698+ IFLA_XFRM_COLLECT_METADATA,
698699 __IFLA_XFRM_MAX
699700 };
700701
include/uapi/linux/landlock.h+5−5
@@ -26,7 +26,7 @@ struct landlock_ruleset_attr { · 25 unmodified lines
2626 * Landlock filesystem access rights that are not part of
2727 * handled_access_fs are allowed. This is needed for backward
2828 * compatibility reasons. One exception is the
29− * LANDLOCK_ACCESS_FS_REFER access right, which is always implicitly
29+ * %LANDLOCK_ACCESS_FS_REFER access right, which is always implicitly
3030 * handled, but must still be explicitly handled to add new rules with
3131 * this access right.
3232 */
@@ -128,11 +128,11 @@ struct landlock_path_beneath_attr { · 95 unmodified lines
128128 * hierarchy must also always have the same or a superset of restrictions of
129129 * the source hierarchy. If it is not the case, or if the domain doesn't
130130 * handle this access right, such actions are denied by default with errno
131− * set to EXDEV. Linking also requires a LANDLOCK_ACCESS_FS_MAKE_* access
132− * right on the destination directory, and renaming also requires a
133− * LANDLOCK_ACCESS_FS_REMOVE_* access right on the source's (file or
131+ * set to ``EXDEV``. Linking also requires a ``LANDLOCK_ACCESS_FS_MAKE_*``
132+ * access right on the destination directory, and renaming also requires a
133+ * ``LANDLOCK_ACCESS_FS_REMOVE_*`` access right on the source's (file or
134134 * directory) parent. Otherwise, such actions are denied with errno set to
135− * EACCES. The EACCES errno prevails over EXDEV to let user space
135+ * ``EACCES``. The ``EACCES`` errno prevails over ``EXDEV`` to let user space
136136 * efficiently deal with an unrecoverable error.
137137 *
138138 * .. warning::
include/uapi/linux/lwtunnel.h+10−0
@@ -15,6 +15,7 @@ enum lwtunnel_encap_types { · 14 unmodified lines
1515 LWTUNNEL_ENCAP_SEG6_LOCAL,
1616 LWTUNNEL_ENCAP_RPL,
1717 LWTUNNEL_ENCAP_IOAM6,
18+ LWTUNNEL_ENCAP_XFRM,
1819 __LWTUNNEL_ENCAP_MAX,
1920 };
2021
@@ -111,4 +112,13 @@ enum { · 90 unmodified lines
111112
112113 #define LWT_BPF_MAX_HEADROOM 256
113114
115+enum {
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+
114124 #endif /* _UAPI_LWTUNNEL_H_ */
include/uapi/linux/stat.h+3−1
@@ -124,7 +124,8 @@ struct statx { · 123 unmodified lines
124124 __u32 stx_dev_minor;
125125 /* 0x90 */
126126 __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 */
128129 /* 0xa0 */
129130 __u64 __spare3[12]; /* Spare space for future expansion */
130131 /* 0x100 */
@@ -152,6 +153,7 @@ struct statx { · 21 unmodified lines
152153 #define STATX_BASIC_STATS 0x000007ffU /* The stuff in the normal stat struct */
153154 #define STATX_BTIME 0x00000800U /* Want/got stx_btime */
154155 #define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
156+#define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */
155157
156158 #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
157159