xref: /linux/tools/testing/selftests/bpf/progs/lsm_cgroup_nonvoid.c (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include "vmlinux.h"
4 #include <bpf/bpf_helpers.h>
5 #include <bpf/bpf_tracing.h>
6 
7 char _license[] SEC("license") = "GPL";
8 
9 SEC("lsm_cgroup/inet_csk_clone")
10 int BPF_PROG(nonvoid_socket_clone, struct sock *newsk, const struct request_sock *req)
11 {
12 	/* Can not return any errors from void LSM hooks. */
13 	return 0;
14 }
15