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 <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>
2023-11-09 20:11:20 -08:00
..
2023-11-09 20:11:20 -08:00
2023-11-09 17:09:35 -08:00
2023-09-22 09:50:55 -07:00
2023-11-06 17:13:55 +00:00
2023-11-01 13:15:54 -10:00
2023-08-23 10:32:39 +02:00
2023-11-02 19:38:47 -10:00
2023-11-01 11:25:08 -10:00
2023-10-18 14:43:22 -07:00
2023-11-02 20:53:31 -10:00
2023-10-18 14:34:17 -07:00
2023-09-20 11:24:18 +02:00
2023-10-30 18:01:41 -10:00
2023-11-02 16:15:30 -10:00
2023-10-31 15:38:12 -10:00
2023-11-03 15:44:25 -10:00
2023-11-08 09:47:52 -08:00
2023-11-02 20:53:31 -10:00
2023-10-31 05:10:11 -10:00
2023-11-09 17:09:35 -08:00
2023-09-11 15:05:50 +02:00
2023-11-02 20:53:31 -10:00
2023-10-25 22:29:47 -04:00
2023-08-15 18:16:14 -04:00
2023-07-21 12:17:25 -04:00
2023-08-15 18:16:14 -04:00
2023-10-13 18:34:46 +02:00
2023-08-08 16:48:47 -04:00
2023-03-14 19:32:38 -07:00
2023-06-05 09:57:20 +02:00
2023-11-01 15:28:33 -10:00
2023-10-04 10:41:58 -07:00
2023-10-30 20:13:17 -10:00
2023-04-18 16:39:34 -07:00
2023-11-02 20:53:31 -10:00
2023-09-21 12:03:50 -06:00
2023-02-08 13:36:22 +01:00
2023-11-02 20:53:31 -10:00
2023-09-18 08:14:36 +02:00
2023-05-28 16:20:21 +09:00
2023-09-29 11:28:39 -07:00
2023-04-08 13:45:37 -07:00
2023-08-21 13:37:28 -07:00
2023-03-24 11:01:29 +01:00
2023-08-29 17:32:32 -07:00
2023-08-25 15:00:36 -07:00
2023-10-19 11:02:48 +02:00
2023-10-04 10:41:56 -07:00
2023-06-09 17:44:17 -07:00
2023-10-04 10:41:58 -07:00
2023-08-30 09:16:56 -07:00
2023-10-09 16:59:47 +10:00
2023-03-24 20:10:59 -07:00
2023-10-18 23:59:54 +09:00
2023-06-08 12:27:20 -07:00
2023-08-24 16:25:14 -07:00
2023-11-02 20:53:31 -10:00
2023-06-28 15:51:08 -07:00
2023-04-08 13:45:38 -07:00
2023-08-21 11:29:12 -07:00
2023-10-27 18:04:24 +08:00
2023-10-04 10:41:56 -07:00
2023-07-10 12:47:01 -07:00
2023-10-04 10:41:57 -07:00
2023-08-21 13:37:59 -07:00
2023-09-19 13:21:33 -07:00
2023-10-18 14:34:15 -07:00
2023-07-28 11:33:09 +01:00
2023-08-18 10:18:55 -07:00
2023-10-05 13:58:07 +02:00
2023-07-14 15:02:57 -07:00
2023-08-17 12:32:15 -07:00
2023-11-02 20:53:31 -10:00
2023-10-30 17:56:53 -10:00
2023-10-04 10:41:57 -07:00
2023-07-13 15:21:50 +02:00
2023-04-20 11:36:35 +02:00
2023-09-11 23:59:47 -04:00
2023-11-01 15:28:33 -10:00
2023-11-02 20:53:31 -10:00
2023-11-01 15:28:33 -10:00
2023-09-19 13:21:32 -07:00
2023-10-04 10:41:57 -07:00
2023-09-24 17:24:01 +02:00
2023-02-18 14:34:36 -05:00
2023-08-15 15:26:17 -07:00
2023-06-29 15:19:43 -07:00
2023-09-13 14:59:24 +02:00
2023-11-02 20:53:31 -10:00
2023-10-11 08:46:01 -07:00
2023-04-13 11:49:35 -07:00
2023-06-08 15:43:09 -04:00
2023-10-09 16:59:48 +10:00
2023-06-19 16:25:28 -07:00
2023-06-09 17:44:21 -07:00
2023-11-01 12:10:02 -07:00
2023-08-07 15:57:22 -10:00
2023-11-02 20:53:31 -10:00