diff options
author | Alexei Starovoitov <ast@kernel.org> | 2018-12-13 11:42:34 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-12-15 01:28:32 +0100 |
commit | 9242b5f5615c823bfc1e9aea284617ff25a55f10 (patch) | |
tree | 0ed48c83d6898b667998b3914eba94b28bc4d602 /include/linux/bpf_verifier.h | |
parent | 19e2dbb7dd978d24505e918ac54d6f7dfdc88b1d (diff) | |
download | blackbird-obmc-linux-9242b5f5615c823bfc1e9aea284617ff25a55f10.tar.gz blackbird-obmc-linux-9242b5f5615c823bfc1e9aea284617ff25a55f10.zip |
bpf: add self-check logic to liveness analysis
Introduce REG_LIVE_DONE to check the liveness propagation
and prepare the states for merging.
See algorithm description in clean_live_states().
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/bpf_verifier.h')
-rw-r--r-- | include/linux/bpf_verifier.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 548dcbdb7111..c233efc106c6 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -38,6 +38,7 @@ enum bpf_reg_liveness { REG_LIVE_NONE = 0, /* reg hasn't been read or written this branch */ REG_LIVE_READ, /* reg was read, so we're sensitive to initial value */ REG_LIVE_WRITTEN, /* reg was written first, screening off later reads */ + REG_LIVE_DONE = 4, /* liveness won't be updating this register anymore */ }; struct bpf_reg_state { |