Blame view

samples/bpf/task_fd_query_kern.c 410 Bytes
ecb96f7fe   Yonghong Song   samples/bpf: add ...
1
2
3
4
  // SPDX-License-Identifier: GPL-2.0
  #include <linux/version.h>
  #include <linux/ptrace.h>
  #include <uapi/linux/bpf.h>
7cf245a37   Toke Høiland-Jørgensen   samples/bpf: Use ...
5
  #include <bpf/bpf_helpers.h>
ecb96f7fe   Yonghong Song   samples/bpf: add ...
6

d2e614cb0   Daniel T. Lee   samples: bpf: fix...
7
  SEC("kprobe/blk_mq_start_request")
ecb96f7fe   Yonghong Song   samples/bpf: add ...
8
9
10
11
  int bpf_prog1(struct pt_regs *ctx)
  {
  	return 0;
  }
2bf8c7e73   Daniel T. Lee   samples: bpf: Fix...
12
  SEC("kretprobe/blk_account_io_done")
ecb96f7fe   Yonghong Song   samples/bpf: add ...
13
14
15
16
17
18
  int bpf_prog2(struct pt_regs *ctx)
  {
  	return 0;
  }
  char _license[] SEC("license") = "GPL";
  u32 _version SEC("version") = LINUX_VERSION_CODE;