lists.openwall.net   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  linux-cve-announce  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:   Wed, 5 Feb 2020 18:19:21 +0900
From:   Yuya Kusakabe <yuya.kusakabe@...il.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>
Cc:     jasowang@...hat.com, ast@...nel.org, daniel@...earbox.net,
        davem@...emloft.net, hawk@...nel.org, john.fastabend@...il.com,
        kafai@...com, songliubraving@...com, yhs@...com, kuba@...nel.org,
        andriin@...com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH bpf-next v4] virtio_net: add XDP meta data support

On 2/5/20 2:33 PM, Michael S. Tsirkin wrote:
> On Tue, Feb 04, 2020 at 04:16:55PM +0900, Yuya Kusakabe wrote:
>> @@ -852,8 +868,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
>>  			 * adjustments. Note other cases do not build an
>>  			 * skb and avoid using offset
>>  			 */
>> -			offset = xdp.data -
>> -					page_address(xdp_page) - vi->hdr_len;
>> +			metasize = xdp.data - xdp.data_meta;
>> +			offset = xdp.data - page_address(xdp_page) -
>> +				 vi->hdr_len - metasize;
>>  
>>  			/* recalculate len if xdp.data or xdp.data_end were
>>  			 * adjusted
> 
> Tricky to get one's head around.
> Can you pls update the comment above to document the new math?
> 

Thank you for your review.

I will update the comment on next patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ