1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_tracing.h>
8 char _license[] SEC("license") = "GPL";
14 SEC("lsm/bpf_token_capable")
15 int BPF_PROG(token_capable, struct bpf_token *token, int cap)
17 if (my_pid == 0 || my_pid != (bpf_get_current_pid_tgid() >> 32))
24 SEC("lsm/bpf_token_cmd")
25 int BPF_PROG(token_cmd, struct bpf_token *token, enum bpf_cmd cmd)
27 if (my_pid == 0 || my_pid != (bpf_get_current_pid_tgid() >> 32))