]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'bpf: Allow bpf_get_netns_cookie in BPF_PROG_TYPE_CGROUP_SOCKOPT'
authorAndrii Nakryiko <andrii@kernel.org>
Sat, 14 Aug 2021 00:49:24 +0000 (17:49 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Sat, 14 Aug 2021 00:51:29 +0000 (17:51 -0700)
commitdd4f4a1725ca97a3e6c93ddb10853b3a11385802
tree88c9dae2a28e3495a2f32507a566fea3b18cd848
parent609dc8e5cc5a32c80d98f8f2d4df819c2cff0cb8
parent6151c44ad89fd3cbb651374f47d0142291a0def9
Merge branch 'bpf: Allow bpf_get_netns_cookie in BPF_PROG_TYPE_CGROUP_SOCKOPT'

Stanislav Fomichev says:

====================

We'd like to be able to identify netns from setsockopt hooks
to be able to do the enforcement of some options only in the
"initial" netns (to give users the ability to create clear/isolated
sandboxes if needed without any enforcement by doing unshare(net)).

v3:
- remove extra 'ctx->skb == NULL' check (Martin KaFai Lau)
- rework test to make sure the helper is really called, not just
  verified

v2:
- add missing CONFIG_NET
====================

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>