mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 00:59:55 -04:00
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
Simple overlapping changes in stmmac driver. Adjust skb_gro_flush_final_remcsum function signature to make GRO list changes in net-next, as per Stephen Rothwell's example merge resolution. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -245,7 +245,8 @@ ssize_t af_alg_sendpage(struct socket *sock, struct page *page,
|
||||
int offset, size_t size, int flags);
|
||||
void af_alg_free_resources(struct af_alg_async_req *areq);
|
||||
void af_alg_async_cb(struct crypto_async_request *_req, int err);
|
||||
__poll_t af_alg_poll_mask(struct socket *sock, __poll_t events);
|
||||
__poll_t af_alg_poll(struct file *file, struct socket *sock,
|
||||
poll_table *wait);
|
||||
struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk,
|
||||
unsigned int areqlen);
|
||||
int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
|
||||
|
||||
@@ -443,6 +443,9 @@ int acpi_check_resource_conflict(const struct resource *res);
|
||||
int acpi_check_region(resource_size_t start, resource_size_t n,
|
||||
const char *name);
|
||||
|
||||
acpi_status acpi_release_memory(acpi_handle handle, struct resource *res,
|
||||
u32 level);
|
||||
|
||||
int acpi_resources_are_enforced(void);
|
||||
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
|
||||
@@ -1119,8 +1119,8 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q,
|
||||
if (!q->limits.chunk_sectors)
|
||||
return q->limits.max_sectors;
|
||||
|
||||
return q->limits.chunk_sectors -
|
||||
(offset & (q->limits.chunk_sectors - 1));
|
||||
return min(q->limits.max_sectors, (unsigned int)(q->limits.chunk_sectors -
|
||||
(offset & (q->limits.chunk_sectors - 1))));
|
||||
}
|
||||
|
||||
static inline unsigned int blk_rq_get_max_sectors(struct request *rq,
|
||||
|
||||
@@ -188,12 +188,38 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor,
|
||||
\
|
||||
__ret; \
|
||||
})
|
||||
int cgroup_bpf_prog_attach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype, struct bpf_prog *prog);
|
||||
int cgroup_bpf_prog_detach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype);
|
||||
int cgroup_bpf_prog_query(const union bpf_attr *attr,
|
||||
union bpf_attr __user *uattr);
|
||||
#else
|
||||
|
||||
struct bpf_prog;
|
||||
struct cgroup_bpf {};
|
||||
static inline void cgroup_bpf_put(struct cgroup *cgrp) {}
|
||||
static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
|
||||
|
||||
static inline int cgroup_bpf_prog_attach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype,
|
||||
struct bpf_prog *prog)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int cgroup_bpf_prog_detach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int cgroup_bpf_prog_query(const union bpf_attr *attr,
|
||||
union bpf_attr __user *uattr)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#define cgroup_bpf_enabled (0)
|
||||
#define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0)
|
||||
#define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; })
|
||||
|
||||
@@ -696,6 +696,8 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map)
|
||||
struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key);
|
||||
struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key);
|
||||
int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type);
|
||||
int sockmap_get_from_fd(const union bpf_attr *attr, int type,
|
||||
struct bpf_prog *prog);
|
||||
#else
|
||||
static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key)
|
||||
{
|
||||
@@ -714,6 +716,12 @@ static inline int sock_map_prog(struct bpf_map *map,
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int sockmap_get_from_fd(const union bpf_attr *attr, int type,
|
||||
struct bpf_prog *prog)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_XDP_SOCKETS)
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
#include <uapi/linux/bpf.h>
|
||||
|
||||
#ifdef CONFIG_BPF_LIRC_MODE2
|
||||
int lirc_prog_attach(const union bpf_attr *attr);
|
||||
int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
|
||||
int lirc_prog_detach(const union bpf_attr *attr);
|
||||
int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr);
|
||||
#else
|
||||
static inline int lirc_prog_attach(const union bpf_attr *attr)
|
||||
static inline int lirc_prog_attach(const union bpf_attr *attr,
|
||||
struct bpf_prog *prog)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,9 @@
|
||||
*/
|
||||
#ifndef COMPAT_SYSCALL_DEFINEx
|
||||
#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
|
||||
__diag_push(); \
|
||||
__diag_ignore(GCC, 8, "-Wattribute-alias", \
|
||||
"Type aliasing is used to sanitize syscall arguments");\
|
||||
asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
|
||||
asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
|
||||
__attribute__((alias(__stringify(__se_compat_sys##name)))); \
|
||||
@@ -80,8 +83,11 @@
|
||||
asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
|
||||
asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
|
||||
{ \
|
||||
return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
|
||||
long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
|
||||
__MAP(x,__SC_TEST,__VA_ARGS__); \
|
||||
return ret; \
|
||||
} \
|
||||
__diag_pop(); \
|
||||
static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
||||
#endif /* COMPAT_SYSCALL_DEFINEx */
|
||||
|
||||
|
||||
@@ -347,3 +347,28 @@
|
||||
#if GCC_VERSION >= 50100
|
||||
#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Turn individual warnings and errors on and off locally, depending
|
||||
* on version.
|
||||
*/
|
||||
#define __diag_GCC(version, severity, s) \
|
||||
__diag_GCC_ ## version(__diag_GCC_ ## severity s)
|
||||
|
||||
/* Severity used in pragma directives */
|
||||
#define __diag_GCC_ignore ignored
|
||||
#define __diag_GCC_warn warning
|
||||
#define __diag_GCC_error error
|
||||
|
||||
/* Compilers before gcc-4.6 do not understand "#pragma GCC diagnostic push" */
|
||||
#if GCC_VERSION >= 40600
|
||||
#define __diag_str1(s) #s
|
||||
#define __diag_str(s) __diag_str1(s)
|
||||
#define __diag(s) _Pragma(__diag_str(GCC diagnostic s))
|
||||
#endif
|
||||
|
||||
#if GCC_VERSION >= 80000
|
||||
#define __diag_GCC_8(s) __diag(s)
|
||||
#else
|
||||
#define __diag_GCC_8(s)
|
||||
#endif
|
||||
|
||||
@@ -271,4 +271,22 @@ struct ftrace_likely_data {
|
||||
# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
|
||||
#endif
|
||||
|
||||
#ifndef __diag
|
||||
#define __diag(string)
|
||||
#endif
|
||||
|
||||
#ifndef __diag_GCC
|
||||
#define __diag_GCC(version, severity, string)
|
||||
#endif
|
||||
|
||||
#define __diag_push() __diag(push)
|
||||
#define __diag_pop() __diag(pop)
|
||||
|
||||
#define __diag_ignore(compiler, version, option, comment) \
|
||||
__diag_ ## compiler(version, ignore, option)
|
||||
#define __diag_warn(compiler, version, option, comment) \
|
||||
__diag_ ## compiler(version, warn, option)
|
||||
#define __diag_error(compiler, version, option, comment) \
|
||||
__diag_ ## compiler(version, error, option)
|
||||
|
||||
#endif /* __LINUX_COMPILER_TYPES_H */
|
||||
|
||||
@@ -135,7 +135,7 @@ void dax_flush(struct dax_device *dax_dev, void *addr, size_t size);
|
||||
|
||||
ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
|
||||
const struct iomap_ops *ops);
|
||||
int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size,
|
||||
vm_fault_t dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size,
|
||||
pfn_t *pfnp, int *errp, const struct iomap_ops *ops);
|
||||
vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf,
|
||||
enum page_entry_size pe_size, pfn_t pfn);
|
||||
|
||||
@@ -470,9 +470,7 @@ struct sock_fprog_kern {
|
||||
};
|
||||
|
||||
struct bpf_binary_header {
|
||||
u16 pages;
|
||||
u16 locked:1;
|
||||
|
||||
u32 pages;
|
||||
/* Some arches need word alignment for their instructions */
|
||||
u8 image[] __aligned(4);
|
||||
};
|
||||
@@ -481,7 +479,7 @@ struct bpf_prog {
|
||||
u16 pages; /* Number of allocated pages */
|
||||
u16 jited:1, /* Is our filter JIT'ed? */
|
||||
jit_requested:1,/* archs need to JIT the prog */
|
||||
locked:1, /* Program image locked? */
|
||||
undo_set_mem:1, /* Passed set_memory_ro() checkpoint */
|
||||
gpl_compatible:1, /* Is filter GPL compatible? */
|
||||
cb_access:1, /* Is control block accessed? */
|
||||
dst_needed:1, /* Do we need dst entry? */
|
||||
@@ -677,46 +675,24 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default)
|
||||
|
||||
static inline void bpf_prog_lock_ro(struct bpf_prog *fp)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
fp->locked = 1;
|
||||
if (set_memory_ro((unsigned long)fp, fp->pages))
|
||||
fp->locked = 0;
|
||||
#endif
|
||||
fp->undo_set_mem = 1;
|
||||
set_memory_ro((unsigned long)fp, fp->pages);
|
||||
}
|
||||
|
||||
static inline void bpf_prog_unlock_ro(struct bpf_prog *fp)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
if (fp->locked) {
|
||||
WARN_ON_ONCE(set_memory_rw((unsigned long)fp, fp->pages));
|
||||
/* In case set_memory_rw() fails, we want to be the first
|
||||
* to crash here instead of some random place later on.
|
||||
*/
|
||||
fp->locked = 0;
|
||||
}
|
||||
#endif
|
||||
if (fp->undo_set_mem)
|
||||
set_memory_rw((unsigned long)fp, fp->pages);
|
||||
}
|
||||
|
||||
static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
hdr->locked = 1;
|
||||
if (set_memory_ro((unsigned long)hdr, hdr->pages))
|
||||
hdr->locked = 0;
|
||||
#endif
|
||||
set_memory_ro((unsigned long)hdr, hdr->pages);
|
||||
}
|
||||
|
||||
static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
if (hdr->locked) {
|
||||
WARN_ON_ONCE(set_memory_rw((unsigned long)hdr, hdr->pages));
|
||||
/* In case set_memory_rw() fails, we want to be the first
|
||||
* to crash here instead of some random place later on.
|
||||
*/
|
||||
hdr->locked = 0;
|
||||
}
|
||||
#endif
|
||||
set_memory_rw((unsigned long)hdr, hdr->pages);
|
||||
}
|
||||
|
||||
static inline struct bpf_binary_header *
|
||||
@@ -728,22 +704,6 @@ bpf_jit_binary_hdr(const struct bpf_prog *fp)
|
||||
return (void *)addr;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_HAS_SET_MEMORY
|
||||
static inline int bpf_prog_check_pages_ro_single(const struct bpf_prog *fp)
|
||||
{
|
||||
if (!fp->locked)
|
||||
return -ENOLCK;
|
||||
if (fp->jited) {
|
||||
const struct bpf_binary_header *hdr = bpf_jit_binary_hdr(fp);
|
||||
|
||||
if (!hdr->locked)
|
||||
return -ENOLCK;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap);
|
||||
static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
|
||||
@@ -1720,8 +1720,6 @@ struct file_operations {
|
||||
int (*iterate) (struct file *, struct dir_context *);
|
||||
int (*iterate_shared) (struct file *, struct dir_context *);
|
||||
__poll_t (*poll) (struct file *, struct poll_table_struct *);
|
||||
struct wait_queue_head * (*get_poll_head)(struct file *, __poll_t);
|
||||
__poll_t (*poll_mask) (struct file *, __poll_t);
|
||||
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
|
||||
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
|
||||
int (*mmap) (struct file *, struct vm_area_struct *);
|
||||
|
||||
@@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n,
|
||||
char __user *user_buffer);
|
||||
size_t iio_dma_buffer_data_available(struct iio_buffer *buffer);
|
||||
int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd);
|
||||
int iio_dma_buffer_set_length(struct iio_buffer *buffer, int length);
|
||||
int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length);
|
||||
int iio_dma_buffer_request_update(struct iio_buffer *buffer);
|
||||
|
||||
int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,
|
||||
|
||||
@@ -100,7 +100,7 @@ static inline bool input_is_mt_axis(int axis)
|
||||
return axis == ABS_MT_SLOT || input_is_mt_value(axis);
|
||||
}
|
||||
|
||||
void input_mt_report_slot_state(struct input_dev *dev,
|
||||
bool input_mt_report_slot_state(struct input_dev *dev,
|
||||
unsigned int tool_type, bool active);
|
||||
|
||||
void input_mt_report_finger_count(struct input_dev *dev, int count);
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <linux/mlx5/driver.h>
|
||||
|
||||
#define MLX5_ESWITCH_MANAGER(mdev) MLX5_CAP_GEN(mdev, eswitch_manager)
|
||||
|
||||
enum {
|
||||
SRIOV_NONE,
|
||||
SRIOV_LEGACY,
|
||||
|
||||
@@ -922,7 +922,7 @@ struct mlx5_ifc_cmd_hca_cap_bits {
|
||||
u8 vnic_env_queue_counters[0x1];
|
||||
u8 ets[0x1];
|
||||
u8 nic_flow_table[0x1];
|
||||
u8 eswitch_flow_table[0x1];
|
||||
u8 eswitch_manager[0x1];
|
||||
u8 device_memory[0x1];
|
||||
u8 mcam_reg[0x1];
|
||||
u8 pcam_reg[0x1];
|
||||
|
||||
@@ -147,7 +147,6 @@ struct proto_ops {
|
||||
int (*getname) (struct socket *sock,
|
||||
struct sockaddr *addr,
|
||||
int peer);
|
||||
__poll_t (*poll_mask) (struct socket *sock, __poll_t events);
|
||||
__poll_t (*poll) (struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
int (*ioctl) (struct socket *sock, unsigned int cmd,
|
||||
|
||||
@@ -2796,11 +2796,31 @@ static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff *pp,
|
||||
if (PTR_ERR(pp) != -EINPROGRESS)
|
||||
NAPI_GRO_CB(skb)->flush |= flush;
|
||||
}
|
||||
static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb,
|
||||
struct sk_buff *pp,
|
||||
int flush,
|
||||
struct gro_remcsum *grc)
|
||||
{
|
||||
if (PTR_ERR(pp) != -EINPROGRESS) {
|
||||
NAPI_GRO_CB(skb)->flush |= flush;
|
||||
skb_gro_remcsum_cleanup(skb, grc);
|
||||
skb->remcsum_offload = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff *pp, int flush)
|
||||
{
|
||||
NAPI_GRO_CB(skb)->flush |= flush;
|
||||
}
|
||||
static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb,
|
||||
struct sk_buff *pp,
|
||||
int flush,
|
||||
struct gro_remcsum *grc)
|
||||
{
|
||||
NAPI_GRO_CB(skb)->flush |= flush;
|
||||
skb_gro_remcsum_cleanup(skb, grc);
|
||||
skb->remcsum_offload = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
@@ -234,7 +234,7 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
|
||||
int of_genpd_parse_idle_states(struct device_node *dn,
|
||||
struct genpd_power_state **states, int *n);
|
||||
unsigned int of_genpd_opp_to_performance_state(struct device *dev,
|
||||
struct device_node *opp_node);
|
||||
struct device_node *np);
|
||||
|
||||
int genpd_dev_pm_attach(struct device *dev);
|
||||
struct device *genpd_dev_pm_attach_by_id(struct device *dev,
|
||||
@@ -274,9 +274,9 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn,
|
||||
|
||||
static inline unsigned int
|
||||
of_genpd_opp_to_performance_state(struct device *dev,
|
||||
struct device_node *opp_node)
|
||||
struct device_node *np)
|
||||
{
|
||||
return -ENODEV;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int genpd_dev_pm_attach(struct device *dev)
|
||||
|
||||
@@ -74,17 +74,17 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
|
||||
pt->_key = ~(__poll_t)0; /* all events enabled */
|
||||
}
|
||||
|
||||
static inline bool file_has_poll_mask(struct file *file)
|
||||
{
|
||||
return file->f_op->get_poll_head && file->f_op->poll_mask;
|
||||
}
|
||||
|
||||
static inline bool file_can_poll(struct file *file)
|
||||
{
|
||||
return file->f_op->poll || file_has_poll_mask(file);
|
||||
return file->f_op->poll;
|
||||
}
|
||||
|
||||
__poll_t vfs_poll(struct file *file, struct poll_table_struct *pt);
|
||||
static inline __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt)
|
||||
{
|
||||
if (unlikely(!file->f_op->poll))
|
||||
return DEFAULT_POLLMASK;
|
||||
return file->f_op->poll(file, pt);
|
||||
}
|
||||
|
||||
struct poll_table_entry {
|
||||
struct file *filp;
|
||||
|
||||
@@ -354,6 +354,8 @@ struct rmi_driver_data {
|
||||
struct mutex irq_mutex;
|
||||
struct input_dev *input;
|
||||
|
||||
struct irq_domain *irqdomain;
|
||||
|
||||
u8 pdt_props;
|
||||
|
||||
u8 num_rx_electrodes;
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
#include <asm/io.h>
|
||||
|
||||
struct scatterlist {
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
unsigned long sg_magic;
|
||||
#endif
|
||||
unsigned long page_link;
|
||||
unsigned int offset;
|
||||
unsigned int length;
|
||||
@@ -64,7 +61,6 @@ struct sg_table {
|
||||
*
|
||||
*/
|
||||
|
||||
#define SG_MAGIC 0x87654321
|
||||
#define SG_CHAIN 0x01UL
|
||||
#define SG_END 0x02UL
|
||||
|
||||
@@ -98,7 +94,6 @@ static inline void sg_assign_page(struct scatterlist *sg, struct page *page)
|
||||
*/
|
||||
BUG_ON((unsigned long) page & (SG_CHAIN | SG_END));
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
BUG_ON(sg->sg_magic != SG_MAGIC);
|
||||
BUG_ON(sg_is_chain(sg));
|
||||
#endif
|
||||
sg->page_link = page_link | (unsigned long) page;
|
||||
@@ -129,7 +124,6 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page,
|
||||
static inline struct page *sg_page(struct scatterlist *sg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
BUG_ON(sg->sg_magic != SG_MAGIC);
|
||||
BUG_ON(sg_is_chain(sg));
|
||||
#endif
|
||||
return (struct page *)((sg)->page_link & ~(SG_CHAIN | SG_END));
|
||||
@@ -195,9 +189,6 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
|
||||
**/
|
||||
static inline void sg_mark_end(struct scatterlist *sg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
BUG_ON(sg->sg_magic != SG_MAGIC);
|
||||
#endif
|
||||
/*
|
||||
* Set termination bit, clear potential chain bit
|
||||
*/
|
||||
@@ -215,9 +206,6 @@ static inline void sg_mark_end(struct scatterlist *sg)
|
||||
**/
|
||||
static inline void sg_unmark_end(struct scatterlist *sg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
BUG_ON(sg->sg_magic != SG_MAGIC);
|
||||
#endif
|
||||
sg->page_link &= ~SG_END;
|
||||
}
|
||||
|
||||
@@ -260,12 +248,6 @@ static inline void *sg_virt(struct scatterlist *sg)
|
||||
static inline void sg_init_marker(struct scatterlist *sgl,
|
||||
unsigned int nents)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_SG
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < nents; i++)
|
||||
sgl[i].sg_magic = SG_MAGIC;
|
||||
#endif
|
||||
sg_mark_end(&sgl[nents - 1]);
|
||||
}
|
||||
|
||||
|
||||
@@ -3253,7 +3253,8 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
|
||||
int *peeked, int *off, int *err);
|
||||
struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
|
||||
int *err);
|
||||
__poll_t datagram_poll_mask(struct socket *sock, __poll_t events);
|
||||
__poll_t datagram_poll(struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
int skb_copy_datagram_iter(const struct sk_buff *from, int offset,
|
||||
struct iov_iter *to, int size);
|
||||
static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset,
|
||||
|
||||
@@ -155,8 +155,12 @@ struct kmem_cache {
|
||||
|
||||
#ifdef CONFIG_SYSFS
|
||||
#define SLAB_SUPPORTS_SYSFS
|
||||
void sysfs_slab_unlink(struct kmem_cache *);
|
||||
void sysfs_slab_release(struct kmem_cache *);
|
||||
#else
|
||||
static inline void sysfs_slab_unlink(struct kmem_cache *s)
|
||||
{
|
||||
}
|
||||
static inline void sysfs_slab_release(struct kmem_cache *s)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -231,6 +231,9 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
|
||||
*/
|
||||
#ifndef __SYSCALL_DEFINEx
|
||||
#define __SYSCALL_DEFINEx(x, name, ...) \
|
||||
__diag_push(); \
|
||||
__diag_ignore(GCC, 8, "-Wattribute-alias", \
|
||||
"Type aliasing is used to sanitize syscall arguments");\
|
||||
asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
|
||||
__attribute__((alias(__stringify(__se_sys##name)))); \
|
||||
ALLOW_ERROR_INJECTION(sys##name, ERRNO); \
|
||||
@@ -243,6 +246,7 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
|
||||
__PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
|
||||
return ret; \
|
||||
} \
|
||||
__diag_pop(); \
|
||||
static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
||||
#endif /* __SYSCALL_DEFINEx */
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
|
||||
int flags);
|
||||
int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
size_t len, int flags);
|
||||
__poll_t bt_sock_poll_mask(struct socket *sock, __poll_t events);
|
||||
__poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait);
|
||||
int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
|
||||
int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo);
|
||||
int bt_sock_wait_ready(struct sock *sk, unsigned long flags);
|
||||
|
||||
@@ -153,6 +153,8 @@ struct iucv_sock_list {
|
||||
atomic_t autobind_name;
|
||||
};
|
||||
|
||||
__poll_t iucv_sock_poll(struct file *file, struct socket *sock,
|
||||
poll_table *wait);
|
||||
void iucv_sock_link(struct iucv_sock_list *l, struct sock *s);
|
||||
void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s);
|
||||
void iucv_accept_enqueue(struct sock *parent, struct sock *sk);
|
||||
|
||||
@@ -128,6 +128,7 @@ struct net {
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
|
||||
struct netns_nf_frag nf_frag;
|
||||
struct ctl_table_header *nf_frag_frags_hdr;
|
||||
#endif
|
||||
struct sock *nfnl;
|
||||
struct sock *nfnl_stash;
|
||||
|
||||
@@ -109,7 +109,6 @@ struct netns_ipv6 {
|
||||
|
||||
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
|
||||
struct netns_nf_frag {
|
||||
struct netns_sysctl_ipv6 sysctl;
|
||||
struct netns_frags frags;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -113,6 +113,11 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q,
|
||||
{
|
||||
}
|
||||
|
||||
static inline bool tcf_block_shared(struct tcf_block *block)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline struct Qdisc *tcf_block_q(struct tcf_block *block)
|
||||
{
|
||||
return NULL;
|
||||
|
||||
@@ -109,7 +109,8 @@ int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
|
||||
int sctp_inet_listen(struct socket *sock, int backlog);
|
||||
void sctp_write_space(struct sock *sk);
|
||||
void sctp_data_ready(struct sock *sk);
|
||||
__poll_t sctp_poll_mask(struct socket *sock, __poll_t events);
|
||||
__poll_t sctp_poll(struct file *file, struct socket *sock,
|
||||
poll_table *wait);
|
||||
void sctp_sock_rfree(struct sk_buff *skb);
|
||||
void sctp_copy_sock(struct sock *newsk, struct sock *sk,
|
||||
struct sctp_association *asoc);
|
||||
|
||||
@@ -388,7 +388,8 @@ bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst);
|
||||
void tcp_close(struct sock *sk, long timeout);
|
||||
void tcp_init_sock(struct sock *sk);
|
||||
void tcp_init_transfer(struct sock *sk, int bpf_op);
|
||||
__poll_t tcp_poll_mask(struct socket *sock, __poll_t events);
|
||||
__poll_t tcp_poll(struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
int tcp_getsockopt(struct sock *sk, int level, int optname,
|
||||
char __user *optval, int __user *optlen);
|
||||
int tcp_setsockopt(struct sock *sk, int level, int optname,
|
||||
|
||||
@@ -109,7 +109,8 @@ struct tls_sw_context_rx {
|
||||
|
||||
struct strparser strp;
|
||||
void (*saved_data_ready)(struct sock *sk);
|
||||
__poll_t (*sk_poll_mask)(struct socket *sock, __poll_t events);
|
||||
unsigned int (*sk_poll)(struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
struct sk_buff *recv_pkt;
|
||||
u8 control;
|
||||
bool decrypted;
|
||||
@@ -224,7 +225,8 @@ void tls_sw_free_resources_tx(struct sock *sk);
|
||||
void tls_sw_free_resources_rx(struct sock *sk);
|
||||
int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
|
||||
int nonblock, int flags, int *addr_len);
|
||||
__poll_t tls_sw_poll_mask(struct socket *sock, __poll_t events);
|
||||
unsigned int tls_sw_poll(struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos,
|
||||
struct pipe_inode_info *pipe,
|
||||
size_t len, unsigned int flags);
|
||||
|
||||
@@ -285,7 +285,7 @@ int udp_init_sock(struct sock *sk);
|
||||
int udp_pre_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
|
||||
int __udp_disconnect(struct sock *sk, int flags);
|
||||
int udp_disconnect(struct sock *sk, int flags);
|
||||
__poll_t udp_poll_mask(struct socket *sock, __poll_t events);
|
||||
__poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait);
|
||||
struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
|
||||
netdev_features_t features,
|
||||
bool is_ipv6);
|
||||
|
||||
@@ -39,8 +39,10 @@ enum {
|
||||
IOCB_CMD_PWRITE = 1,
|
||||
IOCB_CMD_FSYNC = 2,
|
||||
IOCB_CMD_FDSYNC = 3,
|
||||
/* 4 was the experimental IOCB_CMD_PREADX */
|
||||
IOCB_CMD_POLL = 5,
|
||||
/* These two are experimental.
|
||||
* IOCB_CMD_PREADX = 4,
|
||||
* IOCB_CMD_POLL = 5,
|
||||
*/
|
||||
IOCB_CMD_NOOP = 6,
|
||||
IOCB_CMD_PREADV = 7,
|
||||
IOCB_CMD_PWRITEV = 8,
|
||||
|
||||
@@ -1857,7 +1857,8 @@ union bpf_attr {
|
||||
* is resolved), the nexthop address is returned in ipv4_dst
|
||||
* or ipv6_dst based on family, smac is set to mac address of
|
||||
* egress device, dmac is set to nexthop mac address, rt_metric
|
||||
* is set to metric from route (IPv4/IPv6 only).
|
||||
* is set to metric from route (IPv4/IPv6 only), and ifindex
|
||||
* is set to the device index of the nexthop from the FIB lookup.
|
||||
*
|
||||
* *plen* argument is the size of the passed in struct.
|
||||
* *flags* argument can be a combination of one or more of the
|
||||
@@ -1873,9 +1874,10 @@ union bpf_attr {
|
||||
* *ctx* is either **struct xdp_md** for XDP programs or
|
||||
* **struct sk_buff** tc cls_act programs.
|
||||
* Return
|
||||
* Egress device index on success, 0 if packet needs to continue
|
||||
* up the stack for further processing or a negative error in case
|
||||
* of failure.
|
||||
* * < 0 if any input argument is invalid
|
||||
* * 0 on success (packet is forwarded, nexthop neighbor exists)
|
||||
* * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the
|
||||
* * packet is not forwarded or needs assist from full stack
|
||||
*
|
||||
* int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags)
|
||||
* Description
|
||||
@@ -2612,6 +2614,18 @@ struct bpf_raw_tracepoint_args {
|
||||
#define BPF_FIB_LOOKUP_DIRECT BIT(0)
|
||||
#define BPF_FIB_LOOKUP_OUTPUT BIT(1)
|
||||
|
||||
enum {
|
||||
BPF_FIB_LKUP_RET_SUCCESS, /* lookup successful */
|
||||
BPF_FIB_LKUP_RET_BLACKHOLE, /* dest is blackholed; can be dropped */
|
||||
BPF_FIB_LKUP_RET_UNREACHABLE, /* dest is unreachable; can be dropped */
|
||||
BPF_FIB_LKUP_RET_PROHIBIT, /* dest not allowed; can be dropped */
|
||||
BPF_FIB_LKUP_RET_NOT_FWDED, /* packet is not forwarded */
|
||||
BPF_FIB_LKUP_RET_FWD_DISABLED, /* fwding is not enabled on ingress */
|
||||
BPF_FIB_LKUP_RET_UNSUPP_LWT, /* fwd requires encapsulation */
|
||||
BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */
|
||||
BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */
|
||||
};
|
||||
|
||||
struct bpf_fib_lookup {
|
||||
/* input: network family for lookup (AF_INET, AF_INET6)
|
||||
* output: network family of egress nexthop
|
||||
@@ -2625,7 +2639,11 @@ struct bpf_fib_lookup {
|
||||
|
||||
/* total length of packet from network header - used for MTU check */
|
||||
__u16 tot_len;
|
||||
__u32 ifindex; /* L3 device index for lookup */
|
||||
|
||||
/* input: L3 device index for lookup
|
||||
* output: device index from FIB lookup
|
||||
*/
|
||||
__u32 ifindex;
|
||||
|
||||
union {
|
||||
/* inputs to lookup */
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#define TCMU_MAILBOX_VERSION 2
|
||||
#define ALIGN_SIZE 64 /* Should be enough for most CPUs */
|
||||
#define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */
|
||||
#define TCMU_MAILBOX_FLAG_CAP_READ_LEN (1 << 1) /* Read data length */
|
||||
|
||||
struct tcmu_mailbox {
|
||||
__u16 version;
|
||||
@@ -71,6 +72,7 @@ struct tcmu_cmd_entry_hdr {
|
||||
__u16 cmd_id;
|
||||
__u8 kflags;
|
||||
#define TCMU_UFLAG_UNKNOWN_OP 0x1
|
||||
#define TCMU_UFLAG_READ_LEN 0x2
|
||||
__u8 uflags;
|
||||
|
||||
} __packed;
|
||||
@@ -119,7 +121,7 @@ struct tcmu_cmd_entry {
|
||||
__u8 scsi_status;
|
||||
__u8 __pad1;
|
||||
__u16 __pad2;
|
||||
__u32 __pad3;
|
||||
__u32 read_len;
|
||||
char sense_buffer[TCMU_SENSE_BUFFERSIZE];
|
||||
} rsp;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user