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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 8 May 2020 09:56:37 +0800
From:   Jason Wang <>
To:     "Michael S. Tsirkin" <>
        Jesper Dangaard Brouer <>
Subject: Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet
 header for XDP

On 2020/5/6 下午5:54, Michael S. Tsirkin wrote:
> On Wed, May 06, 2020 at 04:19:40PM +0800, Jason Wang wrote:
>> On 2020/5/6 下午3:53, Michael S. Tsirkin wrote:
>>> On Wed, May 06, 2020 at 02:16:32PM +0800, Jason Wang wrote:
>>>> We tried to reserve space for vnet header before
>>>> xdp.data_hard_start. But this is useless since the packet could be
>>>> modified by XDP which may invalidate the information stored in the
>>>> header and there's no way for XDP to know the existence of the vnet
>>>> header currently.
>>> What do you mean? Doesn't XDP_PASS use the header in the buffer?
>> We don't, see 436c9453a1ac0 ("virtio-net: keep vnet header zeroed after
>> processing XDP")
>> If there's other place, it should be a bug.
>>>> So let's just not reserve space for vnet header in this case.
>>> In any case, we can find out XDP does head adjustments
>>> if we need to.
>> But XDP program can modify the packets without adjusting headers.
>> Thanks
> Then what's the problem?

Then we can't do anything more than just invalidating vnet header since 
we don't know whether or not the packet has been modified or not.

Technically, XDP can give the driver some hint about whether or not the 
packet has been modified, but AFAIK we haven't implemented this yet.



Powered by blists - more mailing lists