diff options
author | Eduard Zingerman <eddyz87@gmail.com> | 2024-08-22 11:41:09 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-08-22 18:35:21 +0300 |
commit | b2ee6d27e9c6be0409e96591dcee62032a8e0156 (patch) | |
tree | e86dafc183ed9f30a16296f3c2eddd7e9f6bb896 /scripts/lib/kdoc/kdoc_files.py | |
parent | adec67d372fecd97585d76dbebb610d62ec9d2cc (diff) | |
download | linux-b2ee6d27e9c6be0409e96591dcee62032a8e0156.tar.xz |
bpf: support bpf_fastcall patterns for kfuncs
Recognize bpf_fastcall patterns around kfunc calls.
For example, suppose bpf_cast_to_kern_ctx() follows bpf_fastcall
contract (which it does), in such a case allow verifier to rewrite BPF
program below:
r2 = 1;
*(u64 *)(r10 - 32) = r2;
call %[bpf_cast_to_kern_ctx];
r2 = *(u64 *)(r10 - 32);
r0 = r2;
By removing the spill/fill pair:
r2 = 1;
call %[bpf_cast_to_kern_ctx];
r0 = r2;
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20240822084112.3257995-4-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions