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] [day] [month] [year] [list]
Date:	Sat, 22 Dec 2007 10:18:08 +0100 (CET)
From:	Matti Linnanvuori <mattilinnanvuori@...oo.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	netdev@...r.kernel.org
Subject: Re: hard_start_xmit struct sk_buff read-only?


--- Jeff Garzik <jeff@...zik.org> schrieb:

> This begs the question, what are you trying to do? 
> ;-)

I have seen network drivers whose hard_start_xmit
function calls skb_push or skb_put to extend the used
data area of the struct skb_buff passed to the
function. That avoids allocating a new buffer and
copying the whole data area to it. The drivers
apparently do that because the device expects a
specific header or suffix in the DMA buffer it
handles.

> In terms of object lifetimes, control passes to the
> net driver when 
> ->hard_start_xmit() is called, but that does not
> mean you can freely 
> scribble over things -- the skb may have been
> cloned, its destructor 
> callback still needs to be called (via
> dev_kfree_skb), etc.

So I assume modifying the data or header area of
struct sk_buff is incorrect because it can break
cloned buffers.


      Heute schon einen Blick in die Zukunft von E-Mails wagen? www.yahoo.de/mail
--
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