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]
Message-ID: <20190828172934.57a2a169@cakuba.netronome.com>
Date:   Wed, 28 Aug 2019 17:29:34 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     Realtek linux nic maintainers <nic_swsd@...ltek.com>,
        David Miller <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Chun-Hao Lin <hau@...ltek.com>
Subject: Re: [PATCH net-next v2 6/9] r8169: don't use bit LastFrag in tx
 descriptor after send

On Wed, 28 Aug 2019 22:27:30 +0200, Heiner Kallweit wrote:
> On RTL8125 this bit is always cleared after send. Therefore check for
> tx_skb->skb being set what is functionally equivalent.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
>  drivers/net/ethernet/realtek/r8169_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 652bacf62..4489cd9f2 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -5713,7 +5713,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,
>  
>  		rtl8169_unmap_tx_skb(tp_to_dev(tp), tx_skb,
>  				     tp->TxDescArray + entry);
> -		if (status & LastFrag) {
> +		if (tx_skb->skb) {
>  			pkts_compl++;
>  			bytes_compl += tx_skb->skb->len;
>  			napi_consume_skb(tx_skb->skb, budget);

Hmm.. the dma_rmb() looks a little sus. Honestly I'm unclear on what it
was doing in the first place. READ_ONCE() should've been sufficient..

And it's not obviously clear what does the smp_rmb() at the start of
the function pair with.

But I don't think you're making anything worse here :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ