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: <20090813192326.GA32435@electric-eye.fr.zoreil.com>
Date:	Thu, 13 Aug 2009 21:23:26 +0200
From:	Francois Romieu <romieu@...zoreil.com>
To:	Dave Jones <davej@...hat.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: 8139cp dma-debug warning.

Dave Jones <davej@...hat.com> :
[...]
>  > @@ -549,8 +549,7 @@ rx_status_loop:
>  >  			pr_debug("%s: rx slot %d status 0x%x len %d\n",
>  >  			       dev->name, rx_tail, status, len);
>  >  
>  > -		buflen = cp->rx_buf_sz + NET_IP_ALIGN;
>  > -		new_skb = netdev_alloc_skb(dev, buflen);
>  > +		new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN);
>  >  		if (!new_skb) {
>  >  			dev->stats.rx_dropped++;
>  >  			goto rx_next;
> 
> Below this, we're still doing an skb_reserve(NET_IP_ALIGN) on new_skb.
> Although the mapping is now constantly sized, aren't we still wastefully
> bumping the data/tail of the skb twice ?

$ grep -n NET_IP_ALIGN drivers/net/8139cp.c
552:		new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN);
558:		skb_reserve(new_skb, NET_IP_ALIGN);
1059:		skb = netdev_alloc_skb(dev, cp->rx_buf_sz + NET_IP_ALIGN);
1063:		skb_reserve(skb, NET_IP_ALIGN);

I do not get it : netdev_alloc_skb allocates but it does not "bump" as
skb_reserve does (and skb_reserve does not allocate). Where would the
double bump come from ?

The mapping is constantly sized but we want the ethernet header following
IP data to be evenly aligned and thus the mapping to be oddly aligned.

-- 
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ