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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <p73tzrzuwe1.fsf@bingen.suse.de>
Date:	20 Jul 2007 13:50:30 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Evgeniy Polyakov <johnpol@....mipt.ru>
Cc:	vinay ravuri <vinaynyc@...oo.com>,
	Stephen Hemminger <shemminger@...ux-foundation.org>,
	netdev@...r.kernel.org
Subject: Re: Socket Buffers and Memory Managment

Evgeniy Polyakov <johnpol@....mipt.ru> writes:

> Hi.
> 
> On Wed, Jul 18, 2007 at 11:51:03PM -0700, vinay ravuri (vinaynyc@...oo.com) wrote:
> > How about the following approach:
> > 
> > I allocate an skb of 0 bytes and replace data element
> > of skb struct (i.e. skb.data = addr_given_by_hw) when
> > the h/w interrupts me with a packet.  I register for a
> > destructor for this skb and when the kernel is ready
> > to free the skb, I make sure that my free is invoked -
> > Ofcourse this is assuming that their is a facility in
> > linux socket buffers to be able to do destructors.  Is
> > this approach a viable, if so, are any gottcha's?
> 
> It will not work, since kfree_skb() eventually tries to free skb->head
> into kmem cache,

And in addition if the skbuff is ever passed towards the socket
layer the destructor will be overwritten

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