From 256af2c8569cbad0d5d1783d468638df29f19395 Mon Sep 17 00:00:00 2001 From: Motomu Utsumi Date: Thu, 22 May 2025 16:21:07 +0900 Subject: [PATCH] Allow rust bpfloader to load bpfRingbufProg.bpf Test: TH Bug: 410982483 Change-Id: Ic1301be9a49935f4845d09d70d6b80d215dce5fa --- loader/bpfloader.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/loader/bpfloader.rs b/loader/bpfloader.rs index 40c155a..ebf2e89 100644 --- a/loader/bpfloader.rs +++ b/loader/bpfloader.rs @@ -334,6 +334,15 @@ const FILE_ARR: &[BpfFileDesc] = &[ ProgDesc::new_kver(GID_ROOT, KVER_6_1, "skfilter_calculate_totalreserve_pages"), ], }, + BpfFileDesc { + filename: "bpfRingbufProg.bpf", + dir: "/etc/bpf/", + prefix: "", + critical: true, + skip_on_user: true, + maps: &[MapDesc::new_kver(GID_ROOT, PERM_GRW, KVER_5_10, "test_ringbuf")], + progs: &[ProgDesc::new_kver(GID_ROOT, KVER_5_10, "skfilter_ringbuf_test")], + }, ]; // TODO: Remove this code when fuse-bpf is upstreamed