1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */ 3 4 #include <vmlinux.h> 5 #include <bpf/bpf_tracing.h> 6 #include "bpf_misc.h" 7 #include "../bpf_testmod/bpf_testmod.h" 8 9 char _license[] SEC("license") = "GPL"; 10 11 SEC("struct_ops/unsupported_ops") 12 __failure 13 __msg("attach to unsupported member unsupported_ops of struct bpf_testmod_ops") 14 int BPF_PROG(unsupported_ops) 15 { 16 return 0; 17 } 18 19 SEC(".struct_ops.link") 20 struct bpf_testmod_ops testmod = { 21 .unsupported_ops = (void *)unsupported_ops, 22 }; 23