mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-29 01:04:14 -04:00
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 <jolsa@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20250720112133.244369-19-jolsa@kernel.org
16 lines
275 B
C
16 lines
275 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include "vmlinux.h"
|
|
#include <bpf/bpf_helpers.h>
|
|
#include <string.h>
|
|
|
|
struct pt_regs regs;
|
|
|
|
char _license[] SEC("license") = "GPL";
|
|
|
|
SEC("uprobe")
|
|
int probe(struct pt_regs *ctx)
|
|
{
|
|
__builtin_memcpy(®s, ctx, sizeof(regs));
|
|
return 0;
|
|
}
|