uapi: update kernel headers to 5.11 pre rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Stephen Hemminger 2020-12-24 19:38:35 -08:00
parent 2639bdc176
commit 2953235e61
7 changed files with 34 additions and 11 deletions

View File

@ -3822,6 +3822,14 @@ union bpf_attr {
* The **hash_algo** is returned on success, * The **hash_algo** is returned on success,
* **-EOPNOTSUP** if IMA is disabled or **-EINVAL** if * **-EOPNOTSUP** if IMA is disabled or **-EINVAL** if
* invalid arguments are passed. * 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) \ #define __BPF_FUNC_MAPPER(FN) \
FN(unspec), \ FN(unspec), \
@ -3986,6 +3994,7 @@ union bpf_attr {
FN(bprm_opts_set), \ FN(bprm_opts_set), \
FN(ktime_get_coarse_ns), \ FN(ktime_get_coarse_ns), \
FN(ima_inode_hash), \ FN(ima_inode_hash), \
FN(sock_from_file), \
/* */ /* */
/* integer value in 'imm' field of BPF_CALL instruction selects which helper /* integer value in 'imm' field of BPF_CALL instruction selects which helper

View File

@ -28,4 +28,9 @@
#define _BITUL(x) (_UL(1) << (x)) #define _BITUL(x) (_UL(1) << (x))
#define _BITULL(x) (_ULL(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 */ #endif /* _LINUX_CONST_H */

View File

@ -322,7 +322,7 @@ enum devlink_reload_limit {
DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1 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 { enum devlink_attr {
/* don't change the order or add anything between, this is ABI! */ /* don't change the order or add anything between, this is ABI! */

View File

@ -24,6 +24,22 @@ struct sockaddr_alg {
__u8 salg_name[64]; __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 { struct af_alg_iv {
__u32 ivlen; __u32 ivlen;
__u8 iv[0]; __u8 iv[0];

View File

@ -3,13 +3,6 @@
#define _LINUX_KERNEL_H #define _LINUX_KERNEL_H
#include <linux/sysinfo.h> #include <linux/sysinfo.h>
#include <linux/const.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))
#endif /* _LINUX_KERNEL_H */ #endif /* _LINUX_KERNEL_H */

View File

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _X_TABLES_H #ifndef _X_TABLES_H
#define _X_TABLES_H #define _X_TABLES_H
#include <linux/kernel.h> #include <linux/const.h>
#include <linux/types.h> #include <linux/types.h>
#define XT_FUNCTION_MAXNAMELEN 30 #define XT_FUNCTION_MAXNAMELEN 30

View File

@ -2,7 +2,7 @@
#ifndef __LINUX_NETLINK_H #ifndef __LINUX_NETLINK_H
#define __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/socket.h> /* for __kernel_sa_family_t */
#include <linux/types.h> #include <linux/types.h>