hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/samples/bpf/task_fd_query_user.c
....@@ -13,8 +13,9 @@
1313 #include <sys/resource.h>
1414 #include <sys/types.h>
1515 #include <sys/stat.h>
16
+#include <linux/perf_event.h>
1617
17
-#include "libbpf.h"
18
+#include <bpf/libbpf.h>
1819 #include "bpf_load.h"
1920 #include "bpf_util.h"
2021 #include "perf-sys.h"
....@@ -289,7 +290,7 @@
289290
290291 int main(int argc, char **argv)
291292 {
292
- struct rlimit r = {1024*1024, RLIM_INFINITY};
293
+ struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
293294 extern char __executable_start;
294295 char filename[256], buf[256];
295296 __u64 uprobe_file_offset;
....@@ -311,9 +312,9 @@
311312 }
312313
313314 /* test two functions in the corresponding *_kern.c file */
314
- CHECK_AND_RET(test_debug_fs_kprobe(0, "blk_start_request",
315
+ CHECK_AND_RET(test_debug_fs_kprobe(0, "blk_mq_start_request",
315316 BPF_FD_TYPE_KPROBE));
316
- CHECK_AND_RET(test_debug_fs_kprobe(1, "blk_account_io_completion",
317
+ CHECK_AND_RET(test_debug_fs_kprobe(1, "blk_account_io_done",
317318 BPF_FD_TYPE_KRETPROBE));
318319
319320 /* test nondebug fs kprobe */