From 10a76ad7aae55b8de9296e2ff2b4d4467273190a Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Thu, 5 Dec 2024 10:01:58 +0000 Subject: [PATCH] chore: update kfuncs.yaml & make generate-docs --- data/kfuncs.yaml | 22 +++++----- docs/linux/kfuncs/hid_bpf_allocate_context.md | 3 +- docs/linux/kfuncs/hid_bpf_hw_output_report.md | 3 +- docs/linux/kfuncs/hid_bpf_hw_request.md | 3 +- docs/linux/kfuncs/hid_bpf_input_report.md | 3 +- docs/linux/kfuncs/hid_bpf_release_context.md | 3 +- .../program-type/BPF_PROG_TYPE_SCHED_ACT.md | 43 ++++++++++++++++--- docs/linux/program-type/BPF_PROG_TYPE_XDP.md | 2 +- 8 files changed, 60 insertions(+), 22 deletions(-) diff --git a/data/kfuncs.yaml b/data/kfuncs.yaml index 836af73..9bbf9ee 100644 --- a/data/kfuncs.yaml +++ b/data/kfuncs.yaml @@ -22,7 +22,7 @@ sets: - BPF_PROG_TYPE_TRACING attach_type: - BPF_TRACE_ITER - + fs_kfunc_set_ids: funcs: - name: bpf_get_file_xattr @@ -30,7 +30,7 @@ sets: program_types: - BPF_PROG_TYPE_LSM - cpumask_kfunc_btf_ids: + cpumask_kfunc_btf_ids: funcs: - name: bpf_cpumask_create flags: [KF_ACQUIRE, KF_RET_NULL] @@ -88,7 +88,7 @@ sets: - BPF_PROG_TYPE_STRUCT_OPS generic_btf_ids: - funcs: + funcs: - name: crash_kexec flags: [KF_DESTRUCTIVE] - name: bpf_obj_new_impl @@ -132,11 +132,11 @@ sets: flags: [KF_ACQUIRE, KF_RET_NULL] - name: bpf_throw program_types: - - BPF_PROG_TYPE_TRACING - - BPF_PROG_TYPE_LSM - - BPF_PROG_TYPE_SCHED_CLS - - BPF_PROG_TYPE_XDP - - BPF_PROG_TYPE_STRUCT_OPS + - BPF_PROG_TYPE_TRACING + - BPF_PROG_TYPE_LSM + - BPF_PROG_TYPE_SCHED_CLS + - BPF_PROG_TYPE_XDP + - BPF_PROG_TYPE_STRUCT_OPS common_btf_ids: funcs: @@ -206,7 +206,7 @@ sets: fsverity_set_ids: funcs: - - name: bpf_get_fsverity_digest + - name: bpf_get_fsverity_digest flags: [KF_TRUSTED_ARGS] program_types: - BPF_PROG_TYPE_LSM @@ -248,7 +248,7 @@ sets: - BPF_PROG_TYPE_CGROUP_SOCK_ADDR bpf_sk_iter_kfunc_ids: - funcs: + funcs: - name: bpf_sock_destroy flags: [KF_TRUSTED_ARGS] program_types: @@ -356,7 +356,7 @@ sets: - name: bpf_xdp_xfrm_state_release flags: [KF_RELEASE] program_types: - - BPF_PROG_TYPE_SCHED_CLS + - BPF_PROG_TYPE_XDP hid_bpf_kfunc_ids: funcs: diff --git a/docs/linux/kfuncs/hid_bpf_allocate_context.md b/docs/linux/kfuncs/hid_bpf_allocate_context.md index 7abbc42..8afba35 100644 --- a/docs/linux/kfuncs/hid_bpf_allocate_context.md +++ b/docs/linux/kfuncs/hid_bpf_allocate_context.md @@ -47,7 +47,8 @@ A pointer to &struct hid_bpf_ctx on success, `NULL` on error. The following program types can make use of this kfunc: -- [`BPF_PROG_TYPE_SYSCALL`](../program-type/BPF_PROG_TYPE_SYSCALL.md) +- [`BPF_PROG_TYPE_LSM`](../program-type/BPF_PROG_TYPE_LSM.md) +- [`BPF_PROG_TYPE_TRACING`](../program-type/BPF_PROG_TYPE_TRACING.md) ### Example diff --git a/docs/linux/kfuncs/hid_bpf_hw_output_report.md b/docs/linux/kfuncs/hid_bpf_hw_output_report.md index 7cf5819..4345dc8 100644 --- a/docs/linux/kfuncs/hid_bpf_hw_output_report.md +++ b/docs/linux/kfuncs/hid_bpf_hw_output_report.md @@ -41,7 +41,8 @@ Returns the number of bytes transferred on success, a negative error code otherw The following program types can make use of this kfunc: -- [`BPF_PROG_TYPE_SYSCALL`](../program-type/BPF_PROG_TYPE_SYSCALL.md) +- [`BPF_PROG_TYPE_LSM`](../program-type/BPF_PROG_TYPE_LSM.md) +- [`BPF_PROG_TYPE_TRACING`](../program-type/BPF_PROG_TYPE_TRACING.md) ### Example diff --git a/docs/linux/kfuncs/hid_bpf_hw_request.md b/docs/linux/kfuncs/hid_bpf_hw_request.md index 3ad1866..0f8222c 100644 --- a/docs/linux/kfuncs/hid_bpf_hw_request.md +++ b/docs/linux/kfuncs/hid_bpf_hw_request.md @@ -45,7 +45,8 @@ Communicate with a HID device The following program types can make use of this kfunc: -- [`BPF_PROG_TYPE_SYSCALL`](../program-type/BPF_PROG_TYPE_SYSCALL.md) +- [`BPF_PROG_TYPE_LSM`](../program-type/BPF_PROG_TYPE_LSM.md) +- [`BPF_PROG_TYPE_TRACING`](../program-type/BPF_PROG_TYPE_TRACING.md) ### Example diff --git a/docs/linux/kfuncs/hid_bpf_input_report.md b/docs/linux/kfuncs/hid_bpf_input_report.md index 011a878..c18f344 100644 --- a/docs/linux/kfuncs/hid_bpf_input_report.md +++ b/docs/linux/kfuncs/hid_bpf_input_report.md @@ -44,7 +44,8 @@ Returns `0` on success, a negative error code otherwise. This function will wait The following program types can make use of this kfunc: -- [`BPF_PROG_TYPE_SYSCALL`](../program-type/BPF_PROG_TYPE_SYSCALL.md) +- [`BPF_PROG_TYPE_LSM`](../program-type/BPF_PROG_TYPE_LSM.md) +- [`BPF_PROG_TYPE_TRACING`](../program-type/BPF_PROG_TYPE_TRACING.md) ### Example diff --git a/docs/linux/kfuncs/hid_bpf_release_context.md b/docs/linux/kfuncs/hid_bpf_release_context.md index 75f95ed..e10bba5 100644 --- a/docs/linux/kfuncs/hid_bpf_release_context.md +++ b/docs/linux/kfuncs/hid_bpf_release_context.md @@ -35,7 +35,8 @@ Release the previously allocated context @ctx The following program types can make use of this kfunc: -- [`BPF_PROG_TYPE_SYSCALL`](../program-type/BPF_PROG_TYPE_SYSCALL.md) +- [`BPF_PROG_TYPE_LSM`](../program-type/BPF_PROG_TYPE_LSM.md) +- [`BPF_PROG_TYPE_TRACING`](../program-type/BPF_PROG_TYPE_TRACING.md) ### Example diff --git a/docs/linux/program-type/BPF_PROG_TYPE_SCHED_ACT.md b/docs/linux/program-type/BPF_PROG_TYPE_SCHED_ACT.md index d00e3ce..9297182 100644 --- a/docs/linux/program-type/BPF_PROG_TYPE_SCHED_ACT.md +++ b/docs/linux/program-type/BPF_PROG_TYPE_SCHED_ACT.md @@ -5,7 +5,7 @@ description: "This page documents the 'BPF_PROG_TYPE_SCHED_ACT' eBPF program typ # Program type `BPF_PROG_TYPE_SCHED_ACT` -[:octicons-tag-24: v4.1](https://github.com/torvalds/linux/commit/94caee8c312d) +[:octicons-tag-24: v4.1](https://github.com/torvalds/linux/commit/96be4325f443dbbfeb37d2a157675ac0736531a1) This program type allows for the implementation of a Traffic Control (TC) action in eBPF. @@ -194,10 +194,6 @@ Not all helper functions are available in all program types. These are the helpe * [`bpf_task_pt_regs`](../helper-function/bpf_task_pt_regs.md) * [`bpf_tcp_check_syncookie`](../helper-function/bpf_tcp_check_syncookie.md) * [`bpf_tcp_gen_syncookie`](../helper-function/bpf_tcp_gen_syncookie.md) - * [`bpf_tcp_raw_check_syncookie_ipv4`](../helper-function/bpf_tcp_raw_check_syncookie_ipv4.md) - * [`bpf_tcp_raw_check_syncookie_ipv6`](../helper-function/bpf_tcp_raw_check_syncookie_ipv6.md) - * [`bpf_tcp_raw_gen_syncookie_ipv4`](../helper-function/bpf_tcp_raw_gen_syncookie_ipv4.md) - * [`bpf_tcp_raw_gen_syncookie_ipv6`](../helper-function/bpf_tcp_raw_gen_syncookie_ipv6.md) * [`bpf_tcp_sock`](../helper-function/bpf_tcp_sock.md) * [`bpf_this_cpu_ptr`](../helper-function/bpf_this_cpu_ptr.md) * [`bpf_timer_cancel`](../helper-function/bpf_timer_cancel.md) @@ -213,7 +209,44 @@ Not all helper functions are available in all program types. These are the helpe ??? abstract "Supported kfuncs" + - [`bpf_arena_alloc_pages`](../kfuncs/bpf_arena_alloc_pages.md) + - [`bpf_arena_free_pages`](../kfuncs/bpf_arena_free_pages.md) + - [`bpf_cast_to_kern_ctx`](../kfuncs/bpf_cast_to_kern_ctx.md) - [`bpf_crypto_decrypt`](../kfuncs/bpf_crypto_decrypt.md) - [`bpf_crypto_encrypt`](../kfuncs/bpf_crypto_encrypt.md) + - [`bpf_dynptr_adjust`](../kfuncs/bpf_dynptr_adjust.md) + - [`bpf_dynptr_clone`](../kfuncs/bpf_dynptr_clone.md) - [`bpf_dynptr_from_skb`](../kfuncs/bpf_dynptr_from_skb.md) + - [`bpf_dynptr_is_null`](../kfuncs/bpf_dynptr_is_null.md) + - [`bpf_dynptr_is_rdonly`](../kfuncs/bpf_dynptr_is_rdonly.md) + - [`bpf_dynptr_size`](../kfuncs/bpf_dynptr_size.md) + - [`bpf_dynptr_slice`](../kfuncs/bpf_dynptr_slice.md) + - [`bpf_dynptr_slice_rdwr`](../kfuncs/bpf_dynptr_slice_rdwr.md) + - [`bpf_iter_bits_destroy`](../kfuncs/bpf_iter_bits_destroy.md) + - [`bpf_iter_bits_new`](../kfuncs/bpf_iter_bits_new.md) + - [`bpf_iter_bits_next`](../kfuncs/bpf_iter_bits_next.md) + - [`bpf_iter_css_destroy`](../kfuncs/bpf_iter_css_destroy.md) + - [`bpf_iter_css_new`](../kfuncs/bpf_iter_css_new.md) + - [`bpf_iter_css_next`](../kfuncs/bpf_iter_css_next.md) + - [`bpf_iter_css_task_destroy`](../kfuncs/bpf_iter_css_task_destroy.md) + - [`bpf_iter_css_task_new`](../kfuncs/bpf_iter_css_task_new.md) + - [`bpf_iter_css_task_next`](../kfuncs/bpf_iter_css_task_next.md) + - [`bpf_iter_num_destroy`](../kfuncs/bpf_iter_num_destroy.md) + - [`bpf_iter_num_new`](../kfuncs/bpf_iter_num_new.md) + - [`bpf_iter_num_next`](../kfuncs/bpf_iter_num_next.md) + - [`bpf_iter_task_destroy`](../kfuncs/bpf_iter_task_destroy.md) + - [`bpf_iter_task_new`](../kfuncs/bpf_iter_task_new.md) + - [`bpf_iter_task_next`](../kfuncs/bpf_iter_task_next.md) + - [`bpf_iter_task_vma_destroy`](../kfuncs/bpf_iter_task_vma_destroy.md) + - [`bpf_iter_task_vma_new`](../kfuncs/bpf_iter_task_vma_new.md) + - [`bpf_iter_task_vma_next`](../kfuncs/bpf_iter_task_vma_next.md) + - [`bpf_map_sum_elem_count`](../kfuncs/bpf_map_sum_elem_count.md) + - [`bpf_preempt_disable`](../kfuncs/bpf_preempt_disable.md) + - [`bpf_preempt_enable`](../kfuncs/bpf_preempt_enable.md) + - [`bpf_rcu_read_lock`](../kfuncs/bpf_rcu_read_lock.md) + - [`bpf_rcu_read_unlock`](../kfuncs/bpf_rcu_read_unlock.md) + - [`bpf_rdonly_cast`](../kfuncs/bpf_rdonly_cast.md) + - [`bpf_wq_init`](../kfuncs/bpf_wq_init.md) + - [`bpf_wq_set_callback_impl`](../kfuncs/bpf_wq_set_callback_impl.md) + - [`bpf_wq_start`](../kfuncs/bpf_wq_start.md) \ No newline at end of file diff --git a/docs/linux/program-type/BPF_PROG_TYPE_XDP.md b/docs/linux/program-type/BPF_PROG_TYPE_XDP.md index 100aa9e..c38fe23 100644 --- a/docs/linux/program-type/BPF_PROG_TYPE_XDP.md +++ b/docs/linux/program-type/BPF_PROG_TYPE_XDP.md @@ -491,10 +491,10 @@ Not all helper functions are available in all program types. These are the helpe - [`bpf_xdp_ct_alloc`](../kfuncs/bpf_xdp_ct_alloc.md) - [`bpf_xdp_ct_lookup`](../kfuncs/bpf_xdp_ct_lookup.md) - [`bpf_xdp_flow_lookup`](../kfuncs/bpf_xdp_flow_lookup.md) + - [`bpf_xdp_get_xfrm_state`](../kfuncs/bpf_xdp_get_xfrm_state.md) - [`bpf_xdp_metadata_rx_hash`](../kfuncs/bpf_xdp_metadata_rx_hash.md) - [`bpf_xdp_metadata_rx_timestamp`](../kfuncs/bpf_xdp_metadata_rx_timestamp.md) - [`bpf_xdp_metadata_rx_vlan_tag`](../kfuncs/bpf_xdp_metadata_rx_vlan_tag.md) - - [`bpf_xdp_get_xfrm_state`](../kfuncs/bpf_xdp_get_xfrm_state.md) - [`bpf_xdp_xfrm_state_release`](../kfuncs/bpf_xdp_xfrm_state_release.md) - [`crash_kexec`](../kfuncs/crash_kexec.md)