diff options
| author | bobogei81123 <chmnchiang@google.com> | 2020-09-09 14:02:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-09 14:02:04 -0700 |
| commit | 409809d8a7c9c775eaea317add40e7a86a1e836c (patch) | |
| tree | e9d780925789f9d76208542768b3c738c0a4bc7f /sys/linux | |
| parent | ac7ca78e73a05a08918dd014f40739b3bbc26ea6 (diff) | |
sys/linux: improve descriptions of bpf tracing (#2076)
- Rename bpf_lsm to bpf_trace and put all bpf program types
that use BPF_RAW_TRACEPOINT_OPEN here.
- Add descriptions for types RAW_TRACEPOINT(_WRITABLE), BPF_TRACING and
BPF_EXT.
- Add the hook names for RAW_TRACEPOINT(_WRITABLE).
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/bpf.txt | 6 | ||||
| -rw-r--r-- | sys/linux/bpf.txt.const | 1 | ||||
| -rw-r--r-- | sys/linux/bpf_lsm.txt | 31 | ||||
| -rw-r--r-- | sys/linux/bpf_lsm.txt.const | 3 | ||||
| -rw-r--r-- | sys/linux/bpf_trace.txt | 73 | ||||
| -rw-r--r-- | sys/linux/bpf_trace.txt.const | 17 | ||||
| -rw-r--r-- | sys/linux/test/btf_id | 8 |
7 files changed, 97 insertions, 42 deletions
diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt index b9fd9f21a..03181531e 100644 --- a/sys/linux/bpf.txt +++ b/sys/linux/bpf.txt @@ -48,7 +48,6 @@ bpf$BPF_GET_PROG_INFO(cmd const[BPF_OBJ_GET_INFO_BY_FD], arg ptr[in, bpf_get_pro bpf$BPF_GET_MAP_INFO(cmd const[BPF_OBJ_GET_INFO_BY_FD], arg ptr[in, bpf_get_map_info_arg], size len[arg]) bpf$BPF_GET_BTF_INFO(cmd const[BPF_OBJ_GET_INFO_BY_FD], arg ptr[in, bpf_get_btf_info_arg], size len[arg]) bpf$BPF_PROG_QUERY(cmd const[BPF_PROG_QUERY], arg ptr[in, bpf_prog_query], size len[arg]) -bpf$BPF_RAW_TRACEPOINT_OPEN(cmd const[BPF_RAW_TRACEPOINT_OPEN], arg ptr[in, bpf_raw_tracepoint], size len[arg]) fd_perf_base (timeout[500]) bpf$BPF_BTF_LOAD(cmd const[BPF_BTF_LOAD], arg ptr[in, bpf_btf_load], size len[arg]) fd_btf bpf$BPF_BTF_GET_FD_BY_ID(cmd const[BPF_BTF_GET_FD_BY_ID], arg ptr[in, bpf_btf_id], size len[arg]) fd_btf bpf$BPF_TASK_FD_QUERY(cmd const[BPF_TASK_FD_QUERY], arg ptr[inout, bpf_task_fd_query], size len[arg]) @@ -547,11 +546,6 @@ bpf_prog_query { prog_cnt len[prog_ids, int32] } [align[8]] -bpf_raw_tracepoint { - name ptr64[in, string] - prog_fd fd_bpf_prog -} [align[8]] - bpf_btf_load { btf ptr64[in, bpf_btf_program] btf_log_buf ptr64[out, array[int8]] diff --git a/sys/linux/bpf.txt.const b/sys/linux/bpf.txt.const index 070c29bab..c672ee1ec 100644 --- a/sys/linux/bpf.txt.const +++ b/sys/linux/bpf.txt.const @@ -180,7 +180,6 @@ BPF_PROG_TYPE_XDP = 6 BPF_PSEUDO_CALL = 1 BPF_PSEUDO_MAP_FD = 1 BPF_PSEUDO_MAP_VALUE = 2 -BPF_RAW_TRACEPOINT_OPEN = 17 BPF_REG_0 = 0 BPF_REG_1 = 1 BPF_REG_10 = 10 diff --git a/sys/linux/bpf_lsm.txt b/sys/linux/bpf_lsm.txt deleted file mode 100644 index e59aa9310..000000000 --- a/sys/linux/bpf_lsm.txt +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2020 syzkaller project authors. All rights reserved. -# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. - -include <uapi/linux/bpf.h> - -resource bpf_lsm_btf_id[bpf_btf_id] - -syz_btf_id_by_name$bpf_lsm(name ptr[in, string[bpf_lsm_func_names]]) bpf_lsm_btf_id (timeout[500]) - -bpf$BPF_LSM_PROG_LOAD(cmd const[BPF_PROG_LOAD], arg ptr[in, bpf_lsm_prog], size len[arg]) fd_bpf_prog (timeout[500]) - -# NEED: After #2035 is merged (which we can't for now due to pahole issues), -# syz_btf_id_by_name should work and we can remove the optional flag from -# bpf_lsm_btf_id. -type bpf_lsm_prog bpf_prog_t[const[BPF_PROG_TYPE_LSM, int32], const[BPF_LSM_MAC, int32], bpf_lsm_btf_id[opt], const[0, int32]] - -# The list is generated by the following commands: -# $ VMLINUX=[path to Linux kernel source directory]/vmlinux -# $ bpftool btf dump file $VMLINUX | sed -n "s/.*FUNC '\(bpf_lsm\w*\).*/\"\1\"/p" | tr '\n' ',' | sed 's/,$/\n/' -# where `$VMLINUX` should exist after compiling the Linux kernel. -# You can also do `VMLINUX=/sys/kernel/btf/vmlinux` and run the command inside the target machine. -# -# How to install bpftool: -# 1. Download the source code of the Linux kernel after version 5.4. -# 2. Run the following commands (might need to run `make install` with root permission): -# $ KERNEL=[path to Linux kernel source directory] -# cd $KERNEL/tools/bpf/bpftool -# make -# make install - -bpf_lsm_func_names = "bpf_lsm_verify_prog", "bpf_lsm_perf_event_write", "bpf_lsm_perf_event_read", "bpf_lsm_perf_event_free", "bpf_lsm_perf_event_alloc", "bpf_lsm_perf_event_open", "bpf_lsm_locked_down", "bpf_lsm_bpf_prog_free_security", "bpf_lsm_bpf_prog_alloc_security", "bpf_lsm_bpf_map_free_security", "bpf_lsm_bpf_map_alloc_security", "bpf_lsm_bpf_prog", "bpf_lsm_bpf_map", "bpf_lsm_bpf", "bpf_lsm_audit_rule_free", "bpf_lsm_audit_rule_match", "bpf_lsm_audit_rule_known", "bpf_lsm_audit_rule_init", "bpf_lsm_key_getsecurity", "bpf_lsm_key_permission", "bpf_lsm_key_free", "bpf_lsm_key_alloc", "bpf_lsm_xfrm_decode_session", "bpf_lsm_xfrm_state_pol_flow_match", "bpf_lsm_xfrm_policy_lookup", "bpf_lsm_xfrm_state_delete_security", "bpf_lsm_xfrm_state_free_security", "bpf_lsm_xfrm_state_alloc_acquire", "bpf_lsm_xfrm_state_alloc", "bpf_lsm_xfrm_policy_delete_security", "bpf_lsm_xfrm_policy_free_security", "bpf_lsm_xfrm_policy_clone_security", "bpf_lsm_xfrm_policy_alloc_security", "bpf_lsm_ib_free_security", "bpf_lsm_ib_alloc_security", "bpf_lsm_ib_endport_manage_subnet", "bpf_lsm_ib_pkey_access", "bpf_lsm_sctp_sk_clone", "bpf_lsm_sctp_bind_connect", "bpf_lsm_sctp_assoc_request", "bpf_lsm_tun_dev_open", "bpf_lsm_tun_dev_attach", "bpf_lsm_tun_dev_attach_queue", "bpf_lsm_tun_dev_create", "bpf_lsm_tun_dev_free_security", "bpf_lsm_tun_dev_alloc_security", "bpf_lsm_req_classify_flow", "bpf_lsm_secmark_refcount_dec", "bpf_lsm_secmark_refcount_inc", "bpf_lsm_secmark_relabel_packet", "bpf_lsm_inet_conn_established", "bpf_lsm_inet_csk_clone", "bpf_lsm_inet_conn_request", "bpf_lsm_sock_graft", "bpf_lsm_sk_getsecid", "bpf_lsm_sk_clone_security", "bpf_lsm_sk_free_security", "bpf_lsm_sk_alloc_security", "bpf_lsm_socket_getpeersec_dgram", "bpf_lsm_socket_getpeersec_stream", "bpf_lsm_socket_sock_rcv_skb", "bpf_lsm_socket_shutdown", "bpf_lsm_socket_setsockopt", "bpf_lsm_socket_getsockopt", "bpf_lsm_socket_getpeername", "bpf_lsm_socket_getsockname", "bpf_lsm_socket_recvmsg", "bpf_lsm_socket_sendmsg", "bpf_lsm_socket_accept", "bpf_lsm_socket_listen", "bpf_lsm_socket_connect", "bpf_lsm_socket_bind", "bpf_lsm_socket_socketpair", "bpf_lsm_socket_post_create", "bpf_lsm_socket_create", "bpf_lsm_unix_may_send", "bpf_lsm_unix_stream_connect", "bpf_lsm_post_notification", "bpf_lsm_inode_getsecctx", "bpf_lsm_inode_setsecctx", "bpf_lsm_inode_notifysecctx", "bpf_lsm_inode_invalidate_secctx", "bpf_lsm_release_secctx", "bpf_lsm_secctx_to_secid", "bpf_lsm_secid_to_secctx", "bpf_lsm_ismaclabel", "bpf_lsm_setprocattr", "bpf_lsm_getprocattr", "bpf_lsm_d_instantiate", "bpf_lsm_netlink_send", "bpf_lsm_sem_semop", "bpf_lsm_sem_semctl", "bpf_lsm_sem_associate", "bpf_lsm_sem_free_security", "bpf_lsm_sem_alloc_security", "bpf_lsm_shm_shmat", "bpf_lsm_shm_shmctl", "bpf_lsm_shm_associate", "bpf_lsm_shm_free_security", "bpf_lsm_shm_alloc_security", "bpf_lsm_msg_queue_msgrcv", "bpf_lsm_msg_queue_msgsnd", "bpf_lsm_msg_queue_msgctl", "bpf_lsm_msg_queue_associate", "bpf_lsm_msg_queue_free_security", "bpf_lsm_msg_queue_alloc_security", "bpf_lsm_msg_msg_free_security", "bpf_lsm_msg_msg_alloc_security", "bpf_lsm_ipc_getsecid", "bpf_lsm_ipc_permission", "bpf_lsm_task_to_inode", "bpf_lsm_task_prctl", "bpf_lsm_task_kill", "bpf_lsm_task_movememory", "bpf_lsm_task_getscheduler", "bpf_lsm_task_setscheduler", "bpf_lsm_task_setrlimit", "bpf_lsm_task_prlimit", "bpf_lsm_task_getioprio", "bpf_lsm_task_setioprio", "bpf_lsm_task_setnice", "bpf_lsm_task_getsecid", "bpf_lsm_task_getsid", "bpf_lsm_task_getpgid", "bpf_lsm_task_setpgid", "bpf_lsm_task_fix_setgid", "bpf_lsm_task_fix_setuid", "bpf_lsm_kernel_post_read_file", "bpf_lsm_kernel_read_file", "bpf_lsm_kernel_load_data", "bpf_lsm_kernel_module_request", "bpf_lsm_kernel_create_files_as", "bpf_lsm_kernel_act_as", "bpf_lsm_cred_getsecid", "bpf_lsm_cred_transfer", "bpf_lsm_cred_prepare", "bpf_lsm_cred_free", "bpf_lsm_cred_alloc_blank", "bpf_lsm_task_free", "bpf_lsm_task_alloc", "bpf_lsm_file_open", "bpf_lsm_file_receive", "bpf_lsm_file_send_sigiotask", "bpf_lsm_file_set_fowner", "bpf_lsm_file_fcntl", "bpf_lsm_file_lock", "bpf_lsm_file_mprotect", "bpf_lsm_mmap_file", "bpf_lsm_mmap_addr", "bpf_lsm_file_ioctl", "bpf_lsm_file_free_security", "bpf_lsm_file_alloc_security", "bpf_lsm_file_permission", "bpf_lsm_kernfs_init_security", "bpf_lsm_inode_copy_up_xattr", "bpf_lsm_inode_copy_up", "bpf_lsm_inode_getsecid", "bpf_lsm_inode_listsecurity", "bpf_lsm_inode_setsecurity", "bpf_lsm_inode_getsecurity", "bpf_lsm_inode_killpriv", "bpf_lsm_inode_need_killpriv", "bpf_lsm_inode_removexattr", "bpf_lsm_inode_listxattr", "bpf_lsm_inode_getxattr", "bpf_lsm_inode_post_setxattr", "bpf_lsm_inode_setxattr", "bpf_lsm_inode_getattr", "bpf_lsm_inode_setattr", "bpf_lsm_inode_permission", "bpf_lsm_inode_follow_link", "bpf_lsm_inode_readlink", "bpf_lsm_inode_rename", "bpf_lsm_inode_mknod", "bpf_lsm_inode_rmdir", "bpf_lsm_inode_mkdir", "bpf_lsm_inode_symlink", "bpf_lsm_inode_unlink", "bpf_lsm_inode_link", "bpf_lsm_inode_create", "bpf_lsm_inode_init_security", "bpf_lsm_inode_free_security", "bpf_lsm_inode_alloc_security", "bpf_lsm_path_notify", "bpf_lsm_path_chroot", "bpf_lsm_path_chown", "bpf_lsm_path_chmod", "bpf_lsm_path_rename", "bpf_lsm_path_link", "bpf_lsm_path_symlink", "bpf_lsm_path_truncate", "bpf_lsm_path_mknod", "bpf_lsm_path_rmdir", "bpf_lsm_path_mkdir", "bpf_lsm_path_unlink", "bpf_lsm_dentry_create_files_as", "bpf_lsm_dentry_init_security", "bpf_lsm_move_mount", "bpf_lsm_sb_add_mnt_opt", "bpf_lsm_sb_clone_mnt_opts", "bpf_lsm_sb_set_mnt_opts", "bpf_lsm_sb_pivotroot", "bpf_lsm_sb_umount", "bpf_lsm_sb_mount", "bpf_lsm_sb_statfs", "bpf_lsm_sb_show_options", "bpf_lsm_sb_kern_mount", "bpf_lsm_sb_remount", "bpf_lsm_sb_eat_lsm_opts", "bpf_lsm_sb_free_mnt_opts", "bpf_lsm_sb_free_security", "bpf_lsm_sb_alloc_security", "bpf_lsm_fs_context_parse_param", "bpf_lsm_fs_context_dup", "bpf_lsm_bprm_committed_creds", "bpf_lsm_bprm_committing_creds", "bpf_lsm_bprm_check_security", "bpf_lsm_bprm_creds_from_file", "bpf_lsm_bprm_creds_for_exec", "bpf_lsm_vm_enough_memory", "bpf_lsm_settime", "bpf_lsm_syslog", "bpf_lsm_quota_on", "bpf_lsm_quotactl", "bpf_lsm_capable", "bpf_lsm_capset", "bpf_lsm_capget", "bpf_lsm_ptrace_traceme", "bpf_lsm_ptrace_access_check", "bpf_lsm_binder_transfer_file", "bpf_lsm_binder_transfer_binder", "bpf_lsm_binder_transaction", "bpf_lsm_binder_set_context_mgr" diff --git a/sys/linux/bpf_lsm.txt.const b/sys/linux/bpf_lsm.txt.const index 35fad6ca8..d6df381b9 100644 --- a/sys/linux/bpf_lsm.txt.const +++ b/sys/linux/bpf_lsm.txt.const @@ -3,4 +3,7 @@ arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x BPF_LSM_MAC = 27 BPF_PROG_LOAD = 5 BPF_PROG_TYPE_LSM = 29 +BPF_PROG_TYPE_RAW_TRACEPOINT = 17 +BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24 +BPF_RAW_TRACEPOINT_OPEN = 17 __NR_bpf = 280, 386:357, amd64:321, arm:386, mips64le:5315, ppc64le:361, s390x:351 diff --git a/sys/linux/bpf_trace.txt b/sys/linux/bpf_trace.txt new file mode 100644 index 000000000..a6b6307c6 --- /dev/null +++ b/sys/linux/bpf_trace.txt @@ -0,0 +1,73 @@ +# Copyright 2020 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +include <uapi/linux/bpf.h> + +# This file describes types of bpf programs that are attached using BPF_RAW_TRACEPOINT_OPEN +# These types are: BPF_PROG_TYPE_TRACING, BPF_PROG_TYPE_EXT, BPF_PROG_TYPE_LSM, BPF_PROG_TYPE_RAW_TRACEPOINT, BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE + +resource bpf_lsm_btf_id[bpf_btf_id] +resource fd_bpf_prog_with_btfid[fd_bpf_prog] +resource fd_bpf_prog_raw_tracepoint[fd_bpf_prog] + +syz_btf_id_by_name$bpf_lsm(name ptr[in, string[bpf_lsm_func_names]]) bpf_lsm_btf_id (timeout[500]) + +bpf$BPF_PROG_WITH_BTFID_LOAD(cmd const[BPF_PROG_LOAD], arg ptr[in, bpf_prog_with_btfid], size len[arg]) fd_bpf_prog_with_btfid (timeout[500]) +bpf$BPF_PROG_RAW_TRACEPOINT_LOAD(cmd const[BPF_PROG_LOAD], arg ptr[in, bpf_prog_raw_tracepoint], size len[arg]) fd_bpf_prog_raw_tracepoint (timeout[500]) + +bpf$BPF_RAW_TRACEPOINT_OPEN_UNNAMED(cmd const[BPF_RAW_TRACEPOINT_OPEN], arg ptr[in, bpf_raw_tracepoint_unnamed], size len[arg]) fd_perf_base (timeout[500]) +bpf$BPF_RAW_TRACEPOINT_OPEN(cmd const[BPF_RAW_TRACEPOINT_OPEN], arg ptr[in, bpf_raw_tracepoint], size len[arg]) fd_perf_base (timeout[500]) + +bpf_prog_with_btfid [ + bpf_lsm bpf_lsm_prog + bpf_tracing bpf_tracing_prog + bpf_ext bpf_ext_prog +] + +# NEED: After #2035 is merged (which we can't for now due to pahole issues), +# syz_btf_id_by_name should work and we can remove the optional flag from +# bpf_lsm_btf_id. +type bpf_lsm_prog bpf_prog_t[const[BPF_PROG_TYPE_LSM, int32], const[BPF_LSM_MAC, int32], bpf_lsm_btf_id[opt], const[0, int32]] +type bpf_tracing_prog bpf_prog_t[const[BPF_PROG_TYPE_TRACING, int32], flags[bpf_tracing_attach_types, int32], int32[0:BTF_ID_MAX], fd_bpf_prog[opt]] +type bpf_ext_prog bpf_prog_t[const[BPF_PROG_TYPE_EXT, int32], const[0, int32], int32[0:BTF_ID_MAX], fd_bpf_prog[opt]] + +type bpf_prog_raw_tracepoint bpf_prog_t[flags[bpf_raw_tracepoint_prog_types, int32], const[0, int32], const[0, int32], const[0, int32]] + +bpf_tracing_attach_types = BPF_TRACE_FENTRY, BPF_TRACE_FEXIT, BPF_TRACE_RAW_TP, BPF_MODIFY_RETURN, BPF_TRACE_ITER +bpf_raw_tracepoint_prog_types = BPF_PROG_TYPE_RAW_TRACEPOINT, BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE + +# An reasonable upper bound for the number of btf_ids. Currently there are around 163000 btf_ids. +# We do not use BTF_MAX_TYPE (~= 1000000) to increase the probability of getting a valid id. +define BTF_ID_MAX 200000 + +bpf_raw_tracepoint_unnamed { + name const[0, int64] + prog_fd fd_bpf_prog_with_btfid +} [align[8]] + +bpf_raw_tracepoint { + name ptr64[in, string[bpf_raw_tracepoint_names]] + prog_fd fd_bpf_prog_raw_tracepoint +} [align[8]] + +# This list is generated by the following commands: +# $ VMLINUX=[path to Linux kernel source directory]/vmlinux +# $ bpftool btf dump file $VMLINUX | sed -n "s/.*FUNC '\(bpf_lsm\w*\).*/\"\1\"/p" | tr '\n' ',' | sed 's/,$/\n/' +# where `$VMLINUX` should exist after compiling the Linux kernel. +# You can also do `VMLINUX=/sys/kernel/btf/vmlinux` and run the command inside the target machine. +# +# How to install bpftool: +# 1. Download the source code of the Linux kernel after version 5.4. +# 2. Run the following commands (might need to run `make install` with root permission): +# $ KERNEL=[path to Linux kernel source directory] +# cd $KERNEL/tools/bpf/bpftool +# make +# make install + +bpf_lsm_func_names = "bpf_lsm_verify_prog", "bpf_lsm_perf_event_write", "bpf_lsm_perf_event_read", "bpf_lsm_perf_event_free", "bpf_lsm_perf_event_alloc", "bpf_lsm_perf_event_open", "bpf_lsm_locked_down", "bpf_lsm_bpf_prog_free_security", "bpf_lsm_bpf_prog_alloc_security", "bpf_lsm_bpf_map_free_security", "bpf_lsm_bpf_map_alloc_security", "bpf_lsm_bpf_prog", "bpf_lsm_bpf_map", "bpf_lsm_bpf", "bpf_lsm_audit_rule_free", "bpf_lsm_audit_rule_match", "bpf_lsm_audit_rule_known", "bpf_lsm_audit_rule_init", "bpf_lsm_key_getsecurity", "bpf_lsm_key_permission", "bpf_lsm_key_free", "bpf_lsm_key_alloc", "bpf_lsm_xfrm_decode_session", "bpf_lsm_xfrm_state_pol_flow_match", "bpf_lsm_xfrm_policy_lookup", "bpf_lsm_xfrm_state_delete_security", "bpf_lsm_xfrm_state_free_security", "bpf_lsm_xfrm_state_alloc_acquire", "bpf_lsm_xfrm_state_alloc", "bpf_lsm_xfrm_policy_delete_security", "bpf_lsm_xfrm_policy_free_security", "bpf_lsm_xfrm_policy_clone_security", "bpf_lsm_xfrm_policy_alloc_security", "bpf_lsm_ib_free_security", "bpf_lsm_ib_alloc_security", "bpf_lsm_ib_endport_manage_subnet", "bpf_lsm_ib_pkey_access", "bpf_lsm_sctp_sk_clone", "bpf_lsm_sctp_bind_connect", "bpf_lsm_sctp_assoc_request", "bpf_lsm_tun_dev_open", "bpf_lsm_tun_dev_attach", "bpf_lsm_tun_dev_attach_queue", "bpf_lsm_tun_dev_create", "bpf_lsm_tun_dev_free_security", "bpf_lsm_tun_dev_alloc_security", "bpf_lsm_req_classify_flow", "bpf_lsm_secmark_refcount_dec", "bpf_lsm_secmark_refcount_inc", "bpf_lsm_secmark_relabel_packet", "bpf_lsm_inet_conn_established", "bpf_lsm_inet_csk_clone", "bpf_lsm_inet_conn_request", "bpf_lsm_sock_graft", "bpf_lsm_sk_getsecid", "bpf_lsm_sk_clone_security", "bpf_lsm_sk_free_security", "bpf_lsm_sk_alloc_security", "bpf_lsm_socket_getpeersec_dgram", "bpf_lsm_socket_getpeersec_stream", "bpf_lsm_socket_sock_rcv_skb", "bpf_lsm_socket_shutdown", "bpf_lsm_socket_setsockopt", "bpf_lsm_socket_getsockopt", "bpf_lsm_socket_getpeername", "bpf_lsm_socket_getsockname", "bpf_lsm_socket_recvmsg", "bpf_lsm_socket_sendmsg", "bpf_lsm_socket_accept", "bpf_lsm_socket_listen", "bpf_lsm_socket_connect", "bpf_lsm_socket_bind", "bpf_lsm_socket_socketpair", "bpf_lsm_socket_post_create", "bpf_lsm_socket_create", "bpf_lsm_unix_may_send", "bpf_lsm_unix_stream_connect", "bpf_lsm_post_notification", "bpf_lsm_inode_getsecctx", "bpf_lsm_inode_setsecctx", "bpf_lsm_inode_notifysecctx", "bpf_lsm_inode_invalidate_secctx", "bpf_lsm_release_secctx", "bpf_lsm_secctx_to_secid", "bpf_lsm_secid_to_secctx", "bpf_lsm_ismaclabel", "bpf_lsm_setprocattr", "bpf_lsm_getprocattr", "bpf_lsm_d_instantiate", "bpf_lsm_netlink_send", "bpf_lsm_sem_semop", "bpf_lsm_sem_semctl", "bpf_lsm_sem_associate", "bpf_lsm_sem_free_security", "bpf_lsm_sem_alloc_security", "bpf_lsm_shm_shmat", "bpf_lsm_shm_shmctl", "bpf_lsm_shm_associate", "bpf_lsm_shm_free_security", "bpf_lsm_shm_alloc_security", "bpf_lsm_msg_queue_msgrcv", "bpf_lsm_msg_queue_msgsnd", "bpf_lsm_msg_queue_msgctl", "bpf_lsm_msg_queue_associate", "bpf_lsm_msg_queue_free_security", "bpf_lsm_msg_queue_alloc_security", "bpf_lsm_msg_msg_free_security", "bpf_lsm_msg_msg_alloc_security", "bpf_lsm_ipc_getsecid", "bpf_lsm_ipc_permission", "bpf_lsm_task_to_inode", "bpf_lsm_task_prctl", "bpf_lsm_task_kill", "bpf_lsm_task_movememory", "bpf_lsm_task_getscheduler", "bpf_lsm_task_setscheduler", "bpf_lsm_task_setrlimit", "bpf_lsm_task_prlimit", "bpf_lsm_task_getioprio", "bpf_lsm_task_setioprio", "bpf_lsm_task_setnice", "bpf_lsm_task_getsecid", "bpf_lsm_task_getsid", "bpf_lsm_task_getpgid", "bpf_lsm_task_setpgid", "bpf_lsm_task_fix_setgid", "bpf_lsm_task_fix_setuid", "bpf_lsm_kernel_post_read_file", "bpf_lsm_kernel_read_file", "bpf_lsm_kernel_load_data", "bpf_lsm_kernel_module_request", "bpf_lsm_kernel_create_files_as", "bpf_lsm_kernel_act_as", "bpf_lsm_cred_getsecid", "bpf_lsm_cred_transfer", "bpf_lsm_cred_prepare", "bpf_lsm_cred_free", "bpf_lsm_cred_alloc_blank", "bpf_lsm_task_free", "bpf_lsm_task_alloc", "bpf_lsm_file_open", "bpf_lsm_file_receive", "bpf_lsm_file_send_sigiotask", "bpf_lsm_file_set_fowner", "bpf_lsm_file_fcntl", "bpf_lsm_file_lock", "bpf_lsm_file_mprotect", "bpf_lsm_mmap_file", "bpf_lsm_mmap_addr", "bpf_lsm_file_ioctl", "bpf_lsm_file_free_security", "bpf_lsm_file_alloc_security", "bpf_lsm_file_permission", "bpf_lsm_kernfs_init_security", "bpf_lsm_inode_copy_up_xattr", "bpf_lsm_inode_copy_up", "bpf_lsm_inode_getsecid", "bpf_lsm_inode_listsecurity", "bpf_lsm_inode_setsecurity", "bpf_lsm_inode_getsecurity", "bpf_lsm_inode_killpriv", "bpf_lsm_inode_need_killpriv", "bpf_lsm_inode_removexattr", "bpf_lsm_inode_listxattr", "bpf_lsm_inode_getxattr", "bpf_lsm_inode_post_setxattr", "bpf_lsm_inode_setxattr", "bpf_lsm_inode_getattr", "bpf_lsm_inode_setattr", "bpf_lsm_inode_permission", "bpf_lsm_inode_follow_link", "bpf_lsm_inode_readlink", "bpf_lsm_inode_rename", "bpf_lsm_inode_mknod", "bpf_lsm_inode_rmdir", "bpf_lsm_inode_mkdir", "bpf_lsm_inode_symlink", "bpf_lsm_inode_unlink", "bpf_lsm_inode_link", "bpf_lsm_inode_create", "bpf_lsm_inode_init_security", "bpf_lsm_inode_free_security", "bpf_lsm_inode_alloc_security", "bpf_lsm_path_notify", "bpf_lsm_path_chroot", "bpf_lsm_path_chown", "bpf_lsm_path_chmod", "bpf_lsm_path_rename", "bpf_lsm_path_link", "bpf_lsm_path_symlink", "bpf_lsm_path_truncate", "bpf_lsm_path_mknod", "bpf_lsm_path_rmdir", "bpf_lsm_path_mkdir", "bpf_lsm_path_unlink", "bpf_lsm_dentry_create_files_as", "bpf_lsm_dentry_init_security", "bpf_lsm_move_mount", "bpf_lsm_sb_add_mnt_opt", "bpf_lsm_sb_clone_mnt_opts", "bpf_lsm_sb_set_mnt_opts", "bpf_lsm_sb_pivotroot", "bpf_lsm_sb_umount", "bpf_lsm_sb_mount", "bpf_lsm_sb_statfs", "bpf_lsm_sb_show_options", "bpf_lsm_sb_kern_mount", "bpf_lsm_sb_remount", "bpf_lsm_sb_eat_lsm_opts", "bpf_lsm_sb_free_mnt_opts", "bpf_lsm_sb_free_security", "bpf_lsm_sb_alloc_security", "bpf_lsm_fs_context_parse_param", "bpf_lsm_fs_context_dup", "bpf_lsm_bprm_committed_creds", "bpf_lsm_bprm_committing_creds", "bpf_lsm_bprm_check_security", "bpf_lsm_bprm_creds_from_file", "bpf_lsm_bprm_creds_for_exec", "bpf_lsm_vm_enough_memory", "bpf_lsm_settime", "bpf_lsm_syslog", "bpf_lsm_quota_on", "bpf_lsm_quotactl", "bpf_lsm_capable", "bpf_lsm_capset", "bpf_lsm_capget", "bpf_lsm_ptrace_traceme", "bpf_lsm_ptrace_access_check", "bpf_lsm_binder_transfer_file", "bpf_lsm_binder_transfer_binder", "bpf_lsm_binder_transaction", "bpf_lsm_binder_set_context_mgr" + +# This list is generated by the following commands: +# $ KERNEL=[path to Linux kernel source directory] +# grep -Rh "TRACE_EVENT\(\|_FN\)(" $KERNEL/include/trace/events/*.h | sed -n 's/TRACE_EVENT\(\|_FN\)(\(.*\),/"\2"/p' | tr '\n' ',' | sed 's/,$/\n/' + +bpf_raw_tracepoint_names = "9p_client_req", "9p_client_res", "9p_protocol_dump", "afs_receive_data", "afs_notify_call", "afs_cb_call", "afs_call", "afs_make_fs_call", "afs_make_fs_calli", "afs_make_fs_call1", "afs_make_fs_call2", "afs_make_vl_call", "afs_call_done", "afs_send_pages", "afs_sent_pages", "afs_dir_check_failed", "afs_page_dirty", "afs_call_state", "afs_lookup", "afs_edit_dir", "afs_protocol_error", "afs_io_error", "afs_file_error", "afs_cm_no_server", "afs_cm_no_server_u", "afs_flock_ev", "afs_flock_op", "afs_reload_dir", "afs_silly_rename", "afs_get_tree", "afs_cb_break", "afs_cb_miss", "afs_server", "afs_volume", "alarmtimer_suspend", "snd_soc_dapm_walk_done", "snd_soc_dapm_path", "snd_soc_dapm_connected", "snd_soc_jack_irq", "snd_soc_jack_report", "snd_soc_jack_notify", "bcache_read", "bcache_write", "bcache_journal_write", "bcache_btree_write", "bcache_btree_gc_coalesce", "bcache_btree_insert_key", "bcache_keyscan", "bcache_invalidate", "bcache_alloc", "bcache_alloc_fail", "block_rq_requeue", "block_rq_complete", "block_bio_bounce", "block_bio_complete", "block_bio_queue", "block_plug", "block_split", "block_bio_remap", "block_rq_remap", "br_fdb_add", "br_fdb_external_learn_add", "fdb_delete", "br_fdb_update", "btrfs_transaction_commit", "btrfs_handle_em_exist", "btrfs_writepage_end_io_hook", "btrfs_sync_file", "btrfs_sync_fs", "btrfs_add_block_group", "btrfs_cow_block", "btrfs_space_reservation", "btrfs_trigger_flush", "btrfs_flush_space", "find_free_extent", "btrfs_find_cluster", "btrfs_failed_cluster_setup", "btrfs_setup_cluster", "alloc_extent_state", "free_extent_state", "qgroup_num_dirty_extents", "btrfs_qgroup_account_extent", "qgroup_update_counters", "qgroup_update_reserve", "qgroup_meta_reserve", "qgroup_meta_convert", "qgroup_meta_free_all_pertrans", "btrfs_inode_mod_outstanding_extents", "btrfs_set_extent_bit", "btrfs_clear_extent_bit", "btrfs_convert_extent_bit", "cachefiles_ref", "cachefiles_lookup", "cachefiles_mkdir", "cachefiles_create", "cachefiles_unlink", "cachefiles_rename", "cachefiles_mark_active", "cachefiles_wait_active", "cachefiles_mark_inactive", "cachefiles_mark_buried", "cma_alloc", "cma_release", "mm_compaction_migratepages", "mm_compaction_begin", "mm_compaction_end", "mm_compaction_try_to_compact_pages", "mm_compaction_kcompactd_sleep", "cpuhp_enter", "cpuhp_multi_enter", "cpuhp_exit", "devfreq_monitor", "devlink_hwmsg", "devlink_hwerr", "devlink_health_report", "devlink_health_recover_aborted", "devlink_health_reporter_state_update", "erofs_lookup", "erofs_fill_inode", "erofs_readpage", "erofs_readpages", "erofs_destroy_inode", "ext4_other_inode_update_time", "ext4_free_inode", "ext4_request_inode", "ext4_allocate_inode", "ext4_evict_inode", "ext4_drop_inode", "ext4_nfs_commit_metadata", "ext4_mark_inode_dirty", "ext4_begin_ordered_truncate", "ext4_writepages", "ext4_da_write_pages", "ext4_da_write_pages_extent", "ext4_writepages_result", "ext4_discard_blocks", "ext4_mb_release_inode_pa", "ext4_mb_release_group_pa", "ext4_discard_preallocations", "ext4_mb_discard_preallocations", "ext4_request_blocks", "ext4_allocate_blocks", "ext4_free_blocks", "ext4_sync_file_enter", "ext4_sync_file_exit", "ext4_sync_fs", "ext4_alloc_da_blocks", "ext4_mballoc_alloc", "ext4_mballoc_prealloc", "ext4_forget", "ext4_da_update_reserve_space", "ext4_da_reserve_space", "ext4_da_release_space", "ext4_direct_IO_enter", "ext4_direct_IO_exit", "ext4_fallocate_exit", "ext4_unlink_enter", "ext4_unlink_exit", "ext4_ext_convert_to_initialized_enter", "ext4_ext_convert_to_initialized_fastpath", "ext4_ext_load_extent", "ext4_load_inode", "ext4_journal_start", "ext4_journal_start_reserved", "ext4_ext_handle_unwritten_extents", "ext4_get_implied_cluster_alloc_exit", "ext4_ext_put_in_cache", "ext4_ext_in_cache", "ext4_find_delalloc_range", "ext4_get_reserved_cluster_alloc", "ext4_ext_show_extent", "ext4_remove_blocks", "ext4_ext_rm_leaf", "ext4_ext_rm_idx", "ext4_ext_remove_space", "ext4_ext_remove_space_done", "ext4_es_remove_extent", "ext4_es_find_extent_range_enter", "ext4_es_find_extent_range_exit", "ext4_es_lookup_extent_enter", "ext4_es_lookup_extent_exit", "ext4_es_shrink_scan_exit", "ext4_collapse_range", "ext4_insert_range", "ext4_es_shrink", "ext4_es_insert_delayed_block", "ext4_shutdown", "ext4_error", "f2fs_sync_file_exit", "f2fs_sync_fs", "f2fs_unlink_enter", "f2fs_truncate_data_blocks_range", "f2fs_truncate_partial_nodes", "f2fs_file_write_iter", "f2fs_map_blocks", "f2fs_background_gc", "f2fs_gc_begin", "f2fs_gc_end", "f2fs_get_victim", "f2fs_lookup_start", "f2fs_lookup_end", "f2fs_readdir", "f2fs_fallocate", "f2fs_direct_IO_enter", "f2fs_direct_IO_exit", "f2fs_reserve_new_blocks", "f2fs_write_begin", "f2fs_write_end", "f2fs_filemap_fault", "f2fs_writepages", "f2fs_readpages", "f2fs_write_checkpoint", "f2fs_issue_reset_zone", "f2fs_issue_flush", "f2fs_lookup_extent_tree_start", "f2fs_update_extent_tree_range", "f2fs_shrink_extent_tree", "f2fs_destroy_extent_tree", "f2fs_shutdown", "f2fs_iostat", "fib6_table_lookup", "fib_table_lookup", "locks_get_lock_context", "generic_add_lease", "leases_conflict", "filemap_set_wb_err", "file_check_and_advance_wb_err", "fscache_cookie", "fscache_netfs", "fscache_acquire", "fscache_relinquish", "fscache_enable", "fscache_disable", "fscache_osm", "fscache_page", "fscache_check_page", "fscache_wake_cookie", "fscache_op", "fscache_page_op", "fscache_wrote_page", "fscache_gang_lookup", "dax_insert_mapping", "dax_writeback_one", "fsi_master_read", "fsi_master_write", "fsi_master_rw_result", "fsi_master_break", "fsi_master_aspeed_opb_read", "fsi_master_aspeed_opb_write", "fsi_master_aspeed_opb_error", "fsi_master_acf_copro_command", "fsi_master_acf_send_request", "fsi_master_acf_copro_response", "fsi_master_acf_crc_rsp_error", "fsi_master_acf_poll_response_busy", "fsi_master_acf_cmd_abs_addr", "fsi_master_acf_cmd_rel_addr", "fsi_master_acf_cmd_same_addr", "fsi_master_gpio_in", "fsi_master_gpio_out", "fsi_master_gpio_clock_zeros", "fsi_master_gpio_break", "fsi_master_gpio_crc_cmd_error", "fsi_master_gpio_crc_rsp_error", "fsi_master_gpio_poll_response_busy", "fsi_master_gpio_cmd_abs_addr", "fsi_master_gpio_cmd_rel_addr", "fsi_master_gpio_cmd_same_addr", "gpio_direction", "gpio_value", "gpu_mem_total", "host1x_cdma_push", "host1x_cdma_push_wide", "host1x_cdma_push_gather", "host1x_channel_submit", "host1x_channel_submitted", "host1x_channel_submit_complete", "host1x_wait_cdma", "host1x_syncpt_load_min", "host1x_syncpt_wait_check", "hsw_stream_buffer", "hsw_stream_alloc_reply", "hsw_mixer_info_reply", "hsw_stream_data_format", "hsw_stream_alloc_request", "hsw_stream_free_req", "hsw_volume_req", "hsw_device_config_req", "mm_khugepaged_scan_pmd", "mm_collapse_huge_page", "mm_collapse_huge_page_isolate", "mm_collapse_huge_page_swapin", "hwmon_attr_show_string", "i2c_write", "i2c_read", "i2c_reply", "i2c_result", "ib_mad_send_done_handler", "ib_mad_recv_done_handler", "initcall_level", "initcall_start", "initcall_finish", "ishtp_dump", "iocost_iocg_activate", "iocost_ioc_vrate_adj", "map", "unmap", "io_uring_create", "io_uring_register", "io_uring_file_get", "io_uring_queue_async_work", "io_uring_defer", "io_uring_link", "io_uring_cqring_wait", "io_uring_fail_link", "io_uring_complete", "io_uring_submit_sqe", "io_uring_poll_arm", "io_uring_poll_wake", "io_uring_task_add", "io_uring_task_run", "ipi_raise", "irq_handler_entry", "irq_handler_exit", "jbd2_checkpoint", "jbd2_end_commit", "jbd2_submit_inode_data", "jbd2_handle_extend", "jbd2_handle_stats", "jbd2_run_stats", "jbd2_checkpoint_stats", "jbd2_update_log_tail", "jbd2_write_superblock", "jbd2_lock_buffer_stall", "mm_page_free", "mm_page_free_batched", "mm_page_alloc", "mm_page_pcpu_drain", "mm_page_alloc_extfrag", "rss_stat", "kvm_userspace_exit", "kvm_vcpu_wakeup", "kvm_set_irq", "kvm_ioapic_set_irq", "kvm_ioapic_delayed_eoi_inj", "kvm_msi_set_irq", "kvm_ack_irq", "kvm_mmio", "kvm_fpu", "kvm_age_page", "kvm_halt_poll_ns", "kyber_latency", "kyber_adjust", "kyber_throttled", "ata_qc_issue", "ata_eh_link_autopsy", "ata_eh_link_autopsy_qc", "lock_acquire", "mce_record", "mm_migrate_pages", "mlxsw_sp_acl_atcam_entry_add_ctcam_spill", "mlxsw_sp_acl_tcam_vregion_rehash", "mlxsw_sp_acl_tcam_vregion_migrate", "mlxsw_sp_acl_tcam_vregion_migrate_end", "mlxsw_sp_acl_tcam_vregion_rehash_rollback_failed", "vm_unmapped_area", "mmc_request_start", "mmc_request_done", "module_load", "module_free", "module_request", "napi_poll", "neigh_create", "neigh_update", "net_dev_start_xmit", "net_dev_xmit", "net_dev_xmit_timeout", "nilfs2_collection_stage_transition", "nilfs2_transaction_transition", "nilfs2_segment_usage_check", "nilfs2_segment_usage_allocated", "nilfs2_segment_usage_freed", "nilfs2_mdt_insert_new_block", "nilfs2_mdt_submit_block", "nmi_handler", "objagg_create", "objagg_destroy", "objagg_obj_create", "objagg_obj_destroy", "objagg_obj_get", "objagg_obj_put", "objagg_obj_parent_assign", "objagg_obj_parent_unassign", "objagg_obj_root_create", "objagg_obj_root_destroy", "oom_score_adj_update", "reclaim_retry_zone", "mark_victim", "wake_reaper", "start_task_reaping", "finish_task_reaping", "skip_task_reaping", "compact_retry", "test_pages_isolated", "mm_lru_insertion", "mm_lru_activate", "page_pool_release", "page_pool_state_release", "page_pool_state_hold", "page_pool_update_nid", "percpu_alloc_percpu", "percpu_free_percpu", "percpu_alloc_percpu_fail", "percpu_create_chunk", "percpu_destroy_chunk", "powernv_throttle", "pstate_sample", "cpu_frequency_limits", "device_pm_callback_start", "device_pm_callback_end", "suspend_resume", "console", "pwc_handler_enter", "pwc_handler_exit", "qdisc_dequeue", "qdisc_reset", "qdisc_destroy", "qdisc_create", "qrtr_ns_service_announce_new", "qrtr_ns_service_announce_del", "qrtr_ns_server_add", "qrtr_ns_message", "add_device_randomness", "credit_entropy_bits", "push_to_pool", "debit_entropy", "add_input_randomness", "add_disk_randomness", "xfer_secondary_pool", "random_read", "urandom_read", "rcu_utilization", "cq_schedule", "cq_reschedule", "cq_process", "cq_poll", "cq_drain_complete", "cq_modify", "cq_alloc", "cq_alloc_error", "cq_free", "mr_alloc", "mr_integ_alloc", "mr_dereg", "rpcgss_import_ctx", "rpcgss_svc_accept_upcall", "rpcgss_svc_accept", "rpcgss_unwrap_failed", "rpcgss_bad_seqno", "rpcgss_seqno", "rpcgss_need_reencode", "rpcgss_update_slack", "rpcgss_upcall_msg", "rpcgss_upcall_result", "rpcgss_context", "rpcgss_createauth", "rpcgss_oid_to_mech", "xprtrdma_inline_thresh", "xprtrdma_op_connect", "xprtrdma_op_set_cto", "xprtrdma_qp_event", "xprtrdma_createmrs", "xprtrdma_mr_get", "xprtrdma_nomrs", "xprtrdma_marshal", "xprtrdma_marshal_failed", "xprtrdma_prepsend_failed", "xprtrdma_post_send", "xprtrdma_post_recv", "xprtrdma_post_recvs", "xprtrdma_post_linv", "xprtrdma_wc_send", "xprtrdma_wc_receive", "xprtrdma_frwr_alloc", "xprtrdma_frwr_dereg", "xprtrdma_frwr_sgerr", "xprtrdma_frwr_maperr", "xprtrdma_dma_maperr", "xprtrdma_reply", "xprtrdma_defer_cmp", "xprtrdma_fixup", "xprtrdma_decode_seg", "xprtrdma_op_allocate", "xprtrdma_op_free", "xprtrdma_cb_setup", "xprtrdma_leaked_rep", "svcrdma_decode_rqst", "svcrdma_decode_short_err", "svcrdma_send_read_chunk", "svcrdma_dma_map_rw_err", "svcrdma_no_rwctx_err", "svcrdma_page_overrun_err", "svcrdma_small_wrch_err", "svcrdma_send_pullup", "svcrdma_send_failed", "svcrdma_post_send", "svcrdma_post_recv", "svcrdma_wc_receive", "svcrdma_post_rw", "svcrdma_qp_error", "svcrdma_sq_post_err", "rpm_return_int", "rseq_update", "rseq_ip_fixup", "rtc_irq_set_freq", "rtc_irq_set_state", "rtc_alarm_irq_enable", "rxrpc_local", "rxrpc_peer", "rxrpc_conn", "rxrpc_client", "rxrpc_call", "rxrpc_skb", "rxrpc_rx_packet", "rxrpc_rx_done", "rxrpc_abort", "rxrpc_call_complete", "rxrpc_transmit", "rxrpc_rx_data", "rxrpc_rx_ack", "rxrpc_rx_abort", "rxrpc_rx_rwind_change", "rxrpc_tx_packet", "rxrpc_tx_data", "rxrpc_tx_ack", "rxrpc_receive", "rxrpc_recvmsg", "rxrpc_rtt_tx", "rxrpc_rtt_rx", "rxrpc_timer", "rxrpc_rx_lose", "rxrpc_propose_ack", "rxrpc_retransmit", "rxrpc_congest", "rxrpc_disconnect_call", "rxrpc_improper_term", "rxrpc_rx_eproto", "rxrpc_connect_call", "rxrpc_resend", "rxrpc_rx_icmp", "rxrpc_tx_fail", "rxrpc_call_reset", "rxrpc_notify_socket", "rxrpc_rx_discard_ack", "sched_kthread_stop", "sched_kthread_stop_ret", "sched_switch", "sched_migrate_task", "sched_process_wait", "sched_process_fork", "sched_process_exec", "sched_pi_setprio", "sched_process_hang", "sched_move_numa", "sched_wake_idle_without_ipi", "scmi_xfer_begin", "scmi_xfer_end", "scmi_rx_done", "scsi_dispatch_cmd_start", "scsi_dispatch_cmd_error", "scsi_eh_wakeup", "sctp_probe_path", "sctp_probe", "signal_generate", "signal_deliver", "siox_set_data", "siox_get_data", "kfree_skb", "consume_skb", "skb_copy_datagram_iovec", "smbus_result", "sock_rcvqueue_full", "sock_exceed_buf_limit", "inet_sock_set_state", "spi_message_done", "spmi_write_begin", "spmi_write_end", "spmi_read_begin", "spmi_read_end", "spmi_cmd", "rpc_clnt_new", "rpc_clnt_new_err", "rpc_clnt_clone_err", "rpc_request", "rpc_call_rpcerror", "rpc_stats_latency", "rpc_xdr_overflow", "rpc_xdr_alignment", "xprt_transmit", "xprt_enq_xmit", "xprt_ping", "xs_stream_read_data", "xs_stream_read_request", "svc_recv", "svc_authenticate", "svc_process", "svc_xprt_create_err", "svc_xprt_do_enqueue", "svc_xprt_accept", "svc_xprt_dequeue", "svc_wake_up", "svc_handle_xprt", "svc_stats_latency", "svcsock_new_socket", "svcsock_marker", "svcsock_tcp_recv_short", "svcsock_tcp_state", "svc_unregister", "vnet_rx_one", "vnet_rx_stopped_ack", "vnet_tx_trigger", "vnet_skip_tx_trigger", "swiotlb_bounced", "sys_enter", "sys_exit", "target_sequencer_start", "target_cmd_complete", "task_newtask", "task_rename", "tcp_retransmit_synack", "tcp_probe", "tegra_dma_tx_status", "tegra_dma_complete_cb", "tegra_dma_isr", "thermal_temperature", "cdev_update", "thermal_zone_trip", "thermal_power_cpu_get_power", "thermal_power_cpu_limit", "thermal_power_devfreq_get_power", "thermal_power_devfreq_limit", "thermal_power_allocator", "thermal_power_allocator_pid", "hugepage_invalidate", "hugepage_set_pmd", "hugepage_update", "hugepage_splitting", "timer_start", "timer_expire_entry", "hrtimer_init", "hrtimer_start", "hrtimer_expire_entry", "itimer_state", "itimer_expire", "tick_stop", "tlb_flush", "udp_fail_queue_rcv_skb", "ufshcd_clk_gating", "ufshcd_clk_scaling", "ufshcd_auto_bkops_state", "ufshcd_command", "ufshcd_upiu", "mm_vmscan_kswapd_sleep", "mm_vmscan_kswapd_wake", "mm_vmscan_wakeup_kswapd", "mm_shrink_slab_start", "mm_shrink_slab_end", "mm_vmscan_lru_isolate", "mm_vmscan_writepage", "mm_vmscan_lru_shrink_inactive", "mm_vmscan_lru_shrink_active", "mm_vmscan_inactive_list_is_low", "mm_vmscan_node_reclaim_begin", "virtio_transport_alloc_pkt", "virtio_transport_recv_pkt", "wbt_stat", "wbt_lat", "wbt_step", "wbt_timer", "workqueue_queue_work", "workqueue_activate_work", "workqueue_execute_start", "workqueue_execute_end", "inode_foreign_history", "inode_switch_wbs", "track_foreign_dirty", "flush_foreign", "writeback_pages_written", "writeback_bdi_register", "writeback_queue_io", "global_dirty_state", "bdi_dirty_ratelimit", "balance_dirty_pages", "writeback_sb_inodes_requeue", "xdp_exception", "xdp_bulk_tx", "xdp_cpumap_kthread", "xdp_cpumap_enqueue", "xdp_devmap_xmit", "mem_disconnect", "mem_connect", "mem_return_failed", "xen_mc_entry", "xen_mc_entry_alloc", "xen_mc_callback", "xen_mc_flush_reason", "xen_mc_flush", "xen_mc_extend_args", "xen_mmu_set_pte_at", "xen_mmu_set_pmd", "xen_mmu_pte_clear", "xen_mmu_pmd_clear", "xen_mmu_set_pud", "xen_mmu_set_p4d", "xen_mmu_set_pud", "xen_mmu_alloc_ptpage", "xen_mmu_release_ptpage", "xen_mmu_flush_tlb_one_user", "xen_mmu_flush_tlb_others", "xen_mmu_write_cr3", "xen_cpu_write_ldt_entry", "xen_cpu_write_idt_entry", "xen_cpu_load_idt", "xen_cpu_write_gdt_entry", "xen_cpu_set_ldt" diff --git a/sys/linux/bpf_trace.txt.const b/sys/linux/bpf_trace.txt.const new file mode 100644 index 000000000..1185aff61 --- /dev/null +++ b/sys/linux/bpf_trace.txt.const @@ -0,0 +1,17 @@ +# Code generated by syz-sysgen. DO NOT EDIT. +arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x +BPF_LSM_MAC = 27 +BPF_MODIFY_RETURN = 26 +BPF_PROG_LOAD = 5 +BPF_PROG_TYPE_EXT = 28 +BPF_PROG_TYPE_LSM = 29 +BPF_PROG_TYPE_RAW_TRACEPOINT = 17 +BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24 +BPF_PROG_TYPE_TRACING = 26 +BPF_RAW_TRACEPOINT_OPEN = 17 +BPF_TRACE_FENTRY = 24 +BPF_TRACE_FEXIT = 25 +BPF_TRACE_ITER = 28 +BPF_TRACE_RAW_TP = 23 +BTF_ID_MAX = 200000 +__NR_bpf = 280, 386:357, amd64:321, arm:386, mips64le:5315, ppc64le:361, s390x:351 diff --git a/sys/linux/test/btf_id b/sys/linux/test/btf_id index 88c5a7cc9..ca13e1daa 100644 --- a/sys/linux/test/btf_id +++ b/sys/linux/test/btf_id @@ -4,16 +4,16 @@ r0 = syz_btf_id_by_name$bpf_lsm(&AUTO='bpf_lsm_path_mkdir\x00') # Load the bpf program. -r1 = bpf$BPF_LSM_PROG_LOAD(0x5, &AUTO={0x1d, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, r0, 0x0}, 0x78) +r1 = bpf$BPF_PROG_WITH_BTFID_LOAD(0x5, &AUTO=@bpf_lsm={0x1d, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, r0, 0x0}, 0x78) # Attach the bpf program to the lsm hook. -r2 = bpf$BPF_RAW_TRACEPOINT_OPEN(0x11, &AUTO={0x0, r1}, 0x10) +r2 = bpf$BPF_RAW_TRACEPOINT_OPEN_UNNAMED(0x11, &AUTO={AUTO, r1}, 0x10) # Run again to test that memorization works. r3 = syz_btf_id_by_name$bpf_lsm(&AUTO='bpf_lsm_path_mkdir\x00') -r4 = bpf$BPF_LSM_PROG_LOAD(0x5, &AUTO={0x1d, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, r3, 0x0}, 0x78) +r4 = bpf$BPF_PROG_WITH_BTFID_LOAD(0x5, &AUTO=@bpf_lsm={0x1d, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [], {AUTO, AUTO, AUTO, AUTO}}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0], 0x0, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, r3, 0x0}, 0x78) -r5 = bpf$BPF_RAW_TRACEPOINT_OPEN(0x11, &AUTO={0x0, r4}, 0x10) +r5 = bpf$BPF_RAW_TRACEPOINT_OPEN_UNNAMED(0x11, &AUTO={AUTO, r4}, 0x10) |
