On Tue, Apr 20, 2021 at 10:56:56PM +0200, Toke Høiland-Jørgensen wrote:
> Martin KaFai Lau writes:
>
> > On Thu, Apr 15, 2021 at 09:53:17PM +0800, Hangbin Liu wrote:
> >> From: Jesper Dangaard Brouer
> >>
> >> This changes the devmap XDP program suppor
On Thu, Apr 15, 2021 at 09:53:17PM +0800, Hangbin Liu wrote:
> From: Jesper Dangaard Brouer
>
> This changes the devmap XDP program support to run the program when the
> bulk queue is flushed instead of before the frame is enqueued. This has
> a couple of benefits:
>
> - It "sorts" the packets b
rc4 + patch | redirect_map multi i40e->veth |1.7M | 10.9M
> 5.12 rc4 + patch | redirect_map multi i40e->mlx4+veth |1.2M | 3.8M
>
> Acked-by: Toke Høiland-Jørgensen
> Signed-off-by: Hangbin Liu
>
> ---
> v8:
> use hlist_for_each_entry_rcu() when looping the devmap hash ojbs
Acked-by: Martin KaFai Lau
f this patchset.
>
> The tests were updated to reflect all the new changes.
Acked-by: Martin KaFai Lau
On Fri, Apr 16, 2021 at 03:45:23PM +0200, Jesper Dangaard Brouer wrote:
> On Thu, 15 Apr 2021 17:39:13 -0700
> Martin KaFai Lau wrote:
>
> > On Thu, Apr 15, 2021 at 10:29:40PM +0200, Toke Høiland-Jørgensen wrote:
> > > Jesper Dangaard Brouer writes:
> > >
>
On Fri, Apr 16, 2021 at 12:03:41PM +0200, Toke Høiland-Jørgensen wrote:
> Martin KaFai Lau writes:
>
> > On Thu, Apr 15, 2021 at 10:29:40PM +0200, Toke Høiland-Jørgensen wrote:
> >> Jesper Dangaard Brouer writes:
> >>
> >> > On Thu, 15 Apr 2021 10:
On Thu, Apr 15, 2021 at 10:29:40PM +0200, Toke Høiland-Jørgensen wrote:
> Jesper Dangaard Brouer writes:
>
> > On Thu, 15 Apr 2021 10:35:51 -0700
> > Martin KaFai Lau wrote:
> >
> >> On Thu, Apr 15, 2021 at 11:22:19AM +0200, Toke Høiland-Jørgensen
On Thu, Apr 15, 2021 at 11:22:19AM +0200, Toke Høiland-Jørgensen wrote:
> Hangbin Liu writes:
>
> > On Wed, Apr 14, 2021 at 05:17:11PM -0700, Martin KaFai Lau wrote:
> >> > static void bq_xmit_all(struct xdp_dev_bulk_queue *bq, u32 flags)
> >> > {
> &g
On Wed, Apr 14, 2021 at 10:16:39PM +0800, zuoqil...@163.com wrote:
> From: zuoqilin
>
> Remove unused variable "ret2".
Please tag the targeting branch in the future as described in
Documentation/bpf/bpf_devel_QA.rst.
This one belongs to bpf-next.
Acked-by: Martin KaFai Lau
On Wed, Apr 14, 2021 at 08:26:08PM +0800, Hangbin Liu wrote:
[ ... ]
> +static __always_inline int __bpf_xdp_redirect_map(struct bpf_map *map, u32
> ifindex,
> + u64 flags, u64 flag_mask,
> void *lookup_
On Wed, Apr 14, 2021 at 08:26:07PM +0800, Hangbin Liu wrote:
[ ... ]
> diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
> index aa516472ce46..3980fb3bfb09 100644
> --- a/kernel/bpf/devmap.c
> +++ b/kernel/bpf/devmap.c
> @@ -57,6 +57,7 @@ struct xdp_dev_bulk_queue {
> struct list_head f
On Mon, Apr 12, 2021 at 04:40:01PM -0300, Pedro Tammela wrote:
> Follows the same logic as the hashtable tests.
>
> Signed-off-by: Pedro Tammela
> ---
> .../bpf/map_tests/array_map_batch_ops.c | 110 +-
> 1 file changed, 80 insertions(+), 30 deletions(-)
>
> diff --git a/t
The tracing test and the recent kfunc call test require
CONFIG_DYNAMIC_FTRACE. This patch adds it to the config file.
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/config | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/config
b/tools/testing
On Tue, Mar 30, 2021 at 11:44:39PM -0700, Andrii Nakryiko wrote:
> On Mon, Mar 29, 2021 at 12:11 PM Martin KaFai Lau wrote:
> >
> > On Mon, Mar 29, 2021 at 05:06:26PM +0100, Lorenz Bauer wrote:
> > > On Mon, 29 Mar 2021 at 02:25,
It will be difficult for others to follow. ]
> On Tue, Mar 30, 2021 at 2:43 PM Martin KaFai Lau wrote:
> >
> > On Tue, Mar 30, 2021 at 12:58:22PM -0700, Cong Wang wrote:
> > > On Tue, Mar 30, 2021 at 7:36 AM Alexei Starovoitov
> > > wrote:
> > > >
On Tue, Mar 30, 2021 at 12:58:22PM -0700, Cong Wang wrote:
> On Tue, Mar 30, 2021 at 7:36 AM Alexei Starovoitov
> wrote:
> >
> > On Tue, Mar 30, 2021 at 2:43 AM Lorenz Bauer wrote:
> > >
> > > On Thu, 25 Mar 2021 at 01:52, Martin KaFai Lau wrote:
> &g
This patch updates the README.rst to specify the clang requirement
to compile the bpf selftests that call kernel function.
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/README.rst | 14 ++
1 file changed, 14 insertions(+)
diff --git a/tools/testing/selftests/bpf
This patch updates bpf_design_QA.rst to clarify that the kernel
function callable by bpf program is not an ABI.
Signed-off-by: Martin KaFai Lau
---
Documentation/bpf/bpf_design_QA.rst | 15 +++
1 file changed, 15 insertions(+)
diff --git a/Documentation/bpf/bpf_design_QA.rst
b
This set updates the document about the bpf program calling kernel
function. In particular, updates are regarding to the clang
requirement in selftests and kfunc-call not an ABI.
Martin KaFai Lau (2):
bpf: Update bpf_design_QA.rst to clarify the kfunc call is not ABI
bpf: selftests: Update
Cong Wang
Reported-by: Lorenz Bauer
Signed-off-by: Martin KaFai Lau
---
net/ipv4/bpf_tcp_ca.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/bpf_tcp_ca.c b/net/ipv4/bpf_tcp_ca.c
index 6bb7b335ff9f..dff4f0eb96b0 100644
--- a/net/ipv4/bpf_tcp_ca.c
+++ b/net/ipv4/bpf_tcp_ca.c
@@ -18
On Mon, Mar 29, 2021 at 05:06:26PM +0100, Lorenz Bauer wrote:
> On Mon, 29 Mar 2021 at 02:25, Martin KaFai Lau wrote:
> >
> > > > >
> > > > > # pahole --version
> > > > > v1.17
> > > >
> > > > That is the most likely r
On Sun, Mar 28, 2021 at 01:13:35PM -0700, Cong Wang wrote:
> On Sat, Mar 27, 2021 at 3:54 PM Alexei Starovoitov
> wrote:
> >
> > On Sat, Mar 27, 2021 at 3:08 PM Cong Wang wrote:
> > > BTFIDS vmlinux
> > > FAILED unresolved symbol cubictcp_state
> > > make: *** [Makefile:1199: vmlinux] Error 25
There is a typo in the bbr function, s/even/event/.
This patch fixes it.
Fixes: e78aea8b2170 ("bpf: tcp: Put some tcp cong functions in allowlist for
bpf-tcp-cc")
Signed-off-by: Martin KaFai Lau
---
net/ipv4/bpf_tcp_ca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
On Thu, Mar 25, 2021 at 11:02:23PM +0100, Toke Høiland-Jørgensen wrote:
> Martin KaFai Lau writes:
>
> > This patch adds support to BPF verifier to allow bpf program calling
> > kernel function directly.
>
> Hi Martin
>
> This is exciting stuff! :)
>
>
return 0;
> + }
> +
> + log_buf = va_arg(args, char *);
> + if (!log_buf)
> + goto out;
> + if (err_str && strstr(log_buf, err_str) != NULL)
> + found = true;
> +out:
> + printf(format, log_buf);
> + return
On Thu, Mar 25, 2021 at 04:40:34PM +0100, Toke Høiland-Jørgensen wrote:
> This adds a selftest to check that the verifier rejects a TCP CC struct_ops
> with a non-GPL license. To save having to add a whole new BPF object just
> for this, reuse the dctcp CC, but rewrite the license field before load
GPL compatible
> license\n");
> + return -EINVAL;
> + }
> +
Thanks for the patch.
A nit. Instead of sitting in between of the attach_btf_id check
and expected_attach_type check, how about moving it to the beginning
of this function. Checking attach_btf_id and expected_attach_type
would make more sense to be done next to each other as in the current
code.
Acked-by: Martin KaFai Lau
This patch adds a few kernel function bpf_kfunc_call_test*() for the
selftest's test_run purpose. They will be allowed for tc_cls prog.
The selftest calling the kernel function bpf_kfunc_call_test*()
is also added in this patch.
Signed-off-by: Martin KaFai Lau
---
include/linux/
() instead.
Acked-by: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/bpf_tcp_helpers.h | 29 ++-
tools/testing/selftests/bpf/progs/bpf_cubic.c | 6 ++--
tools/testing/selftests/bpf/progs/bpf_dctcp.c | 22 --
3 files changed, 11 insertions
As a similar chanage in the kernel, this patch gives the proper
name to the bpf cubic.
Acked-by: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/progs/bpf_cubic.c | 30 +--
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/tools
e required LLVM patch: https://reviews.llvm.org/D93563
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 174 ++---
1 file changed, 162 insertions(+), 12 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 23148566ab3a..c65
existing is_ldimm64() helper
is renamed to is_ldimm64_insn() for consistency.
Acked-by: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 63 +++---
1 file changed, 34 insertions(+), 29 deletions(-)
diff --git a/tools/lib/bpf
This patch renames RELO_EXTERN to RELO_EXTERN_VAR.
It is to avoid the confusion with a later patch adding
RELO_EXTERN_FUNC.
Acked-by: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/lib
This patch refactors code, that finds kernel btf_id by kind
and symbol name, to a new function find_ksym_btf_id().
It also adds a new helper __btf_kind_str() to return
a string by the numeric kind value.
Acked-by: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 44
: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 124 ++---
1 file changed, 67 insertions(+), 57 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 058b643cbcb1..57123a2179b4 100644
--- a/tools/lib/bpf
.
When any of them has changed, the bpf-tcp-cc program has to be changed
like any in-tree/out-of-tree kernel tcp-cc implementations do also.
Acked-by: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
---
net/ipv4/bpf_tcp_ca.c | 41 +
1 file changed, 41
one to call during bpf prog load time.
Signed-off-by: Martin KaFai Lau
---
net/ipv4/tcp_cubic.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index ffcbe46dacdb..4a30deaa9a37 100644
--- a/net/ipv4
the same way as
it displays other bpf helper calls.
gpl_compatible program is required to call kernel function.
This feature currently requires JIT.
The verifier selftests are adjusted because of the changes in
the verbose log in add_subprog_and_kfunc().
Signed-off-by: Martin KaFai Lau
---
arch
This patch adds kernel function call support to the x86-32 bpf jit.
Signed-off-by: Martin KaFai Lau
---
arch/x86/net/bpf_jit_comp32.c | 198 ++
1 file changed, 198 insertions(+)
diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c
index
function call descriptors will also
be done in the "bpf_prog_jit_attempt_done()".
"bpf_prog_free_linfo()" is removed since it is only called by
"__bpf_prog_put_noref()". The kvfree() are directly called
instead.
It also takes this chance to s/kcalloc/kvcalloc/ for
mprove the
indentation which will be useful for a later patch.
Some of the "btf_kind_str[]" usages is replaced with the shortcut
"btf_type_str(t)".
Signed-off-by: Martin KaFai Lau
---
include/linux/bpf.h | 4 +-
include/linux/btf.h | 5 +
ii)
- Move btf_func_linkage() from btf.h to libbpf.c in patch 11. (Andrii)
- Fixed the linker error when CONFIG_BPF_SYSCALL is not defined.
Moved the check_kfunc_call from filter.c to test_run.c in patch 14.
(kernel test robot)
Martin KaFai Lau (14):
bpf: Simplify freeing logic in linfo and jited_l
On Sat, Mar 20, 2021 at 10:18:36AM -0700, Andrii Nakryiko wrote:
> > From test_ksyms.c:
> > [22] DATASEC '.ksyms' size=0 vlen=5
> > type_id=12 offset=0 size=1
> > type_id=13 offset=0 size=1
> >
> > For extern, does it make sense for the libbpf to assign 0 to
> > both var offset and size s
On Fri, Mar 19, 2021 at 06:05:20PM +0100, Shanti Lombard née Bouchez-Mongardé
wrote:
> Le 19/03/2021 à 17:55, Martin KaFai Lau a écrit :
> > On Wed, Mar 17, 2021 at 10:04:18AM +0100, Shanti Lombard née
> > Bouchez-Mongardé wrote:
> > > Q1: How do we prevent socket lo
On Fri, Mar 19, 2021 at 04:02:27PM -0700, Andrii Nakryiko wrote:
> On Fri, Mar 19, 2021 at 3:45 PM Martin KaFai Lau wrote:
> >
> > On Fri, Mar 19, 2021 at 03:29:57PM -0700, Andrii Nakryiko wrote:
> > > On Fri, Mar 19, 2021 at 3:19 PM Martin KaFai Lau wrote:
> > &g
On Fri, Mar 19, 2021 at 03:29:57PM -0700, Andrii Nakryiko wrote:
> On Fri, Mar 19, 2021 at 3:19 PM Martin KaFai Lau wrote:
> >
> > On Fri, Mar 19, 2021 at 02:27:13PM -0700, Andrii Nakryiko wrote:
> > > On Thu, Mar 18, 2021 at 10:29 PM Martin KaFai Lau wrote:
> > &g
On Fri, Mar 19, 2021 at 02:27:13PM -0700, Andrii Nakryiko wrote:
> On Thu, Mar 18, 2021 at 10:29 PM Martin KaFai Lau wrote:
> >
> > On Thu, Mar 18, 2021 at 09:13:56PM -0700, Andrii Nakryiko wrote:
> > > On Thu, Mar 18, 2021 at 4:39 PM Martin KaFai Lau wrote:
> > &g
On Thu, Mar 18, 2021 at 06:03:49PM -0700, Andrii Nakryiko wrote:
> On Tue, Mar 16, 2021 at 12:01 AM Martin KaFai Lau wrote:
> >
> > This patch adds support to BPF verifier to allow bpf program calling
> > kernel function directly.
> >
> > The use case included i
On Thu, Mar 18, 2021 at 04:32:47PM -0700, Andrii Nakryiko wrote:
> On Tue, Mar 16, 2021 at 12:01 AM Martin KaFai Lau wrote:
> >
> > This patch refactors the core logic of "btf_check_func_arg_match()"
> > into a new function "do_btf_check_func_arg_match()".
On Wed, Mar 17, 2021 at 10:04:18AM +0100, Shanti Lombard née Bouchez-Mongardé
wrote:
> Hello everyone,
>
> Background discussion:
> https://lore.kernel.org/bpf/CAADnVQJnX-+9u--px_VnhrMTPB=o9y0lh9t7rjbqzflchbu...@mail.gmail.com/
>
> In a previous e-mail I was explaining that sk_lookup BPF progra
On Thu, Mar 18, 2021 at 09:21:08PM -0700, Andrii Nakryiko wrote:
> > --- /dev/null
> > +++ b/tools/testing/selftests/bpf/prog_tests/kfunc_call.c
> > @@ -0,0 +1,61 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/* Copyright (c) 2021 Facebook */
> > +#include
> > +#include
> > +#include "kfunc_ca
On Thu, Mar 18, 2021 at 09:13:56PM -0700, Andrii Nakryiko wrote:
> On Thu, Mar 18, 2021 at 4:39 PM Martin KaFai Lau wrote:
> >
> > On Thu, Mar 18, 2021 at 03:53:38PM -0700, Andrii Nakryiko wrote:
> > > On Tue, Mar 16, 2021 at 12:01 AM Martin KaFai Lau wrote:
> > &g
On Thu, Mar 18, 2021 at 09:11:39PM -0700, Andrii Nakryiko wrote:
> On Tue, Mar 16, 2021 at 12:02 AM Martin KaFai Lau wrote:
> >
> > This patch is to make libbpf able to handle the following extern
> > kernel function declaration and do the needed relocations before
> >
On Thu, Mar 18, 2021 at 03:53:38PM -0700, Andrii Nakryiko wrote:
> On Tue, Mar 16, 2021 at 12:01 AM Martin KaFai Lau wrote:
> >
> > This patch makes BTF verifier to accept extern func. It is used for
> > allowing bpf program to call a limited set of kernel functions
() instead.
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/bpf_tcp_helpers.h | 29 ++-
tools/testing/selftests/bpf/progs/bpf_cubic.c | 6 ++--
tools/testing/selftests/bpf/progs/bpf_dctcp.c | 22 --
3 files changed, 11 insertions(+), 46 deletions(-)
diff
This patch adds two kernel function bpf_kfunc_call_test[12]() for the
selftest's test_run purpose. They will be allowed for tc_cls prog.
The selftest calling the kernel function bpf_kfunc_call_test[12]()
is also added in this patch.
Signed-off-by: Martin KaFai Lau
---
net/bpf/test_
As a similar chanage in the kernel, this patch gives the proper
name to the bpf cubic.
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/progs/bpf_cubic.c | 30 +--
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs
are vars.
It also takes this chance to remove the
"if (... || (t->size && t->size != size)) { return -ENOENT; }" test
because t->size is zero at the point.
The required LLVM patch: https://reviews.llvm.org/D93563
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/bt
: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 125 ++---
1 file changed, 68 insertions(+), 57 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 2f351d3ad3e7..7d5f9b7877bc 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf
fixed ABI contract.
When any of them has changed, the bpf-tcp-cc program has to be changed
like any in-tree/out-of-tree kernel tcp-cc implementations do also.
Signed-off-by: Martin KaFai Lau
---
net/ipv4/bpf_tcp_ca.c | 41 +
1 file changed, 41 insertions
This patch renames RELO_EXTERN to RELO_EXTERN_VAR.
It is to avoid the confusion with a later patch adding
RELO_EXTERN_FUNC.
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf
This patch records the extern sym relocs first before recording
subprog relocs. The later patch will have relocs for extern
kernel function call which is also using BPF_JMP | BPF_CALL.
It will be easier to handle the extern symbols first in
the later patch.
Signed-off-by: Martin KaFai Lau
This patch refactors code, that finds kernel btf_id by kind
and symbol name, to a new function find_ksym_btf_id().
It also adds a new helper __btf_kind_str() to return
a string by the numeric kind value.
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 44
;
will be able to display the kernel function calls the same way as
it displays other bpf helper calls.
gpl_compatible program is required to call kernel function.
This feature currently requires JIT.
Signed-off-by: Martin KaFai Lau
---
arch/x86/net/bpf_jit_comp.c | 5 +
include/lin
one to call during bpf prog load time.
Signed-off-by: Martin KaFai Lau
---
net/ipv4/tcp_cubic.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index ffcbe46dacdb..4a30deaa9a37 100644
--- a/net/ipv4
This patch adds kernel function call support to the x86-32 bpf jit.
Signed-off-by: Martin KaFai Lau
---
arch/x86/net/bpf_jit_comp32.c | 198 ++
1 file changed, 198 insertions(+)
diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c
index
NC 'foo' type_id=24 linkage=extern
This patch allows BTF_FUNC_EXTERN in btf_func_check_meta().
Also extern kernel function declaration does not
necessary have arg name. Another change in btf_func_check() is
to allow extern function having no arg name.
The btf selftest is adjusted accordingly.
to improve the indentation
which will be useful for a later patch.
Some of the "btf_kind_str[]" usages is replaced with the shortcut
"btf_type_str(t)".
Signed-off-by: Martin KaFai Lau
---
include/linux/btf.h | 5 ++
kernel/bpf/btf.c| 159 +++
function call descriptors will also
be done in the "bpf_prog_jit_attempt_done()".
"bpf_prog_free_linfo()" is removed since it is only called by
"__bpf_prog_put_noref()". The kvfree() are directly called
instead.
It also takes this chance to s/kcalloc/kvcalloc/ for
ee and out-of-tree kernel tcp-cc
implementations have to be changed. The same goes for the struct_ops
bpf-tcp-cc programs which have to be adjusted accordingly.
Please see individual patch for details.
Martin KaFai Lau (15):
bpf: Simplify freeing logic in linfo and jited_linfo
bpf: btf: Suppo
ux.h for selftests build"),
> allow to provide pre-generated vmlinux.h for runqslower build.
Acked-by: Martin KaFai Lau
tches.
Acked-by: Martin KaFai Lau
owner of the counter, it is still possible to
> trigger deadlock on the other lock. For example, if bpf_local_storage_map
> owns the counters, it cannot prevent deadlock on bpf_local_storage->lock
> when two maps are used.
Acked-by: Martin KaFai Lau
n the task free path, e.g.
> exit_creds(). To avoid allocating task local storage after
> bpf_task_storage_free(). bpf_task_storage_get() is updated to not allocate
> new storage when the task is not refcounted (task->usage == 0).
Acked-by: Martin KaFai Lau
On Mon, Feb 22, 2021 at 05:20:14PM -0800, Song Liu wrote:
> Replace hashtab with task local storage in runqslower. This improves the
> performance of these BPF programs. The following table summarizes average
> runtime of these programs, in nanoseconds:
>
> task-local h
On Mon, Feb 22, 2021 at 05:20:13PM -0800, Song Liu wrote:
> Update the Makefile to prefer using $(O)/mvlinux, $(KBUILD_OUTPUT)/vmlinux
s/mvlinux/vmlinux/
On Mon, Feb 22, 2021 at 05:20:09PM -0800, Song Liu wrote:
[ ... ]
> diff --git a/kernel/bpf/bpf_task_storage.c b/kernel/bpf/bpf_task_storage.c
> index e0da0258b732d..2034019966d44 100644
> --- a/kernel/bpf/bpf_task_storage.c
> +++ b/kernel/bpf/bpf_task_storage.c
> @@ -15,7 +15,6 @@
> #include
>
; definition differences between kernels.
Acked-by: Martin KaFai Lau
[ Acked-by and Reviewed-by can be carried over to
the following revisions if the change is obvious.
Also, it is useful to comment on what has
changed between revisions. There is no need
to resend this patch just for this though. ]
ween kernels.
Acked-by: Martin KaFai Lau
This patch adds a "void *owner" member. The existing
bpf_tcp_ca test will ensure the bpf_cubic.o and bpf_dctcp.o
can be loaded.
Acked-by: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/bpf_tcp_helpers.h | 1 +
1 file changed, 1 insertion(+)
diff --g
type is no longer needed. Remove:
"skip_mods_and_typedefs(btf, mtype->type, &mtype_id)"
- Do "if (!prog)" test before skip_mods_and_typedefs.
Fixes: 590a00888250 ("bpf: libbpf: Add STRUCT_OPS support")
Acked-by: Andrii Nakryiko
Signed-off-by: Martin KaFai Lau
On Wed, Feb 10, 2021 at 06:07:04PM -0800, Andrii Nakryiko wrote:
> On Wed, Feb 10, 2021 at 5:55 PM Martin KaFai Lau wrote:
> >
> > On Wed, Feb 10, 2021 at 02:54:40PM -0800, Andrii Nakryiko wrote:
> > > On Wed, Feb 10, 2021 at 1:17 PM Martin KaFai Lau wrote:
> > &g
On Wed, Feb 10, 2021 at 02:54:40PM -0800, Andrii Nakryiko wrote:
> On Wed, Feb 10, 2021 at 1:17 PM Martin KaFai Lau wrote:
> >
> > On Wed, Feb 10, 2021 at 12:27:38PM -0800, Andrii Nakryiko wrote:
> > > On Tue, Feb 9, 2021 at 12:11 PM Martin KaFai Lau wrote:
> >
On Wed, Feb 10, 2021 at 12:26:20PM -0800, Andrii Nakryiko wrote:
> On Tue, Feb 9, 2021 at 12:40 PM Martin KaFai Lau wrote:
> >
> > When libbpf initializes the kernel's struct_ops in
> > "bpf_map__init_kern_struct_ops()", it enforces all
> > pointer ty
On Wed, Feb 10, 2021 at 12:27:38PM -0800, Andrii Nakryiko wrote:
> On Tue, Feb 9, 2021 at 12:11 PM Martin KaFai Lau wrote:
> >
> > This patch adds a "void *owner" member. The existing
> > bpf_tcp_ca test will ensure the bpf_cubic.o and bpf_dctcp.o
> > can be
urn;
>
> - if (node->type == BPF_LRU_LOCAL_LIST_T_PENDING) {
> + if (node_type == BPF_LRU_LOCAL_LIST_T_PENDING) {
I think this can be bpf-next.
Acked-by: Martin KaFai Lau
if (!prog) { continue; }".
The "btf_is_func_proto(mtype)" has already been guaranteed
in "bpf_object__collect_st_ops_relos()" which has been run
before "bpf_map__init_kern_struct_ops()". Thus, this check
is removed.
Fixes: 590a00888250 ("bpf: libbpf:
This patch adds a "void *owner" member. The existing
bpf_tcp_ca test will ensure the bpf_cubic.o and bpf_dctcp.o
can be loaded.
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/bpf_tcp_helpers.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/sel
On Tue, Jan 26, 2021 at 08:51:04AM -0800, Stanislav Fomichev wrote:
> Return 3 to indicate that permission check for port 111
> should be skipped.
>
[ ... ]
> +void cap_net_bind_service(cap_flag_value_t flag)
> +{
> + const cap_value_t cap_net_bind_service = CAP_NET_BIND_SERVICE;
> + cap
v3:
> - Update description (Martin KaFai Lau)
> - Fix capability restore in selftest (Martin KaFai Lau)
>
> v2:
> - Switch to explicit return code (Martin KaFai Lau)
>
[ ... ]
> @@ -499,7 +501,8 @@ int __inet_bind(struct sock *sk, struct sockaddr *uaddr,
> int addr_len
On Tue, Jan 26, 2021 at 11:35:44AM -0800, Stanislav Fomichev wrote:
> Return 3 to indicate that permission check for port 111
> should be skipped.
Acked-by: Martin KaFai Lau
v4:
> - Add missing IPv6 support (Martin KaFai Lau)
>
> v3:
> - Update description (Martin KaFai Lau)
> - Fix capability restore in selftest (Martin KaFai Lau)
>
> v2:
> - Switch to explicit return code (Martin KaFai Lau)
Reviewed-by: Martin KaFai Lau
On Mon, Jan 25, 2021 at 03:32:53PM -0800, Stanislav Fomichev wrote:
> On Mon, Jan 25, 2021 at 3:25 PM Martin KaFai Lau wrote:
> >
> > On Mon, Jan 25, 2021 at 09:26:40AM -0800, Stanislav Fomichev wrote:
> > > At the moment, BPF_CGROUP_INET{4,6}_BIND hooks can rewrit
>
> Cc: Andrey Ignatov
> Cc: Martin KaFai Lau
> Signed-off-by: Stanislav Fomichev
> ---
> .../selftests/bpf/prog_tests/bind_perm.c | 85 +++
> tools/testing/selftests/bpf/progs/bind_perm.c | 36
> 2 files changed, 121 insertions(+)
> c
On Mon, Jan 25, 2021 at 09:26:40AM -0800, Stanislav Fomichev wrote:
> At the moment, BPF_CGROUP_INET{4,6}_BIND hooks can rewrite user_port
> to the privileged ones (< ip_unprivileged_port_start), but it will
> be rejected later on in the __inet_bind or __inet6_bind.
>
> Let's export 'port_changed'
On Fri, Jan 22, 2021 at 08:16:40AM -0800, s...@google.com wrote:
> On 01/21, Martin KaFai Lau wrote:
> > On Thu, Jan 21, 2021 at 04:30:08PM -0800, s...@google.com wrote:
> > > On 01/21, Martin KaFai Lau wrote:
> > > > On Thu, Jan 21, 2021 at 02:57:44PM -0800, s...@goo
On Thu, Jan 21, 2021 at 04:30:08PM -0800, s...@google.com wrote:
> On 01/21, Martin KaFai Lau wrote:
> > On Thu, Jan 21, 2021 at 02:57:44PM -0800, s...@google.com wrote:
> > > On 01/21, Martin KaFai Lau wrote:
> > > > On Wed, Jan 20, 2021 at 05:22:41PM -
On Thu, Jan 21, 2021 at 02:57:44PM -0800, s...@google.com wrote:
> On 01/21, Martin KaFai Lau wrote:
> > On Wed, Jan 20, 2021 at 05:22:41PM -0800, Stanislav Fomichev wrote:
> > > BPF rewrites from 111 to 111, but it still should mark the port as
> > > "changed&quo
On Wed, Jan 20, 2021 at 05:22:41PM -0800, Stanislav Fomichev wrote:
> BPF rewrites from 111 to 111, but it still should mark the port as
> "changed".
> We also verify that if port isn't touched by BPF, it's still prohibited.
>
> Signed-off-by: Stanislav Fomichev
> ---
> .../selftests/bpf/prog_te
On Thu, Jan 21, 2021 at 09:40:19PM +0100, Shanti Lombard wrote:
> Le 2021-01-21 12:14, Jakub Sitnicki a écrit :
> > On Wed, Jan 20, 2021 at 10:06 PM CET, Alexei Starovoitov wrote:
> >
> > There is also documentation in the kernel:
> >
> > https://www.kernel.org/doc/html/latest/bpf/prog_sk_lookup.
1 - 100 of 1277 matches
Mail list logo