diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-11-09 16:26:36 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-11-09 20:11:20 -0800 |
commit | 3feb263bb516ee7e1da0acd22b15afbb9a7daa19 (patch) | |
tree | b29c0f1447aad1aca146c40769a05a39d420d71a /scripts/gdb/linux/proc.py | |
parent | fe69a1b1b6ed9ffc2c578c63f526026a8ab74f0c (diff) |
bpf: handle ldimm64 properly in check_cfg()
ldimm64 instructions are 16-byte long, and so have to be handled
appropriately in check_cfg(), just like the rest of BPF verifier does.
This has implications in three places:
- when determining next instruction for non-jump instructions;
- when determining next instruction for callback address ldimm64
instructions (in visit_func_call_insn());
- when checking for unreachable instructions, where second half of
ldimm64 is expected to be unreachable;
We take this also as an opportunity to report jump into the middle of
ldimm64. And adjust few test_verifier tests accordingly.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Reported-by: Hao Sun <sunhao.th@gmail.com>
Fixes: 475fb78fbf48 ("bpf: verifier (add branch/goto checks)")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231110002638.4168352-2-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions