On Tue, Apr 20, 2021 at 08:33:43AM -0700, Alexei Starovoitov wrote:
> On Tue, Apr 20, 2021 at 5:51 AM Jiri Olsa wrote:
> >
> > On Fri, Apr 16, 2021 at 12:48:34PM -0400, Steven Rostedt wrote:
> > > On Sat, 17 Apr 2021 00:03:04 +0900
> > > Masami Hiramatsu wr
2
$ make
make[1]: Nothing to be done for 'docs'.
Cc: Joe Stringer
Fixes: a01d935b2e09 ("tools/bpf: Remove bpf-helpers from bpftool docs")
Signed-off-by: Jiri Olsa
---
tools/testing/selftests/bpf/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
On Fri, Apr 16, 2021 at 12:48:34PM -0400, Steven Rostedt wrote:
> On Sat, 17 Apr 2021 00:03:04 +0900
> Masami Hiramatsu wrote:
>
> > > Anyway, IIRC, Masami wasn't sure that the full regs was ever needed for
> > > the
> > > return (who cares about the registers on return, except for the return
>
On Thu, Apr 15, 2021 at 07:30:32PM -0400, Steven Rostedt wrote:
> On Thu, 15 Apr 2021 23:49:43 +0200
> Jiri Olsa wrote:
>
>
> > right, I quickly checked on that and it looks exactly like
> > the thing we need
> >
> > I'll try to rebase that on the cu
On Thu, Apr 15, 2021 at 04:45:24PM -0700, Alexei Starovoitov wrote:
> On Wed, Apr 14, 2021 at 12:52 PM Jiri Olsa wrote:
> >
> > hi,
> > while adding test for pinning the module while there's
> > trampoline attach to it, I noticed that we don't allow
> &
On Thu, Apr 15, 2021 at 02:21:20PM -0400, Steven Rostedt wrote:
> On Thu, 15 Apr 2021 14:18:31 -0400
> Steven Rostedt wrote:
>
> > My last release of that code is here:
> >
> > https://lore.kernel.org/lkml/20190525031633.811342...@goodmis.org/
> >
> > It allows you to "reserve data" to pass f
On Thu, Apr 15, 2021 at 11:10:02AM -0400, Steven Rostedt wrote:
SNIP
> > > heya,
> > > I had some initial prototypes trying this way, but always ended up
> > > in complicated code, that's why I turned to ftrace_ops.
> > >
> > > let's see if it'll make any sense to you ;-)
> > >
> > > 1) so let's
On Wed, Apr 14, 2021 at 03:46:49PM -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 Tue, Apr 13, 2021 at 7:57 AM Jiri Olsa wrote:
> > > >
> &g
Replacing CHECK with ASSERT macros.
Suggested-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/test_lsm.c | 27 +++
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/test_lsm.c
b/tools
Adding test to verify that once we attach module's trampoline,
the module can't be unloaded.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/module_attach.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/testing/sel
Adding the test to re-attach (detach/attach again) lsm programs,
plus check that already linked program can't be attached again.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/test_lsm.c | 48 +++
1 file changed, 38 insertions(+
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.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/fexit_test.c
Adding the test to re-attach (detach/attach again) tracing
fentry programs, plus check that already linked program can't
be attached again.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/fentry_test.c| 52 +--
1 file change
Adding missing semicolon.
Fixes: 22ba36351631 ("selftests/bpf: Move and extend ASSERT_xxx() testing
macros")
Signed-off-by: Jiri Olsa
---
tools/testing/selftests/bpf/test_progs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_
a.
Reported-by: kernel test robot
Reported-by: Julia Lawall
Acked-by: Toke Høiland-Jørgensen
Signed-off-by: Jiri Olsa
---
kernel/bpf/syscall.c| 23 +--
kernel/bpf/trampoline.c | 4 ++--
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/kernel/bpf/syscall
pass.
v5 changes:
- fixed missing hlist_del_init change
- fixed several ASSERT calls
- added extra patch for missing ';'
- added ASSERT macros to lsm test
- added acks
thanks,
jirka
[1] https://lore.kernel.org/bpf/20210326105900.151466-1-jo...@kernel.org/
---
Jiri Olsa (7):
b
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 probes
> > for bpftrace and possibly other tools (first post in [1]).
> >
On Tue, Apr 13, 2021 at 02:55:32PM -0700, Andrii Nakryiko wrote:
> 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
On Tue, Apr 13, 2021 at 03:03:27PM -0700, Andrii Nakryiko wrote:
> 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 st
On Tue, Apr 13, 2021 at 02:54:10PM -0700, Andrii Nakryiko wrote:
SNIP
> > __u32 duration = 0, retval;
> > + struct bpf_link *link;
> > __u64 *result;
> >
> > - fentry_skel = fentry_test__open_and_load();
> > - if (CHECK(!fentry_skel, "fentry_skel_load", "fentry s
On Tue, Apr 13, 2021 at 02:57:26PM -0700, Andrii Nakryiko wrote:
> On Mon, Apr 12, 2021 at 9:31 AM Jiri Olsa wrote:
> >
> > Adding the test to re-attach (detach/attach again) lsm programs,
> > plus check that already linked program can't be attached again.
> &
trace_probe as probe, but we could change it to use any
function with same prototype if needed.
Signed-off-by: Jiri Olsa
---
include/uapi/linux/bpf.h | 3 +
kernel/bpf/syscall.c | 147 +
kernel/bpf/verifier.c | 30 +++
net/bpf/test_ru
Adding 2 more tests for fentry probe test,
to show/test ftrace probe.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/fentry_test.c | 5 -
tools/testing/selftests/bpf/progs/fentry_test.c | 16
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a
Signed-off-by: Jiri Olsa
---
tools/lib/bpf/bpf.c | 12 +++
tools/lib/bpf/bpf.h | 5 ++-
tools/lib/bpf/libbpf.c | 74
tools/lib/bpf/libbpf.map | 1 +
4 files changed, 91 insertions(+), 1 deletion(-)
diff --git a/tools/lib/bpf/bpf.c b/tool
Adding simple ftrace probe test that configures ftrace
probe and verifies the 'ip' argument matches the probed
functions addresses.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/ftrace_test.c| 48 +++
.../testing/selftests/bpf/progs/ftrace_test.c | 17
o available in
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
bpf/ftrace
thanks,
jirka
[1] https://lore.kernel.org/bpf/20201022082138.2322434-1-jo...@kernel.org/
---
Jiri Olsa (7):
bpf: Move bpf_prog_start/end functions to generic place
bpf: Add bpf_functions o
fd is returned.
For fd >= 0 the function (specified by btf_id) is added
to the existing object for the given fd.
Signed-off-by: Jiri Olsa
---
include/uapi/linux/bpf.h | 5 ++
kernel/bpf/syscall.c | 137 +
tools/include/uapi/linux/bpf.h | 5 ++
Adding btf__find_by_pattern_kind function that returns
array of BTF ids for given function name pattern.
Using libc's regex.h support for that.
Signed-off-by: Jiri Olsa
---
tools/lib/bpf/btf.c | 68 +
tools/lib/bpf/btf.h | 3 ++
2 files change
Moving bpf_prog_start/end functions plus related static
functions to generic place. So they can be used also when
trampolines are disabled.
Reported-by: kernel test robot
Signed-off-by: Jiri Olsa
---
kernel/bpf/syscall.c| 97 +
kernel/bpf
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_tests/fexit_test.c | 51 +--
1 file change
Adding the test to re-attach (detach/attach again) lsm programs,
plus check that already linked program can't be attached again.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/test_lsm.c | 48 +++
1 file changed, 38 insertions(+), 10 deletions(-)
diff --
Adding test to verify that once we attach module's trampoline,
the module can't be unloaded.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/module_attach.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/testing/sel
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-by: Jiri Olsa
---
.../selftests/bpf/prog_test
a.
Reported-by: kernel test robot
Reported-by: Julia Lawall
Acked-by: Toke Høiland-Jørgensen
Signed-off-by: Jiri Olsa
---
kernel/bpf/syscall.c| 23 +--
kernel/bpf/trampoline.c | 2 +-
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/kernel/bpf/syscall
pass.
v4 changes:
- fix wrong cleanup goto jump reported by Julia
thanks,
jirka
[1] https://lore.kernel.org/bpf/20210326105900.151466-1-jo...@kernel.org/
---
Jiri Olsa (5):
bpf: Allow trampoline re-attach for tracing and lsm programs
selftests/bpf: Add re-attach test to fentry_test
lt;20210411130010.1337650-2-jo...@kernel.org>
> References: <20210411130010.1337650-2-jo...@kernel.org>
> TO: Jiri Olsa
> TO: Alexei Starovoitov
> TO: Daniel Borkmann
> TO: Andrii Nakryiko
> CC: "Toke Høiland-Jørgensen"
> CC: netdev@vger.kernel.org
Adding the test to re-attach (detach/attach again) lsm programs,
plus check that already linked program can't be attached again.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/test_lsm.c | 48 +++
1 file changed, 38 insertions(+), 10 deletions(-)
diff --
Adding test to verify that once we attach module's trampoline,
the module can't be unloaded.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/module_attach.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/testing/sel
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-by: Jiri Olsa
---
.../selftests/bpf/prog_test
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_tests/fexit_test.c | 51 +--
1 file change
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.
Acked-by: Toke Høiland-Jørgensen
Signed-off-by: Jiri Olsa
---
kerne
pass.
v3 changes:
- used ASSERT* macros apart from lsm test, which is using
CHECKs all over the place [Andrii]
- added acks
thanks,
jirka
[1] https://lore.kernel.org/bpf/20210326105900.151466-1-jo...@kernel.org/
---
Jiri Olsa (5):
bpf: Allow trampoline re-attach for tracing and ls
On Wed, Apr 07, 2021 at 04:04:48PM -0700, Andrii Nakryiko wrote:
> On Wed, Apr 7, 2021 at 4:22 AM Jiri Olsa wrote:
> >
> > Adding test to verify that once we attach module's trampoline,
> > the module can't be unloaded.
> >
> > Signed-off-by: Jiri Olsa
On Wed, Apr 07, 2021 at 03:47:30PM -0700, Andrii Nakryiko wrote:
> 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
On Wed, Apr 07, 2021 at 03:51:46PM -0700, Andrii Nakryiko wrote:
> 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
On Wed, Apr 07, 2021 at 04:14:27PM -0700, Cong Wang wrote:
> On Wed, Apr 7, 2021 at 2:22 PM Jiri Olsa wrote:
> >
> > hi,
> > I'm getting couple of WARNINGs below when running
> > test_sockmap on latest bpf-next/master, like:
> >
> > # while :; do ./t
Adding test to verify that once we attach module's trampoline,
the module can't be unloaded.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/module_attach.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/modul
Adding the test to re-attach (detach/attach again) lsm programs,
plus check that already linked program can't be attached again.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/test_lsm.c | 48 +++
1 file changed, 38 insertions(+), 10 deletions(-)
diff --
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
---
.../selftests/bpf/prog_tests/fexit_test.c
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
---
.../selftests/bpf/prog_tests/fentry_test.c
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.
Signed-off-by: Jiri Olsa
---
kernel/bpf/sy
pass.
v2 changes:
- allow re-attach for TRACING and LSM programs
- add lsm re-attach test
thanks,
jirka
[1] https://lore.kernel.org/bpf/20210326105900.151466-1-jo...@kernel.org/
---
Jiri Olsa (5):
bpf: Allow trampoline re-attach for tracing and lsm programs
selftests/bpf: Add re-atta
On Mon, Apr 05, 2021 at 04:15:54PM +0200, Toke Høiland-Jørgensen wrote:
> Jiri Olsa writes:
>
> > On Sat, Apr 03, 2021 at 11:21:55AM -0700, Alexei Starovoitov wrote:
> >> On Sat, Apr 03, 2021 at 01:24:12PM +0200, Toke Høiland-Jørgensen wrote:
> >> > >
On Sat, Apr 03, 2021 at 11:21:55AM -0700, Alexei Starovoitov wrote:
> On Sat, Apr 03, 2021 at 01:24:12PM +0200, Toke Høiland-Jørgensen wrote:
> > > if (!prog->aux->dst_trampoline && !tgt_prog) {
> > > - err = -ENOENT;
> > > - goto out_unlock;
> > > + /*
> > > + *
On Sat, Apr 03, 2021 at 01:24:12PM +0200, Toke Høiland-Jørgensen wrote:
> Jiri Olsa writes:
>
> > 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.
> >
>
On Tue, Mar 30, 2021 at 01:23:15AM +, Song Liu wrote:
>
>
> > On Mar 28, 2021, at 4:26 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 a
On Sun, Mar 28, 2021 at 11:29:27AM -0700, Andrii Nakryiko wrote:
> 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 Mon, Mar 29, 2021 at 12:29:16PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the net-next tree got a conflict in:
>
> include/linux/bpf.h
>
> between commit:
>
> 861de02e5f3f ("bpf: Take module reference for trampoline in module")
>
> from the bpf tree and co
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:
> > >
> > > On Thu, Mar 18, 2021 at 12:40:31PM -0700, Andrii Nakry
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
---
.../selftests/bpf/prog_tests/fentry_test.c
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
kernel program.
Signed-off-by: Jiri Olsa
---
kernel/bpf/sy
Adding test to verify that once we attach module's trampoline,
the module can't be unloaded.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/module_attach.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/modul
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
---
.../selftests/bpf/prog_tests/fexit_test.c
now.
You need to have patch [1] from bpf tree for test module
attach test to pass.
thanks,
jirka
[1] https://lore.kernel.org/bpf/20210326105900.151466-1-jo...@kernel.org/
---
Jiri Olsa (4):
bpf: Allow trampoline re-attach
selftests/bpf: Add re-attach test to fentry_test
selfte
;s ip is
within the module code. Releasing it when the trampoline's
ip is unregistered.
Signed-off-by: Jiri Olsa
---
v3 changes:
- store module pointer under bpf_trampoline struct
include/linux/bpf.h | 2 ++
kernel/bpf/trampoline.c | 30 ++
2 files ch
On Thu, Mar 25, 2021 at 10:26:32PM +0100, Daniel Borkmann wrote:
> On 3/24/21 6:40 PM, Jiri Olsa wrote:
> > Currently module can be unloaded even if there's a trampoline
> > register in it. It's easily reproduced by running in parallel:
> >
> ># while :; d
;s ip is
within the module code. Releasing it when the trampoline's
ip is unregistered.
Signed-off-by: Jiri Olsa
---
v2 changes:
- fixed ip_module_put to do preempt_disable/preempt_enable
kernel/bpf/trampoline.c | 31 +++
1 file changed, 31 insertions(+)
dif
On Wed, Mar 24, 2021 at 12:31:42PM +0100, Jiri Olsa wrote:
> On Tue, Mar 23, 2021 at 06:22:37PM -0700, Alexei Starovoitov wrote:
> > On Tue, Mar 23, 2021 at 10:15:33PM +0100, Jiri Olsa wrote:
> > > Currently module can be unloaded even if there's a trampoline
> >
On Tue, Mar 23, 2021 at 06:22:37PM -0700, Alexei Starovoitov wrote:
> On Tue, Mar 23, 2021 at 10:15:33PM +0100, Jiri Olsa wrote:
> > Currently module can be unloaded even if there's a trampoline
> > register in it. It's easily reproduced by running in parallel:
p is
within the module code. Releasing it when the trampoline's
ip is unregistered.
Signed-off-by: Jiri Olsa
---
kernel/bpf/trampoline.c | 32
1 file changed, 32 insertions(+)
diff --git a/kernel/bpf/trampoline.c b/kernel/bpf/trampoline.c
index 1f3a4be4b175.
On Fri, Mar 19, 2021 at 01:59:08PM -0700, Andrii Nakryiko wrote:
> Skip BTF fixup step when input object file is missing BTF altogether.
>
> Reported-by: Jiri Olsa
> Fixes: 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support")
> Signed-off-by: Andrii N
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:
> >
> > On Thu, Mar 18, 2021 at 12:40:31PM -0700, Andrii Nakryiko wrote:
> >
> > SNIP
> >
> > > +
> > > + return NULL;
> &g
On Thu, Mar 18, 2021 at 12:40:31PM -0700, Andrii Nakryiko wrote:
SNIP
> +
> + return NULL;
> +}
> +
> +static int linker_fixup_btf(struct src_obj *obj)
> +{
> + const char *sec_name;
> + struct src_sec *sec;
> + int i, j, n, m;
> +
> + n = btf__get_nr_types(obj->btf);
hi,
I'm
er objects and we don't get them mixed
> > > in the future.
> > >
> > > It also simplifies cleaning, which is now simple rm -rf.
> > >
> > > Also there's no need for FEATURE-DUMP.libbpf and bpf_helper_defs.h
> > > files in .gitignore anymo
On Sat, Mar 06, 2021 at 07:13:17PM -0800, Andrii Nakryiko wrote:
> On Fri, Mar 5, 2021 at 5:42 AM Jiri Olsa wrote:
> >
> > When testing uprobes we the test gets GEP (Global Entry Point)
> > address from kallsyms, but then the function is called locally
> > so
function pointed out and explained by Michael and Naveen.
Cc: Michael Ellerman
Cc: Naveen N. Rao
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/attach_probe.c | 40 ++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests
On Thu, Mar 04, 2021 at 07:04:59AM +0530, Naveen N. Rao wrote:
SNIP
> > > static inline unsigned long ppc_function_entry(void *func)
> > > {
> > > #ifdef PPC64_ELF_ABI_v2
> > > u32 *insn = func;
> > >
> > > /*
> > >* A PPC64 ABIv2 function may have a local and a global entry
> > >* p
hi,
I'm getting attached BUG/crash when running in parralel selftests, like:
while :; do ./test_progs -t spinlock; done
while :; do ./test_progs ; done
it's the latest bpf-next/master, I can send the .config if needed,
but I don't think there's anything special about it, because I saw
the bug
On Thu, Mar 04, 2021 at 11:46:27AM +1100, Michael Ellerman wrote:
> "Naveen N. Rao" writes:
> > On 2021/03/02 11:35AM, Jiri Olsa wrote:
> >> On Mon, Mar 01, 2021 at 02:58:53PM -0800, Yonghong Song wrote:
> >> >
> >> >
> >> > On 3/
On Wed, Mar 03, 2021 at 12:10:43PM +0530, Naveen N. Rao wrote:
> On 2021/03/02 11:35AM, Jiri Olsa wrote:
> > On Mon, Mar 01, 2021 at 02:58:53PM -0800, Yonghong Song wrote:
> > >
> > >
> > > On 3/1/21 11:04 AM, Jiri Olsa wrote:
> > > > When testing
On Tue, Mar 02, 2021 at 10:31:41AM -0800, Andrii Nakryiko wrote:
> On Tue, Mar 2, 2021 at 3:14 AM Jiri Olsa wrote:
> >
> > On Mon, Mar 01, 2021 at 04:34:24PM -0800, Andrii Nakryiko wrote:
> > > On Mon, Mar 1, 2021 at 11:11 AM Jiri Olsa wrote:
> > > >
> >
On Mon, Mar 01, 2021 at 04:34:24PM -0800, Andrii Nakryiko wrote:
> On Mon, Mar 1, 2021 at 11:11 AM Jiri Olsa wrote:
> >
> > When testing uprobes we the test gets GEP (Global Entry Point)
> > address from kallsyms, but then the function is called locally
> > so
On Mon, Mar 01, 2021 at 02:58:53PM -0800, Yonghong Song wrote:
>
>
> On 3/1/21 11:04 AM, Jiri Olsa wrote:
> > When testing uprobes we the test gets GEP (Global Entry Point)
> > address from kallsyms, but then the function is called locally
> > so the uprobe is not trig
When testing uprobes we the test gets GEP (Global Entry Point)
address from kallsyms, but then the function is called locally
so the uprobe is not triggered.
Fixing this by adjusting the address to LEP (Local Entry Point)
for powerpc arch.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf
On Wed, Feb 24, 2021 at 10:30:45AM -0700, Nathan Chancellor wrote:
SNIP
> > +
> > +build()
> > +{
> > + local name=$1
> > + local opts=$2
>
> A more robust way to handle this might be
>
> shift
> local opts=$@
>
> > +
> > + echo "build ${name} (${OUTPUT}/output)"
> > +
> > + mkdir -p $
hi,
I cleaned up a bit my testing scripts, that I'm using for testing
btf encoding changes. It's far from ideal and convoluted, but let's
have discussion if this could be kicked into something useful for
everybody.
There are 2 scripts:
kernel-objects-build.sh - compiles kernel for several archs
count the whole function not
just the entrypoint.
Most of the is_ftrace_func code was contributed by Andrii.
[1] https://lore.kernel.org/bpf/20210209034416.GA1669105@ubuntu-m3-large-x86/
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
v2 changes:
- update functions addr directly [A
On Fri, Feb 12, 2021 at 02:21:04PM -0800, Andrii Nakryiko wrote:
> On Fri, Feb 12, 2021 at 2:05 PM Jiri Olsa wrote:
> >
> > Currently when processing DWARF function, we check its entrypoint
> > against ftrace addresses, assuming that the ftrace address matches
> >
count the whole function not
just the entrypoint.
Most of the is_ftrace_func code was contributed by Andrii.
[1] https://lore.kernel.org/bpf/20210209034416.GA1669105@ubuntu-m3-large-x86/
Signed-off-by: Jiri Olsa
---
btf_encoder.c | 55 +--
1
On Fri, Feb 12, 2021 at 11:22:41AM -0800, Andrii Nakryiko wrote:
SNIP
> > +static int is_ftrace_func(struct elf_function *func, __u64 *addrs,
> > + __u64 count, bool kmod)
> > +{
> > + /*
> > +* For vmlinux image both addrs[x] and functions[x]::addr
> > +
On Fri, Feb 12, 2021 at 11:48:46AM -0800, Andrii Nakryiko wrote:
> On Thu, Feb 11, 2021 at 5:07 PM Stanislav Fomichev wrote:
> >
> > There is what I see after compiling the kernel:
>
> typo: This?
>
> >
> > # bpf-next...bpf-next/master
> > ?? tools/bpf/resolve_btfids/libbpf/
> >
> > Signed-off
On Fri, Feb 12, 2021 at 11:56:29AM -0800, Stanislav Fomichev wrote:
> On Fri, Feb 12, 2021 at 11:48 AM Andrii Nakryiko
> wrote:
> >
> > On Thu, Feb 11, 2021 at 5:07 PM Stanislav Fomichev wrote:
> > >
> > > There is what I see after compiling the kernel:
> >
> > typo: This?
> Yes, sure.
>
>
> >
On Thu, Feb 11, 2021 at 11:59:02AM -0800, Andrii Nakryiko wrote:
SNIP
>
> So in my previous example I assumed we have address ranges for ftrace
> section, which is exactly the opposite from what we have. So this
> binary search should be a bit different. start <= addr seems wrong
> here as well.
On Fri, Feb 12, 2021 at 12:30:45PM +0900, Masahiro Yamada wrote:
SNIP
>
> I expected this kind of mess
> when I saw 33a57ce0a54d498275f432db04850001175dfdfa
>
>
> The tools/ directory is a completely different world
> governed by a different build system
> (no, not a build system, but a collec
On Thu, Feb 11, 2021 at 11:59:02AM -0800, Andrii Nakryiko wrote:
SNIP
> > return strcmp(a->name, b->name);
> > }
> >
> > +static int functions_cmp_addr(const void *_a, const void *_b)
> > +{
> > + const struct elf_function *a = _a;
> > + const struct elf_function *b = _b;
> >
On Thu, Feb 11, 2021 at 04:43:48PM +0100, Sedat Dilek wrote:
SNIP
> > > filled with elf functions start/end values, right?
> > >
> > > > /*
> > > > * We iterate over sorted array, so we can
> > > > easily skip
> > > > * no
On Wed, Feb 10, 2021 at 09:13:47PM +0100, Jiri Olsa wrote:
> On Wed, Feb 10, 2021 at 10:20:20AM -0800, Andrii Nakryiko wrote:
>
> SNIP
>
> > > but below is change for checking that ftrace addrs are within elf
> > > functions
> > >
> > > seems t
around the resolve_btfids clean target to
ensure the output directory is in place.
Tested-by: Nathan Chancellor
Signed-off-by: Jiri Olsa
---
Makefile | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 159d9592b587..b6fa039c18b8 100644
--- a
On Wed, Feb 10, 2021 at 11:26:28AM -0800, Andrii Nakryiko wrote:
SNIP
> > > > Can't reproduce it. It works in all kinds of variants (relative and
> > > > absolute O=, clean and not clean trees, etc). Jiri, please check as
> > > > well.
> > > >
> > >
> > > Odd, this reproduces for me on a complete
On Wed, Feb 10, 2021 at 10:20:20AM -0800, Andrii Nakryiko wrote:
SNIP
> > but below is change for checking that ftrace addrs are within elf functions
> >
> > seems to work in my tests, I'll run some more tests and send full patch
>
> It seems unnecessarily convoluted. I was thinking about someth
1 - 100 of 643 matches
Mail list logo