Files
linux/kernel
Andrii Nakryiko 3feb263bb5 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 <[email protected]>
Reported-by: Hao Sun <[email protected]>
Fixes: 475fb78fbf ("bpf: verifier (add branch/goto checks)")
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
2023-11-09 20:11:20 -08:00
..
…
…
…
…
…
…
2023-03-24 11:01:29 +01:00
2023-10-19 11:02:48 +02:00
2023-10-04 10:41:56 -07:00
2023-10-09 16:59:47 +10:00
2023-09-19 13:21:33 -07:00
…
2023-10-18 14:34:15 -07:00
…
…
…
2023-10-04 10:41:57 -07:00
…
…
2023-08-15 15:26:17 -07:00
…
…
2023-10-11 08:46:01 -07:00
…