]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Update kernel headers
authorDavid Ahern <dsahern@kernel.org>
Wed, 7 Feb 2024 16:25:36 +0000 (16:25 +0000)
committerDavid Ahern <dsahern@kernel.org>
Wed, 7 Feb 2024 16:25:36 +0000 (16:25 +0000)
Update kernel headers to commit:
    1e8f1477aba5 ("Merge branch 'net-phy-c22-c45-enumeration'")

Signed-off-by: David Ahern <dsahern@kernel.org>
include/uapi/linux/bpf.h
include/uapi/linux/if_link.h
include/uapi/linux/virtio_config.h

index 0a2380a1139d460f08c40aaec6829006ad432879..dbf58b4171ddb33fcc875c75f5fe560d6e88c2a4 100644 (file)
@@ -847,6 +847,36 @@ union bpf_iter_link_info {
  *             Returns zero on success. On error, -1 is returned and *errno*
  *             is set appropriately.
  *
+ * BPF_TOKEN_CREATE
+ *     Description
+ *             Create BPF token with embedded information about what
+ *             BPF-related functionality it allows:
+ *             - a set of allowed bpf() syscall commands;
+ *             - a set of allowed BPF map types to be created with
+ *             BPF_MAP_CREATE command, if BPF_MAP_CREATE itself is allowed;
+ *             - a set of allowed BPF program types and BPF program attach
+ *             types to be loaded with BPF_PROG_LOAD command, if
+ *             BPF_PROG_LOAD itself is allowed.
+ *
+ *             BPF token is created (derived) from an instance of BPF FS,
+ *             assuming it has necessary delegation mount options specified.
+ *             This BPF token can be passed as an extra parameter to various
+ *             bpf() syscall commands to grant BPF subsystem functionality to
+ *             unprivileged processes.
+ *
+ *             When created, BPF token is "associated" with the owning
+ *             user namespace of BPF FS instance (super block) that it was
+ *             derived from, and subsequent BPF operations performed with
+ *             BPF token would be performing capabilities checks (i.e.,
+ *             CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN, CAP_SYS_ADMIN) within
+ *             that user namespace. Without BPF token, such capabilities
+ *             have to be granted in init user namespace, making bpf()
+ *             syscall incompatible with user namespace, for the most part.
+ *
+ *     Return
+ *             A new file descriptor (a nonnegative integer), or -1 if an
+ *             error occurred (in which case, *errno* is set appropriately).
+ *
  * NOTES
  *     eBPF objects (maps and programs) can be shared between processes.
  *
@@ -901,6 +931,8 @@ enum bpf_cmd {
        BPF_ITER_CREATE,
        BPF_LINK_DETACH,
        BPF_PROG_BIND_MAP,
+       BPF_TOKEN_CREATE,
+       __MAX_BPF_CMD,
 };
 
 enum bpf_map_type {
@@ -951,6 +983,7 @@ enum bpf_map_type {
        BPF_MAP_TYPE_BLOOM_FILTER,
        BPF_MAP_TYPE_USER_RINGBUF,
        BPF_MAP_TYPE_CGRP_STORAGE,
+       __MAX_BPF_MAP_TYPE
 };
 
 /* Note that tracing related programs such as
@@ -995,6 +1028,7 @@ enum bpf_prog_type {
        BPF_PROG_TYPE_SK_LOOKUP,
        BPF_PROG_TYPE_SYSCALL, /* a program that can execute syscalls */
        BPF_PROG_TYPE_NETFILTER,
+       __MAX_BPF_PROG_TYPE
 };
 
 enum bpf_attach_type {
@@ -1330,6 +1364,12 @@ enum {
 
 /* Get path from provided FD in BPF_OBJ_PIN/BPF_OBJ_GET commands */
        BPF_F_PATH_FD           = (1U << 14),
+
+/* Flag for value_type_btf_obj_fd, the fd is available */
+       BPF_F_VTYPE_BTF_OBJ_FD  = (1U << 15),
+
+/* BPF token FD is passed in a corresponding command's token_fd field */
+       BPF_F_TOKEN_FD          = (1U << 16),
 };
 
 /* Flags for BPF_PROG_QUERY. */
@@ -1403,6 +1443,15 @@ union bpf_attr {
                 * to using 5 hash functions).
                 */
                __u64   map_extra;
+
+               __s32   value_type_btf_obj_fd;  /* fd pointing to a BTF
+                                                * type data for
+                                                * btf_vmlinux_value_type_id.
+                                                */
+               /* BPF token FD to use with BPF_MAP_CREATE operation.
+                * If provided, map_flags should have BPF_F_TOKEN_FD flag set.
+                */
+               __s32   map_token_fd;
        };
 
        struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -1472,6 +1521,10 @@ union bpf_attr {
                 * truncated), or smaller (if log buffer wasn't filled completely).
                 */
                __u32           log_true_size;
+               /* BPF token FD to use with BPF_PROG_LOAD operation.
+                * If provided, prog_flags should have BPF_F_TOKEN_FD flag set.
+                */
+               __s32           prog_token_fd;
        };
 
        struct { /* anonymous struct used by BPF_OBJ_* commands */
@@ -1584,6 +1637,11 @@ union bpf_attr {
                 * truncated), or smaller (if log buffer wasn't filled completely).
                 */
                __u32           btf_log_true_size;
+               __u32           btf_flags;
+               /* BPF token FD to use with BPF_BTF_LOAD operation.
+                * If provided, btf_flags should have BPF_F_TOKEN_FD flag set.
+                */
+               __s32           btf_token_fd;
        };
 
        struct {
@@ -1714,6 +1772,11 @@ union bpf_attr {
                __u32           flags;          /* extra flags */
        } prog_bind_map;
 
+       struct { /* struct used by BPF_TOKEN_CREATE command */
+               __u32           flags;
+               __u32           bpffs_fd;
+       } token_create;
+
 } __attribute__((aligned(8)));
 
 /* The description below is an attempt at providing documentation to eBPF
@@ -4839,9 +4902,9 @@ union bpf_attr {
  *             going through the CPU's backlog queue.
  *
  *             The *flags* argument is reserved and must be 0. The helper is
- *             currently only supported for tc BPF program types at the ingress
- *             hook and for veth device types. The peer device must reside in a
- *             different network namespace.
+ *             currently only supported for tc BPF program types at the
+ *             ingress hook and for veth and netkit target device types. The
+ *             peer device must reside in a different network namespace.
  *     Return
  *             The helper returns **TC_ACT_REDIRECT** on success or
  *             **TC_ACT_SHOT** on error.
@@ -6487,7 +6550,7 @@ struct bpf_map_info {
        __u32 btf_id;
        __u32 btf_key_type_id;
        __u32 btf_value_type_id;
-       __u32 :32;      /* alignment pad */
+       __u32 btf_vmlinux_id;
        __u64 map_extra;
 } __attribute__((aligned(8)));
 
@@ -6563,6 +6626,7 @@ struct bpf_link_info {
                        __u32 count; /* in/out: kprobe_multi function count */
                        __u32 flags;
                        __u64 missed;
+                       __aligned_u64 cookies;
                } kprobe_multi;
                struct {
                        __aligned_u64 path;
@@ -6582,6 +6646,7 @@ struct bpf_link_info {
                                        __aligned_u64 file_name; /* in/out */
                                        __u32 name_len;
                                        __u32 offset; /* offset from file_name */
+                                       __u64 cookie;
                                } uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */
                                struct {
                                        __aligned_u64 func_name; /* in/out */
@@ -6589,14 +6654,19 @@ struct bpf_link_info {
                                        __u32 offset; /* offset from func_name */
                                        __u64 addr;
                                        __u64 missed;
+                                       __u64 cookie;
                                } kprobe; /* BPF_PERF_EVENT_KPROBE, BPF_PERF_EVENT_KRETPROBE */
                                struct {
                                        __aligned_u64 tp_name;   /* in/out */
                                        __u32 name_len;
+                                       __u32 :32;
+                                       __u64 cookie;
                                } tracepoint; /* BPF_PERF_EVENT_TRACEPOINT */
                                struct {
                                        __u64 config;
                                        __u32 type;
+                                       __u32 :32;
+                                       __u64 cookie;
                                } event; /* BPF_PERF_EVENT_EVENT */
                        };
                } perf_event;
index d17271fbfdb1072f8e4875cea8349ed5a38e8a43..ff4ceeafc452825263cf2ff8bbd3c1c08f57db0d 100644 (file)
@@ -1503,6 +1503,7 @@ enum {
        IFLA_BOND_AD_LACP_ACTIVE,
        IFLA_BOND_MISSED_MAX,
        IFLA_BOND_NS_IP6_TARGET,
+       IFLA_BOND_COUPLED_CONTROL,
        __IFLA_BOND_MAX,
 };
 
index 8c3f151d72b15311905488a90332181b6d69fba1..3bf80a8d447b8ee53adbb3952ec9632016318b8e 100644 (file)
@@ -52,7 +52,7 @@
  * rest are per-device feature bits.
  */
 #define VIRTIO_TRANSPORT_F_START       28
-#define VIRTIO_TRANSPORT_F_END         41
+#define VIRTIO_TRANSPORT_F_END         42
 
 #ifndef VIRTIO_CONFIG_NO_LEGACY
 /* Do we get callbacks when the ring is completely used, even if we've
  * This feature indicates that the driver can reset a queue individually.
  */
 #define VIRTIO_F_RING_RESET            40
+
+/*
+ * This feature indicates that the device support administration virtqueues.
+ */
+#define VIRTIO_F_ADMIN_VQ              41
+
 #endif /* _LINUX_VIRTIO_CONFIG_H */