Alexei Starovoitov
2fe99eb0cc
bpf: Add x86-64 JIT support for PROBE_MEM32 pseudo instructions.
...
Add support for [LDX | STX | ST], PROBE_MEM32, [B | H | W | DW] instructions.
They are similar to PROBE_MEM instructions with the following differences:
- PROBE_MEM has to check that the address is in the kernel range with
src_reg + insn->off >= TASK_SIZE_MAX + PAGE_SIZE check
- PROBE_MEM doesn't support store
- PROBE_MEM32 relies on the verifier to clear upper 32-bit in the register
- PROBE_MEM32 adds 64-bit kern_vm_start address (which is stored in %r12 in the prologue)
Due to bpf_arena constructions such %r12 + %reg + off16 access is guaranteed
to be within arena virtual range, so no address check at run-time.
- PROBE_MEM32 allows STX and ST. If they fault the store is a nop.
When LDX faults the destination register is zeroed.
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Signed-off-by: Andrii Nakryiko <andrii@kernel.org >
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com >
Link: https://lore.kernel.org/bpf/20240308010812.89848-4-alexei.starovoitov@gmail.com
2024-03-11 15:37:24 -07:00
..
2024-01-18 11:37:24 -08:00
2024-01-04 17:01:13 +01:00
2024-02-07 14:43:29 +01:00
2024-01-18 15:16:57 -08:00
2024-01-04 17:02:49 +01:00
2024-02-21 12:41:24 +00:00
2024-02-13 11:02:53 +01:00
2024-01-14 23:00:50 +01:00
2024-02-04 15:01:14 +00:00
2024-01-11 14:19:23 -08:00
2024-01-29 13:00:23 +00:00
2024-02-22 15:29:26 -08:00
2024-01-31 23:13:57 +01:00
2024-02-21 12:46:17 +00:00
2024-01-10 16:43:55 -08:00
2024-01-24 15:11:38 +00:00
2024-01-10 16:13:57 -08:00
2024-01-17 16:47:17 -08:00
2024-02-09 10:26:08 +00:00
2024-01-18 16:22:43 -08:00
2024-01-04 15:19:17 +01:00
2024-02-06 09:44:03 -07:00
2024-01-16 15:02:25 -07:00
2024-02-01 13:06:40 +01:00
2024-01-11 13:58:04 -08:00
2024-01-17 14:16:34 -07:00
2024-01-11 13:58:04 -08:00
2024-02-11 14:06:24 -08:00
2024-03-11 15:37:23 -07:00
2024-03-06 15:17:31 -08:00
2024-02-13 15:41:17 -08:00
2024-03-11 15:37:24 -07:00
2024-01-31 20:40:52 -08:00
2024-02-13 18:46:46 -08:00
2024-02-15 11:14:33 -08:00
2024-02-15 11:14:33 -08:00
2024-02-03 18:31:17 +01:00
2024-01-09 11:18:47 -08:00
2024-02-01 13:06:40 +01:00
2024-02-20 22:50:52 -08:00
2024-02-09 23:31:16 -05:00
2024-01-18 15:16:57 -08:00
2024-01-18 15:16:57 -08:00
2024-01-30 22:11:13 +05:30
2024-02-29 14:24:56 -08:00
2024-01-18 09:48:40 -08:00
2024-02-28 12:18:05 +00:00
2024-03-11 15:37:24 -07:00
2024-01-08 09:36:55 +09:00
2024-01-19 11:59:11 -08:00
2024-02-22 10:06:29 -08:00
2024-01-05 15:42:25 +00:00
2024-01-12 15:34:50 +01:00
2024-01-31 10:27:08 +01:00
2024-02-06 10:56:35 +01:00
2024-01-08 15:27:15 -08:00
2024-01-18 21:10:43 +01:00
2024-02-21 15:19:04 +01:00
2024-02-04 15:41:18 +00:00
2024-01-23 15:13:54 +01:00
2024-02-28 19:36:39 -08:00
2024-01-11 14:19:23 -08:00
2024-03-11 16:58:10 +01:00
2024-02-23 16:45:05 +01:00
2024-01-08 12:27:46 -07:00
2024-03-01 08:42:30 +00:00
2024-01-04 23:42:21 -05:00
2024-01-22 22:26:03 +01:00
2024-01-10 16:43:55 -08:00
2024-02-01 15:12:37 -08:00
2024-01-04 14:37:17 +01:00
2024-02-21 14:56:59 -08:00
2024-02-21 14:56:58 -08:00
2024-02-16 23:20:34 -08:00
2024-01-05 10:17:44 -08:00
2024-01-18 15:16:57 -08:00
2024-01-10 08:45:22 -08:00
2024-01-25 23:52:20 -08:00
2024-01-25 23:52:21 -08:00
2024-01-10 18:00:18 -08:00
2024-01-04 17:01:14 +01:00
2024-01-10 16:43:55 -08:00
2024-03-01 08:44:54 +00:00
2024-02-29 14:24:56 -08:00
2024-01-17 12:02:49 +01:00
2024-02-29 14:24:56 -08:00
2024-01-05 15:42:25 +00:00
2024-02-26 11:46:12 +00:00
2024-01-07 17:54:26 -05:00
2024-02-25 02:10:32 -05:00
2024-01-04 10:47:56 -05:00
2024-02-13 08:46:09 -08:00
2024-01-04 17:01:13 +01:00
2024-01-04 17:01:13 +01:00
2024-01-19 08:17:28 -06:00
2024-01-19 08:17:28 -06:00
2024-01-08 15:27:15 -08:00
2024-01-12 11:55:28 -08:00
2024-01-15 12:10:41 -06:00
2024-01-15 12:10:41 -06:00
2024-01-31 09:03:51 -06:00
2024-01-17 10:50:46 -08:00
2024-02-17 18:45:06 +00:00
2024-01-31 12:30:47 +00:00
2024-01-10 20:59:20 +01:00
2024-01-09 15:00:09 +01:00
2024-02-23 17:27:12 -08:00
2024-02-25 02:10:32 -05:00
2024-01-17 16:47:17 -08:00
2024-01-29 13:00:23 +00:00
2024-02-12 23:04:34 +01:00
2024-01-05 09:33:16 +01:00
2024-01-05 10:17:43 -08:00
2024-02-14 11:20:13 +00:00
2024-01-24 11:48:52 -08:00
2024-01-24 16:21:01 -08:00
2024-02-15 12:17:28 -05:00
2024-02-06 14:42:02 +00:00
2024-01-04 16:05:47 -08:00
2024-02-23 16:22:56 -08:00
2024-01-21 18:09:30 +00:00
2024-01-09 11:18:47 -08:00
2024-01-23 15:13:55 +01:00
2024-01-21 10:21:43 -08:00
2024-01-31 12:24:06 +00:00
2024-01-19 11:59:11 -08:00
2024-02-20 14:20:48 -08:00
2024-01-24 11:49:19 +01:00
2024-02-28 20:21:24 -08:00
2024-01-17 14:47:33 -08:00
2024-01-18 11:37:24 -08:00
2024-02-21 17:05:01 -08:00
2024-01-10 16:43:55 -08:00
2024-02-21 15:19:03 +01:00
2024-01-04 16:06:32 +01:00
2024-01-13 18:06:23 +00:00
2024-03-06 15:17:22 -08:00
2024-01-05 10:17:47 -08:00
2024-01-10 16:43:55 -08:00
2024-01-19 09:10:23 -08:00
2024-02-09 12:07:48 +00:00