Re: [PATCH v16 11/17]Add a hook to intercept external buffers from NIC driver.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Changli Gao
Date: Wednesday, December 1, 2010 - 2:38 am

On Wed, Dec 1, 2010 at 4:08 PM,  <xiaohui.xin@intel.com> wrote:

I think it won't work if the skbs is captured by the previous ptype.
We need to trace the skb pages(skb_shared_info.frags[*].page), but
currently, there isn't a easy way to do that. skb pages are treated as
normal pages, and anyone can get it freely. And it is the problem in
the way to fix the potential data corruption bug.

Eric thinks af_packets(mmap) isn't worth fixing. But if this patch
serial has the same problem. It will be worth.

My idea is adding a new function dtor pointer  and some other args
pointers to the struct skb_shared_info. If skb_shared_info.dtor
exists, the pages in skb_shared_info.frags are private to this
skb->head. Anyone who wants to get these pages, should copy them
instead.

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v16 12/17] Add header file for mp device., xiaohui.xin, (Wed Dec 1, 1:08 am)
[PATCH v16 13/17] Add mp(mediate passthru) device., xiaohui.xin, (Wed Dec 1, 1:08 am)
Re: [PATCH v16 11/17]Add a hook to intercept external buff ..., Changli Gao, (Wed Dec 1, 2:38 am)