History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-12-30 The following pull-request contains BPF updates for your *net-next* tree. We've added 72 non-merge commits during the last 20 day(s) which contain a total of 223 files changed, 3510 insertions(+), 1591 deletions(-). The main changes are: 1) Automatic setrlimit in libbpf when bpf is memcg's in the kernel, from Andrii. 2) Beautify and de-verbose verifier logs, from Christy. 3) Composable verifier types, from Hao. 4) bpf_strncmp helper, from Hou. 5) bpf.h header dependency cleanup, from Jakub. 6) get_func_[arg|ret|arg_cnt] helpers, from Jiri. 7) Sleepable local storage, from KP. 8) Extend kfunc with PTR_TO_CTX, PTR_TO_MEM argument support, from Kumar. ====================

David S. Miller committed 4 years ago

Commit e63a0232 parents ce2b6eb 9e6b19a221 files · +3506 −1591Browse files

Showing the changes to include/uapi (1 of 221 files). Show all

Unified · Split

include/uapi/linux/bpf.h+39−0
@@ -4983,6 +4983,41 @@ union bpf_attr { · 4982 unmodified lines
4983 * Return4983 * Return
4984 * The number of loops performed, **-EINVAL** for invalid **flags**,4984 * The number of loops performed, **-EINVAL** for invalid **flags**,
4985 * **-E2BIG** if **nr_loops** exceeds the maximum number of loops.4985 * **-E2BIG** if **nr_loops** exceeds the maximum number of loops.
4986 *
4987 * long bpf_strncmp(const char *s1, u32 s1_sz, const char *s2)
4988 * Description
4989 * Do strncmp() between **s1** and **s2**. **s1** doesn't need
4990 * to be null-terminated and **s1_sz** is the maximum storage
4991 * size of **s1**. **s2** must be a read-only string.
4992 * Return
4993 * An integer less than, equal to, or greater than zero
4994 * if the first **s1_sz** bytes of **s1** is found to be
4995 * less than, to match, or be greater than **s2**.
4996 *
4997 * long bpf_get_func_arg(void *ctx, u32 n, u64 *value)
4998 * Description
4999 * Get **n**-th argument (zero based) of the traced function (for tracing programs)
5000 * returned in **value**.
5001 *
5002 * Return
5003 * 0 on success.
5004 * **-EINVAL** if n >= arguments count of traced function.
5005 *
5006 * long bpf_get_func_ret(void *ctx, u64 *value)
5007 * Description
5008 * Get return value of the traced function (for tracing programs)
5009 * in **value**.
5010 *
5011 * Return
5012 * 0 on success.
5013 * **-EOPNOTSUPP** for tracing programs other than BPF_TRACE_FEXIT or BPF_MODIFY_RETURN.
5014 *
5015 * long bpf_get_func_arg_cnt(void *ctx)
5016 * Description
5017 * Get number of arguments of the traced function (for tracing programs).
5018 *
5019 * Return
5020 * The number of arguments of the traced function.
4986 */5021 */
4987#define __BPF_FUNC_MAPPER(FN) \5022#define __BPF_FUNC_MAPPER(FN) \
4988 FN(unspec), \5023 FN(unspec), \
@@ -5167,6 +5202,10 @@ union bpf_attr { · 178 unmodified lines
5167 FN(kallsyms_lookup_name), \5202 FN(kallsyms_lookup_name), \
5168 FN(find_vma), \5203 FN(find_vma), \
5169 FN(loop), \5204 FN(loop), \
5205 FN(strncmp), \
5206 FN(get_func_arg), \
5207 FN(get_func_ret), \
5208 FN(get_func_arg_cnt), \
5170 /* */5209 /* */
5171 5210
5172/* integer value in 'imm' field of BPF_CALL instruction selects which helper5211/* integer value in 'imm' field of BPF_CALL instruction selects which helper