From 74ca6500202fa31d9cdadf277dbc211b7ddd9d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 29 Jul 2025 23:06:33 -0700 Subject: [PATCH] bpf_helper: fix map assert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BPFLOADER_T_VERSION is not defined (and thus 0) This was missed when BPFLOADER_*_VERSION was removed as no longer needed (for non mainline versions) due to not actually causing a compile error. Restore it. Android S kernels might not support writing into non-zero index of bpf map arrays (due to kernel bug). Test: TreeHugger Flag: EXEMPT mainline/noop Signed-off-by: Maciej Żenczykowski Change-Id: I834d4a9f897ea1fa16435d8df709df8eeb69e7e8 --- bpf/progs/include/bpf_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpf/progs/include/bpf_helpers.h b/bpf/progs/include/bpf_helpers.h index 3ed20b4ffb..0546810d47 100644 --- a/bpf/progs/include/bpf_helpers.h +++ b/bpf/progs/include/bpf_helpers.h @@ -329,7 +329,7 @@ static int (*bpf_sk_storage_delete_unsafe) (const void* sk_storage, #ifdef THIS_BPF_PROGRAM_IS_FOR_TEST_PURPOSES_ONLY #define BPF_MAP_ASSERT_OK(type, entries, mode) -#elif BPFLOADER_MIN_VER >= BPFLOADER_T_VERSION +#elif BPFLOADER_MIN_VER >= BPFLOADER_MAINLINE_T_VERSION #define BPF_MAP_ASSERT_OK(type, entries, mode) #else #define BPF_MAP_ASSERT_OK(type, entries, mode) \