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: <BANLkTimvCVcQX-7teQgG7EQV9eeLgG3JnQ@mail.gmail.com>
Date:	Mon, 16 May 2011 23:04:54 +0300
From:	Tomas Winkler <tomasw@...il.com>
To:	Emmanuel Grumbach <egrumbach@...il.com>
Cc:	Michał Mirosław <mirqus@...il.com>,
	netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
	Johannes Berg <johannes@...solutions.net>,
	"Guy, Wey-Yi" <wey-yi.w.guy@...el.com>, guy.cohen@...el.com
Subject: Re: several packets in a single buffer in Rx

2011/5/16 Emmanuel Grumbach <egrumbach@...il.com>:
> 2011/5/16 Michał Mirosław <mirqus@...il.com>:
>> W dniu 16 maja 2011 14:59 użytkownik Emmanuel Grumbach
>> <egrumbach@...il.com> napisał:
>>> 2011/5/16 Michał Mirosław <mirqus@...il.com>:
>>>> 2011/5/16 Emmanuel Grumbach <egrumbach@...il.com>:
>>>>> I would like to be able to deliver the same page several times to the
>>>>> stack without having the stack consume it before the last time I
>>>>> deliver it.
>>>>> Of course I would like to avoid cloning it.
>>>>
>>>> Just do get_page() on the page having another packet in it before
>>>> passing skb up.
>>>>
>>>
>>> I can see the path:
>>> __kfree_skb -> skb_release_all -> skb_release_data -> put_page
>>> put_page will free the page iff the _count variable reaches 0. Of course,
>>> _count is incremented by get_page.
>>>
>>> I will give it try.
>>>
>>> I understand that this will work regardless the order given to
>>> alloc_pages right ?
>>
>> Yes. Remember that if you put a lot of packets in a big-order page
>> then the memory will be freed only after all packets are freed.
>
> Sure. Thanks for the help.

How it is ensured that skb manipulation won't corrupt another packet
on the same page?

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