brintos

brintos / linux-shallow public Read only

0
0
Text · 612 B · 624078a Raw
21 lines · c
1// SPDX-License-Identifier: GPL-2.02// Copyright (c) 2020 Facebook3 4#include "vmlinux.h"5#include <bpf/bpf_helpers.h>6#include <bpf/bpf_tracing.h>7 8SEC("freplace/btf_unreliable_kprobe")9/* context type is what BPF verifier expects for kprobe context, but target10 * program has `stuct whatever *ctx` argument, so freplace operation will be11 * rejected with the following message:12 *13 * arg0 replace_btf_unreliable_kprobe(struct pt_regs *) doesn't match btf_unreliable_kprobe(struct whatever *)14 */15int replace_btf_unreliable_kprobe(bpf_user_pt_regs_t *ctx)16{17	return 0;18}19 20char _license[] SEC("license") = "GPL";21