File Index
Files and directories
Sign in
FILE

unsupported_ops.c

File preview with syntax highlighting.

linux-6.19.14/tools/testing/selftests/bpf/progs/unsupported_ops.c C
 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 "../test_kmods/bpf_testmod.h"
 8
 9char _license[] SEC("license") = "GPL";
10
11SEC("struct_ops/unsupported_ops")
12__failure
13__msg("attach to unsupported member unsupported_ops of struct bpf_testmod_ops")
14int BPF_PROG(unsupported_ops)
15{
16	return 0;
17}
18
19SEC(".struct_ops.link")
20struct bpf_testmod_ops testmod = {
21	.unsupported_ops = (void *)unsupported_ops,
22};
~/ Read-only file preview.