]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'sockmap-fixes'
authorDavid S. Miller <davem@davemloft.net>
Fri, 20 Oct 2017 12:01:30 +0000 (13:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Oct 2017 12:01:30 +0000 (13:01 +0100)
commit60f0f9bbd85b9cf7d8061b27f853b1827d6028e0
tree52d1bcf9c1257a973d3a78cdf54d0d6f005df705
parent74d562e053747d505bf6c53336939af3ed14727d
parent5816964fdeaac9660b8d31d0cd26fe2991a675b2
Merge branch 'sockmap-fixes'

John Fastabend says:

====================
sockmap fixes for net

The following implements a set of fixes for sockmap and changes the
API slightly in a few places to reduce preempt_disable/enable scope.
We do this here in net because it requires an API change and this
avoids getting stuck with legacy API going forward.

The short description:

Access to skb mark is removed, it is problematic when we add
features in the future because mark is a union and used by the
TCP/socket code internally. We don't want to expose this to the
BPF programs or let programs change the values.

The other change is caching metadata in the skb itself between
when the BPF program returns a redirect code and the core code
implements the redirect. This avoids having per cpu metadata.

Finally, tighten restriction on using sockmap to CAP_NET_ADMIN and
only SOCK_STREAM sockets.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>