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, 26 Aug 2009 08:01:23 +0200
From:	Frank Blaschka <blaschka@...ux.vnet.ibm.com>
To:	Stephen Hemminger <shemminger@...tta.com>
CC:	Chris Ross <chris@...pilednetworks.com>, netdev@...r.kernel.org
Subject: Re: skb header allocation

Is it save to change dev->hard_header_len to a value other than ETH_HLEN for
an ethernet device?

I rememeber we run in trouble with some kernel components (netfilter?, I'm
not sure can't remember the details ...) when we did this is the past.

Is this not an issue any more?

Thanks

Stephen Hemminger schrieb:
> On Tue, 25 Aug 2009 22:04:10 -0500
> Chris Ross <chris@...pilednetworks.com> wrote:
> 
>> I have a network driver that acts as a Ethernet device and builds up a
>> series of outer headers on skb(s) it receives from upper layers. I am
>> currently using the technique that is in ipip.c to ensure I have
>> enough room to add my header ...
>>
>> if (skb_headroom(skb) < some_value || skb_shared(skb) ||
>>          ((skb_cloned(skb) && !skb_clone_writable(skb, 0))))
>>    {
>>       if ((skb2 = skb_realloc_headroom(skb, some_value)) == NULL)
>>          return -1;
>>
>>       dev_kfree_skb(skb);
>>       skb = skb2;
>>    }
>>
>> Is this the best practice for a high bandwidth scenario?
> 
> Define a value of dev->hard_header_len that adds space for what you need.
> Use skb_cow_head(skb, headroom) before touching skb header.
> --
> 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
> 


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