On Sat, Oct 19, 2019 at 01:19:31PM +0200, Toke Høiland-Jørgensen wrote:
> It seems I forgot to add handling of devmap_hash type maps to the device
> unregister hook for devmaps. This omission causes devices to not be
> properly released, which causes hangs.
>
> Fix this by adding the missing handl
On Fri, Oct 18, 2019 at 09:44:18PM +0200, Toke Høiland-Jørgensen wrote:
> It seems I forgot to add handling of devmap_hash type maps to the device
> unregister hook for devmaps. This omission causes devices to not be
> properly released, which causes hangs.
>
> Fix this by adding the missing handl
On Fri, Oct 18, 2019 at 12:26:55PM +0200, Toke Høiland-Jørgensen wrote:
> Martin Lau writes:
>
> > On Thu, Oct 17, 2019 at 12:52:32PM +0200, Toke Høiland-Jørgensen wrote:
> >> It seems I forgot to add handling of devmap_hash type maps to the device
> >> unregister h
On Thu, Oct 17, 2019 at 12:52:32PM +0200, Toke Høiland-Jørgensen wrote:
> It seems I forgot to add handling of devmap_hash type maps to the device
> unregister hook for devmaps. This omission causes devices to not be
> properly released, which causes hangs.
>
> Fix this by adding the missing handl
On Thu, Oct 17, 2019 at 10:37:52AM +0200, Jakub Sitnicki wrote:
> flow_dissector_reattach test changes the netns we run in but does not
> restore it to the one we started in when finished. This interferes with
> tests that run after it. Fix it by restoring the netns when done.
>
> Fixes: f97eea175
On Tue, Oct 15, 2019 at 08:24:54PM -0700, Alexei Starovoitov wrote:
> The end result is safer and faster bpf tracing.
> Safer - because type safe direct load can be used most of the time
> instead of bpf_probe_read().
> Faster - because direct loads are used to walk kernel data structures
> instead
On Wed, Oct 16, 2019 at 03:28:02PM +0200, Toke Høiland-Jørgensen wrote:
> It seems I forgot to add handling of devmap_hash type maps to the device
> unregister hook for devmaps. This omission causes devices to not be
> properly released, which causes hangs.
>
> Fix this by adding the missing handl
On Tue, Oct 15, 2019 at 09:44:11AM -0700, Wei Wang wrote:
> On Tue, Oct 15, 2019 at 7:29 AM Jesse Hathaway wrote:
> >
> > On Fri, Oct 11, 2019 at 12:54 PM Wei Wang wrote:
> > > Hmm... Yes... I would think a per-CPU input cache should work for the
> > > case above.
> > > Another idea is: instead o
On Tue, Oct 15, 2019 at 09:42:49AM -0700, Wei Wang wrote:
> On Tue, Oct 15, 2019 at 7:45 AM David Ahern wrote:
> >
> > On 10/14/19 1:26 PM, Martin Lau wrote:
> > >
> > > AFAICT, even for the route that are affected by
> > > fib6_update_sernum_upto_root(
On Tue, Oct 15, 2019 at 11:31:25AM -0700, Stanislav Fomichev wrote:
> Make sure BPF_PROG_TEST_RUN accepts tstamp and exports any
> modifications that BPF program does.
Acked-by: Martin KaFai Lau
On Tue, Oct 15, 2019 at 11:31:24AM -0700, Stanislav Fomichev wrote:
> It's useful for implementing EDT related tests (set tstamp, run the
> test, see how the tstamp is changed or observe some other parameter).
>
> Note that bpf_ktime_get_ns() helper is using monotonic clock, so for
> the BPF progr
On Sun, Oct 13, 2019 at 05:23:01PM -0700, Wei Wang wrote:
> On Fri, Oct 11, 2019 at 11:56 PM Martin Lau wrote:
> >
> > On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote:
> > > On Fri, Oct 11, 2019 at 8:42 AM Ido Schimmel wrote:
> > > >
> > &g
On Fri, Oct 11, 2019 at 03:01:44PM -0700, Andrii Nakryiko wrote:
> Patch #1 enforces libbpf build to have bpf_helper_defs.h ready before test BPF
> programs are built.
> Patch #2 drops obsolete BTF/pahole detection logic from Makefile.
Acked-by: Martin KaFai Lau
On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote:
> On Fri, Oct 11, 2019 at 8:42 AM Ido Schimmel wrote:
> >
> > On Fri, Oct 11, 2019 at 09:36:51AM -0500, Jesse Hathaway wrote:
> > > On Thu, Oct 10, 2019 at 3:31 AM Ido Schimmel wrote:
> > > > I think it's working as expected. Here is my th
On Thu, Oct 10, 2019 at 08:13:17PM -0700, Andrii Nakryiko wrote:
> Given BPF programs rely on libbpf's bpf_helper_defs.h, which is
> auto-generated during libbpf build, libbpf build has to happen before
> we attempt progs/*.c build. Enforce it as order-only dependency.
Acked-by: Martin KaFai Lau
On Fri, Oct 11, 2019 at 09:21:24AM -0700, Stanislav Fomichev wrote:
> Print recently added created_by_comm along the existing created_by_uid.
>
> Example with loop1.o (loaded via bpftool):
> 4: raw_tracepoint name nested_loops tag b9472b3ff5753ef2 gpl
> loaded_at 2019-10-10T13:38:18-070
On Thu, Oct 10, 2019 at 08:13:18PM -0700, Andrii Nakryiko wrote:
> Given lots of selftests won't work without recent enough Clang/LLVM that
> fully supports BTF, there is no point in maintaining outdated BTF
> support detection and fall-back to pahole logic. Just assume we have
> everything we need
On Thu, Oct 10, 2019 at 08:29:01PM -0700, Andrii Nakryiko wrote:
> Old GCC versions are producing invalid typedef for __gnuc_va_list
> pointing to void. Special-case this and emit valid:
>
> typedef __builtin_va_list __gnuc_va_list;
Acked-by: Martin KaFai Lau
On Thu, Oct 10, 2019 at 09:29:25PM -0700, Andrii Nakryiko wrote:
> Fix "warning: cast to pointer from integer of different size" when
> casting u64 addr to void *.
>
> Reported-by: kbuild test robot
> Signed-off-by: Andrii Nakryiko
Fixes: a23740ec43ba ("bpf: Track contents of read-only maps as s
On Thu, Oct 10, 2019 at 08:17:50PM +0200, Jakub Sitnicki wrote:
> Make sure a new flow dissector program can be attached to replace the old
> one with a single syscall. Also check that attaching the same program twice
> is prohibited.
>
> Signed-off-by: Jakub Sitnicki
Acked-by: Martin KaFai Lau
On Thu, Oct 10, 2019 at 08:17:49PM +0200, Jakub Sitnicki wrote:
> It is currently not possible to detach the flow dissector program and
> attach a new one in an atomic fashion, that is with a single syscall.
> Attempts to do so will be met with EEXIST error.
>
> This makes updates to flow dissecto
On Fri, Oct 04, 2019 at 10:03:07PM -0700, Alexei Starovoitov wrote:
> If in-kernel BTF exists parse it and prepare 'struct btf *btf_vmlinux'
> for further use by the verifier.
> In-kernel BTF is trusted just like kallsyms and other build artifacts
> embedded into vmlinux.
> Yet run this BTF image t
On Tue, Oct 08, 2019 at 04:49:30PM -0700, Andrii Nakryiko wrote:
> On Tue, Oct 8, 2019 at 2:53 PM Martin Lau wrote:
> >
> > On Tue, Oct 08, 2019 at 12:45:47PM -0700, Andrii Nakryiko wrote:
> > > Maps that are read-only both from BPF program side and user space side
&
On Tue, Oct 08, 2019 at 12:45:47PM -0700, Andrii Nakryiko wrote:
> Maps that are read-only both from BPF program side and user space side
> have their contents constant, so verifier can track referenced values
> precisely and use that knowledge for dead code elimination, branch
> pruning, etc. This
On Fri, Sep 27, 2019 at 01:47:32PM -0700, Eric Dumazet wrote:
>
>
> On 9/27/19 11:17 AM, Martin Lau wrote:
> > On Fri, Sep 27, 2019 at 10:24:49AM -0700, Eric Dumazet wrote:
> >>
> >>
> >> On 9/27/19 9:52 AM, Martin KaFai Lau wrote:
> >>>
On Fri, Sep 27, 2019 at 10:24:49AM -0700, Eric Dumazet wrote:
>
>
> On 9/27/19 9:52 AM, Martin KaFai Lau wrote:
> > In reuseport_array_free(), the rcu_read_lock() cannot ensure sk is still
> > valid. It is because bpf_sk_reuseport_detach() can be called from
> > __sk_destruct() which is invoked
On Tue, Aug 13, 2019 at 09:26:28AM -0700, Stanislav Fomichev wrote:
> Add new helper bpf_sk_storage_clone which optionally clones sk storage
> and call it from sk_clone_lock.
Acked-by: Martin KaFai Lau
On Fri, Aug 09, 2019 at 09:10:36AM -0700, Stanislav Fomichev wrote:
> Add new helper bpf_sk_storage_clone which optionally clones sk storage
> and call it from sk_clone_lock.
Thanks for v2. Sorry for the delay. I am traveling.
>
> Cc: Martin KaFai Lau
> Cc: Yonghong Song
> Signed-off-by: Stan
On Thu, Aug 08, 2019 at 08:28:30AM -0700, Stanislav Fomichev wrote:
> On 08/08, Martin Lau wrote:
> > On Wed, Aug 07, 2019 at 08:47:18AM -0700, Stanislav Fomichev wrote:
> > > Add new helper bpf_sk_storage_clone which optionally clones sk storage
> > > and call it from
On Wed, Aug 07, 2019 at 05:05:33PM -0700, Stanislav Fomichev wrote:
[ ... ]
> > > +int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk)
> > > +{
> > > + struct bpf_sk_storage *new_sk_storage = NULL;
> > > + struct bpf_sk_storage *sk_storage;
> > > + struct bpf_sk_storage_elem *selem;
On Wed, Aug 07, 2019 at 08:47:18AM -0700, Stanislav Fomichev wrote:
> Add new helper bpf_sk_storage_clone which optionally clones sk storage
> and call it from bpf_sk_storage_clone. Reuse the gap in
> bpf_sk_storage_elem to store clone/non-clone flag.
>
> Cc: Martin KaFai Lau
> Signed-off-by: Sta
On Tue, Jul 09, 2019 at 09:33:21AM -0700, Stanislav Fomichev wrote:
> On 06/11, Martin KaFai Lau wrote:
> > The cloned sk should not carry its parent-listener's sk_bpf_storage.
> > This patch fixes it by setting it back to NULL.
> Have you thought about some kind of inheritance for listener sockets
On Fri, Jul 12, 2019 at 10:25:55AM -0700, Andrii Nakryiko wrote:
> BTF verifier has a size resolution bug which in some circumstances leads to
> invalid size resolution for, e.g., TYPEDEF modifier. This happens if we have
> [1] PTR -> [2] TYPEDEF -> [3] ARRAY, in which case due to being in pointer
On Thu, Jun 13, 2019 at 01:14:46PM -0700, Andrii Nakryiko wrote:
> On Wed, Jun 12, 2019 at 12:08 PM Martin KaFai Lau wrote:
> >
> > There is SO_ATTACH_REUSEPORT_[CE]BPF but there is no DETACH.
> > This patch adds SO_DETACH_REUSEPORT_BPF sockopt. The same
> > sockopt can be used to undo both SO_AT
On Wed, Jun 12, 2019 at 12:59:17PM -0700, Stanislav Fomichev wrote:
> On 06/12, Martin KaFai Lau wrote:
> > This patch adds a test for the new sockopt SO_REUSEPORT_DETACH_BPF.
> >
> > '-I../../../../usr/include/' is added to the Makefile to get
> > the newly added SO_REUSEPORT_DETACH_BPF.
> >
> >
On Wed, Jun 12, 2019 at 12:59:17PM -0700, Stanislav Fomichev wrote:
> On 06/12, Martin KaFai Lau wrote:
> > This patch adds a test for the new sockopt SO_REUSEPORT_DETACH_BPF.
> >
> > '-I../../../../usr/include/' is added to the Makefile to get
> > the newly added SO_REUSEPORT_DETACH_BPF.
> >
> >
On Wed, Jun 12, 2019 at 02:53:35PM -0700, Alexei Starovoitov wrote:
> On 6/12/19 2:47 PM, Stanislav Fomichev wrote:
> CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(BPFDIR) -I$(GENDIR)
> $(GENFLAGS) -I../../../include \
> + -I../../../../usr/include/ \
> >>> Why not copy
On Wed, Jun 12, 2019 at 03:25:47PM -0700, Alexei Starovoitov wrote:
> On 6/12/19 3:15 PM, Martin Lau wrote:
> > On Wed, Jun 12, 2019 at 02:53:35PM -0700, Alexei Starovoitov wrote:
> >> On 6/12/19 2:47 PM, Stanislav Fomichev wrote:
> >>>>>> CFLAGS += -Wall -O2
On Tue, Jun 11, 2019 at 12:47:58AM +0200, Stefano Brivio wrote:
> On Mon, 10 Jun 2019 23:53:15 +0200
> Stefano Brivio wrote:
>
> > On Mon, 10 Jun 2019 15:38:06 -0600
> > David Ahern wrote:
> >
> > > in dot releases of stable trees, I think it would be better to converge
> > > on consistent beha
On Mon, Jun 10, 2019 at 03:38:06PM -0600, David Ahern wrote:
> The ability to list exceptions was deleted 2 years ago with 4.15. So far
> no one has complained that exceptions do not show up in route dumps.
> Rather than perturb the system again and worse with different behaviors,
> in dot releases
On Mon, Jun 10, 2019 at 02:08:22PM -0700, Stanislav Fomichev wrote:
> This series implements two new per-cgroup hooks: getsockopt and
> setsockopt along with a new sockopt program type. The idea is pretty
> similar to recently introduced cgroup sysctl hooks, but
> implementation is simpler (no need
On Mon, Jun 10, 2019 at 10:46:55AM -0700, Andrii Nakryiko wrote:
> Fix signature of bpf_probe_read and bpf_probe_write_user to mark source
> pointer as const. This causes warnings during compilation for
> applications relying on those helpers.
Acked-by: Martin KaFai Lau
On Sat, Jun 08, 2019 at 12:54:19PM -0700, Jonathan Lemon wrote:
> If the leftmost parent node of the tree has does not have a child
> on the left side, then trie_get_next_key (and bpftool map dump) will
> not look at the child on the right. This leads to the traversal
> missing elements.
Good catc
On Mon, Jun 10, 2019 at 12:35:58PM -0700, Stanislav Fomichev wrote:
> On 06/10, Martin Lau wrote:
> > On Mon, Jun 10, 2019 at 09:34:14AM -0700, Stanislav Fomichev wrote:
> > > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and
> > > BPF_CGROUP_
On Sat, Jun 08, 2019 at 05:47:07PM +0200, Stefano Brivio wrote:
> On Sat, 8 Jun 2019 17:02:06 +0200
> Stefano Brivio wrote:
>
> > On Sat, 8 Jun 2019 07:19:23 +0000
> > Martin Lau wrote:
> >
> > > On Sat, Jun 08, 2019 at 07:59:11AM +0200, Stefano Brivio wr
BPF prog exits
> * 2: success, do _not_ execute kernel {s,g}etsockopt path after BPF
> prog exits
>
> v4:
> * don't export bpf_sk_fullsock helper (Martin Lau)
> * size != sizeof(__u64) for uapi pointers (Martin Lau)
> * offsetof instead of bpf_ctx_range when checking ctx
On Sat, Jun 08, 2019 at 07:59:11AM +0200, Stefano Brivio wrote:
> On Sat, 8 Jun 2019 05:40:06 +
> Martin Lau wrote:
>
> > On Thu, Jun 06, 2019 at 04:47:00PM -0600, David Ahern wrote:
> > > On 6/6/19 3:18 PM, Stefano Brivio wrote:
> > > > On Thu, 6 J
BPF prog exits
> * 2: success, do _not_ execute kernel {s,g}etsockopt path after BPF
> prog exits
>
> v3:
> * typos in BPF_PROG_CGROUP_SOCKOPT_RUN_ARRAY comments (Andrii Nakryiko)
> * reverse christmas tree in BPF_PROG_CGROUP_SOCKOPT_RUN_ARRAY (Andrii
> Nakryiko)
>
r
> listing, and wouldn't fix the issue with current and previous versions of
> iproute2.
>
> v2: Add tracking of number of entries to be skipped in current node after
> a partial dump. As we restart from the same node, if not all the
> exceptions for a given nod
On Thu, Jun 06, 2019 at 04:47:00PM -0600, David Ahern wrote:
> On 6/6/19 3:18 PM, Stefano Brivio wrote:
> > On Thu, 6 Jun 2019 14:57:33 -0600
> > David Ahern wrote:
> >
> >>> This will cause a non-trivial conflict with commit cc5c073a693f
> >>> ("ipv6: Move exception bucket to fib6_nh") on net-ne
On Thu, Jun 06, 2019 at 01:59:42PM -0700, Jonathan Lemon wrote:
> Check that bpf_map_lookup_elem lookup and structure
> access operats correctly.
>
> Signed-off-by: Jonathan Lemon
Acked-by: Martin KaFai Lau
On Thu, Jun 06, 2019 at 01:59:41PM -0700, Jonathan Lemon wrote:
> Sync uapi/linux/bpf.h
>
> Signed-off-by: Jonathan Lemon
Acked-by: Martin KaFai Lau
BPF prog exits
> * 2: success, do _not_ execute kernel {s,g}etsockopt path after BPF
> prog exits
>
> v2:
> * moved bpf_sockopt_kern fields around to remove a hole (Martin Lau)
> * aligned bpf_sockopt_kern->buf to 8 bytes (Martin Lau)
> * bpf_prog_array_is_empty inst
On Fri, Jun 07, 2019 at 12:58:52AM +0200, Stefano Brivio wrote:
> On Thu, 6 Jun 2019 22:37:11 +
> Martin Lau wrote:
>
> > On Fri, Jun 07, 2019 at 12:17:47AM +0200, Stefano Brivio wrote:
> > > On Thu, 6 Jun 2019 21:44:58 +
> > > Martin Lau wrote:
>
On Fri, Jun 07, 2019 at 12:17:47AM +0200, Stefano Brivio wrote:
> On Thu, 6 Jun 2019 21:44:58 +
> Martin Lau wrote:
>
> > > + if (!(filter->flags & RTM_F_CLONED)) {
> > > + err = rt6_fill_node(net, arg->skb, rt, NULL, NULL, NULL, 0,
> > &
On Thu, Jun 06, 2019 at 10:13:41PM +0200, Stefano Brivio wrote:
> Since commit 2b760fcf5cfb ("ipv6: hook up exception table to store dst
> cache"), route exceptions reside in a separate hash table, and won't be
> found by walking the FIB, so they won't be dumped to userspace on a
> RTM_GETROUTE mes
On Thu, Jun 06, 2019 at 09:58:37AM -0700, Hechao Li wrote:
> Use the newly added bpf_num_possible_cpus() in bpftool and selftests
> and remove duplicate implementations.
>
> Signed-off-by: Hechao Li
> ---
> tools/bpf/bpftool/common.c | 53 +++---
> tools/testing/s
On Thu, Jun 06, 2019 at 09:58:36AM -0700, Hechao Li wrote:
> Adding a new API libbpf_num_possible_cpus() that helps user with
> per-CPU map operations.
>
> Signed-off-by: Hechao Li
> ---
> tools/lib/bpf/libbpf.c | 53
> tools/lib/bpf/libbpf.h | 16 +++
On Thu, Jun 06, 2019 at 04:35:13PM +0200, Daniel Borkmann wrote:
> Please refer to the patch 1/4 as the main patch with the details
> on the current sendmsg hook API limitations and proposal to fix
> it in order to work with basic applications like DNS. Remaining
> patches are the usual uapi and to
On Wed, Jun 05, 2019 at 04:47:22PM -0700, Jakub Kicinski wrote:
> It seems like periodically someone posts patches to "fix"
> header includes. The issue is that samples expect the
> include path to have the uAPI headers (from usr/) first,
> and then tools/ headers, so that locally installed uAPI
>
On Wed, Jun 05, 2019 at 10:40:49PM +0200, Daniel Borkmann wrote:
> Intention of cgroup bind/connect/sendmsg BPF hooks is to act transparently
> to applications as also stated in original motivation in 7828f20e3779 ("Merge
> branch 'bpf-cgroup-bind-connect'"). When recently integrating the latter
>
On Wed, Jun 05, 2019 at 08:57:56AM -0700, Jonathan Lemon wrote:
> Currently, the AF_XDP code uses a separate map in order to
> determine if an xsk is bound to a queue. Instead of doing this,
> have bpf_map_lookup_elem() return a xdp_sock.
>
> Rearrange some xdp_sock members to eliminate structure
On Wed, Jun 05, 2019 at 02:16:30PM -0700, Stanislav Fomichev wrote:
> On 06/05, Martin Lau wrote:
> > On Wed, Jun 05, 2019 at 12:17:24PM -0700, Stanislav Fomichev wrote:
> > > On 06/05, Martin Lau wrote:
> > > > On Tue, Jun 04, 2019 at 02:35:18PM -
On Wed, Jun 05, 2019 at 12:17:24PM -0700, Stanislav Fomichev wrote:
> On 06/05, Martin Lau wrote:
> > On Tue, Jun 04, 2019 at 02:35:18PM -0700, Stanislav Fomichev wrote:
> > > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and
> > > BPF_CGROUP_
On Tue, Jun 04, 2019 at 02:35:18PM -0700, Stanislav Fomichev wrote:
> Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and
> BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks.
>
> BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments.
> BPF_CGROUP_GETSOCKOPT can modify the supplied bu
On Tue, Jun 04, 2019 at 08:05:58PM -0600, David Ahern wrote:
> On 6/4/19 6:39 PM, Martin Lau wrote:
> > IMO, ip6_create_rt_rcu(), which returns untracked rt, was a mistake
> > and removing it has been overdue. Tracking down the unregister dev
> > bug is not easy.
>
>
On Tue, Jun 04, 2019 at 02:36:27PM -0700, Wei Wang wrote:
> On Tue, Jun 4, 2019 at 2:13 PM David Ahern wrote:
> >
> > On 6/4/19 3:06 PM, Martin Lau wrote:
> > > On Tue, Jun 04, 2019 at 02:17:28PM -0600, David Ahern wrote:
> > >> On 6/3/19 11:29 PM, Martin Lau
On Tue, Jun 04, 2019 at 03:13:38PM -0600, David Ahern wrote:
> On 6/4/19 3:06 PM, Martin Lau wrote:
> > On Tue, Jun 04, 2019 at 02:17:28PM -0600, David Ahern wrote:
> >> On 6/3/19 11:29 PM, Martin Lau wrote:
> >>> On Mon, Jun 03, 2019 at 07:36:06PM -0600, David Aher
On Tue, Jun 04, 2019 at 02:17:28PM -0600, David Ahern wrote:
> On 6/3/19 11:29 PM, Martin Lau wrote:
> > On Mon, Jun 03, 2019 at 07:36:06PM -0600, David Ahern wrote:
> >> On 6/3/19 6:58 PM, Martin Lau wrote:
> >>> I have concern on calling ip6_create_rt_rcu() in gene
On Tue, Jun 04, 2019 at 10:25:23AM -0700, Jonathan Lemon wrote:
> On 4 Jun 2019, at 9:43, Jesper Dangaard Brouer wrote:
>
> > On Mon, 3 Jun 2019 09:38:51 -0700
> > Jonathan Lemon wrote:
> >
> >> Currently, the AF_XDP code uses a separate map in order to
> >> determine if an xsk is bound to a queu
On Mon, Jun 03, 2019 at 07:36:06PM -0600, David Ahern wrote:
> On 6/3/19 6:58 PM, Martin Lau wrote:
> > I have concern on calling ip6_create_rt_rcu() in general which seems
> > to trace back to this commit
> > dec9b0e295f6 ("net/ipv6: Add rt6_info create function for
On Mon, Jun 03, 2019 at 05:18:11PM -0600, David Ahern wrote:
> On 6/3/19 5:05 PM, Wei Wang wrote:
> > On Mon, Jun 3, 2019 at 3:35 PM David Ahern wrote:
> >>
> >> On 6/3/19 3:58 PM, Wei Wang wrote:
> >>> Hmm... I am still a bit concerned with the ip6_create_rt_rcu() call.
> >>> If we have a blackho
On Sat, Jun 01, 2019 at 04:54:46PM -0700, Song Liu wrote:
>
>
> > On May 31, 2019, at 3:29 PM, Martin KaFai Lau wrote:
> >
> > When the commit a6024562ffd7 ("udp: Add GRO functions to UDP socket")
> > added udp[46]_lib_lookup_skb to the udp_gro code path, it broke
> > the reuseport_select_sock(
On Tue, May 28, 2019 at 04:59:34PM -0700, brakmo wrote:
> This patchset adds support for propagating congestion notifications (cn)
> to TCP from cgroup inet skb egress BPF programs.
Acked-by: Martin KaFai Lau
On Sat, May 18, 2019 at 07:07:29PM -0700, Martin Lau wrote:
> On Sat, May 18, 2019 at 06:52:48PM -0700, Joe Stringer wrote:
> > On Sat, May 18, 2019, 09:05 Martin Lau wrote:
> > >
> > > On Sat, May 18, 2019 at 08:38:46AM -1000, Joe Stringer wrote:
> > > >
On Sat, May 18, 2019 at 06:52:48PM -0700, Joe Stringer wrote:
> On Sat, May 18, 2019, 09:05 Martin Lau wrote:
> >
> > On Sat, May 18, 2019 at 08:38:46AM -1000, Joe Stringer wrote:
> > > On Fri, May 17, 2019, 12:02 Martin Lau wrote:
> > >
> > > > O
On Sat, May 18, 2019 at 08:38:46AM -1000, Joe Stringer wrote:
> On Fri, May 17, 2019, 12:02 Martin Lau wrote:
>
> > On Fri, May 17, 2019 at 02:51:48PM -0700, Eric Dumazet wrote:
> > >
> > >
> > > On 5/17/19 2:21 PM, Martin KaFai Lau wrote:
> >
On Fri, May 17, 2019 at 02:51:48PM -0700, Eric Dumazet wrote:
>
>
> On 5/17/19 2:21 PM, Martin KaFai Lau wrote:
> > The BPF_FUNC_sk_lookup_xxx helpers return RET_PTR_TO_SOCKET_OR_NULL.
> > Meaning a fullsock ptr and its fullsock's fields in bpf_sock can be
> > accessed, e.g. type, protocol, mark
nfo is created for a gateway route with
> src addr. However, the lookup code is not able to find this route cache.
>
> Fixes: 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache")
> Reported-by: Mikael Magnusson
> Bisected-by: David Ahern
> Signed-off-by
nfo is created for a gateway route with
> src addr. However, the lookup code is not able to find this route cache.
>
> Fixes: 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache")
> Reported-by: Mikael Magnusson
> Bisected-by: David Ahern
> Signed-off-by
On Wed, May 15, 2019 at 07:39:52PM -0700, Eric Dumazet wrote:
> At ipv6 route dismantle, fib6_drop_pcpu_from() is responsible
> for finding all percpu routes and set their ->from pointer
> to NULL, so that fib6_ref can reach its expected value (1).
>
> The problem right now is that other cpus can
On Wed, May 15, 2019 at 06:06:58PM -0600, David Ahern wrote:
> On 5/15/19 6:03 PM, Wei Wang wrote:
> > Thanks Martin.
> > Changing __rt6_find_exception_xxx() might not be easy cause other
> > callers of this function does not really need to back off and use
> > another saddr.
> > And the validation
On Wed, May 15, 2019 at 11:31:44AM -0700, Wei Wang wrote:
> On Wed, May 15, 2019 at 11:06 AM Martin Lau wrote:
> >
> > On Tue, May 14, 2019 at 12:33:25PM -0700, Wei Wang wrote:
> > > I think the bug is because when creating exceptions, src_addr is not
> > > alway
On Tue, May 14, 2019 at 05:46:10PM -0700, Wei Wang wrote:
> From: Wei Wang
>
> When inserting route cache into the exception table, the key is
> generated with both src_addr and dest_addr with src addr routing.
> However, current logic always assumes the src_addr used to generate the
> key is a /
On Tue, May 14, 2019 at 12:33:25PM -0700, Wei Wang wrote:
> I think the bug is because when creating exceptions, src_addr is not
> always set even though fib6_info is in the subtree. (because of
> rt6_is_gw_or_nonexthop() check)
> However, when looking up for exceptions, we always set src_addr to t
On Wed, May 08, 2019 at 05:49:32PM +0100, Lorenz Bauer wrote:
> There are a few tests which call bpf_object__close on uninitialized
> bpf_object*, which may segfault. Explicitly zero-initialise these pointers
> to avoid this.
Acked-by: Martin KaFai Lau
On Thu, May 02, 2019 at 11:49:32AM -0400, Lorenz Bauer wrote:
> Currently, code like the following segfaults if bpf_prog_load_xattr
> returns an error:
>
> struct bpf_object *obj;
>
> err = bpf_prog_load_xattr(&attr, &obj, &prog_fd);
> bpf_object__close(obj);
This is a bug. err shoul
On Sun, Apr 28, 2019 at 12:22:25PM -0700, Eric Dumazet wrote:
> We had many syzbot reports that seem to be caused by use-after-free
> of struct fib6_info.
>
> ip6_dst_destroy(), fib6_drop_pcpu_from() and rt6_remove_exception()
> are writers vs rt->from, and use non consistent synchronization among
On Mon, Apr 29, 2019 at 08:40:17AM -0700, Martin KaFai Lau wrote:
> On Mon, Apr 29, 2019 at 01:56:11PM +, YueHaibing wrote:
> > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> Acked-by: Martin KaFai Lau
btw, that should go to the bpf-next branch.
On Mon, Apr 29, 2019 at 01:56:11PM +, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Acked-by: Martin KaFai Lau
On Fri, Apr 26, 2019 at 11:32:01AM -0700, Yonghong Song wrote:
>
>
> On 4/26/19 10:11 AM, Martin KaFai Lau wrote:
> > This patch adds BPF_MAP_TYPE_SK_STORAGE test to test_maps.
> > The src file is rather long, so it is put into another dir map_tests/
> > and compile like the current prog_tests/ d
On Fri, Apr 26, 2019 at 10:55:02AM -0700, Stanislav Fomichev wrote:
> On 04/26, Martin KaFai Lau wrote:
> > This patch rides on an existing BPF_PROG_TYPE_CGROUP_SKB test
> > (test_sock_fields.c) to do a TCP end-to-end test on the new
> > bpf_sk_storage_* helpers.
> >
> > Signed-off-by: Martin KaFa
On Fri, Apr 26, 2019 at 10:54:00AM -0700, Stanislav Fomichev wrote:
> On 04/26, Martin KaFai Lau wrote:
> > This patch adds BPF_MAP_TYPE_SK_STORAGE test to test_maps.
> > The src file is rather long, so it is put into another dir map_tests/
> > and compile like the current prog_tests/ does. Other
On Fri, Apr 26, 2019 at 10:52:20AM -0700, Stanislav Fomichev wrote:
> On 04/26, Martin KaFai Lau wrote:
> > After allowing a bpf prog to
> > - directly read the skb->sk ptr
> > - get the fullsock bpf_sock by "bpf_sk_fullsock()"
> > - get the bpf_tcp_sock by "bpf_tcp_sock()"
> > - get the listener s
On Fri, Apr 26, 2019 at 10:50:29AM -0700, Yonghong Song wrote:
>
>
> On 4/26/19 10:11 AM, Martin KaFai Lau wrote:
> > This patch supports probing for the new BPF_MAP_TYPE_SK_STORAGE.
> > BPF_MAP_TYPE_SK_STORAGE enforces BTF usage, so the new probe
> > requires to create and load a BTF also.
> >
On Fri, Apr 26, 2019 at 10:27:16AM -0700, Yonghong Song wrote:
>
>
> On 4/25/19 5:10 PM, Martin KaFai Lau wrote:
> > After allowing a bpf prog to
> > - directly read the skb->sk ptr
> > - get the fullsock bpf_sock by "bpf_sk_fullsock()"
> > - get the bpf_tcp_sock by "bpf_tcp_sock()"
> > - get the
On Wed, Apr 24, 2019 at 03:39:58PM -0700, Martin KaFai Lau wrote:
> This patch adds BPF_MAP_TYPE_SK_STORAGE test to test_maps.
> The src file is rather long, so it is put into another dir map_tests/
> and compile like the current prog_tests/ does. Other existing
> tests in test_maps can also be re
On Mon, Apr 15, 2019 at 09:54:55AM +, Viet Hoang Tran wrote:
> The helper function bpf_sock_ops_cb_flags_set() can be used to both
> set and clear the sock_ops callback flags. However, its current
> behavior is not consistent. BPF program may clear a flag if more than
> one were set, or replace
On Sun, Apr 14, 2019 at 03:29:30PM -0700, Eric Dumazet wrote:
>
>
> On 04/14/2019 02:21 PM, Jonathan Lemon wrote:
> > When __ip6_rt_update_pmtu() is called, rt->from is RCU dereferenced, but is
> > never checked for null - rt6_flush_exceptions() may have removed the entry.
> >
> > [ 1913.989004]
On Sun, Apr 14, 2019 at 02:21:29PM -0700, Jonathan Lemon wrote:
> When __ip6_rt_update_pmtu() is called, rt->from is RCU dereferenced, but is
> never checked for null - rt6_flush_exceptions() may have removed the entry.
>
> [ 1913.989004] RIP: 0010:ip6_rt_cache_alloc+0x13/0x170
> [ 1914.209410] Ca
1 - 100 of 224 matches
Mail list logo