The communication between the verifier and advanced JITs is based on instruction indexes. We have to keep them stable throughout the optimizations otherwise referring to a particular instruction gets messy quickly.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -187,6 +187,7 @@ struct bpf_insn_aux_data { · 186 unmodified lines | |||
| 187 | int sanitize_stack_off; /* stack slot to be cleared */ | 187 | int sanitize_stack_off; /* stack slot to be cleared */ |
| 188 | bool seen; /* this insn was processed by the verifier */ | 188 | bool seen; /* this insn was processed by the verifier */ |
| 189 | u8 alu_state; /* used in combination with alu_limit */ | 189 | u8 alu_state; /* used in combination with alu_limit */ |
| 190 | unsigned int orig_idx; /* original instruction index */ | ||
| 190 | }; | 191 | }; |
| 191 | 192 | ||
| 192 | #define MAX_USED_MAPS 64 /* max number of maps accessed by one eBPF program */ | 193 | #define MAX_USED_MAPS 64 /* max number of maps accessed by one eBPF program */ |