Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 31 lines 582 B view raw
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("kprobe.session") 12__success 13int kprobe_session_return_0(struct pt_regs *ctx) 14{ 15 return 0; 16} 17 18SEC("kprobe.session") 19__success 20int kprobe_session_return_1(struct pt_regs *ctx) 21{ 22 return 1; 23} 24 25SEC("kprobe.session") 26__failure 27__msg("At program exit the register R0 has smin=2 smax=2 should have been in [0, 1]") 28int kprobe_session_return_2(struct pt_regs *ctx) 29{ 30 return 2; 31}