A test is considered failed when a sample trace exceeds the threshold.
Failed tests return the same exit code as passed tests, requiring test
frameworks to determine the result by searching for "hit stop tracing"
in the output.
Assign a distinct exit code for failed tests to enable the use of shel
On Thu, May 15, 2025 at 5:13 AM Jiri Olsa wrote:
>
> Adding support to add special mapping for user space trampoline with
> following functions:
>
> uprobe_trampoline_get - find or add uprobe_trampoline
> uprobe_trampoline_put - remove or destroy uprobe_trampoline
>
> The user space trampoline
On Thu, May 15, 2025 at 5:14 AM Jiri Olsa wrote:
>
> Renaming uprobe_syscall_executed prog to test_uretprobe_multi
> to fit properly in the following changes that add more programs.
>
> Plus adding pid filter and increasing executed variable.
>
> Acked-by: Andrii Nakryiko
> Signed-off-by: Jiri Ol
On Thu, May 15, 2025 at 5:14 AM Jiri Olsa wrote:
>
> Importing usdt.h from libbpf/usdt project.
>
> Suggested-by: Andrii Nakryiko
> Signed-off-by: Jiri Olsa
> ---
> tools/testing/selftests/bpf/usdt.h | 545 +
> 1 file changed, 545 insertions(+)
> create mode 100644
On Thu, May 15, 2025 at 5:15 AM Jiri Olsa wrote:
>
> Adding test that makes sure parallel execution of the uprobe and
> attach/detach of optimized uprobe on it works properly.
>
> Signed-off-by: Jiri Olsa
> ---
> .../selftests/bpf/prog_tests/uprobe_syscall.c | 94 +++
> 1 file ch
On 5/15/25 12:16 AM, Jason Xing wrote:
> From: Jason Xing
>
> In this version, only support dumping the counter for buffer full and
> implement the framework of how it works.
>
> Users can pass certain flag to fetch what field/statistics they expect
> to know. Each time it only returns one resul
Looks fine:
Reviewed-by: Jens Axboe
--
Jens Axboe
Looks fine:
Reviewed-by: Jens Axboe
--
Jens Axboe
On 5/15/25 12:16 AM, Jason Xing wrote:
> From: Jason Xing
>
> Replace internal subbuf_start in blktrace with the default policy
> in relayfs.
>
> Remove dropped field from struct blktrace. Correspondingly, call the
> common helper in relay. Through incrementing full_count to keep track
> of how
From: Masami Hiramatsu (Google)
Rewind persistent ring buffer pages which have been read in the
previous boot. Those pages are highly possible to be lost before
writing it to the disk if the previous kernel crashed. In this
case, the trace data is kept on the persistent ring buffer, but
it can no
Currently unapply_uprobe takes mmap_read_lock, but it might call
remove_breakpoint which eventually changes user pages.
Current code writes either breakpoint or original instruction, so
it can probably go away with that, but with the upcoming change that
writes multiple instructions on the probed
Making copy_from_page global and adding uprobe prefix.
Adding the uprobe prefix to copy_to_page as well for symmetry.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
include/linux/uprobes.h | 1 +
kernel/events/uprobes.c | 10 +-
2 files changed, 6 insertions(+), 5 deletions(-)
We are about to add uprobe trampoline, so cleaning up the namespace.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
arch/x86/kernel/uprobes.c | 2 +-
include/linux/uprobes.h | 2 +-
kernel/events/uprobes.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch
Adding nbytes argument to uprobe_write and related functions as
preparation for writing whole instructions in following changes.
Also renaming opcode arguments to insn, which seems to fit better.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
include/linux/uprobes.h | 4 ++--
kernel/e
Adding uprobe_write function that does what uprobe_write_opcode did
so far, but allows to pass verify callback function that checks the
memory location before writing the opcode.
It will be used in following changes to implement specific checking
logic for instruction update.
The uprobe_write_opc
The uprobe_write has special path to restore the original page when we
write original instruction back. This happens when uprobe_write detects
that we want to write anything else but breakpoint instruction.
Moving the detection away and passing it to uprobe_write as argument,
so it's possible to w
Making update_ref_ctr call in uprobe_write conditional based
on do_ref_ctr argument. This way we can use uprobe_write for
instruction update without doing ref_ctr_offset update.
Signed-off-by: Jiri Olsa
---
include/linux/uprobes.h | 2 +-
kernel/events/uprobes.c | 8
2 files changed, 5
Adding new uprobe syscall that calls uprobe handlers for given
'breakpoint' address.
The idea is that the 'breakpoint' address calls the user space
trampoline which executes the uprobe syscall.
The syscall handler reads the return address of the initial call
to retrieve the original 'breakpoint'
Putting together all the previously added pieces to support optimized
uprobes on top of 5-byte nop instruction.
The current uprobe execution goes through following:
- installs breakpoint instruction over original instruction
- exception handler hit and calls related uprobe consumers
- and e
Make sure that calling uprobe syscall from outside uprobe trampoline
results in sigill signal.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/uprobe_syscall.c | 36 +++
1 file changed, 36 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall
Importing usdt.h from libbpf/usdt project.
Suggested-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
tools/testing/selftests/bpf/usdt.h | 545 +
1 file changed, 545 insertions(+)
create mode 100644 tools/testing/selftests/bpf/usdt.h
diff --git a/tools/testing/self
Adding optimized usdt variant for basic usdt test to check that
usdt arguments are properly passed in optimized code path.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
tools/testing/selftests/bpf/prog_tests/usdt.c | 38 ---
1 file changed, 25 insertions(+), 13 deletion
Adding __test_uprobe_syscall with non x86_64 stub to execute all the tests,
so we don't need to keep adding non x86_64 stub functions for new tests.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/uprobe_syscall.c | 34 +++
1 file changed, 12
Renaming uprobe_syscall_executed prog to test_uretprobe_multi
to fit properly in the following changes that add more programs.
Plus adding pid filter and increasing executed variable.
Acked-by: Andrii Nakryiko
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/uprobe_syscall.c | 1
Changing uretprobe_regs_trigger to allow the test for both
uprobe and uretprobe and renaming it to uprobe_regs_equal.
We check that both uprobe and uretprobe probes (bpf programs)
see expected registers with few exceptions.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/uprobe_syscal
Adding test that makes sure parallel execution of the uprobe and
attach/detach of optimized uprobe on it works properly.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/uprobe_syscall.c | 94 +++
1 file changed, 94 insertions(+)
diff --git a/tools/testing/selftests/bpf
Changing the test_uretprobe_regs_change test to test both uprobe
and uretprobe by adding entry consumer handler to the testmod
and making it to change one of the registers.
Making sure that changed values both uprobe and uretprobe handlers
propagate to the user space.
Signed-off-by: Jiri Olsa
--
Changing uretprobe syscall man page to be shared with new
uprobe syscall man page.
Cc: Alejandro Colomar
Signed-off-by: Jiri Olsa
---
man/man2/uprobe.2| 1 +
man/man2/uretprobe.2 | 36
2 files changed, 25 insertions(+), 12 deletions(-)
create mode 1006
Adding support to add special mapping for user space trampoline with
following functions:
uprobe_trampoline_get - find or add uprobe_trampoline
uprobe_trampoline_put - remove or destroy uprobe_trampoline
The user space trampoline is exported as arch specific user space special
mapping through
Adding uprobe as another exception to the seccomp filter alongside
with the uretprobe syscall.
Same as the uretprobe the uprobe syscall is installed by kernel as
replacement for the breakpoint exception and is limited to x86_64
arch and isn't expected to ever be supported in i386.
Cc: Kees Cook
Adding tests for optimized uprobe/usdt probes.
Checking that we get expected trampoline and attached bpf programs
get executed properly.
Signed-off-by: Jiri Olsa
---
.../selftests/bpf/prog_tests/uprobe_syscall.c | 289 +-
.../bpf/progs/uprobe_syscall_executed.c | 32 ++
2
Adding uprobe checks into the current uretprobe tests.
All the related tests are now executed with attached uprobe
or uretprobe or without any probe.
Renaming the test fixture to uprobe, because it seems better.
Cc: Kees Cook
Cc: Eyal Birger
Reviewed-by: Kees Cook
Signed-off-by: Jiri Olsa
--
hi,
this patchset adds support to optimize usdt probes on top of 5-byte
nop instruction.
The generic approach (optimize all uprobes) is hard due to emulating
possible multiple original instructions and its related issues. The
usdt case, which stores 5-byte nop seems much easier, so starting
with t
On 14.05.25 19:53, David Hildenbrand wrote:
On 13.05.25 19:48, Liam R. Howlett wrote:
* David Hildenbrand [250512 08:34]:
The "memramp() shrinking" scenario no longer applies, so let's remove
that now-unnecessary handling.
Reviewed-by: Lorenzo Stoakes
Acked-by: Ingo Molnar # x86 bits
Signed
Hi Jiri,
On Thu, May 15, 2025 at 02:11:19PM +0200, Jiri Olsa wrote:
> Changing uretprobe syscall man page to be shared with new
> uprobe syscall man page.
>
> Cc: Alejandro Colomar
> Signed-off-by: Jiri Olsa
LGTM.
Have a lovely night!
Alex
> ---
> man/man2/uprobe.2| 1 +
> man/man2/ur
On Wed, May 14, 2025, Sohil Mehta wrote:
> On 5/14/2025 7:15 AM, Sean Christopherson wrote:
> > Compile tested only...
> >
>
> No worries. I'll test it out. I am assuming you want this patch to go as
> part of this series.
Yes please. I can also post it separately, but that seems unnecessary.
On 2025/5/15 11:22, Nico Pache wrote:
khugepaged scans anons PMD ranges for potential collapse to a hugepage.
To add mTHP support we use this scan to instead record chunks of utilized
sections of the PMD.
khugepaged_scan_bitmap uses a stack struct to recursively scan a bitmap
that represents
On Thu, May 15, 2025 at 02:16:41PM +0800, Jason Xing wrote:
> +extern size_t relay_dump(struct rchan *chan, int flags);
Please don't add pointless externs for function prototypes.
> +EXPORT_SYMBOL_GPL(relay_dump);
This export seems unused even with the entire series applied.
On Fri, May 16, 2025 at 12:37 PM Christoph Hellwig wrote:
>
> On Thu, May 15, 2025 at 02:16:41PM +0800, Jason Xing wrote:
> > +extern size_t relay_dump(struct rchan *chan, int flags);
>
> Please don't add pointless externs for function prototypes.
Do you mean make it inline in include/linux/relay
On Fri, May 16, 2025 at 01:02:59PM +0800, Jason Xing wrote:
> Do you mean make it inline in include/linux/relay.h like how
> relay_write() works?
>
> Will do that.
Just drop the extern, which is not needed:
size_t relay_dump(struct rchan *chan, int flags);
> >
> > This export seems unused even
On Fri, May 16, 2025 at 1:06 PM Christoph Hellwig wrote:
>
> On Fri, May 16, 2025 at 01:02:59PM +0800, Jason Xing wrote:
> > Do you mean make it inline in include/linux/relay.h like how
> > relay_write() works?
> >
> > Will do that.
>
> Just drop the extern, which is not needed:
>
> size_t relay_d
On Fri, May 16, 2025 at 2:19 AM Jens Axboe wrote:
>
> On 5/15/25 12:16 AM, Jason Xing wrote:
> > From: Jason Xing
> >
> > In this version, only support dumping the counter for buffer full and
> > implement the framework of how it works.
> >
> > Users can pass certain flag to fetch what field/stat
On Fri, May 16, 2025 at 2:21 AM Jens Axboe wrote:
>
> On 5/15/25 12:16 AM, Jason Xing wrote:
> > From: Jason Xing
> >
> > Replace internal subbuf_start in blktrace with the default policy
> > in relayfs.
> >
> > Remove dropped field from struct blktrace. Correspondingly, call the
> > common helpe
On Thu, 15 May 2025 14:16:41 +0800
Jason Xing wrote:
> From: Jason Xing
>
> In this version, only support dumping the counter for buffer full and
> implement the framework of how it works.
>
> Users can pass certain flag to fetch what field/statistics they expect
> to know. Each time it only r
On Mon, 31 Mar 2025 21:23:37 +0900
Masami Hiramatsu (Google) wrote:
> On Fri, 28 Mar 2025 14:38:56 -0400
> Brian Masney wrote:
>
> > Allow the user to override the CFLAGS and LDFLAGS similar to what's
> > currently done on other kernel tools. These changes allows bootconfig to
> > be compiled w
On Fri, May 16, 2025 at 10:08 AM Masami Hiramatsu wrote:
>
> On Thu, 15 May 2025 14:16:41 +0800
> Jason Xing wrote:
>
> > From: Jason Xing
> >
> > In this version, only support dumping the counter for buffer full and
> > implement the framework of how it works.
> >
> > Users can pass certain fla
46 matches
Mail list logo