diff options
Diffstat (limited to 'include/linux/bpf_verifier.h')
| -rw-r--r-- | include/linux/bpf_verifier.h | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 3930c963fa67..81b19669efba 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -344,6 +344,14 @@ struct bpf_verifier_state_list {  	int miss_cnt, hit_cnt;  }; +struct bpf_loop_inline_state { +	int initialized:1; /* set to true upon first entry */ +	int fit_for_inline:1; /* true if callback function is the same +			       * at each call and flags are always zero +			       */ +	u32 callback_subprogno; /* valid when fit_for_inline is true */ +}; +  /* Possible states for alu_state member. */  #define BPF_ALU_SANITIZE_SRC		(1U << 0)  #define BPF_ALU_SANITIZE_DST		(1U << 1) @@ -373,6 +381,10 @@ struct bpf_insn_aux_data {  				u32 mem_size;	/* mem_size for non-struct typed var */  			};  		} btf_var; +		/* if instruction is a call to bpf_loop this field tracks +		 * the state of the relevant registers to make decision about inlining +		 */ +		struct bpf_loop_inline_state loop_inline_state;  	};  	u64 map_key_state; /* constant (32 bit) key tracking for maps */  	int ctx_field_size; /* the ctx field size for load insn, maybe 0 */ |