On Tue, Apr 20, 2021 at 8:45 AM Kuniyuki Iwashima wrote:
>
> This patch adds a test for BPF_SK_REUSEPORT_SELECT_OR_MIGRATE and
> removes 'static' from settimeo() in network_helpers.c.
>
> Signed-off-by: Kuniyuki Iwashima
> ---
Almost everything in prog_tests/migrate_reuseport.c should be static,
more explicit[1].
> >>
> >> This patch also updates the tests that relied on the macros.
> >>
> >> [1]
> >> https://lore.kernel.org/bpf/caef4bzymj_zpdq8zi4dbntbojkrpu2tvopysbnrdd9fohtf...@mail.gmail.com/
> >>
> >> Suggested-by: Andr
> >
> > Masami, you may want to use lore.kernel.org to read the history of this
> > thread.
> > ]
> >
> > On Thu, 15 Apr 2021 13:45:06 -0700
> > Andrii Nakryiko wrote:
> >
> > > > I don't know how the BPF code does it, but if you a
On Mon, Apr 19, 2021 at 5:18 AM Kumar Kartikeya Dwivedi
wrote:
>
> This adds some basic tests for the low level bpf_tc_cls_* API.
>
> Reviewed-by: Toke Høiland-Jørgensen
> Signed-off-by: Kumar Kartikeya Dwivedi
> ---
> .../selftests/bpf/prog_tests/test_tc_bpf.c| 112 ++
> ..
. In the follow up
patches this most probably will be relaxed, with __weak map definitions being
able to differ between each other (with non-weak definition always winning, of
course).
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/linker.c | 132 +
1 file
-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 3 +-
.../selftests/bpf/prog_tests/linked_vars.c| 43 +++
.../selftests/bpf/progs/linked_vars1.c| 54 ++
.../selftests/bpf/progs/linked_vars2.c| 55 +++
4 files
-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 4 +-
.../selftests/bpf/prog_tests/linked_maps.c| 30 +++
.../selftests/bpf/progs/linked_maps1.c| 82 +++
.../selftests/bpf/progs/linked_maps2.c| 76 +
4 files
turns off any
optimization and provides the best debugging experience.
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile
b/tools/testing/selftests/bpf/Makefile
weak function that "lost" (it leaves gaps in code with
no ELF symbols);
- correct handling of hidden visibility to turn global function into
"static" for the purpose of BPF verification.
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile |
n. This is by design,
so skip individual BPF skeletons and only validate them as part of their
linked final BPF object file and skeleton.
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing
e whole process, but
keeps the other parts much simpler due to stability of sec_var and VAR/FUNC
types, as well as ELF symbol, so please keep that in mind while reviewing.
BTF-defined maps require some extra custom logic and is addressed separate in
the next patch, so that to keep this one smalle
.
No functional changes are intended.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/linker.c | 233 ++---
1 file changed, 127 insertions(+), 106 deletions(-)
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
index 4e08bc07e635..0bb927226370 100644
Make skip_mods_and_typedefs(), btf_kind_str(), and btf_func_linkage() helpers
available outside of libbpf.c, to be used by static linker code.
Also do few cleanups (error code fixes, comment clean up, etc) that don't
deserve their own commit.
Signed-off-by: Andrii Nakryiko
---
tools/li
It should never fail, but if it does, it's better to know about this rather
than end up with nonsensical type IDs.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/linker.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
Add logic to validate extern symbols, plus some other minor extra checks, like
ELF symbol #0 validation, general symbol visibility and binding validations.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/linker.c | 43 +-
1 file changed, 34 insertions
ore information
(caller's context) into account during a subprogram validation.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_helpers.h | 8 ++
tools/lib/bpf/btf.c | 5
tools/lib/bpf/libbpf.c | 45 -
tools/lib/bpf/li
Add dumping of "extern" linkage for BTF VAR kind. Also shorten
"global-allocated" to "global" to be in line with FUNC's "global".
Signed-off-by: Andrii Nakryiko
---
tools/bpf/bpftool/btf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
dif
When used on externs SEC() macro will trigger compilation warning about
inapplicable `__attribute__((used))`. That's expected for extern declarations,
so suppress it with the corresponding _Pragma.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_helpers.h | 11 +--
1 file ch
that, but it
could be useful for backwards compatibility reasons later.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 256 ++--
tools/lib/bpf/libbpf_internal.h | 32
2 files changed, 177 insertions(+), 111 deletions(-)
diff --git a/tools/li
iscover all available BPF subprograms and
programs.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 56 --
1 file changed, 21 insertions(+), 35 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index ce5558d0a61b..a0e6d6bc47f3 1
'bpf_link_fops')
[39] DATASEC '.rodata' size=0 vlen=2
type_id=12 offset=0 size=4 (VAR 'input_rodata1')
type_id=15 offset=0 size=4 (VAR 'input_rodata_weak')
[40] DATASEC 'license' size=0 vlen=1
type_id=24 offset=0 size=4 (VAR 'LICENS
addressed in a follow up.
Andrii Nakryiko (17):
bpftool: support dumping BTF VAR's "extern" linkage
bpftool: dump more info about DATASEC members
libbpf: suppress compiler warning when using SEC() macro with externs
libbpf: mark BPF subprogs with hidden visibility as
On Wed, Apr 14, 2021 at 12:52 PM Jiri Olsa wrote:
>
> Replacing CHECK with ASSERT macros.
>
> Suggested-by: Andrii Nakryiko
> Signed-off-by: Jiri Olsa
> ---
thanks!
Acked-by: Andrii Nakryiko
> .../selftests/bpf/prog_tests/test_lsm.c | 27 +++
On Wed, Apr 14, 2021 at 5:43 PM Jiri Olsa wrote:
>
> Adding missing semicolon.
>
> Fixes: 22ba36351631 ("selftests/bpf: Move and extend ASSERT_xxx() testing
> macros")
> Signed-off-by: Jiri Olsa
> ---
this is already fixed by 1969b3c60db6 ("selftests/bpf: Fix the
ASSERT_ERR_PTR macro")
> tool
programs.
>
> Fixing missing unlock with proper cleanup goto jump reported
> by Julia.
>
> Reported-by: kernel test robot
> Reported-by: Julia Lawall
> Acked-by: Toke Høiland-Jørgensen
> Signed-off-by: Jiri Olsa
> ---
Acked-by: Andrii Nakryiko
> kernel/bpf/sy
On Thu, Apr 15, 2021 at 3:10 PM Daniel Borkmann wrote:
>
> On 4/15/21 1:58 AM, Andrii Nakryiko wrote:
> > On Wed, Apr 14, 2021 at 4:32 PM Daniel Borkmann
> > wrote:
> >> On 4/15/21 1:19 AM, Andrii Nakryiko wrote:
> >>> On Wed, Apr 14, 2021 at 3:51
On Thu, Apr 15, 2021 at 8:57 AM Toke Høiland-Jørgensen wrote:
>
> Andrii Nakryiko writes:
>
> > On Wed, Apr 14, 2021 at 3:51 PM Toke Høiland-Jørgensen
> > wrote:
> >>
> >> Andrii Nakryiko writes:
> >>
> >> > On Wed, A
On Thu, Apr 15, 2021 at 8:10 AM Steven Rostedt wrote:
>
> On Wed, 14 Apr 2021 15:46:49 -0700
> Andrii Nakryiko wrote:
>
> > On Wed, Apr 14, 2021 at 5:19 AM Jiri Olsa wrote:
> > >
> > > On Tue, Apr 13, 2021 at 06:04:05PM -0700, Andrii Nakryiko wrote:
> >
On Wed, Apr 14, 2021 at 7:01 PM Alexei Starovoitov
wrote:
>
> On Wed, Apr 14, 2021 at 04:48:25PM -0700, Andrii Nakryiko wrote:
> > On Wed, Apr 14, 2021 at 3:00 PM Alexei Starovoitov wrote:
> > >
> > > On 4/14/21 1:01 PM, Andrii Nakryiko wrote:
> > > > A
On Wed, Apr 14, 2021 at 1:02 PM Andrii Nakryiko wrote:
>
> Add BPF static linker support for extern resolution of global variables,
> functions, and BTF-defined maps.
>
> This patch set consists of 4 parts:
> - few patches are extending bpftool to simplify working with BTF
On Wed, Apr 14, 2021 at 3:15 PM David Laight wrote:
>
> From: Andrii Nakryiko
> > Sent: 14 April 2021 21:02
> >
> > While -Og is designed to work well with debugger, it's still inferior to -O0
> > in terms of debuggability experience. It will cause some variabl
On Wed, Apr 14, 2021 at 4:32 PM Daniel Borkmann wrote:
>
> On 4/15/21 1:19 AM, Andrii Nakryiko wrote:
> > On Wed, Apr 14, 2021 at 3:51 PM Toke Høiland-Jørgensen
> > wrote:
> >> Andrii Nakryiko writes:
> >>> On Wed, Apr 14, 2021 at 3:58 AM Toke Høiland
On Wed, Apr 14, 2021 at 3:00 PM Alexei Starovoitov wrote:
>
> On 4/14/21 1:01 PM, Andrii Nakryiko wrote:
> > Add extra logic to handle map externs (only BTF-defined maps are supported
> > for
> > linking). Re-use the map parsing logic used during bpf_object__open(). Map
&
On Wed, Apr 14, 2021 at 3:51 PM Toke Høiland-Jørgensen wrote:
>
> Andrii Nakryiko writes:
>
> > On Wed, Apr 14, 2021 at 3:58 AM Toke Høiland-Jørgensen
> > wrote:
> >>
> >> Andrii Nakryiko writes:
> >>
> >> > On Tue,
On Wed, Apr 14, 2021 at 5:19 AM Jiri Olsa wrote:
>
> On Tue, Apr 13, 2021 at 06:04:05PM -0700, Andrii Nakryiko wrote:
> > On Tue, Apr 13, 2021 at 7:57 AM Jiri Olsa wrote:
> > >
> > > hi,
> > > sending another attempt on speeding up load of multiple probe
On Wed, Apr 14, 2021 at 3:58 AM Toke Høiland-Jørgensen wrote:
>
> Andrii Nakryiko writes:
>
> > On Tue, Apr 6, 2021 at 3:06 AM Toke Høiland-Jørgensen
> > wrote:
> >>
> >> Andrii Nakryiko writes:
> >>
> >> > On Sat, Apr 3, 2021 at 1
On Wed, Apr 14, 2021 at 3:57 AM Jiri Olsa wrote:
>
> On Tue, Apr 13, 2021 at 02:54:10PM -0700, Andrii Nakryiko wrote:
>
> SNIP
>
> > > __u32 duration = 0, retval;
> > > + struct bpf_link *link;
> > > __u64 *result;
> > >
>
It should never fail, but if it does, it's better to know about this rather
than end up with nonsensical type IDs.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/linker.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 3 +-
.../selftests/bpf/prog_tests/linked_vars.c| 43 +
.../selftests/bpf/progs/linked_vars1.c| 60 ++
.../selftests/bpf/progs/linked_vars2.c| 61 +++
4 files
-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 4 +-
.../selftests/bpf/prog_tests/linked_maps.c| 33 ++
.../selftests/bpf/progs/linked_maps1.c| 102
.../selftests/bpf/progs/linked_maps2.c| 112 ++
4 files
n. This is by design,
so skip individual BPF skeletons and only validate them as part of their
linked final BPF object file and skeleton.
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing
weak function that "lost" (it leaves gaps in code with
no ELF symbols);
- correct handling of hidden visibility to turn global function into
"static" for the purpose of BPF verification.
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile |
turns off any
optimization and provides the best debugging experience.
Signed-off-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/Makefile | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile
b/tools/testing/selftests/bpf/Makefile
e whole process, but
keeps the other parts much simpler due to stability of sec_var and VAR/FUNC
types, as well as ELF symbol, so please keep that in mind while reviewing.
BTF-defined maps require some extra custom logic and is addressed separate in
the next patch, so that to keep this one smalle
, so I want to document it here.
Otherwise extern maps behave intuitively, just like extern vars and funcs.
Weak definitions are also supported.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/linker.c | 167 +
1 file changed, 167 insertions(+)
diff --git
Make skip_mods_and_typedefs(), btf_kind_str(), and btf_func_linkage() helpers
available outside of libbpf.c, to be used by static linker code.
Also do few cleanups (error code fixes, comment clean up, etc) that don't
deserve their own commit.
Signed-off-by: Andrii Nakryiko
---
tools/li
Add logic to validate extern symbols, plus some other minor extra checks, like
ELF symbol #0 validation, general symbol visibility and binding validations.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/linker.c | 43 +-
1 file changed, 34 insertions
iscover all available BPF subprograms and
programs.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 56 --
1 file changed, 21 insertions(+), 35 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index b6a7f62521a6..38c78195ce57 1
ore information
(caller's context) into account during a subprogram validation.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_helpers.h | 8 ++
tools/lib/bpf/btf.c | 5
tools/lib/bpf/libbpf.c | 45 -
tools/lib/bpf/li
.
No functional changes are intended.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/linker.c | 233 ++---
1 file changed, 127 insertions(+), 106 deletions(-)
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
index 4e08bc07e635..0bb927226370 100644
that, but it
could be useful for backwards compatibility reasons later.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 256 ++--
tools/lib/bpf/libbpf_internal.h | 32
2 files changed, 177 insertions(+), 111 deletions(-)
diff --git a/tools/li
'bpf_link_fops')
[39] DATASEC '.rodata' size=0 vlen=2
type_id=12 offset=0 size=4 (VAR 'input_rodata1')
type_id=15 offset=0 size=4 (VAR 'input_rodata_weak')
[40] DATASEC 'license' size=0 vlen=1
type_id=24 offset=0 size=4 (VAR 'LICENS
When used on externs SEC() macro will trigger compilation warning about
inapplicable `__attribute__((used))`. That's expected for extern declarations,
so suppress it with the corresponding _Pragma.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_helpers.h | 11 +--
1 file ch
Add dumping of "extern" linkage for BTF VAR kind. Also shorten
"global-allocated" to "global" to be in line with FUNC's "global".
Signed-off-by: Andrii Nakryiko
---
tools/bpf/bpftool/btf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
dif
d there is little reason
to do that anyways).
This and few other things will be the topic of the next set of patches.
Andrii Nakryiko (17):
bpftool: support dumping BTF VAR's "extern" linkage
bpftool: dump more info about DATASEC members
libbpf: suppress compiler warning wh
On Tue, Apr 13, 2021 at 7:57 AM Jiri Olsa wrote:
>
> hi,
> sending another attempt on speeding up load of multiple probes
> for bpftrace and possibly other tools (first post in [1]).
>
> This patchset adds support to attach bpf program directly to
> ftrace probe as suggested by Steven and it speed
On Tue, Apr 6, 2021 at 3:06 AM Toke Høiland-Jørgensen wrote:
>
> Andrii Nakryiko writes:
>
> > On Sat, Apr 3, 2021 at 10:47 AM Alexei Starovoitov
> > wrote:
> >>
> >> On Sat, Apr 03, 2021 at 12:38:06AM +0530, Kumar Kartikeya Dwivedi wrote:
> >>
On Mon, Apr 12, 2021 at 9:38 AM Randy Dunlap wrote:
>
> On 4/11/21 8:48 PM, a...@linux-foundation.org wrote:
> > The mm-of-the-moment snapshot 2021-04-11-20-47 has been uploaded to
> >
> >https://www.ozlabs.org/~akpm/mmotm/
> >
> > mmotm-readme.txt says
> >
> > README for mm-of-the-moment:
> >
On Mon, Apr 12, 2021 at 9:28 AM Jiri Olsa wrote:
>
> Currently we don't allow re-attaching of trampolines. Once
> it's detached, it can't be re-attach even when the program
> is still loaded.
>
> Adding the possibility to re-attach the loaded tracing and
> lsm programs.
>
> Fixing missing unlock w
ests/test_lsm.c | 48 +++
> 1 file changed, 38 insertions(+), 10 deletions(-)
>
Surprised you didn't switch this one to ASSERT, but ok, we can do it
some other time ;)
Acked-by: Andrii Nakryiko
> diff --git a/tools/testing/selftests/bpf/prog_tests/test_lsm.c
> b/tools/testing/
On Mon, Apr 12, 2021 at 9:30 AM Jiri Olsa wrote:
>
> Adding the test to re-attach (detach/attach again) tracing
> fexit programs, plus check that already linked program can't
> be attached again.
>
> Also switching to ASSERT* macros.
>
> Signed-off-by: Jiri Olsa
> ---
> .../selftests/bpf/prog_te
On Mon, Apr 12, 2021 at 9:29 AM Jiri Olsa wrote:
>
> Adding the test to re-attach (detach/attach again) tracing
> fentry programs, plus check that already linked program can't
> be attached again.
>
> Also switching to ASSERT* macros and adding missing ';' in
> ASSERT_ERR_PTR macro.
>
> Signed-off
On Mon, Apr 12, 2021 at 12:25 PM Pedro Tammela wrote:
>
> In 'bpf_ringbuf_reserve()' we require the flag to '0' at the moment.
>
> For 'bpf_ringbuf_{discard,submit,output}' a flag of '0' might send a
> notification to the process if needed.
>
> Signed-off-by: Pedro Tammela
> ---
Great, thanks! A
On Wed, Apr 7, 2021 at 4:24 PM Rustam Kovhaev wrote:
>
> On Mon, Mar 01, 2021 at 09:43:00PM +0100, Dmitry Vyukov wrote:
> > On Mon, Mar 1, 2021 at 9:39 PM Rustam Kovhaev wrote:
> > >
> > > On Mon, Mar 01, 2021 at 08:05:42PM +0100, Dmitry Vyukov wrote:
> > > > On Mon, Mar 1, 2021 at 5:21 PM Rustam
K() usage (please do consider updating to ASSERT):
Acked-by: Andrii Nakryiko
> .../selftests/bpf/prog_tests/module_attach.c | 23 +++
> 1 file changed, 23 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/module_attach.c
> b/tools/testin
On Wed, Apr 7, 2021 at 4:21 AM Jiri Olsa wrote:
>
> Adding the test to re-attach (detach/attach again) tracing
> fexit programs, plus check that already linked program can't
> be attached again.
>
> Fixing the number of check-ed results, which should be 8.
>
> Signed-off-by: Jiri Olsa
> ---
> ..
On Wed, Apr 7, 2021 at 4:21 AM Jiri Olsa wrote:
>
> Adding the test to re-attach (detach/attach again) tracing
> fentry programs, plus check that already linked program can't
> be attached again.
>
> Fixing the number of check-ed results, which should be 8.
>
> Signed-off-by: Jiri Olsa
> ---
> .
On Wed, Apr 7, 2021 at 1:10 PM Pedro Tammela wrote:
>
> Em qua., 7 de abr. de 2021 às 16:58, Andrii Nakryiko
> escreveu:
> >
> > On Wed, Apr 7, 2021 at 11:43 AM Joe Stringer wrote:
> > >
> > > Hi Pedro,
> > >
> > > On Tue, Apr 6,
On Wed, Apr 7, 2021 at 11:43 AM Joe Stringer wrote:
>
> Hi Pedro,
>
> On Tue, Apr 6, 2021 at 11:58 AM Pedro Tammela wrote:
> >
> > In 'bpf_ringbuf_reserve()' we require the flag to '0' at the moment.
> >
> > For 'bpf_ringbuf_{discard,submit,output}' a flag of '0' might send a
> > notification to
On Wed, Apr 7, 2021 at 12:30 PM Pedro Tammela wrote:
>
> Em qua., 7 de abr. de 2021 às 15:31, Andrii Nakryiko
> escreveu:
> >
> > On Tue, Apr 6, 2021 at 11:55 AM Pedro Tammela wrote:
> > >
> > > This macro was refactored out of the bpf selftests.
> &g
On Wed, Mar 31, 2021 at 6:08 PM syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:0f4498ce Merge tag 'for-5.12/dm-fixes-2' of git://git.kern..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1250e126d0
> kernel config:
On Tue, Apr 6, 2021 at 11:55 AM Pedro Tammela wrote:
>
> This macro was refactored out of the bpf selftests.
>
> Since percpu values are rounded up to '8' in the kernel, a careless
> user in userspace might encounter unexpected values when parsing the
> output of the batched operations.
I wonder
On Tue, Mar 30, 2021 at 11:45 PM Ciara Loftus wrote:
>
> If the call to xsk_socket__create fails, the user may want to retry the
> socket creation using the same umem. Ensure that the umem is in the
> same state on exit if the call fails by:
> 1. ensuring the umem _save pointers are unmodified.
>
On Sat, Apr 3, 2021 at 10:47 AM Alexei Starovoitov
wrote:
>
> On Sat, Apr 03, 2021 at 12:38:06AM +0530, Kumar Kartikeya Dwivedi wrote:
> > On Sat, Apr 03, 2021 at 12:02:14AM IST, Alexei Starovoitov wrote:
> > > On Fri, Apr 2, 2021 at 8:27 AM Kumar Kartikeya Dwivedi
> > > wrote:
> > > > [...]
> >
On Fri, Apr 2, 2021 at 8:27 AM Kumar Kartikeya Dwivedi wrote:
>
> On Fri, Apr 02, 2021 at 05:49:29AM IST, Daniel Borkmann wrote:
> > On 3/31/21 11:44 AM, Kumar Kartikeya Dwivedi wrote:
> > > On Wed, Mar 31, 2021 at 02:55:47AM IST, Daniel Borkmann wrote:
> > > > Do we even need the _block variant?
On Sun, Apr 4, 2021 at 9:01 PM Hengqi Chen wrote:
>
> Add missing ')' for KERNEL_VERSION macro.
>
> Signed-off-by: Hengqi Chen
> ---
Applied to bpf-next, thanks.
> tools/lib/bpf/bpf_helpers.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/bpf_helpers.h b
On Sun, Apr 4, 2021 at 2:53 AM Hengqi Chen wrote:
>
> Add missing ')' for KERNEL_VERSION macro.
>
> Signed-off-by: Hengqi Chen
> ---
The fix looks good, thank you. But your patch didn't make it into
bpf/netdev patchworks instance ([0]) most probably due to too long CC
list. Can you please re-sen
On Fri, Apr 2, 2021 at 5:31 PM Martin KaFai Lau wrote:
>
> 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(
On Sat, Apr 3, 2021 at 6:29 AM Pedro Tammela wrote:
>
> Em qua., 31 de mar. de 2021 às 04:02, Andrii Nakryiko
> escreveu:
> >
> > On Tue, Mar 30, 2021 at 4:16 PM Alexei Starovoitov
> > wrote:
> > >
> > > On Tue, Mar 30, 2021 at 3:54 PM Pedr
On Sat, Apr 3, 2021 at 6:34 AM Pedro Tammela wrote:
>
> Em qua., 31 de mar. de 2021 às 03:54, Andrii Nakryiko
> escreveu:
> >
> > On Sun, Mar 28, 2021 at 9:11 AM Pedro Tammela wrote:
> > >
> > > The current way to provide a no-op flag to 'bpf_ringbuf_
On Thu, Apr 1, 2021 at 12:51 PM Martin KaFai Lau wrote:
>
> 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, Mar 29, 2021 at 3:34 PM Stanislav Fomichev wrote:
>
> * make eprintf static, used only in main.c
> * initialize ret in eprintf
> * remove unused *tmp
>
> v3:
> * remove another err (Song Liu)
>
> v2:
> * remove unused 'int err = -1'
>
> Cc: Song Liu
> Signed-off-by: Stanislav Fomichev
>
On Mon, Mar 29, 2021 at 11:11 AM Jisheng Zhang
wrote:
>
> From: Jisheng Zhang
>
> This is useful for cross compile process to point linker to the
> correct libelf, libcap, libz path.
Is this enough to make cross-compilation of selftests/bpf work? I
think there was a discussion another day about
On Mon, Mar 29, 2021 at 9:28 AM Song Liu wrote:
>
>
>
> > On Mar 28, 2021, at 9:10 AM, Pedro Tammela wrote:
> >
> > 'bpf_ring_buffer__poll()' abstracts the polling method, so abstract the
> > constants that make the implementation don't wait or wait indefinetly
> > for data.
> >
> > Signed-off-by
On Tue, Mar 30, 2021 at 4:16 PM Alexei Starovoitov
wrote:
>
> On Tue, Mar 30, 2021 at 3:54 PM Pedro Tammela wrote:
> >
> > BPF_CALL_2(bpf_ringbuf_submit, void *, sample, u64, flags)
> > {
> > + if (unlikely(flags & ~(BPF_RB_NO_WAKEUP | BPF_RB_FORCE_WAKEUP)))
> > + return -EI
On Sun, Mar 28, 2021 at 9:12 AM Pedro Tammela wrote:
>
> The current code only checks flags in 'bpf_ringbuf_output()'.
>
> Signed-off-by: Pedro Tammela
> ---
> include/uapi/linux/bpf.h | 8
> kernel/bpf/ringbuf.c | 13 +++--
> tools/include/uapi/linux/bpf.h | 8
On Sun, Mar 28, 2021 at 9:11 AM Pedro Tammela wrote:
>
> The current way to provide a no-op flag to 'bpf_ringbuf_submit()',
> 'bpf_ringbuf_discard()' and 'bpf_ringbuf_output()' is to provide a '0'
> value.
>
> A '0' value might notify the consumer if it already caught up in processing,
> so let's
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, Martin KaFai Lau wrote:
> > >
> > > > > >
> > > > > > # pahole --version
> > > > > > v1.17
> > > > >
> > > > > That is the most likely reaso
On Sun, Mar 28, 2021 at 1:11 AM Kumar Kartikeya Dwivedi
wrote:
>
> On Sun, Mar 28, 2021 at 10:12:40AM IST, Andrii Nakryiko wrote:
> > Is there some succinct but complete enough documentation/tutorial/etc
> > that I can reasonably read to understand kernel APIs provided by TC
&
On Mon, Mar 29, 2021 at 8:28 PM Alexei Starovoitov
wrote:
>
> On Sun, Mar 28, 2021 at 07:38:42PM -0700, Andrii Nakryiko wrote:
> >
> > See above. I don't know which hassle is libbpf for users today. You
> > were implying code size used for functionality users mi
On Mon, Mar 29, 2021 at 11:56 AM Alexei Starovoitov
wrote:
>
> On Sun, Mar 28, 2021 at 11:09:23PM -0700, Andrii Nakryiko wrote:
> >
> > BPF skeleton works just fine without BTF, if BPF programs don't use
> > global data. I have no way of knowing how BPF skeleton
On Sun, Mar 28, 2021 at 6:16 PM Alexei Starovoitov
wrote:
>
> On Fri, Mar 26, 2021 at 9:44 AM Andrii Nakryiko
> wrote:
> > > Because they double the maintenance cost now and double the support
> > > forever.
> > > We never needed to worry about skeleton wit
On Sun, Mar 28, 2021 at 6:40 PM Alexei Starovoitov
wrote:
>
> On Sat, Mar 27, 2021 at 09:32:58PM -0700, Andrii Nakryiko wrote:
> > > I think it's better to start with new library for tc/xdp and have
> > > libbpf as a dependency on that new lib.
> > > For ex
On Sun, Mar 28, 2021 at 5:03 AM Jiri Olsa wrote:
>
> On Fri, Mar 19, 2021 at 07:58:13PM +0100, Jiri Olsa wrote:
> > On Fri, Mar 19, 2021 at 11:39:01AM -0700, Andrii Nakryiko wrote:
> > > On Fri, Mar 19, 2021 at 9:23 AM Jiri Olsa wrote:
> > > >
> > >
t; few
> lines above?
Map does use f_flags, so we need to let them through. Or did you mean
to do a (type != BPF_TYPE_MAP && f_flags != O_RDWR) check?
Either way is fine with me, so:
Acked-by: Andrii Nakryiko
>
> Thanks,
> Song
>
> >
> > if (type == BP
a way to override this behaviour for programs
> and links.
>
> Fixes: 70ed506c3bbc ("bpf: Introduce pinnable bpf_link abstraction")
> Signed-off-by: Lorenz Bauer
> ---
LGTM.
Acked-by: Andrii Nakryiko
> kernel/bpf/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1
On Thu, Mar 25, 2021 at 5:02 AM Kumar Kartikeya Dwivedi
wrote:
>
> This adds functions that wrap the netlink API used for adding,
> manipulating, and removing filters and actions. These functions operate
> directly on the loaded prog's fd, and return a handle to the filter and
> action using an ou
On Fri, Mar 26, 2021 at 7:15 PM Alexei Starovoitov
wrote:
>
> On Thu, Mar 25, 2021 at 05:30:03PM +0530, Kumar Kartikeya Dwivedi wrote:
> > This adds some basic tests for the low level bpf_tc_* API and its
> > bpf_program__attach_tc_* wrapper on top.
>
> *_block() apis from patch 3 and 4 are not co
Free temporary allocated memory used to construct finalized .BTF.ext data.
Found by Coverity static analysis on libbpf's Github repo.
Fixes: 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support")
Signed-off-by: Andrii Nakryiko
---
tools/lib/bp
On Fri, Mar 26, 2021 at 8:54 PM Kumar Kartikeya Dwivedi
wrote:
>
> On Sat, Mar 27, 2021 at 04:55:51AM IST, Andrii Nakryiko wrote:
> > On Thu, Mar 25, 2021 at 5:01 AM Kumar Kartikeya Dwivedi
> > wrote:
> > >
> > > Update the header file so we can use the new
1 - 100 of 3095 matches
Mail list logo