mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 17:32:32 +00:00
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 <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Dmitrii Dolgov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
15 lines
334 B
C
15 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;
|
|
}
|