#ifndef _LINUX_SOCKPTR_H
#define _LINUX_SOCKPTR_H
#include <linux/slab.h>
#include <linux/uaccess.h>
sockptr_t;
static inline bool sockptr_is_kernel(sockptr_t sockptr)
{ … }
static inline sockptr_t KERNEL_SOCKPTR(void *p)
{ … }
static inline sockptr_t USER_SOCKPTR(void __user *p)
{ … }
static inline bool sockptr_is_null(sockptr_t sockptr)
{ … }
static inline int copy_from_sockptr_offset(void *dst, sockptr_t src,
size_t offset, size_t size)
{ … }
static inline int copy_from_sockptr(void *dst, sockptr_t src, size_t size)
{ … }
static inline int copy_safe_from_sockptr(void *dst, size_t ksize,
sockptr_t optval, unsigned int optlen)
{ … }
static inline int copy_struct_from_sockptr(void *dst, size_t ksize,
sockptr_t src, size_t usize)
{ … }
static inline int copy_to_sockptr_offset(sockptr_t dst, size_t offset,
const void *src, size_t size)
{ … }
static inline int copy_to_sockptr(sockptr_t dst, const void *src, size_t size)
{ … }
static inline void *memdup_sockptr_noprof(sockptr_t src, size_t len)
{ … }
#define memdup_sockptr(...) …
static inline void *memdup_sockptr_nul_noprof(sockptr_t src, size_t len)
{ … }
#define memdup_sockptr_nul(...) …
static inline long strncpy_from_sockptr(char *dst, sockptr_t src, size_t count)
{ … }
static inline int check_zeroed_sockptr(sockptr_t src, size_t offset,
size_t size)
{ … }
#endif