FILE
bad_struct_ops.c
File preview with syntax highlighting.
linux-6.19.14/tools/testing/selftests/bpf/progs/bad_struct_ops.c
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#include "../test_kmods/bpf_testmod.h" 7 8char _license[] SEC("license") = "GPL"; 9 10SEC("struct_ops/test_1") 11int BPF_PROG(test_1) { return 0; } 12 13SEC("struct_ops/test_2") 14int BPF_PROG(test_2) { return 0; } 15 16SEC(".struct_ops.link") 17struct bpf_testmod_ops testmod_1 = { 18 .test_1 = (void *)test_1, 19 .test_2 = (void *)test_2 20}; 21 22SEC(".struct_ops.link") 23struct bpf_testmod_ops2 testmod_2 = { 24 .test_1 = (void *)test_1 25};
~/
Read-only file preview.