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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Nov 2019 14:52:26 +0000
From:   Arthur Fabre <afabre@...udflare.com>
To:     Edward Cree <ecree@...arflare.com>
Cc:     Solarflare linux maintainers <linux-net-drivers@...arflare.com>,
        Charles McLachlan <cmclachlan@...arflare.com>,
        Martin Habets <mhabets@...arflare.com>,
        David Miller <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        kernel-team <kernel-team@...udflare.com>
Subject: Re: [PATCH net-next] sfc: trace_xdp_exception on XDP failure

On Mon, Nov 11, 2019 at 6:01 PM Edward Cree <ecree@...arflare.com> wrote:
>
> On 11/11/2019 17:38, Arthur Fabre wrote:
> > On Mon, Nov 11, 2019 at 5:27 PM Edward Cree <ecree@...arflare.com> wrote:
> >>
> >> On 11/11/2019 10:51, Arthur Fabre wrote:
> >>> diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
> >>> index a7d9841105d8..5bfe1f6112a1 100644
> >>> --- a/drivers/net/ethernet/sfc/rx.c
> >>> +++ b/drivers/net/ethernet/sfc/rx.c
> >>> @@ -678,6 +678,7 @@ static bool efx_do_xdp(struct efx_nic *efx, struct efx_channel *channel,
> >>>                                 "XDP is not possible with multiple receive fragments (%d)\n",
> >>>                                 channel->rx_pkt_n_frags);
> >>>               channel->n_rx_xdp_bad_drops++;
> >>> +             trace_xdp_exception(efx->net_dev, xdp_prog, xdp_act);
> >>>               return false;
> >>>       }
> >> AIUI trace_xdp_exception() is improper here as we have not run
> >>  the XDP program (and xdp_act is thus uninitialised).
> >>
> >> The other three, below, appear to be correct.
> >> -Ed
> >>
> >
> > Good point. Do you know under what conditions we'd end up with
> > "fragmented" packets? As far as I can tell this isn't IP
> > fragmentation?
>
> Fragments in this case means that the packet data are spread across
>  multiple RX buffers (~= memory pages).  This should only happen if
>  the RX packet is too big to fit in a single buffer, and when
>  enabling XDP we ensure that the MTU is small enough to prevent
>  that.  So in theory this can't happen if the NIC is functioning
>  correctly.
>
> -Ed

Makes sense, thank you for the explanation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ