diff options
author | Alexei Starovoitov <ast@kernel.org> | 2021-12-13 09:26:50 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-12-13 09:41:36 -0800 |
commit | e94fac3829ddd3d9f21efa27d1512215b630782c (patch) | |
tree | 7ade7429fb7c8cbbc59ee6a8b5b347e8bd099e95 /drivers | |
parent | 4b443bc1785f28df56fdbd6a107dc68ef7d5aa8e (diff) | |
parent | 006004b715569f742535f70f3f06b41d8135486c (diff) | |
download | linux-e94fac3829ddd3d9f21efa27d1512215b630782c.tar.bz2 |
Merge branch 'bpf: Add helpers to access traced function arguments'
Jiri Olsa says:
====================
Add new helpers to access traced function arguments that
came out of the trampoline batch changes [1].
Get n-th argument of the traced function:
long bpf_get_func_arg(void *ctx, u32 n, u64 *value)
Get return value of the traced function:
long bpf_get_func_ret(void *ctx, u64 *value)
Get arguments count of the traced funtion:
long bpf_get_func_arg_cnt(void *ctx)
v2 changes:
- added acks
- updated stack diagram
- return -EOPNOTSUPP instead of -EINVAL in bpf_get_func_ret
- removed gpl_only for all helpers
- added verifier fix to allow proper arguments checks,
Andrii asked for checking also 'int *b' argument in
bpf_modify_return_test programs and it turned out that it's currently
not supported by verifier - we can't read argument that is int pointer,
so I had to add verifier change to allow that + adding verifier selftest
- checking all arguments in bpf_modify_return_test test programs
- moved helpers proto gets in tracing_prog_func_proto with attach type check
thanks,
jirka
[1] https://lore.kernel.org/bpf/20211118112455.475349-1-jolsa@kernel.org/
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions