Re: [PATCH bpf-next 3/9] bpf: add bpf helper bpf_skb_set_ecn

2019-02-20 Thread Lawrence Brakmo
On 2/19/19, 10:30 AM, "Eric Dumazet" wrote: On 02/18/2019 09:38 PM, brakmo wrote: > This patch adds a new bpf helper BPF_FUNC_skb_set_ecn > "int bpf_skb_set_Ecn(struct sk_buff *skb)". It is added to > BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can > be a

Re: [PATCH bpf-next 3/9] bpf: add bpf helper bpf_skb_set_ecn

2019-02-19 Thread Lawrence Brakmo
On 2/19/19, 2:52 AM, "netdev-ow...@vger.kernel.org on behalf of Daniel Borkmann" wrote: On 02/19/2019 06:38 AM, brakmo wrote: > This patch adds a new bpf helper BPF_FUNC_skb_set_ecn > "int bpf_skb_set_Ecn(struct sk_buff *skb)". It is added to > BPF_PROG_TYPE_CGROUP_SKB typed b

Re: [PATCH bpf-next 3/9] bpf: add bpf helper bpf_skb_set_ecn

2019-02-19 Thread Daniel Borkmann
On 02/19/2019 11:52 AM, Daniel Borkmann wrote: [...] > Looking at cg_skb_verifier_ops ... it seems there also a bug in the current > code, namely that if we have a direct packet write, we don't make the skb > writable; at that point skb->data is not private. The cg_skb_is_valid_access() > allows to

Re: [PATCH bpf-next 3/9] bpf: add bpf helper bpf_skb_set_ecn

2019-02-19 Thread Eric Dumazet
On 02/18/2019 09:38 PM, brakmo wrote: > This patch adds a new bpf helper BPF_FUNC_skb_set_ecn > "int bpf_skb_set_Ecn(struct sk_buff *skb)". It is added to > BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can > be attached to the ingress and egress path. This type of > bpf_prog cannot mo

Re: [PATCH bpf-next 3/9] bpf: add bpf helper bpf_skb_set_ecn

2019-02-19 Thread Daniel Borkmann
On 02/19/2019 06:38 AM, brakmo wrote: > This patch adds a new bpf helper BPF_FUNC_skb_set_ecn > "int bpf_skb_set_Ecn(struct sk_buff *skb)". It is added to > BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can > be attached to the ingress and egress path. This type of > bpf_prog cannot modif

[PATCH bpf-next 3/9] bpf: add bpf helper bpf_skb_set_ecn

2019-02-18 Thread brakmo
This patch adds a new bpf helper BPF_FUNC_skb_set_ecn "int bpf_skb_set_Ecn(struct sk_buff *skb)". It is added to BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can be attached to the ingress and egress path. This type of bpf_prog cannot modify the skb directly. This helper is used to set