bpf: remove mark access for SK_SKB program types
authorJohn Fastabend <[email protected]>
Wed, 18 Oct 2017 14:10:58 +0000 (07:10 -0700)
committerDavid S. Miller <[email protected]>
Fri, 20 Oct 2017 12:01:29 +0000 (13:01 +0100)
commitf7e9cb1ecb6d922584abff16db07930162c57155
tree3686d4b38db981a9289725f9c9aed66ed59b7607
parent34f79502bbcfab659b8729da68b5e387f96eb4c1
bpf: remove mark access for SK_SKB program types

The skb->mark field is a union with reserved_tailroom which is used
in the TCP code paths from stream memory allocation. Allowing SK_SKB
programs to set this field creates a conflict with future code
optimizations, such as "gifting" the skb to the egress path instead
of creating a new skb and doing a memcpy.

Because we do not have a released version of SK_SKB yet lets just
remove it for now. A more appropriate scratch pad to use at the
socket layer is dev_scratch, but lets add that in future kernels
when needed.

Signed-off-by: John Fastabend <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/core/filter.c
tools/testing/selftests/bpf/test_verifier.c