On Mon, 04 Dec 2006 18:12:48 +0100, Paolo Abeni <[EMAIL PROTECTED]> wrote:

> The issue rises because libpcap substitutes the usbmon event header
> provided by the kernel with a different header that is more "kernel
> agnostic". This substitution is not a strict libpcap requirement, but
> given the multi-platform nature of the library and the eventuality to
> support some day sniffing from usb busses also on non linux platform, I
> think the header substitution has to be performed.
>[...]
> The write access gives the user the possibility to waste the
> ring-buffer, but it should be impossible for the user to cause trouble
> to the kernel, right ? (the indexes are not accessible via mmap)

Unfortunately, kernel depends on the consistency of the chain, so it
can easily be made to break (oops or loop) by changing ep->len_cap.
I can't allow the in-place modifications of mmap-ed area, I'm afraid.
BTW, it is no excuse that usbmon is accessible to root user only.

I suppose that long-term I'll need to look at the libpcap proper.
The substitution sounds very fishy to me. What is libpcap going
to do in case of other protocols exposing packets with mmap, like
Infiniband?

Short-term, perhaps we ought to move forward with the mmap disabled,
just to relax the size limitation, and tinker with mmap later.

-- Pete

P.S. Why is it that you always neglect to add cc: to the list?
I'm cc-ing this to linux-usb-devel.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to