History

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

Several conflicts, seemingly all over the place. I used Stephen Rothwell's sample resolutions for many of these, if not just to double check my own work, so definitely the credit largely goes to him. The NFP conflict consisted of a bug fix (moving operations past the rhashtable operation) while chaning the initial argument in the function call in the moved code. The net/dsa/master.c conflict had to do with a bug fix intermixing of making dsa_master_set_mtu() static with the fixing of the tagging attribute location. cls_flower had a conflict because the dup reject fix from Or overlapped with the addition of port range classifiction. __set_phy_supported()'s conflict was relatively easy to resolve because Andrew fixed it in both trees, so it was just a matter of taking the net-next copy. Or at least I think it was :-) Joe Stringer's fix to the handling of netns id 0 in bpf_sk_lookup() intermixed with changes on how the sdif and caller_net are calculated in these code paths in net-next. The remaining BPF conflicts were largely about the addition of the __bpf_md_ptr stuff in 'net' overlapping with adjustments and additions to the relevant data structure where the MD pointer macros are used.

David S. Miller committed 7 years ago

Commit 4cc1fee2 parents a60956e 40e020c576 files · +6121 −3146Browse files

Showing the changes to include/uapi/linux (2 of 576 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/bpf.h +37 −23
  2. include/uapi/linux/prctl.h +1 −0
include/uapi/linux/bpf.h+37−23
@@ -2177,7 +2177,7 @@ union bpf_attr { · 2176 unmodified lines
2177 * Return2177 * Return
2178 * 0 on success, or a negative error in case of failure.2178 * 0 on success, or a negative error in case of failure.
2179 *2179 *
2180 * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)2180 * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2181 * Description2181 * Description
2182 * Look for TCP socket matching *tuple*, optionally in a child2182 * Look for TCP socket matching *tuple*, optionally in a child
2183 * network namespace *netns*. The return value must be checked,2183 * network namespace *netns*. The return value must be checked,
@@ -2194,12 +2194,14 @@ union bpf_attr { · 10 unmodified lines
2194 * **sizeof**\ (*tuple*\ **->ipv6**)2194 * **sizeof**\ (*tuple*\ **->ipv6**)
2195 * Look for an IPv6 socket.2195 * Look for an IPv6 socket.
2196 *2196 *
2197 * If the *netns* is zero, then the socket lookup table in the2197 * If the *netns* is a negative signed 32-bit integer, then the
2198 * netns associated with the *ctx* will be used. For the TC hooks,2198 * socket lookup table in the netns associated with the *ctx* will
2199 * this in the netns of the device in the skb. For socket hooks,2199 * will be used. For the TC hooks, this is the netns of the device
2200 * this in the netns of the socket. If *netns* is non-zero, then2200 * in the skb. For socket hooks, this is the netns of the socket.
2201 * it specifies the ID of the netns relative to the netns2201 * If *netns* is any other signed 32-bit value greater than or
2202 * associated with the *ctx*.2202 * equal to zero then it specifies the ID of the netns relative to
2203 * the netns associated with the *ctx*. *netns* values beyond the
2204 * range of 32-bit integers are reserved for future use.
2203 *2205 *
2204 * All values for *flags* are reserved for future usage, and must2206 * All values for *flags* are reserved for future usage, and must
2205 * be left at zero.2207 * be left at zero.
@@ -2208,10 +2210,10 @@ union bpf_attr { · 2 unmodified lines
2208 * **CONFIG_NET** configuration option.2210 * **CONFIG_NET** configuration option.
2209 * Return2211 * Return
2210 * Pointer to *struct bpf_sock*, or NULL in case of failure.2212 * Pointer to *struct bpf_sock*, or NULL in case of failure.
2211 * For sockets with reuseport option, *struct bpf_sock*2213 * For sockets with reuseport option, the *struct bpf_sock*
2212 * return is from reuse->socks[] using hash of the packet.2214 * result is from reuse->socks[] using the hash of the tuple.
2213 *2215 *
2214 * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)2216 * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
2215 * Description2217 * Description
2216 * Look for UDP socket matching *tuple*, optionally in a child2218 * Look for UDP socket matching *tuple*, optionally in a child
2217 * network namespace *netns*. The return value must be checked,2219 * network namespace *netns*. The return value must be checked,
@@ -2228,12 +2230,14 @@ union bpf_attr { · 10 unmodified lines
2228 * **sizeof**\ (*tuple*\ **->ipv6**)2230 * **sizeof**\ (*tuple*\ **->ipv6**)
2229 * Look for an IPv6 socket.2231 * Look for an IPv6 socket.
2230 *2232 *
2231 * If the *netns* is zero, then the socket lookup table in the2233 * If the *netns* is a negative signed 32-bit integer, then the
2232 * netns associated with the *ctx* will be used. For the TC hooks,2234 * socket lookup table in the netns associated with the *ctx* will
2233 * this in the netns of the device in the skb. For socket hooks,2235 * will be used. For the TC hooks, this is the netns of the device
2234 * this in the netns of the socket. If *netns* is non-zero, then2236 * in the skb. For socket hooks, this is the netns of the socket.
2235 * it specifies the ID of the netns relative to the netns2237 * If *netns* is any other signed 32-bit value greater than or
2236 * associated with the *ctx*.2238 * equal to zero then it specifies the ID of the netns relative to
2239 * the netns associated with the *ctx*. *netns* values beyond the
2240 * range of 32-bit integers are reserved for future use.
2237 *2241 *
2238 * All values for *flags* are reserved for future usage, and must2242 * All values for *flags* are reserved for future usage, and must
2239 * be left at zero.2243 * be left at zero.
@@ -2242,8 +2246,8 @@ union bpf_attr { · 2 unmodified lines
2242 * **CONFIG_NET** configuration option.2246 * **CONFIG_NET** configuration option.
2243 * Return2247 * Return
2244 * Pointer to *struct bpf_sock*, or NULL in case of failure.2248 * Pointer to *struct bpf_sock*, or NULL in case of failure.
2245 * For sockets with reuseport option, *struct bpf_sock*2249 * For sockets with reuseport option, the *struct bpf_sock*
2246 * return is from reuse->socks[] using hash of the packet.2250 * result is from reuse->socks[] using the hash of the tuple.
2247 *2251 *
2248 * int bpf_sk_release(struct bpf_sock *sk)2252 * int bpf_sk_release(struct bpf_sock *sk)
2249 * Description2253 * Description
@@ -2430,6 +2434,9 @@ enum bpf_func_id { · 180 unmodified lines
2430/* BPF_FUNC_perf_event_output for sk_buff input context. */2434/* BPF_FUNC_perf_event_output for sk_buff input context. */
2431#define BPF_F_CTXLEN_MASK (0xfffffULL << 32)2435#define BPF_F_CTXLEN_MASK (0xfffffULL << 32)
2432 2436
2437/* Current network namespace */
2438#define BPF_F_CURRENT_NETNS (-1L)
2439
2433/* Mode for BPF_FUNC_skb_adjust_room helper. */2440/* Mode for BPF_FUNC_skb_adjust_room helper. */
2434enum bpf_adj_room_mode {2441enum bpf_adj_room_mode {
2435 BPF_ADJ_ROOM_NET,2442 BPF_ADJ_ROOM_NET,
@@ -2447,6 +2454,12 @@ enum bpf_lwt_encap_mode { · 11 unmodified lines
2447 BPF_LWT_ENCAP_SEG6_INLINE2454 BPF_LWT_ENCAP_SEG6_INLINE
2448};2455};
2449 2456
2457#define __bpf_md_ptr(type, name) \
2458union { \
2459 type name; \
2460 __u64 :64; \
2461} __attribute__((aligned(8)))
2462
2450/* user accessible mirror of in-kernel sk_buff.2463/* user accessible mirror of in-kernel sk_buff.
2451 * new fields can only be added to the end of this structure2464 * new fields can only be added to the end of this structure
2452 */2465 */
@@ -2481,7 +2494,7 @@ struct __sk_buff { · 28 unmodified lines
2481 /* ... here. */2494 /* ... here. */
2482 2495
2483 __u32 data_meta;2496 __u32 data_meta;
2484 struct bpf_flow_keys *flow_keys;2497 __bpf_md_ptr(struct bpf_flow_keys *, flow_keys);
2485 __u64 tstamp;2498 __u64 tstamp;
2486};2499};
2487 2500
@@ -2598,8 +2611,8 @@ enum sk_action { · 110 unmodified lines
2598 * be added to the end of this structure2611 * be added to the end of this structure
2599 */2612 */
2600struct sk_msg_md {2613struct sk_msg_md {
2601 void *data;2614 __bpf_md_ptr(void *, data);
2602 void *data_end;2615 __bpf_md_ptr(void *, data_end);
2603 2616
2604 __u32 family;2617 __u32 family;
2605 __u32 remote_ip4; /* Stored in network byte order */2618 __u32 remote_ip4; /* Stored in network byte order */
@@ -2615,8 +2628,9 @@ struct sk_reuseport_md { · 9 unmodified lines
2615 * Start of directly accessible data. It begins from2628 * Start of directly accessible data. It begins from
2616 * the tcp/udp header.2629 * the tcp/udp header.
2617 */2630 */
2618 void *data;2631 __bpf_md_ptr(void *, data);
2619 void *data_end; /* End of directly accessible data */2632 /* End of directly accessible data */
2633 __bpf_md_ptr(void *, data_end);
2620 /*2634 /*
2621 * Total length of packet (starting from the tcp/udp header).2635 * Total length of packet (starting from the tcp/udp header).
2622 * Note that the directly accessible bytes (data_end - data)2636 * Note that the directly accessible bytes (data_end - data)
include/uapi/linux/prctl.h+1−0
@@ -212,6 +212,7 @@ struct prctl_mm_map { · 211 unmodified lines
212#define PR_SET_SPECULATION_CTRL 53212#define PR_SET_SPECULATION_CTRL 53
213/* Speculation control variants */213/* Speculation control variants */
214# define PR_SPEC_STORE_BYPASS 0214# define PR_SPEC_STORE_BYPASS 0
215# define PR_SPEC_INDIRECT_BRANCH 1
215/* Return and control values for PR_SET/GET_SPECULATION_CTRL */216/* Return and control values for PR_SET/GET_SPECULATION_CTRL */
216# define PR_SPEC_NOT_AFFECTED 0217# define PR_SPEC_NOT_AFFECTED 0
217# define PR_SPEC_PRCTL (1UL << 0)218# define PR_SPEC_PRCTL (1UL << 0)