Verify the fact that only one fentry prog could be attached to another fentry, building up an attachment chain of limited size. Use existing bpf_testmod as a start of the chain. Acked-by: Jiri Olsa <olsajiri@gmail.com> Acked-by: Song Liu <song@kernel.org> Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com> Link: https://lore.kernel.org/r/20240103190559.14750-3-9erthalion6@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
14 lines
334 B
C
14 lines
334 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/* Copyright (c) 2023 Red Hat, Inc. */
|
|
#include <linux/bpf.h>
|
|
#include <bpf/bpf_helpers.h>
|
|
#include <bpf/bpf_tracing.h>
|
|
|
|
char _license[] SEC("license") = "GPL";
|
|
|
|
/* Dummy fentry bpf prog for testing fentry attachment chains */
|
|
SEC("fentry/XXX")
|
|
int BPF_PROG(recursive_attach, int a)
|
|
{
|
|
return 0;
|
|
}
|