xref: /linux/tools/testing/selftests/bpf/progs/test_signed_loader.c (revision c16ce856e422e73a54c41131e0332de1afe09b8b)
1 // SPDX-License-Identifier: GPL-2.0
2 #include "vmlinux.h"
3 #include <bpf/bpf_helpers.h>
4 
5 /*
6  * Minimal, map-less program. Driven through libbpf's gen_loader (gen_hash)
7  * by prog_tests/signed_loader.c so the generated light-skeleton loader (with
8  * the emit_signature_match metadata check) can be exercised against good
9  * and tampered metadata. A socket filter needs no load-time attach resolution,
10  * and having no maps keeps the generated loader's ctx trivial (0 maps, 1 prog).
11  */
12 SEC("socket")
13 int probe(void *ctx)
14 {
15 	return 0;
16 }
17 
18 char _license[] SEC("license") = "GPL";
19