Linux Audio

Check our new training course

Loading...
Note: File does not exist in v6.8.
 1// SPDX-License-Identifier: GPL-2.0
 2#include "vmlinux.h"
 3#include <bpf/bpf_helpers.h>
 4#include <bpf/bpf_tracing.h>
 5#include <bpf/usdt.bpf.h>
 6#include "bpf_misc.h"
 7
 8char _license[] SEC("license") = "GPL";
 9
10
11SEC("uprobe.session")
12__success
13int uprobe_sesison_return_0(struct pt_regs *ctx)
14{
15	return 0;
16}
17
18SEC("uprobe.session")
19__success
20int uprobe_sesison_return_1(struct pt_regs *ctx)
21{
22	return 1;
23}
24
25SEC("uprobe.session")
26__failure
27__msg("At program exit the register R0 has smin=2 smax=2 should have been in [0, 1]")
28int uprobe_sesison_return_2(struct pt_regs *ctx)
29{
30	return 2;
31}