diff --git a/docs/linux/helper-function/bpf_get_smp_processor_id.md b/docs/linux/helper-function/bpf_get_smp_processor_id.md index 987f8e1..46b757c 100644 --- a/docs/linux/helper-function/bpf_get_smp_processor_id.md +++ b/docs/linux/helper-function/bpf_get_smp_processor_id.md @@ -20,7 +20,7 @@ Get the SMP (symmetric multiprocessing) processor id. Note that all programs run The SMP id of the processor running the program. -`#!c static __u32 (* const bpf_get_smp_processor_id)(void) = (void *) 8;` +`#!c static __bpf_fastcall __u32 (* const bpf_get_smp_processor_id)(void) = (void *) 8;` ## Usage diff --git a/docs/linux/helper-function/bpf_kptr_xchg.md b/docs/linux/helper-function/bpf_kptr_xchg.md index e80d55a..1a9a3bd 100644 --- a/docs/linux/helper-function/bpf_kptr_xchg.md +++ b/docs/linux/helper-function/bpf_kptr_xchg.md @@ -14,13 +14,13 @@ description: "This page documents the 'bpf_kptr_xchg' eBPF helper function, incl -Exchange kptr at pointer _map_value_ with _ptr_, and return the old value. _ptr_ can be NULL, otherwise it must be a referenced pointer which will be released when this helper is called. +Exchange kptr at pointer _dst_ with _ptr_, and return the old value. _dst_ can be map value or local kptr. _ptr_ can be NULL, otherwise it must be a referenced pointer which will be released when this helper is called. ### Returns The old value of kptr (which can be NULL). The returned pointer if not NULL, is a reference which must be released using its corresponding release function, or moved into a BPF map before program exit. -`#!c static void *(* const bpf_kptr_xchg)(void *map_value, void *ptr) = (void *) 194;` +`#!c static void *(* const bpf_kptr_xchg)(void *dst, void *ptr) = (void *) 194;` ## Usage diff --git a/docs/linux/helper-function/bpf_loop.md b/docs/linux/helper-function/bpf_loop.md index b88518f..7c10fb1 100644 --- a/docs/linux/helper-function/bpf_loop.md +++ b/docs/linux/helper-function/bpf_loop.md @@ -16,7 +16,7 @@ description: "This page documents the 'bpf_loop' eBPF helper function, including For **nr_loops**, call **callback_fn** function with **callback_ctx** as the context parameter. The **callback_fn** should be a static function and the **callback_ctx** should be a pointer to the stack. The **flags** is used to control certain aspects of the helper. Currently, the **flags** must be 0. Currently, nr_loops is limited to 1 << 23 (~8 million) loops. -long (\_callback_fn)(u32 index, void \_ctx); +long (\_callback_fn)(u64 index, void \_ctx); where **index** is the current index in the loop. The index is zero-indexed. diff --git a/docs/linux/helper-function/bpf_override_return.md b/docs/linux/helper-function/bpf_override_return.md index d684c1b..654140e 100644 --- a/docs/linux/helper-function/bpf_override_return.md +++ b/docs/linux/helper-function/bpf_override_return.md @@ -20,8 +20,6 @@ This helper works by setting the PC (program counter) to an override function wh This helper has security implications, and thus is subject to restrictions. It is only available if the kernel was compiled with the **CONFIG_BPF_KPROBE_OVERRIDE** configuration option, and in this case it only works on functions tagged with **ALLOW_ERROR_INJECTION** in the kernel code. -Also, the helper is only available for the architectures having the CONFIG_FUNCTION_ERROR_INJECTION option. As of this writing, x86 architecture is the only one to support this feature. - ### Returns 0 diff --git a/docs/linux/helper-function/bpf_setsockopt.md b/docs/linux/helper-function/bpf_setsockopt.md index 641295a..3fa5ddb 100644 --- a/docs/linux/helper-function/bpf_setsockopt.md +++ b/docs/linux/helper-function/bpf_setsockopt.md @@ -26,7 +26,7 @@ This helper actually implements a subset of **setsockopt()**. It supports the fo * **SOL_SOCKET**, which supports the following _optname_s: **SO_RCVBUF**, **SO_SNDBUF**, **SO_MAX_PACING_RATE**, **SO_PRIORITY**, **SO_RCVLOWAT**, **SO_MARK**, **SO_BINDTODEVICE**, **SO_KEEPALIVE**, **SO_REUSEADDR**, **SO_REUSEPORT**, **SO_BINDTOIFINDEX**, **SO_TXREHASH**. * **IPPROTO_TCP**, which supports the following _optname_s: - **TCP_CONGESTION**, **TCP_BPF_IW**, **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**, **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**, **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**, **TCP_NODELAY**, **TCP_MAXSEG**, **TCP_WINDOW_CLAMP**, **TCP_THIN_LINEAR_TIMEOUTS**, **TCP_BPF_DELACK_MAX**, **TCP_BPF_RTO_MIN**. * **IPPROTO_IP**, which supports _optname_ **IP_TOS**. + **TCP_CONGESTION**, **TCP_BPF_IW**, **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**, **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**, **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**, **TCP_NODELAY**, **TCP_MAXSEG**, **TCP_WINDOW_CLAMP**, **TCP_THIN_LINEAR_TIMEOUTS**, **TCP_BPF_DELACK_MAX**, **TCP_BPF_RTO_MIN**, **TCP_BPF_SOCK_OPS_CB_FLAGS**. * **IPPROTO_IP**, which supports _optname_ **IP_TOS**. * **IPPROTO_IPV6**, which supports the following _optname_s: **IPV6_TCLASS**, **IPV6_AUTOFLOWLABEL**.