1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (c) 2024 Meta Platforms, Inc. and affiliates. */ 3#include <vmlinux.h> 4#include <bpf/bpf_tracing.h> 5#include "../bpf_testmod/bpf_testmod.h" 6 7char _license[] SEC("license") = "GPL"; 8 9int rand; 10int arr[1]; 11 12SEC("struct_ops/test_1") 13int BPF_PROG(test_1_turn_off) 14{ 15 return arr[rand]; /* potentially way out of range access */ 16} 17 18SEC(".struct_ops.link") 19struct bpf_testmod_ops ops = { 20 .test_1 = (void *)test_1_turn_off, 21}; 22 23