xref: /linux/tools/testing/selftests/bpf/progs/lsm_cgroup_nonvoid.c (revision 249ebf3f65f8530beb2cbfb91bff1d83ba88d23c)
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