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, 27 Sep 2022 02:58:50 +0000
From:   "Rout, ChandanX" <chandanx.rout@...el.com>
To:     "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "edumazet@...gle.com" <edumazet@...gle.com>
CC:     "Sokolowski, Jan" <jan.sokolowski@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bjorn@...nel.org" <bjorn@...nel.org>,
        "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "hawk@...nel.org" <hawk@...nel.org>,
        "john.fastabend@...il.com" <john.fastabend@...il.com>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "Nagraj, Shravan" <shravan.nagraj@...el.com>,
        "Kuruvinakunnel, George" <george.kuruvinakunnel@...el.com>,
        "Nagaraju, Shwetha" <shwetha.nagaraju@...el.com>
Subject: RE: [PATCH net 3/3] i40e: Fix DMA mappings leak



>-----Original Message-----
>From: Nguyen, Anthony L <anthony.l.nguyen@...el.com>
>Sent: Tuesday, September 27, 2022 2:02 AM
>To: davem@...emloft.net; kuba@...nel.org; pabeni@...hat.com;
>edumazet@...gle.com
>Cc: Sokolowski, Jan <jan.sokolowski@...el.com>; netdev@...r.kernel.org;
>Nguyen, Anthony L <anthony.l.nguyen@...el.com>; bjorn@...nel.org;
>Fijalkowski, Maciej <maciej.fijalkowski@...el.com>; Karlsson, Magnus
><magnus.karlsson@...el.com>; ast@...nel.org; daniel@...earbox.net;
>hawk@...nel.org; john.fastabend@...il.com; bpf@...r.kernel.org; Rout,
>ChandanX <chandanx.rout@...el.com>
>Subject: [PATCH net 3/3] i40e: Fix DMA mappings leak
>
>From: Jan Sokolowski <jan.sokolowski@...el.com>
>
>During reallocation of RX buffers, new DMA mappings are created for those
>buffers. New buffers with different RX ring count should substitute older
>ones, but those buffers were freed in i40e_configure_rx_ring and reallocated
>again with i40e_alloc_rx_bi, thus kfree on rx_bi caused leak of already
>mapped DMA.
>
>In case of non XDP ring, do not free rx_bi and reuse already existing buffer,
>move kfree to XDP rings only, remove unused i40e_alloc_rx_bi function.
>
>steps for reproduction:
>while :
>do
>for ((i=0; i<=8160; i=i+32))
>do
>ethtool -G enp130s0f0 rx $i tx $i
>sleep 0.5
>ethtool -g enp130s0f0
>done
>done
>
>Fixes: be1222b585fd ("i40e: Separate kernel allocated rx_bi rings from AF_XDP
>rings")
>Signed-off-by: Jan Sokolowski <jan.sokolowski@...el.com>
>Tested-by: Chandan <chandanx.rout@...el.com> (A Contingent Worker at
>Intel)
>Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
>---
> .../net/ethernet/intel/i40e/i40e_ethtool.c    |  3 -
> drivers/net/ethernet/intel/i40e/i40e_main.c   | 13 ++--
> drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 13 ++--
> drivers/net/ethernet/intel/i40e/i40e_txrx.h   |  1 -
> drivers/net/ethernet/intel/i40e/i40e_xsk.c    | 67 ++++++++++++++++---
> drivers/net/ethernet/intel/i40e/i40e_xsk.h    |  2 +-
> 6 files changed, 71 insertions(+), 28 deletions(-)

Tested-by: Chandan <chandanx.rout@...el.com> (A Contingent Worker at Intel)

Powered by blists - more mailing lists