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] [day] [month] [year] [list]
Date:   Thu, 31 Mar 2022 10:21:57 +0000
From:   "Nagaraju, Shwetha" <shwetha.nagaraju@...el.com>
To:     "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH intel-next] ice: xsk: check if Rx ring
 was filled up to the end



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Maciej Fijalkowski
> Sent: Thursday, March 17, 2022 11:27 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org; kuba@...nel.org; bpf@...r.kernel.org;
> davem@...emloft.net; Karlsson, Magnus <magnus.karlsson@...el.com>
> Subject: [Intel-wired-lan] [PATCH intel-next] ice: xsk: check if Rx ring was
> filled up to the end
> 
> __ice_alloc_rx_bufs_zc() checks if a number of the descriptors to be
> allocated would cause the ring wrap. In that case, driver will issue two calls to
> xsk_buff_alloc_batch() - one that will fill the ring up to the end and the
> second one that will start with filling descriptors from the beginning of the
> ring.
> 
> ice_fill_rx_descs() is a wrapper for taking care of what
> xsk_buff_alloc_batch() gave back to the driver. It works in a best effort
> approach, so for example when driver asks for 64 buffers,
> ice_fill_rx_descs() could assign only 32. Such case needs to be checked when
> ring is being filled up to the end, because in that situation ntu might not
> reached the end of the ring.
> 
> Fix the ring wrap by checking if nb_buffs_extra has the expected value.
> If not, bump ntu and go directly to tail update.
> 
> Fixes: 3876ff525de7 ("ice: xsk: Handle SW XDP ring wrap and bump tail more
> often")
> Signed-off-by: Magnus Karlsson <magnus.karlsson@...el.com>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_xsk.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
Tested-by: Shwetha Nagaraju <Shwetha.nagaraju@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ