(in target_1)
ENTRY #5: 0x75922c (in caller)
ENTRY #6: 0x6f8f39
ENTRY #7: 0x6fa6f0
ENTRY #8: 0x7f986adc4cd0
Now there is a logical and complete sequence of function calls.
Signed-off-by: Andrii Nakryiko
---
.../bpf/prog_tests/uretprobe_stack.c | 186 ++
.../selftests/bpf/progs
ing frame
pointer-based logic.
Signed-off-by: Andrii Nakryiko
---
arch/x86/events/core.c | 20
include/linux/uprobes.h | 2 ++
kernel/events/uprobes.c | 2 ++
3 files changed, 24 insertions(+)
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 5b0dd07b1ef1..82d
im
Signed-off-by: Andrii Nakryiko
---
kernel/events/callchain.c | 43 ++-
kernel/events/uprobes.c | 9
2 files changed, 51 insertions(+), 1 deletion(-)
diff --git a/kernel/events/callchain.c b/kernel/events/callchain.c
index 1273be84392c..b17e3323f
This helper is needed in another file, so make it a bit more uniquely
named and expose it internally.
Signed-off-by: Andrii Nakryiko
---
include/linux/uprobes.h | 1 +
kernel/events/uprobes.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/uprobes.h b
selftests changes and can go in
through non-BPF tree without the risk of merge conflicts.
Patches are based on latest linux-trace/probes/for-next.
v1->v2:
- fixed GCC aggressively inlining test_uretprobe_stack() function (BPF CI);
- fixed comments (Peter).
Andrii Nakryiko (4):
uprobes: ren
prepare uprobe args buffer lazily")
Reported-by: Breno Leitao
Signed-off-by: Andrii Nakryiko
---
kernel/trace/trace_uprobe.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index 8541fa1494ae..
On Mon, May 20, 2024 at 8:20 AM Jiri Olsa wrote:
>
> On Wed, May 15, 2024 at 08:32:30AM -0600, Andrii Nakryiko wrote:
> > On Wed, May 15, 2024 at 3:30 AM Peter Zijlstra wrote:
> > >
> > > On Wed, May 08, 2024 at 02:26:03PM -0700, Andrii Nakryiko wro
On Wed, May 15, 2024 at 3:30 AM Peter Zijlstra wrote:
>
> On Wed, May 08, 2024 at 02:26:03PM -0700, Andrii Nakryiko wrote:
>
> > +static void fixup_uretprobe_trampoline_entries(struct perf_callchain_entry
> > *entry,
> > +
(in target_1)
ENTRY #5: 0x75922c (in caller)
ENTRY #6: 0x6f8f39
ENTRY #7: 0x6fa6f0
ENTRY #8: 0x7f986adc4cd0
Now there is a logical and complete sequence of function calls.
Signed-off-by: Andrii Nakryiko
---
.../bpf/prog_tests/uretprobe_stack.c | 185 ++
.../selftests/bpf/progs
ing frame
pointer-based logic.
Signed-off-by: Andrii Nakryiko
---
arch/x86/events/core.c | 20
include/linux/uprobes.h | 2 ++
kernel/events/uprobes.c | 2 ++
3 files changed, 24 insertions(+)
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 5b0dd07b1ef1..82d
ne
address entries with correct original return address. This is done only
if there are pending uretprobes for current task.
Reported-by: Riham Selim
Signed-off-by: Andrii Nakryiko
---
kernel/events/callchain.c | 42 ++-
kernel/events/uprobes.c | 9
This helper is needed in another file, so make it a bit more uniquely
named and expose it internally.
Signed-off-by: Andrii Nakryiko
---
include/linux/uprobes.h | 1 +
kernel/events/uprobes.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/uprobes.h b
selftests, is isolated from any other BPF selftests changes and can go in
through non-BPF tree without the risk of merge conflicts.
Patches are based on latest linux-trace's probes/for-next branch.
Andrii Nakryiko (4):
uprobes: rename get_trampoline_vaddr() and make it global
perf,uprobes: fix user
On Wed, Apr 24, 2024 at 5:02 PM Andrii Nakryiko wrote:
>
> At the lowest level, rethook-based kretprobes on x86-64 architecture go
> through arch_rethoook_trampoline() function, manually written in
> assembly, which calls into a simple arch_rethook_trampoline_callback()
> functio
On Fri, Apr 26, 2024 at 7:25 AM Masami Hiramatsu wrote:
>
> Hi Andrii,
>
> On Wed, 24 Apr 2024 14:52:12 -0700
> Andrii Nakryiko wrote:
>
> > Improve objpool (used heavily in kretprobe hot path) performance with two
> > improvements:
> > - inlini
change is acceptable and whether I should complete it
with 32-bit "inlining" as well. Thanks!
[0]
https://nakryiko.com/posts/retsnoop-intro/#peering-deep-into-functions-with-lbr
Signed-off-by: Andrii Nakryiko
---
arch/x86/kernel/asm-offsets_64.c | 4
arch/x8
-multi: 10.440 ± 0.108M/s
AFTER
=
kretprobe : 10.106 ± 0.120M/s (+1.7%)
kretprobe-multi: 10.515 ± 0.180M/s (+0.7%)
Cc: Matt (Qiang) Wu
Signed-off-by: Andrii Nakryiko
---
include/linux/objpool.h | 6 +++---
lib/objpool.c | 12 ++--
2 files changed, 9 insertions
: 10.440 ± 0.108M/s (+2.2%)
Cc: Matt (Qiang) Wu
Signed-off-by: Andrii Nakryiko
---
include/linux/objpool.h | 101 +++-
lib/objpool.c | 100 ---
2 files changed, 99 insertions(+), 102 deletions(-)
diff --git
kprobes and
kretprobes with BPF-based benchmarks. See individual patches for details and
results.
Andrii Nakryiko (2):
objpool: enable inlining objpool_push() and objpool_pop() operations
objpool: cache nr_possible_cpus() and avoid caching nr_cpu_ids
include/linux/objpool.h | 105
On Thu, Apr 18, 2024 at 6:00 PM Masami Hiramatsu wrote:
>
> On Thu, 18 Apr 2024 12:09:09 -0700
> Andrii Nakryiko wrote:
>
> > Take into account CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING when validating
> > that RCU is watching when trying to setup rethooko on a function en
://lore.kernel.org/bpf/caef4bzauq2wkmjzdc9s0rbwa01bybgwhn6andxqshyia47p...@mail.gmail.com/
Signed-off-by: Andrii Nakryiko
---
kernel/trace/rethook.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/rethook.c b/kernel/trace/rethook.c
index fa03094e9e69..a974605ad7a5 100644
--- a/kernel
/bpf/caef4bzauq2wkmjzdc9s0rbwa01bybgwhn6andxqshyia47p...@mail.gmail.com/
Cc: Steven Rostedt
Cc: Masami Hiramatsu
Cc: Paul E. McKenney
Acked-by: Masami Hiramatsu (Google)
Signed-off-by: Andrii Nakryiko
---
include/linux/trace_recursion.h | 2 +-
kernel/trace/Kconfig| 13
On Tue, Apr 9, 2024 at 3:48 PM Masami Hiramatsu wrote:
>
> On Wed, 3 Apr 2024 15:03:28 -0700
> Andrii Nakryiko wrote:
>
> > Take into account CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING when validating
> > that RCU is watching when trying to setup rethooko on a function ent
On Fri, Apr 5, 2024 at 8:41 PM Masami Hiramatsu wrote:
>
> On Tue, 2 Apr 2024 22:21:00 -0700
> Andrii Nakryiko wrote:
>
> > On Tue, Apr 2, 2024 at 9:00 PM Andrii Nakryiko
> > wrote:
> > >
> > > On Tue, Apr 2, 2024 at 5:52 PM Steven Rostedt wrote:
&
%, according to BPF benchmarks ([0]).
[0]
https://lore.kernel.org/bpf/caef4bzauq2wkmjzdc9s0rbwa01bybgwhn6andxqshyia47p...@mail.gmail.com/
Signed-off-by: Andrii Nakryiko
---
kernel/trace/rethook.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/rethook.c b/kernel/trace/rethook.c
/bpf/caef4bzauq2wkmjzdc9s0rbwa01bybgwhn6andxqshyia47p...@mail.gmail.com/
Cc: Steven Rostedt
Cc: Masami Hiramatsu
Cc: Paul E. McKenney
Signed-off-by: Andrii Nakryiko
---
include/linux/trace_recursion.h | 2 +-
kernel/trace/Kconfig| 13 +
2 files changed, 14 insertions
On Tue, Apr 2, 2024 at 9:00 PM Andrii Nakryiko
wrote:
>
> On Tue, Apr 2, 2024 at 5:52 PM Steven Rostedt wrote:
> >
> > On Wed, 3 Apr 2024 09:40:48 +0900
> > Masami Hiramatsu (Google) wrote:
> >
> > > OK, for me, this last sentence is preferred for
On Tue, Apr 2, 2024 at 5:52 PM Steven Rostedt wrote:
>
> On Wed, 3 Apr 2024 09:40:48 +0900
> Masami Hiramatsu (Google) wrote:
>
> > OK, for me, this last sentence is preferred for the help message. That
> > explains
> > what this is for.
> >
> > All callbacks that attach to the function
_running(tsk))
> return 0;
>
This should probably go through Masami's tree, but the change makes
sense to me, given this is an expected condition.
Acked-by: Andrii Nakryiko
> do {
> --
> 2.34.1
>
>
On Mon, Apr 1, 2024 at 5:38 PM Masami Hiramatsu wrote:
>
> On Mon, 1 Apr 2024 12:09:18 -0400
> Steven Rostedt wrote:
>
> > On Mon, 1 Apr 2024 20:25:52 +0900
> > Masami Hiramatsu (Google) wrote:
> >
> > > > Masami,
> > > >
> > > > Are you OK with just keeping it set to N.
> > >
> > > OK, if it
of ftrace subsystem. For most users it should
probably be kept disabled to eliminate unnecessary runtime overhead.
Cc: Steven Rostedt
Cc: Masami Hiramatsu
Cc: Paul E. McKenney
Signed-off-by: Andrii Nakryiko
---
include/linux/trace_recursion.h | 2 +-
kernel/trace/Kconfig| 14
On Tue, Mar 26, 2024 at 11:58 AM Steven Rostedt wrote:
>
> On Tue, 26 Mar 2024 09:16:33 -0700
> Andrii Nakryiko wrote:
>
> > > It's no different than lockdep. Test boxes should have it enabled, but
> > > there's no reason to have this enabled in a production system.
On Mon, Mar 25, 2024 at 3:11 PM Steven Rostedt wrote:
>
> On Mon, 25 Mar 2024 11:38:48 +0900
> Masami Hiramatsu (Google) wrote:
>
> > On Fri, 22 Mar 2024 09:03:23 -0700
> > Andrii Nakryiko wrote:
> >
> > > Introduce CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING
On Sun, Mar 24, 2024 at 7:38 PM Masami Hiramatsu wrote:
>
> On Fri, 22 Mar 2024 09:03:23 -0700
> Andrii Nakryiko wrote:
>
> > Introduce CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING config option to
> > control whether ftrace low-level code performs additional
> > rcu_
with extra config to let users decide if they are willing to
pay the price.
Cc: Steven Rostedt
Cc: Masami Hiramatsu
Cc: Paul E. McKenney
Signed-off-by: Andrii Nakryiko
---
include/linux/trace_recursion.h | 2 +-
kernel/trace/Kconfig| 13 +
2 files changed, 14 insertions(+), 1
to
kallsyms_on_each_match_symbol() to perform a proper counting.
Cc: Francis Laniel
Cc: sta...@vger.kernel.org
Cc: Masami Hiramatsu
Cc: Steven Rostedt
Fixes: b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches
several symbols")
Signed-off-by: Andrii Nakryiko
---
kernel/trace/trace_kpr
36 matches
Mail list logo