diff options
author | 2022-12-06 15:33:44 -0800 | |
---|---|---|
committer | 2022-12-06 19:14:38 -0800 | |
commit | a095f421057e22853022cb644b1589d0dd0e756e (patch) | |
tree | c33f61ef1b9eb4bb28e81e0c4abca9ae4b6ad831 /scripts/generate_rust_analyzer.py | |
parent | bpf: decouple prune and jump points (diff) | |
download | wireguard-linux-a095f421057e22853022cb644b1589d0dd0e756e.tar.xz wireguard-linux-a095f421057e22853022cb644b1589d0dd0e756e.zip |
bpf: mostly decouple jump history management from is_state_visited()
Jump history updating and state equivalence checks are conceptually
independent, so move push_jmp_history() out of is_state_visited(). Also
make a decision whether to perform state equivalence checks or not one
layer higher in do_check(), keeping is_state_visited() unconditionally
performing state checks.
push_jmp_history() should be performed after state checks. There is just
one small non-uniformity. When is_state_visited() finds already
validated equivalent state, it propagates precision marks to current
state's parent chain. For this to work correctly, jump history has to be
updated, so is_state_visited() is doing that internally.
But if no equivalent verified state is found, jump history has to be
updated in a newly cloned child state, so is_jmp_point()
+ push_jmp_history() is performed after is_state_visited() exited with
zero result, which means "proceed with validation".
This change has no functional changes. It's not strictly necessary, but
feels right to decouple these two processes.
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20221206233345.438540-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions