diff options
| author | Jiri Kosina <[email protected]> | 2020-04-01 12:26:12 +0200 | 
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2020-04-01 12:26:12 +0200 | 
| commit | c9f289701540baeef9ac7c9977d67a7259f404db (patch) | |
| tree | ac3c29d41da02ac735c9a12da78905842fbccd2f /include/linux/bpf_verifier.h | |
| parent | 0aac6f9aaae5fba08963651d2ce49930145e118f (diff) | |
| parent | 910a7e89cec65efad254c947ce2bf8bf5b370962 (diff) | |
Merge branch 'for-5.7/appleir' into for-linus
- small code cleanups in hid-appleir from Lucas Tanure
Diffstat (limited to 'include/linux/bpf_verifier.h')
| -rw-r--r-- | include/linux/bpf_verifier.h | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 26e40de9ef55..5406e6e96585 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -304,11 +304,13 @@ struct bpf_insn_aux_data {  	u64 map_key_state; /* constant (32 bit) key tracking for maps */  	int ctx_field_size; /* the ctx field size for load insn, maybe 0 */  	int sanitize_stack_off; /* stack slot to be cleared */ -	bool seen; /* this insn was processed by the verifier */ +	u32 seen; /* this insn was processed by the verifier at env->pass_cnt */  	bool zext_dst; /* this insn zero extends dst reg */  	u8 alu_state; /* used in combination with alu_limit */ -	bool prune_point; + +	/* below fields are initialized once */  	unsigned int orig_idx; /* original instruction index */ +	bool prune_point;  };  #define MAX_USED_MAPS 64 /* max number of maps accessed by one eBPF program */ @@ -379,6 +381,7 @@ struct bpf_verifier_env {  		int *insn_stack;  		int cur_stack;  	} cfg; +	u32 pass_cnt; /* number of times do_check() was called */  	u32 subprog_cnt;  	/* number of instructions analyzed by the verifier */  	u32 prev_insn_processed, insn_processed; @@ -428,4 +431,7 @@ bpf_prog_offload_replace_insn(struct bpf_verifier_env *env, u32 off,  void  bpf_prog_offload_remove_insns(struct bpf_verifier_env *env, u32 off, u32 cnt); +int check_ctx_reg(struct bpf_verifier_env *env, +		  const struct bpf_reg_state *reg, int regno); +  #endif /* _LINUX_BPF_VERIFIER_H */ |