From ed2f9cb2835faa7020c9e5bdcfc16aba2f3ca538 Mon Sep 17 00:00:00 2001 From: Alexei Starovoitov Date: Wed, 24 Aug 2022 11:22:39 +0800 Subject: [PATCH] libbpf: Support for syscall program type mainline inclusion from mainline-5.14-rc1 commit 5452fc9a17fc26816a683ab04cf1c29131ca27e4 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5452fc9a17fc26816a683ab04cf1c29131ca27e4 ------------------------------------------------- Trivial support for syscall program type. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-5-alexei.starovoitov@gmail.com (cherry picked from commit 5452fc9a17fc26816a683ab04cf1c29131ca27e4) Signed-off-by: Wang Yufen Conflicts: tools/lib/bpf/libbpf.c Signed-off-by: Wang Yufen --- tools/lib/bpf/libbpf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 6b57e429ba7d..6cc9c77ef131 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -8972,6 +8972,8 @@ static const struct bpf_sec_def section_defs[] = { .is_attach_btf = true, .expected_attach_type = BPF_SCHED, .attach_fn = attach_sched), + SEC_DEF("syscall", SYSCALL, + .is_sleepable = true), BPF_EAPROG_SEC("xdp_devmap/", BPF_PROG_TYPE_XDP, BPF_XDP_DEVMAP), BPF_EAPROG_SEC("xdp_cpumap/", BPF_PROG_TYPE_XDP, -- GitLab