File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -1817,6 +1817,19 @@ static int copy_verifier_state(struct bpf_verifier_state *dst_state,
1817
1817
return 0;
1818
1818
}
1819
1819
1820
+ static u32 state_htab_size(struct bpf_verifier_env *env)
1821
+ {
1822
+ return env->prog->len;
1823
+ }
1824
+
1825
+ static struct bpf_verifier_state_list **explored_state(struct bpf_verifier_env *env, int idx)
1826
+ {
1827
+ struct bpf_verifier_state *cur = env->cur_state;
1828
+ struct bpf_func_state *state = cur->frame[cur->curframe];
1829
+
1830
+ return &env->explored_states[(idx ^ state->callsite) % state_htab_size(env)];
1831
+ }
1832
+
1820
1833
static void update_branch_counts(struct bpf_verifier_env *env, struct bpf_verifier_state *st)
1821
1834
{
1822
1835
while (st) {
@@ -15020,21 +15033,6 @@ enum {
15020
15033
BRANCH = 2,
15021
15034
};
15022
15035
15023
- static u32 state_htab_size(struct bpf_verifier_env *env)
15024
- {
15025
- return env->prog->len;
15026
- }
15027
-
15028
- static struct bpf_verifier_state_list **explored_state(
15029
- struct bpf_verifier_env *env,
15030
- int idx)
15031
- {
15032
- struct bpf_verifier_state *cur = env->cur_state;
15033
- struct bpf_func_state *state = cur->frame[cur->curframe];
15034
-
15035
- return &env->explored_states[(idx ^ state->callsite) % state_htab_size(env)];
15036
- }
15037
-
15038
15036
static void mark_prune_point(struct bpf_verifier_env *env, int idx)
15039
15037
{
15040
15038
env->insn_aux_data[idx].prune_point = true;
You can’t perform that action at this time.
0 commit comments