]> 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)
commit1ea18884755f7d9070f2b1db0d06a9b972444571
tree52d1bcf9c1257a973d3a78cdf54d0d6f005df705
parent4879d3950b7fbd797f089f5985cc9589edf35f81
parent7f50823fe6acdf0c3b448278ed6abbae9424025c
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>