lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 23 Feb 2018 17:42:07 +0000 From: Edward Cree <ecree@...arflare.com> To: netdev <netdev@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net> Subject: [RFC PATCH bpf-next 10/12] bpf/verifier: parent state pointer is not per-frame Computing min_frame in find_loop and using it to detect recursion means we don't need to play games with per-frame parent pointers, and can instead have a single parent pointer in the verifier_state. Signed-off-by: Edward Cree <ecree@...arflare.com> --- include/linux/bpf_verifier.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index ee034232fbd6..0320df10555b 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -121,12 +121,6 @@ struct bpf_func_state { */ u32 subprogno; - /* loop detection; points into an explored_state */ - struct bpf_func_state *parent; - /* These flags are only meaningful in an explored_state, not cur_state */ - bool bounded_loop, conditional; - int live_children; - /* should be second to last. See copy_func_state() */ int allocated_stack; struct bpf_stack_state *stack; @@ -137,6 +131,12 @@ struct bpf_verifier_state { /* call stack tracking */ struct bpf_func_state *frame[MAX_CALL_FRAMES]; u32 curframe; + + /* loop detection; points into an explored_state */ + struct bpf_verifier_state *parent; + /* These flags are only meaningful in an explored_state, not cur_state */ + bool bounded_loop, conditional; + int live_children; }; /* linked list of verifier states used to prune search */
Powered by blists - more mailing lists