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: <20091007.135217.73491149.davem@davemloft.net>
Date:	Wed, 07 Oct 2009 13:52:17 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	shemminger@...tta.com
Cc:	thomas@...ron.com.tw, netdev@...r.kernel.org
Subject: Re: [PATCH 3/4] ethoc: align received packet to make IP header at
 word boundary

From: Stephen Hemminger <shemminger@...tta.com>
Date: Wed, 7 Oct 2009 09:13:37 -0700

> On Mon,  5 Oct 2009 17:33:19 +0800
> Thomas Chou <thomas@...ron.com.tw> wrote:
> 
>> diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
>> index f92747f..0c6c7f4 100644
>> --- a/drivers/net/ethoc.c
>> +++ b/drivers/net/ethoc.c
>> @@ -399,6 +399,10 @@ static int ethoc_rx(struct net_device *dev, int limit)
>>  		if (ethoc_update_rx_stats(priv, &bd) == 0) {
>>  			int size = bd.stat >> 16;
>>  			struct sk_buff *skb = netdev_alloc_skb(dev, size);
>> +
>> +			size -= 4; /* strip the CRC */
>> +			skb_reserve(skb, 2); /* align TCP/IP header */
> 
> Please use NET_IP_ALIGN rather than hard coding 2 so that the value
> can be changed on a per-cpu architecture basis if desired.

Indeed.

Thomas please send a patch to fix this up, thanks.
--
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