On Tue, May 26, 2026 at 10:58 PM +02, Jiri Olsa wrote:
> Optimized uprobes are now on top of 10-bytes nop instructions,
> reflect that in existing tests.
>
> Signed-off-by: Jiri Olsa <[email protected]>
> ---

[...]

> @@ -430,9 +432,11 @@ static void *check_attach(struct uprobe_syscall_executed 
> *skel, trigger_t trigge
>  
>  static void check_detach(void *addr, void *tramp)
>  {
> +     static const char nop10_prefix[] = { 0x66, 0x2e, 0x0f, 0x1f, 0x84 };
> +
>       /* [uprobes_trampoline] stays after detach */
>       ASSERT_OK(find_uprobes_trampoline(tramp), "uprobes_trampoline");
> -     ASSERT_OK(memcmp(addr, nop5, 5), "nop5");
> +     ASSERT_OK(memcmp(addr, nop10_prefix, 5), "nop10_prefix");
>  }
>  
>  static void check(struct uprobe_syscall_executed *skel, struct bpf_link 
> *link,

Nit: You could just do `memcmp(addr, nop10, 5)` to match the prefix.

Reviewed-by: Jakub Sitnicki <[email protected]>

Reply via email to