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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Jan 2022 22:55:24 -0800
From:   Alexei Starovoitov <>
To:     "Tyler Wear (QUIC)" <>
Cc:     Network Development <>,
        bpf <>,
        Maciej Żenczykowski <>,
        Yonghong Song <>, Martin KaFai Lau <>,
        Toke Høiland-Jørgensen <>,
        Daniel Borkmann <>,
        Song Liu <>
Subject: Re: [PATCH bpf-next v6 1/2] Add skb_store_bytes() for BPF_PROG_TYPE_CGROUP_SKB

On Thu, Jan 13, 2022 at 10:49 PM Tyler Wear (QUIC)
<> wrote:
> > > This is wrong.
> > > CGROUP_INET_EGRESS bpf prog cannot arbitrary change packet data.
> > > The networking stack populated the IP header at that point.
> > > If the prog changes it to something else it will be confusing other
> > > layers of stack. neigh(L2) will be wrong, etc.
> > > We can still change certain things in the packet, but not arbitrary bytes.
> > >
> > > We cannot change the DS field directly in the packet either.
> > > It can only be changed by changing its value in the socket.
> >
> > Why is the DS field unchangeable, but ecn is changeable?
> Per spec the requirement is to modify the ds field of egress packets with DSCP value. Setting ds field on socket will not suffice here.
> Another case is where device is a middle-man and needs to modify the packets of a connected tethered client with the DSCP value, using a sock will not be able to change the packet here.

If DS field needs to be changed differently for every packet
it's better to use TC layer for this task.
qdiscs may send packets with different DSs to different queues.

Powered by blists - more mailing lists