]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
uapi: update kernel headers to 5.11 pre rc1
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 25 Dec 2020 03:38:35 +0000 (19:38 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 25 Dec 2020 03:38:35 +0000 (19:38 -0800)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/uapi/linux/bpf.h
include/uapi/linux/const.h
include/uapi/linux/devlink.h
include/uapi/linux/if_alg.h
include/uapi/linux/kernel.h
include/uapi/linux/netfilter/x_tables.h
include/uapi/linux/netlink.h

index 0981d0a3e7099283aeecb031c26808a252ece783..bd28bc76d810c8af5bf24ded8858bb066c5199c4 100644 (file)
@@ -3822,6 +3822,14 @@ union bpf_attr {
  *             The **hash_algo** is returned on success,
  *             **-EOPNOTSUP** if IMA is disabled or **-EINVAL** if
  *             invalid arguments are passed.
+ *
+ * struct socket *bpf_sock_from_file(struct file *file)
+ *     Description
+ *             If the given file represents a socket, returns the associated
+ *             socket.
+ *     Return
+ *             A pointer to a struct socket on success or NULL if the file is
+ *             not a socket.
  */
 #define __BPF_FUNC_MAPPER(FN)          \
        FN(unspec),                     \
@@ -3986,6 +3994,7 @@ union bpf_attr {
        FN(bprm_opts_set),              \
        FN(ktime_get_coarse_ns),        \
        FN(ima_inode_hash),             \
+       FN(sock_from_file),             \
        /* */
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
index fd885c79b75b921ead1868d815d67170f85a4a86..5e489872516827f195db45746660b9ed7d1f4870 100644 (file)
@@ -28,4 +28,9 @@
 #define _BITUL(x)      (_UL(1) << (x))
 #define _BITULL(x)     (_ULL(1) << (x))
 
+#define __ALIGN_KERNEL(x, a)           __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
+#define __ALIGN_KERNEL_MASK(x, mask)   (((x) + (mask)) & ~(mask))
+
+#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
+
 #endif /* _LINUX_CONST_H */
index 1414aceeeab2e5aa48180505281cd390f4e6a2d3..958ef7b949c6c571ba823d80e4b9c6b1f12b76a5 100644 (file)
@@ -322,7 +322,7 @@ enum devlink_reload_limit {
        DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1
 };
 
-#define DEVLINK_RELOAD_LIMITS_VALID_MASK (BIT(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
+#define DEVLINK_RELOAD_LIMITS_VALID_MASK (_BITUL(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
 
 enum devlink_attr {
        /* don't change the order or add anything between, this is ABI! */
index 60b7c2efd921c1144e5aba9d9acec137aced2a29..dc52a11ba6d1585d44cb2351ff7268299885ba81 100644 (file)
@@ -24,6 +24,22 @@ struct sockaddr_alg {
        __u8    salg_name[64];
 };
 
+/*
+ * Linux v4.12 and later removed the 64-byte limit on salg_name[]; it's now an
+ * arbitrary-length field.  We had to keep the original struct above for source
+ * compatibility with existing userspace programs, though.  Use the new struct
+ * below if support for very long algorithm names is needed.  To do this,
+ * allocate 'sizeof(struct sockaddr_alg_new) + strlen(algname) + 1' bytes, and
+ * copy algname (including the null terminator) into salg_name.
+ */
+struct sockaddr_alg_new {
+       __u16   salg_family;
+       __u8    salg_type[14];
+       __u32   salg_feat;
+       __u32   salg_mask;
+       __u8    salg_name[];
+};
+
 struct af_alg_iv {
        __u32   ivlen;
        __u8    iv[0];
index d99ffa1a0abdb3a22d59bf8fcd16b2584e4da7a5..5413a8c50bfe44b727d2d578162debb4251d9da0 100644 (file)
@@ -3,13 +3,6 @@
 #define _LINUX_KERNEL_H
 
 #include <linux/sysinfo.h>
-
-/*
- * 'kernel.h' contains some often-used function prototypes etc
- */
-#define __ALIGN_KERNEL(x, a)           __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
-#define __ALIGN_KERNEL_MASK(x, mask)   (((x) + (mask)) & ~(mask))
-
-#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
+#include <linux/const.h>
 
 #endif /* _LINUX_KERNEL_H */
index ae2fd12799399b065a7927a605968d196219dfb0..89ee50d6cf7a5677f51aaef52b9ddd8fe36808ca 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _X_TABLES_H
 #define _X_TABLES_H
-#include <linux/kernel.h>
+#include <linux/const.h>
 #include <linux/types.h>
 
 #define XT_FUNCTION_MAXNAMELEN 30
index dfef006be9f91f397e7ab25a6fc7b4de94f39530..5024c5435749a41dc17334f8ad86b7ecc17dbf71 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef __LINUX_NETLINK_H
 #define __LINUX_NETLINK_H
 
-#include <linux/kernel.h>
+#include <linux/const.h>
 #include <linux/socket.h> /* for __kernel_sa_family_t */
 #include <linux/types.h>