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] [day] [month] [year] [list]
Message-ID: <00b84a99d52d5828d95a9b32bff81fc8f8b4aef4.camel@mellanox.com>
Date:   Wed, 27 May 2020 16:24:00 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "dsahern@...il.com" <dsahern@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bjorn.topel@...el.com" <bjorn.topel@...el.com>,
        "brouer@...hat.com" <brouer@...hat.com>
Subject: Re: [PATCH net-next] mlx5: fix xdp data_meta setup in
 mlx5e_fill_xdp_buff

On Wed, 2020-05-27 at 08:08 -0600, David Ahern wrote:
> On 5/27/20 7:44 AM, Jesper Dangaard Brouer wrote:
> > The helper function xdp_set_data_meta_invalid() must be called
> > after
> > setting xdp->data as it depends on it.
> > 
> > The bug was introduced in 39d6443c8daf ("mlx5, xsk: Migrate to
> > new MEM_TYPE_XSK_BUFF_POOL"), and cause the kernel to crash when
> > using BPF helper bpf_xdp_adjust_head() on mlx5 driver.
> > 
> > Fixes: 39d6443c8daf ("mlx5, xsk: Migrate to new
> > MEM_TYPE_XSK_BUFF_POOL")
> > Reported-by: David Ahern <dsahern@...nel.org>
> > Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> > ---
> >  drivers/net/ethernet/mellanox/mlx5/core/en_rx.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > index 6b3c82da199c..dbb1c6323967 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > @@ -1056,8 +1056,8 @@ static void mlx5e_fill_xdp_buff(struct
> > mlx5e_rq *rq, void *va, u16 headroom,
> >  				u32 len, struct xdp_buff *xdp)
> >  {
> >  	xdp->data_hard_start = va;
> > -	xdp_set_data_meta_invalid(xdp);
> >  	xdp->data = va + headroom;
> > +	xdp_set_data_meta_invalid(xdp);
> >  	xdp->data_end = xdp->data + len;
> >  	xdp->rxq = &rq->xdp_rxq;
> >  	xdp->frame_sz = rq->buff.frame0_sz;
> > 
> > 
> 
> good catch. I looked right past that yesterday.
> 
> Tested-by: David Ahern <dsahern@...il.com>

Applied to net-next-mlx5, will send shortly to net-next.
Thanks,
Saeed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ