bpf: Collapse offset checks in sock_filter_is_valid_access
Subsystems (4)
PATCH 1/1 bpf: Collapse offset checks in sock_filter_is_valid_access
Make sock_filter_is_valid_access consistent with other is_valid_access helpers.
Requested-by Daniel Borkmann <[email protected]>
Signed-off-by David Ahern <[email protected]>
--- net/core/filter.c | 2 -- 1 file changed, 2 deletions(-)
net/core/filter.c +0 -2
@@ -3468,9 +3468,7 @@ static bool sock_filter_is_valid_access(int off, int size,if (type ==BPF_WRITE ) {switch (off) {case offsetof(struct bpf_sock , bound_dev_if): -break ;case offsetof(struct bpf_sock , mark): -break ;case offsetof(struct bpf_sock , priority):break ;default :
Signature · 1 line
2.1.4
Quoted 5 lines · David Ahern
Make
sock_filter_is_valid_accessconsistent with otheris_valid_accesshelpers.Requested-by Daniel Borkmann <[email protected]>Signed-off-by David Ahern <[email protected]>
Thanks for following up,
Acked-by Daniel Borkmann <[email protected]>
Quoted 5 lines · David Ahern
Make
sock_filter_is_valid_accessconsistent with otheris_valid_accesshelpers.Requested-by Daniel Borkmann <[email protected]>Signed-off-by David Ahern <[email protected]>
From: David Ahern <[email protected]>
Date: Fri, 1 Sep 2017 08:18:07 -0700
Quoted 5 lines
Make
sock_filter_is_valid_accessconsistent with otheris_valid_accesshelpers.Requested-by Daniel Borkmann <[email protected]>Signed-off-by David Ahern <[email protected]>
Applied.