Both description and returns section will become mandatory for helpers and syscalls in a later commit to generate man pages. This commit also adds in the documentation that BPF_PROG_RUN is an alias for BPF_PROG_TEST_RUN for anyone searching for the syscall in the generated man pages.
Showing the changes to tools/include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -330,6 +330,8 @@ union bpf_iter_link_info { · 329 unmodified lines | ||
| 330 | 330 | * *ctx_out*, *data_in* and *data_out* must be NULL. |
| 331 | 331 | * *repeat* must be zero. |
| 332 | 332 | * |
| 333 | + * BPF_PROG_RUN is an alias for BPF_PROG_TEST_RUN. | |
| 334 | + * | |
| 333 | 335 | * Return |
| 334 | 336 | * Returns zero on success. On error, -1 is returned and *errno* |
| 335 | 337 | * is set appropriately. |
| @@ -1775,6 +1777,8 @@ union bpf_attr { · 1439 unmodified lines | ||
| 1775 | 1777 | * 0 on success, or a negative error in case of failure. |
| 1776 | 1778 | * |
| 1777 | 1779 | * u64 bpf_get_current_pid_tgid(void) |
| 1780 | + * Description | |
| 1781 | + * Get the current pid and tgid. | |
| 1778 | 1782 | * Return |
| 1779 | 1783 | * A 64-bit integer containing the current tgid and pid, and |
| 1780 | 1784 | * created as such: |
| @@ -1782,6 +1786,8 @@ union bpf_attr { · 1 unmodified line | ||
| 1782 | 1786 | * *current_task*\ **->pid**. |
| 1783 | 1787 | * |
| 1784 | 1788 | * u64 bpf_get_current_uid_gid(void) |
| 1789 | + * Description | |
| 1790 | + * Get the current uid and gid. | |
| 1785 | 1791 | * Return |
| 1786 | 1792 | * A 64-bit integer containing the current GID and UID, and |
| 1787 | 1793 | * created as such: *current_gid* **<< 32 \|** *current_uid*. |
| @@ -2256,6 +2262,8 @@ union bpf_attr { · 468 unmodified lines | ||
| 2256 | 2262 | * The 32-bit hash. |
| 2257 | 2263 | * |
| 2258 | 2264 | * u64 bpf_get_current_task(void) |
| 2265 | + * Description | |
| 2266 | + * Get the current task. | |
| 2259 | 2267 | * Return |
| 2260 | 2268 | * A pointer to the current task struct. |
| 2261 | 2269 | * |
| @@ -2369,6 +2377,8 @@ union bpf_attr { · 107 unmodified lines | ||
| 2369 | 2377 | * indicate that the hash is outdated and to trigger a |
| 2370 | 2378 | * recalculation the next time the kernel tries to access this |
| 2371 | 2379 | * hash or when the **bpf_get_hash_recalc**\ () helper is called. |
| 2380 | + * Return | |
| 2381 | + * void. | |
| 2372 | 2382 | * |
| 2373 | 2383 | * long bpf_get_numa_node_id(void) |
| 2374 | 2384 | * Description |
| @@ -2466,6 +2476,8 @@ union bpf_attr { · 91 unmodified lines | ||
| 2466 | 2476 | * A 8-byte long unique number or 0 if *sk* is NULL. |
| 2467 | 2477 | * |
| 2468 | 2478 | * u32 bpf_get_socket_uid(struct sk_buff *skb) |
| 2479 | + * Description | |
| 2480 | + * Get the owner UID of the socked associated to *skb*. | |
| 2469 | 2481 | * Return |
| 2470 | 2482 | * The owner UID of the socket associated to *skb*. If the socket |
| 2471 | 2483 | * is **NULL**, or if it is not a full socket (i.e. if it is a |
| @@ -3240,6 +3252,9 @@ union bpf_attr { · 768 unmodified lines | ||
| 3240 | 3252 | * The id is returned or 0 in case the id could not be retrieved. |
| 3241 | 3253 | * |
| 3242 | 3254 | * u64 bpf_get_current_cgroup_id(void) |
| 3255 | + * Description | |
| 3256 | + * Get the current cgroup id based on the cgroup within which | |
| 3257 | + * the current task is running. | |
| 3243 | 3258 | * Return |
| 3244 | 3259 | * A 64-bit integer containing the current cgroup id based |
| 3245 | 3260 | * on the cgroup within which the current task is running. |