Jeff Garzik wrote:
> Once packets classified to be delivered to a specific local host socket,
> what further operations are require privs? What received packet data
> cannot be exposed to userspace?
You just need to make sure that you don't leak data from other peoples
sockets. Two issues I see:
1. If the card receives a long frame for application #1 and then receives
a short frame for application #2, then you need to make sure that
the data gets zeroed out first. So you need to limit this to only
maximum-sized packets (or packets whose previous use was on the same
flow). Probably not a big deal, since that's the performance-critical
case anyway
2. More concerning is how you control what packets the app can see.
If you made the memory frames all PAGE_SIZE then you could just give
the app the packets to its flows by doing MMU tricks, but wouldn't
that murder performance anyway? So I think the only real solution
would be to allow the app to map all of the frames all of the time.
So I agree that this would have to be CAP_NET_ADMIN only.
-Mitch
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html