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:	Wed, 20 Feb 2013 14:47:19 -0800
From:	Alexander Duyck <alexander.h.duyck@...el.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	"Allan, Bruce W" <bruce.w.allan@...el.com>,
	"e1000-devel@...ts.sourceforge.net" 
	<e1000-devel@...ts.sourceforge.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
	Daniel Santos <daniel.santos@...ox.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Wu, Fengguang" <fengguang.wu@...el.com>
Subject: Re: [E1000-devel] [next:akpm 16/587] drivers/net/ethernet/intel/igb/igb_main.c:6231:2:
 error: call to '__compiletime_assert_6235' declared with attribute error:
 BUILD_BUG_ON failed: SKB_WITH_OVERHEAD(IGB_RX_BUFSZ) < (NET_SKB_PAD + NET_IP_ALIGN
 + IGB_TS_HDR_LEN + ETH...

On 02/20/2013 01:42 PM, Eric Dumazet wrote:
> On Wed, 2013-02-20 at 13:23 -0800, Alexander Duyck wrote:
>
>> NET_SKB_PAD is defined for the s390.  It is already 32.  If you look it
>> up we only have 2 definitions for NET_SKB_PAD, one specific to the s390
>> architecture and the other one in skbuff.h.
>>
> Andrew traces disagree, as they were :
>
>>>> s390 allmodconfig:
>>>>
>>>> bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + (256 - 1)) &
>>>> ~(256 - 1))) < (32 + 2 + 16 + 1514 + 4)));
>>>>
> So it might be only a cross-compile environment issue, I dont know.

Huh?  I'm not seeing what you are saying.  The NET_SKB_PAD is the value
that is in the last set of parenthesis since it was:
(NET_SKB_PAD + NET_IP_ALIGN + IGB_TS_HDR_LEN + ETH_FRAME_LEN + ETH_FCS_LEN)
    that is the bit that became:
(32 + 2 + 16 + 1514 + 4)

The problem is the skb_shared_info bit rounds up to 512 reducing the
available space to 1536.  If you add up all of the other bits ignoring
the NET_SKB_PAD value you end up with exactly 1536 meaning the only
value for NET_SKB_PAD that would work is 0.

>> From what I can tell we would have to drop the NET_SKB_PAD to 0 in order
>> to not trigger this error with igb since we still have to add 22 bytes
>> for igb's per packet timestamp header, IP alignment, and CRC.
>>
>> The simple fix is for us just to drop the BUILD_BUG_ON check for igb
>> since we already had a check for size check in igb_set_rx_buffer_len. 
>> It just means that build_skb won't be available for standard MTU sizes
>> on s390.
> Yeah, probably nobody will notice ;)

Yeah, it is only a few percentage points difference and only really
impacts small packets anyway.  :-)

Thanks,

Alex
--
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