History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller: "A decent batch of fixes here. I'd say about half are for problems that have existed for a while, and half are for new regressions added in the 4.20 merge window. 1) Fix 10G SFP phy module detection in mvpp2, from Baruch Siach. 2) Revert bogus emac driver change, from Benjamin Herrenschmidt. 3) Handle BPF exported data structure with pointers when building 32-bit userland, from Daniel Borkmann. 4) Memory leak fix in act_police, from Davide Caratti. 5) Check RX checksum offload in RX descriptors properly in aquantia driver, from Dmitry Bogdanov. 6) SKB unlink fix in various spots, from Edward Cree. 7) ndo_dflt_fdb_dump() only works with ethernet, enforce this, from Eric Dumazet. 8) Fix FID leak in mlxsw driver, from Ido Schimmel. 9) IOTLB locking fix in vhost, from Jean-Philippe Brucker. 10) Fix SKB truesize accounting in ipv4/ipv6/netfilter frag memory limits otherwise namespace exit can hang. From Jiri Wiesner. 11) Address block parsing length fixes in x25 from Martin Schiller. 12) IRQ and ring accounting fixes in bnxt_en, from Michael Chan. 13) For tun interfaces, only iface delete works with rtnl ops, enforce this by disallowing add. From Nicolas Dichtel. 14) Use after free in liquidio, from Pan Bian. 15) Fix SKB use after passing to netif_receive_skb(), from Prashant Bhole. 16) Static key accounting and other fixes in XPS from Sabrina Dubroca. 17) Partially initialized flow key passed to ip6_route_output(), from Shmulik Ladkani. 18) Fix RTNL deadlock during reset in ibmvnic driver, from Thomas Falcon. 19) Several small TCP fixes (off-by-one on window probe abort, NULL deref in tail loss probe, SNMP mis-estimations) from Yuchung Cheng" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (93 commits) net/sched: cls_flower: Reject duplicated rules also under skip_sw bnxt_en: Fix _bnxt_get_max_rings() for 57500 chips. bnxt_en: Fix NQ/CP rings accounting on the new 57500 chips. bnxt_en: Keep track of reserved IRQs. bnxt_en: Fix CNP CoS queue regression. net/mlx4_core: Correctly set PFC param if global pause is turned off. Revert "net/ibm/emac: wrong bit is used for STA control" neighbour: Avoid writing before skb->head in neigh_hh_output() ipv6: Check available headroom in ip6_xmit() even without options tcp: lack of available data can also cause TSO defer ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output mlxsw: spectrum_switchdev: Fix VLAN device deletion via ioctl mlxsw: spectrum_router: Relax GRE decap matching check mlxsw: spectrum_switchdev: Avoid leaking FID's reference count mlxsw: spectrum_nve: Remove easily triggerable warnings ipv4: ipv6: netfilter: Adjust the frag mem limit when truesize changes sctp: frag_point sanity check tcp: fix NULL ref in tail loss probe tcp: Do not underestimate rwnd_limited net: use skb_list_del_init() to remove from RX sublists ...

Linus Torvalds committed 7 years ago

Commit d48f7822 parents 8586ca8 35cc3ce83 files · +1225 −368Browse files

Showing the changes to include/uapi/linux (1 of 83 files). Show all

Unified · Split

include/uapi/linux/bpf.h+37−19
@@ -2170,7 +2170,7 @@ union bpf_attr { · 2169 unmodified lines
2170 * Return2170 * Return
2171 * 0 on success, or a negative error in case of failure.2171 * 0 on success, or a negative error in case of failure.
2172 *2172 *
2173 * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)2173 * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2174 * Description2174 * Description
2175 * Look for TCP socket matching *tuple*, optionally in a child2175 * Look for TCP socket matching *tuple*, optionally in a child
2176 * network namespace *netns*. The return value must be checked,2176 * network namespace *netns*. The return value must be checked,
@@ -2187,12 +2187,14 @@ union bpf_attr { · 10 unmodified lines
2187 * **sizeof**\ (*tuple*\ **->ipv6**)2187 * **sizeof**\ (*tuple*\ **->ipv6**)
2188 * Look for an IPv6 socket.2188 * Look for an IPv6 socket.
2189 *2189 *
2190 * If the *netns* is zero, then the socket lookup table in the2190 * If the *netns* is a negative signed 32-bit integer, then the
2191 * netns associated with the *ctx* will be used. For the TC hooks,2191 * socket lookup table in the netns associated with the *ctx* will
2192 * this in the netns of the device in the skb. For socket hooks,2192 * will be used. For the TC hooks, this is the netns of the device
2193 * this in the netns of the socket. If *netns* is non-zero, then2193 * in the skb. For socket hooks, this is the netns of the socket.
2194 * it specifies the ID of the netns relative to the netns2194 * If *netns* is any other signed 32-bit value greater than or
2195 * associated with the *ctx*.2195 * equal to zero then it specifies the ID of the netns relative to
2196 * the netns associated with the *ctx*. *netns* values beyond the
2197 * range of 32-bit integers are reserved for future use.
2196 *2198 *
2197 * All values for *flags* are reserved for future usage, and must2199 * All values for *flags* are reserved for future usage, and must
2198 * be left at zero.2200 * be left at zero.
@@ -2201,8 +2203,10 @@ union bpf_attr { · 2 unmodified lines
2201 * **CONFIG_NET** configuration option.2203 * **CONFIG_NET** configuration option.
2202 * Return2204 * Return
2203 * Pointer to *struct bpf_sock*, or NULL in case of failure.2205 * Pointer to *struct bpf_sock*, or NULL in case of failure.
2206 * For sockets with reuseport option, the *struct bpf_sock*
2207 * result is from reuse->socks[] using the hash of the tuple.
2204 *2208 *
2205 * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)2209 * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2206 * Description2210 * Description
2207 * Look for UDP socket matching *tuple*, optionally in a child2211 * Look for UDP socket matching *tuple*, optionally in a child
2208 * network namespace *netns*. The return value must be checked,2212 * network namespace *netns*. The return value must be checked,
@@ -2219,12 +2223,14 @@ union bpf_attr { · 10 unmodified lines
2219 * **sizeof**\ (*tuple*\ **->ipv6**)2223 * **sizeof**\ (*tuple*\ **->ipv6**)
2220 * Look for an IPv6 socket.2224 * Look for an IPv6 socket.
2221 *2225 *
2222 * If the *netns* is zero, then the socket lookup table in the2226 * If the *netns* is a negative signed 32-bit integer, then the
2223 * netns associated with the *ctx* will be used. For the TC hooks,2227 * socket lookup table in the netns associated with the *ctx* will
2224 * this in the netns of the device in the skb. For socket hooks,2228 * will be used. For the TC hooks, this is the netns of the device
2225 * this in the netns of the socket. If *netns* is non-zero, then2229 * in the skb. For socket hooks, this is the netns of the socket.
2226 * it specifies the ID of the netns relative to the netns2230 * If *netns* is any other signed 32-bit value greater than or
2227 * associated with the *ctx*.2231 * equal to zero then it specifies the ID of the netns relative to
2232 * the netns associated with the *ctx*. *netns* values beyond the
2233 * range of 32-bit integers are reserved for future use.
2228 *2234 *
2229 * All values for *flags* are reserved for future usage, and must2235 * All values for *flags* are reserved for future usage, and must
2230 * be left at zero.2236 * be left at zero.
@@ -2233,6 +2239,8 @@ union bpf_attr { · 2 unmodified lines
2233 * **CONFIG_NET** configuration option.2239 * **CONFIG_NET** configuration option.
2234 * Return2240 * Return
2235 * Pointer to *struct bpf_sock*, or NULL in case of failure.2241 * Pointer to *struct bpf_sock*, or NULL in case of failure.
2242 * For sockets with reuseport option, the *struct bpf_sock*
2243 * result is from reuse->socks[] using the hash of the tuple.
2236 *2244 *
2237 * int bpf_sk_release(struct bpf_sock *sk)2245 * int bpf_sk_release(struct bpf_sock *sk)
2238 * Description2246 * Description
@@ -2405,6 +2413,9 @@ enum bpf_func_id { · 166 unmodified lines
2405/* BPF_FUNC_perf_event_output for sk_buff input context. */2413/* BPF_FUNC_perf_event_output for sk_buff input context. */
2406#define BPF_F_CTXLEN_MASK (0xfffffULL << 32)2414#define BPF_F_CTXLEN_MASK (0xfffffULL << 32)
2407 2415
2416/* Current network namespace */
2417#define BPF_F_CURRENT_NETNS (-1L)
2418
2408/* Mode for BPF_FUNC_skb_adjust_room helper. */2419/* Mode for BPF_FUNC_skb_adjust_room helper. */
2409enum bpf_adj_room_mode {2420enum bpf_adj_room_mode {
2410 BPF_ADJ_ROOM_NET,2421 BPF_ADJ_ROOM_NET,
@@ -2422,6 +2433,12 @@ enum bpf_lwt_encap_mode { · 11 unmodified lines
2422 BPF_LWT_ENCAP_SEG6_INLINE2433 BPF_LWT_ENCAP_SEG6_INLINE
2423};2434};
2424 2435
2436#define __bpf_md_ptr(type, name) \
2437union { \
2438 type name; \
2439 __u64 :64; \
2440} __attribute__((aligned(8)))
2441
2425/* user accessible mirror of in-kernel sk_buff.2442/* user accessible mirror of in-kernel sk_buff.
2426 * new fields can only be added to the end of this structure2443 * new fields can only be added to the end of this structure
2427 */2444 */
@@ -2456,7 +2473,7 @@ struct __sk_buff { · 28 unmodified lines
2456 /* ... here. */2473 /* ... here. */
2457 2474
2458 __u32 data_meta;2475 __u32 data_meta;
2459 struct bpf_flow_keys *flow_keys;2476 __bpf_md_ptr(struct bpf_flow_keys *, flow_keys);
2460};2477};
2461 2478
2462struct bpf_tunnel_key {2479struct bpf_tunnel_key {
@@ -2572,8 +2589,8 @@ enum sk_action { · 109 unmodified lines
2572 * be added to the end of this structure2589 * be added to the end of this structure
2573 */2590 */
2574struct sk_msg_md {2591struct sk_msg_md {
2575 void *data;2592 __bpf_md_ptr(void *, data);
2576 void *data_end;2593 __bpf_md_ptr(void *, data_end);
2577 2594
2578 __u32 family;2595 __u32 family;
2579 __u32 remote_ip4; /* Stored in network byte order */2596 __u32 remote_ip4; /* Stored in network byte order */
@@ -2589,8 +2606,9 @@ struct sk_reuseport_md { · 9 unmodified lines
2589 * Start of directly accessible data. It begins from2606 * Start of directly accessible data. It begins from
2590 * the tcp/udp header.2607 * the tcp/udp header.
2591 */2608 */
2592 void *data;2609 __bpf_md_ptr(void *, data);
2593 void *data_end; /* End of directly accessible data */2610 /* End of directly accessible data */
2611 __bpf_md_ptr(void *, data_end);
2594 /*2612 /*
2595 * Total length of packet (starting from the tcp/udp header).2613 * Total length of packet (starting from the tcp/udp header).
2596 * Note that the directly accessible bytes (data_end - data)2614 * Note that the directly accessible bytes (data_end - data)