diff options
author | Eduard Zingerman <eddyz87@gmail.com> | 2024-08-22 01:41:09 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-08-22 08:35:21 -0700 |
commit | b2ee6d27e9c6be0409e96591dcee62032a8e0156 (patch) | |
tree | e86dafc183ed9f30a16296f3c2eddd7e9f6bb896 /scripts/generate_rust_analyzer.py | |
parent | adec67d372fecd97585d76dbebb610d62ec9d2cc (diff) |
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/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions