linux/net/xfrm/xfrm_compat.c

// SPDX-License-Identifier: GPL-2.0
/*
 * XFRM compat layer
 * Author: Dmitry Safonov <[email protected]>
 * Based on code and translator idea by: Florian Westphal <[email protected]>
 */
#include <linux/compat.h>
#include <linux/nospec.h>
#include <linux/xfrm.h>
#include <net/xfrm.h>

struct compat_xfrm_lifetime_cfg {}; /* same size on 32bit, but only 4 byte alignment required */

struct compat_xfrm_lifetime_cur {}; /* same size on 32bit, but only 4 byte alignment required */

struct compat_xfrm_userpolicy_info {};

struct compat_xfrm_usersa_info {};

struct compat_xfrm_user_acquire {};

struct compat_xfrm_userspi_info {};

struct compat_xfrm_user_expire {};

struct compat_xfrm_user_polexpire {};

#define XMSGSIZE(type)

static const int compat_msg_min[XFRM_NR_MSGTYPES] =;

static const struct nla_policy compat_policy[XFRMA_MAX+1] =;

static struct nlmsghdr *xfrm_nlmsg_put_compat(struct sk_buff *skb,
			const struct nlmsghdr *nlh_src, u16 type)
{}

static int xfrm_nla_cpy(struct sk_buff *dst, const struct nlattr *src, int len)
{}

static int xfrm_xlate64_attr(struct sk_buff *dst, const struct nlattr *src)
{}

/* Take kernel-built (64bit layout) and create 32bit layout for userspace */
static int xfrm_xlate64(struct sk_buff *dst, const struct nlmsghdr *nlh_src)
{}

static int xfrm_alloc_compat(struct sk_buff *skb, const struct nlmsghdr *nlh_src)
{}

/* Calculates len of translated 64-bit message. */
static size_t xfrm_user_rcv_calculate_len64(const struct nlmsghdr *src,
					    struct nlattr *attrs[XFRMA_MAX + 1],
					    int maxtype)
{}

static int xfrm_attr_cpy32(void *dst, size_t *pos, const struct nlattr *src,
			   size_t size, int copy_len, int payload)
{}

static int xfrm_xlate32_attr(void *dst, const struct nlattr *nla,
			     size_t *pos, size_t size,
			     struct netlink_ext_ack *extack)
{}

static int xfrm_xlate32(struct nlmsghdr *dst, const struct nlmsghdr *src,
			struct nlattr *attrs[XFRMA_MAX+1],
			size_t size, u8 type, int maxtype,
			struct netlink_ext_ack *extack)
{}

static struct nlmsghdr *xfrm_user_rcv_msg_compat(const struct nlmsghdr *h32,
			int maxtype, const struct nla_policy *policy,
			struct netlink_ext_ack *extack)
{}

static int xfrm_user_policy_compat(u8 **pdata32, int optlen)
{}

static struct xfrm_translator xfrm_translator =;

static int __init xfrm_compat_init(void)
{}

static void __exit xfrm_compat_exit(void)
{}

module_init();
module_exit(xfrm_compat_exit);
MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();