aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-06-29 14:50:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-06-29 14:50:42 -0400
commit32826ac41f2170df0d9a2e8df5a9b570c7858ccf (patch)
treef7b3b971a078d1d3742a2d21e67d530fd3f66640 /include/linux
parent653c574a7df4760442162272169834d63c33f298 (diff)
parent751ad819b0bf443ad8963eb7bfbd533e6a463973 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "I've been traveling so this accumulates more than week or so of bug fixing. It perhaps looks a little worse than it really is. 1) Fix deadlock in ath10k driver, from Ben Greear. 2) Increase scan timeout in iwlwifi, from Luca Coelho. 3) Unbreak STP by properly reinjecting STP packets back into the stack. Regression fix from Ido Schimmel. 4) Mediatek driver fixes (missing malloc failure checks, leaking of scratch memory, wrong indexing when mapping TX buffers, etc.) from John Crispin. 5) Fix endianness bug in icmpv6_err() handler, from Hannes Frederic Sowa. 6) Fix hashing of flows in UDP in the ruseport case, from Xuemin Su. 7) Fix netlink notifications in ovs for tunnels, delete link messages are never emitted because of how the device registry state is handled. From Nicolas Dichtel. 8) Conntrack module leaks kmemcache on unload, from Florian Westphal. 9) Prevent endless jump loops in nft rules, from Liping Zhang and Pablo Neira Ayuso. 10) Not early enough spinlock initialization in mlx4, from Eric Dumazet. 11) Bind refcount leak in act_ipt, from Cong WANG. 12) Missing RCU locking in HTB scheduler, from Florian Westphal. 13) Several small MACSEC bug fixes from Sabrina Dubroca (missing RCU barrier, using heap for SG and IV, and erroneous use of async flag when allocating AEAD conext.) 14) RCU handling fix in TIPC, from Ying Xue. 15) Pass correct protocol down into ipv4_{update_pmtu,redirect}() in SIT driver, from Simon Horman. 16) Socket timer deadlock fix in TIPC from Jon Paul Maloy. 17) Fix potential deadlock in team enslave, from Ido Schimmel. 18) Memory leak in KCM procfs handling, from Jiri Slaby. 19) ESN generation fix in ipv4 ESP, from Herbert Xu. 20) Fix GFP_KERNEL allocations with locks held in act_ife, from Cong WANG. 21) Use after free in netem, from Eric Dumazet. 22) Uninitialized last assert time in multicast router code, from Tom Goff. 23) Skip raw sockets in sock_diag destruction broadcast, from Willem de Bruijn. 24) Fix link status reporting in thunderx, from Sunil Goutham. 25) Limit resegmentation of retransmit queue so that we do not retransmit too large GSO frames. From Eric Dumazet. 26) Delay bpf program release after grace period, from Daniel Borkmann" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (141 commits) openvswitch: fix conntrack netlink event delivery qed: Protect the doorbell BAR with the write barriers. neigh: Explicitly declare RCU-bh read side critical section in neigh_xmit() e1000e: keep VLAN interfaces functional after rxvlan off cfg80211: fix proto in ieee80211_data_to_8023 for frames without LLC header qlcnic: use the correct ring in qlcnic_83xx_process_rcv_ring_diag() bpf, perf: delay release of BPF prog after grace period net: bridge: fix vlan stats continue counter tcp: do not send too big packets at retransmit time ibmvnic: fix to use list_for_each_safe() when delete items net: thunderx: Fix TL4 configuration for secondary Qsets net: thunderx: Fix link status reporting net/mlx5e: Reorganize ethtool statistics net/mlx5e: Fix number of PFC counters reported to ethtool net/mlx5e: Prevent adding the same vxlan port net/mlx5e: Check for BlueFlame capability before allocating SQ uar net/mlx5e: Change enum to better reflect usage net/mlx5: Add ConnectX-5 PCIe 4.0 to list of supported devices net/mlx5: Update command strings net: marvell: Add separate config ANEG function for Marvell 88E1111 ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bpf.h32
-rw-r--r--include/linux/inet_diag.h6
-rw-r--r--include/linux/mlx4/device.h1
-rw-r--r--include/linux/net.h3
-rw-r--r--include/linux/qed/qed_eth_if.h1
-rw-r--r--include/linux/sock_diag.h6
6 files changed, 47 insertions, 2 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 8ee27b8afe81..0de4de6dd43e 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -111,6 +111,31 @@ enum bpf_access_type {
111 BPF_WRITE = 2 111 BPF_WRITE = 2
112}; 112};
113 113
114/* types of values stored in eBPF registers */
115enum bpf_reg_type {
116 NOT_INIT = 0, /* nothing was written into register */
117 UNKNOWN_VALUE, /* reg doesn't contain a valid pointer */
118 PTR_TO_CTX, /* reg points to bpf_context */
119 CONST_PTR_TO_MAP, /* reg points to struct bpf_map */
120 PTR_TO_MAP_VALUE, /* reg points to map element value */
121 PTR_TO_MAP_VALUE_OR_NULL,/* points to map elem value or NULL */
122 FRAME_PTR, /* reg == frame_pointer */
123 PTR_TO_STACK, /* reg == frame_pointer + imm */
124 CONST_IMM, /* constant integer value */
125
126 /* PTR_TO_PACKET represents:
127 * skb->data
128 * skb->data + imm
129 * skb->data + (u16) var
130 * skb->data + (u16) var + imm
131 * if (range > 0) then [ptr, ptr + range - off) is safe to access
132 * if (id > 0) means that some 'var' was added
133 * if (off > 0) menas that 'imm' was added
134 */
135 PTR_TO_PACKET,
136 PTR_TO_PACKET_END, /* skb->data + headlen */
137};
138
114struct bpf_prog; 139struct bpf_prog;
115 140
116struct bpf_verifier_ops { 141struct bpf_verifier_ops {
@@ -120,7 +145,8 @@ struct bpf_verifier_ops {
120 /* return true if 'size' wide access at offset 'off' within bpf_context 145 /* return true if 'size' wide access at offset 'off' within bpf_context
121 * with 'type' (read or write) is allowed 146 * with 'type' (read or write) is allowed
122 */ 147 */
123 bool (*is_valid_access)(int off, int size, enum bpf_access_type type); 148 bool (*is_valid_access)(int off, int size, enum bpf_access_type type,
149 enum bpf_reg_type *reg_type);
124 150
125 u32 (*convert_ctx_access)(enum bpf_access_type type, int dst_reg, 151 u32 (*convert_ctx_access)(enum bpf_access_type type, int dst_reg,
126 int src_reg, int ctx_off, 152 int src_reg, int ctx_off,
@@ -238,6 +264,10 @@ static inline struct bpf_prog *bpf_prog_get(u32 ufd)
238static inline void bpf_prog_put(struct bpf_prog *prog) 264static inline void bpf_prog_put(struct bpf_prog *prog)
239{ 265{
240} 266}
267
268static inline void bpf_prog_put_rcu(struct bpf_prog *prog)
269{
270}
241#endif /* CONFIG_BPF_SYSCALL */ 271#endif /* CONFIG_BPF_SYSCALL */
242 272
243/* verifier prototypes for helper functions called from eBPF programs */ 273/* verifier prototypes for helper functions called from eBPF programs */
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
index 7c27fa1030e8..feb04ea20f11 100644
--- a/include/linux/inet_diag.h
+++ b/include/linux/inet_diag.h
@@ -52,6 +52,12 @@ struct sock *inet_diag_find_one_icsk(struct net *net,
52 52
53int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk); 53int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk);
54 54
55void inet_diag_msg_common_fill(struct inet_diag_msg *r, struct sock *sk);
56
57int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb,
58 struct inet_diag_msg *r, int ext,
59 struct user_namespace *user_ns);
60
55extern int inet_diag_register(const struct inet_diag_handler *handler); 61extern int inet_diag_register(const struct inet_diag_handler *handler);
56extern void inet_diag_unregister(const struct inet_diag_handler *handler); 62extern void inet_diag_unregister(const struct inet_diag_handler *handler);
57#endif /* _INET_DIAG_H_ */ 63#endif /* _INET_DIAG_H_ */
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 80dec87a94f8..d46a0e7f144d 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -466,6 +466,7 @@ enum {
466enum { 466enum {
467 MLX4_INTERFACE_STATE_UP = 1 << 0, 467 MLX4_INTERFACE_STATE_UP = 1 << 0,
468 MLX4_INTERFACE_STATE_DELETION = 1 << 1, 468 MLX4_INTERFACE_STATE_DELETION = 1 << 1,
469 MLX4_INTERFACE_STATE_SHUTDOWN = 1 << 2,
469}; 470};
470 471
471#define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \ 472#define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \
diff --git a/include/linux/net.h b/include/linux/net.h
index 9aa49a05fe38..25aa03b51c4e 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -251,7 +251,8 @@ do { \
251 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ 251 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
252 if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ 252 if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
253 net_ratelimit()) \ 253 net_ratelimit()) \
254 __dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__); \ 254 __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
255 ##__VA_ARGS__); \
255} while (0) 256} while (0)
256#elif defined(DEBUG) 257#elif defined(DEBUG)
257#define net_dbg_ratelimited(fmt, ...) \ 258#define net_dbg_ratelimited(fmt, ...) \
diff --git a/include/linux/qed/qed_eth_if.h b/include/linux/qed/qed_eth_if.h
index 6ae8cb4a61d3..6c876a63558d 100644
--- a/include/linux/qed/qed_eth_if.h
+++ b/include/linux/qed/qed_eth_if.h
@@ -49,6 +49,7 @@ struct qed_start_vport_params {
49 bool drop_ttl0; 49 bool drop_ttl0;
50 u8 vport_id; 50 u8 vport_id;
51 u16 mtu; 51 u16 mtu;
52 bool clear_stats;
52}; 53};
53 54
54struct qed_stop_rxq_params { 55struct qed_stop_rxq_params {
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
index 4018b48f2b3b..a0596ca0e80a 100644
--- a/include/linux/sock_diag.h
+++ b/include/linux/sock_diag.h
@@ -36,6 +36,9 @@ enum sknetlink_groups sock_diag_destroy_group(const struct sock *sk)
36{ 36{
37 switch (sk->sk_family) { 37 switch (sk->sk_family) {
38 case AF_INET: 38 case AF_INET:
39 if (sk->sk_type == SOCK_RAW)
40 return SKNLGRP_NONE;
41
39 switch (sk->sk_protocol) { 42 switch (sk->sk_protocol) {
40 case IPPROTO_TCP: 43 case IPPROTO_TCP:
41 return SKNLGRP_INET_TCP_DESTROY; 44 return SKNLGRP_INET_TCP_DESTROY;
@@ -45,6 +48,9 @@ enum sknetlink_groups sock_diag_destroy_group(const struct sock *sk)
45 return SKNLGRP_NONE; 48 return SKNLGRP_NONE;
46 } 49 }
47 case AF_INET6: 50 case AF_INET6:
51 if (sk->sk_type == SOCK_RAW)
52 return SKNLGRP_NONE;
53
48 switch (sk->sk_protocol) { 54 switch (sk->sk_protocol) {
49 case IPPROTO_TCP: 55 case IPPROTO_TCP:
50 return SKNLGRP_INET6_TCP_DESTROY; 56 return SKNLGRP_INET6_TCP_DESTROY;