aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/uprobe_syscall.c
blob: e08c31669e5a763164cce8933fbb959c3576927e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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(&regs, ctx, sizeof(regs));
	return 0;
}