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:   Tue, 31 Mar 2020 15:16:22 +0900
From:   Toshiaki Makita <toshiaki.makita1@...il.com>
To:     Mao Wenan <maowenan@...wei.com>, davem@...emloft.net,
        ast@...nel.org, daniel@...earbox.net, kuba@...nel.org,
        hawk@...nel.org, john.fastabend@...il.com, kafai@...com,
        songliubraving@...com, yhs@...com, andriin@...com,
        jwi@...ux.ibm.com, jianglidong3@...com, edumazet@...gle.com
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        bpf@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net v2] veth: xdp: use head instead of hard_start

On 2020/03/31 15:06, Mao Wenan wrote:
> xdp.data_hard_start is equal to first address of
> struct xdp_frame, which is mentioned in
> convert_to_xdp_frame(). But the pointer hard_start
> in veth_xdp_rcv_one() is 32 bytes offset of frame,
> so it should use head instead of hard_start to
> set xdp.data_hard_start. Otherwise, if BPF program
> calls helper_function such as bpf_xdp_adjust_head, it
> will be confused for xdp_frame_end.

I think you should discuss this more with Jesper before
submitting v2.
He does not like this to be included now due to merge conflict risk.
Basically I agree with him that we don't need to hurry with this fix.

Toshiaki Makita

> 
> Fixes: 9fc8d518d9d5 ("veth: Handle xdp_frames in xdp napi ring")
> Signed-off-by: Mao Wenan <maowenan@...wei.com>
> ---
>   v2: add fixes tag, as well as commit log.
>   drivers/net/veth.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index d4cbb9e8c63f..5ea550884bf8 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -506,7 +506,7 @@ static struct sk_buff *veth_xdp_rcv_one(struct veth_rq *rq,
>   		struct xdp_buff xdp;
>   		u32 act;
>   
> -		xdp.data_hard_start = hard_start;
> +		xdp.data_hard_start = head;
>   		xdp.data = frame->data;
>   		xdp.data_end = frame->data + frame->len;
>   		xdp.data_meta = frame->data - frame->metasize;
> 

Powered by blists - more mailing lists