Message ID | 20230421162718.440230-5-daan.j.demeyer@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | Add cgroup sockaddr hooks for unix sockets | expand |
On 4/21/23 9:27 AM, Daan De Meyer wrote: > In preparation for adding a sock addr specific kfunc, let's add the > necessary hook for it. Please combine this patch with patch 5.
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index a0887ee44e89..1ec9a8590c72 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -212,6 +212,7 @@ enum btf_kfunc_hook { BTF_KFUNC_HOOK_SK_SKB, BTF_KFUNC_HOOK_SOCKET_FILTER, BTF_KFUNC_HOOK_LWT, + BTF_KFUNC_HOOK_SOCK_ADDR, BTF_KFUNC_HOOK_MAX, }; @@ -7802,6 +7803,8 @@ static int bpf_prog_type_to_kfunc_hook(enum bpf_prog_type prog_type) case BPF_PROG_TYPE_LWT_XMIT: case BPF_PROG_TYPE_LWT_SEG6LOCAL: return BTF_KFUNC_HOOK_LWT; + case BPF_PROG_TYPE_CGROUP_SOCK_ADDR: + return BTF_KFUNC_HOOK_SOCK_ADDR; default: return BTF_KFUNC_HOOK_MAX; }
In preparation for adding a sock addr specific kfunc, let's add the necessary hook for it. Signed-off-by: Daan De Meyer <daan.j.demeyer@gmail.com> --- kernel/bpf/btf.c | 3 +++ 1 file changed, 3 insertions(+)