History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Daniel Borkmann says: ==================== pull-request: bpf-next 2021-02-16 The following pull-request contains BPF updates for your *net-next* tree. There's a small merge conflict between 7eeba1706eba ("tcp: Add receive timestamp support for receive zerocopy.") from net-next tree and 9cacf81f8161 ("bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE") from bpf-next tree. Resolve as follows: [...] lock_sock(sk); err = tcp_zerocopy_receive(sk, &zc, &tss); err = BPF_CGROUP_RUN_PROG_GETSOCKOPT_KERN(sk, level, optname, &zc, &len, err); release_sock(sk); [...] We've added 116 non-merge commits during the last 27 day(s) which contain a total of 156 files changed, 5662 insertions(+), 1489 deletions(-). The main changes are: 1) Adds support of pointers to types with known size among global function args to overcome the limit on max # of allowed args, from Dmitrii Banshchikov. 2) Add bpf_iter for task_vma which can be used to generate information similar to /proc/pid/maps, from Song Liu. 3) Enable bpf_{g,s}etsockopt() from all sock_addr related program hooks. Allow rewriting bind user ports from BPF side below the ip_unprivileged_port_start range, both from Stanislav Fomichev. 4) Prevent recursion on fentry/fexit & sleepable programs and allow map-in-map as well as per-cpu maps for the latter, from Alexei Starovoitov. 5) Add selftest script to run BPF CI locally. Also enable BPF ringbuffer for sleepable programs, both from KP Singh. 6) Extend verifier to enable variable offset read/write access to the BPF program stack, from Andrei Matei. 7) Improve tc & XDP MTU handling and add a new bpf_check_mtu() helper to query device MTU from programs, from Jesper Dangaard Brouer. 8) Allow bpf_get_socket_cookie() helper also be called from [sleepable] BPF tracing programs, from Florent Revest. 9) Extend x86 JIT to pad JMPs with NOPs for helping image to converge when otherwise too many passes are required, from Gary Lin. 10) Verifier fixes on atomics with BPF_FETCH as well as function-by-function verification both related to zero-extension handling, from Ilya Leoshkevich. 11) Better kernel build integration of resolve_btfids tool, from Jiri Olsa. 12) Batch of AF_XDP selftest cleanups and small performance improvement for libbpf's xsk map redirect for newer kernels, from Björn Töpel. 13) Follow-up BPF doc and verifier improvements around atomics with BPF_FETCH, from Brendan Jackman. 14) Permit zero-sized data sections e.g. if ELF .rodata section contains read-only data from local variables, from Yonghong Song. 15) veth driver skb bulk-allocation for ndo_xdp_xmit, from Lorenzo Bianconi. ====================

David S. Miller committed 5 years ago

Commit b8af4172 parents 9ec5eea 45159b2156 files · +5662 −1489Browse files

Showing the changes to include/net (4 of 156 files). Show all

Unified · Split

4 files
  1. include/net/inet_common.h +2 −0
  2. include/net/sock.h +2 −0
  3. include/net/tcp.h +1 −0
  4. include/net/xdp.h +6 −0
include/net/inet_common.h+2−0
@@ -41,6 +41,8 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len); · 40 unmodified lines
4141 #define BIND_WITH_LOCK (1 << 1)
4242 /* Called from BPF program. */
4343 #define BIND_FROM_BPF (1 << 2)
44+/* Skip CAP_NET_BIND_SERVICE check. */
45+#define BIND_NO_CAP_NET_BIND_SERVICE (1 << 3)
4446 int __inet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,
4547 u32 flags);
4648 int inet_getname(struct socket *sock, struct sockaddr *uaddr,
include/net/sock.h+2−0
@@ -1174,6 +1174,8 @@ struct proto { · 1173 unmodified lines
11741174
11751175 int (*backlog_rcv) (struct sock *sk,
11761176 struct sk_buff *skb);
1177+ bool (*bpf_bypass_getsockopt)(int level,
1178+ int optname);
11771179
11781180 void (*release_cb)(struct sock *sk);
11791181
include/net/tcp.h+1−0
@@ -403,6 +403,7 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, · 402 unmodified lines
403403 struct poll_table_struct *wait);
404404 int tcp_getsockopt(struct sock *sk, int level, int optname,
405405 char __user *optval, int __user *optlen);
406+bool tcp_bpf_bypass_getsockopt(int level, int optname);
406407 int tcp_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,
407408 unsigned int optlen);
408409 void tcp_set_keepalive(struct sock *sk, int val);
include/net/xdp.h+6−0
@@ -164,6 +164,12 @@ void xdp_warn(const char *msg, const char *func, const int line); · 163 unmodified lines
164164 #define XDP_WARN(msg) xdp_warn(msg, __func__, __LINE__)
165165
166166 struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp);
167+struct sk_buff *__xdp_build_skb_from_frame(struct xdp_frame *xdpf,
168+ struct sk_buff *skb,
169+ struct net_device *dev);
170+struct sk_buff *xdp_build_skb_from_frame(struct xdp_frame *xdpf,
171+ struct net_device *dev);
172+int xdp_alloc_skb_bulk(void **skbs, int n_skb, gfp_t gfp);
167173
168174 static inline
169175 void xdp_convert_frame_to_buff(struct xdp_frame *frame, struct xdp_buff *xdp)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t