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