]>
git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - include/linux/bpf_lsm.h
1 /* SPDX-License-Identifier: GPL-2.0 */
4 * Copyright (C) 2020 Google LLC.
7 #ifndef _LINUX_BPF_LSM_H
8 #define _LINUX_BPF_LSM_H
10 #include <linux/bpf.h>
11 #include <linux/lsm_hooks.h>
15 #define LSM_HOOK(RET, DEFAULT, NAME, ...) \
16 RET bpf_lsm_##NAME(__VA_ARGS__);
17 #include <linux/lsm_hook_defs.h>
20 int bpf_lsm_verify_prog(struct bpf_verifier_log
*vlog
,
21 const struct bpf_prog
*prog
);
23 #else /* !CONFIG_BPF_LSM */
25 static inline int bpf_lsm_verify_prog(struct bpf_verifier_log
*vlog
,
26 const struct bpf_prog
*prog
)
31 #endif /* CONFIG_BPF_LSM */
33 #endif /* _LINUX_BPF_LSM_H */