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 39 lines 618 B view raw
1// SPDX-License-Identifier: GPL-2.0 2#include <linux/bpf.h> 3#include <bpf/bpf_helpers.h> 4#include <bpf/bpf_tracing.h> 5#include <stdbool.h> 6#include "bpf_kfuncs.h" 7#include "bpf_misc.h" 8 9char _license[] SEC("license") = "GPL"; 10 11__u64 uprobe_result[4]; 12 13SEC("uprobe.multi") 14int uprobe_0(struct pt_regs *ctx) 15{ 16 uprobe_result[0]++; 17 return 0; 18} 19 20SEC("uprobe.multi") 21int uprobe_1(struct pt_regs *ctx) 22{ 23 uprobe_result[1]++; 24 return 0; 25} 26 27SEC("uprobe.session") 28int uprobe_2(struct pt_regs *ctx) 29{ 30 uprobe_result[2]++; 31 return 0; 32} 33 34SEC("uprobe.session") 35int uprobe_3(struct pt_regs *ctx) 36{ 37 uprobe_result[3]++; 38 return 1; 39}