From c201cadb3cd0fdfb5b8e303e91b94a1152894a10 Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Mon, 11 Mar 2024 09:34:47 -0700 Subject: [PATCH] Update ubpf and address breaking change Signed-off-by: Alan Jowett --- external/ubpf | 2 +- libs/execution_context/ebpf_program.c | 2 +- libs/service/api_service.cpp | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/external/ubpf b/external/ubpf index 2c163d6645..a6082a2124 160000 --- a/external/ubpf +++ b/external/ubpf @@ -1 +1 @@ -Subproject commit 2c163d66458c513de5ec54d7fcaed26bf86fcd21 +Subproject commit a6082a2124e25045161a4ea9aa1a5a7dbd995379 diff --git a/libs/execution_context/ebpf_program.c b/libs/execution_context/ebpf_program.c index f82f017bf7..35f51b87bc 100644 --- a/libs/execution_context/ebpf_program.c +++ b/libs/execution_context/ebpf_program.c @@ -1052,7 +1052,7 @@ _ebpf_program_update_interpret_helpers( } #if !defined(CONFIG_BPF_INTERPRETER_DISABLED) - if (ubpf_register(program->code_or_vm.vm, (unsigned int)index, NULL, (void*)helper) < 0) { + if (ubpf_register(program->code_or_vm.vm, (unsigned int)index, NULL, (external_function_t)helper) < 0) { EBPF_LOG_MESSAGE_UINT64( EBPF_TRACELOG_LEVEL_ERROR, EBPF_TRACELOG_KEYWORD_PROGRAM, "ubpf_register failed", index); result = EBPF_INVALID_ARGUMENT; diff --git a/libs/service/api_service.cpp b/libs/service/api_service.cpp index 93ea8afb73..d8a9372f79 100644 --- a/libs/service/api_service.cpp +++ b/libs/service/api_service.cpp @@ -348,7 +348,9 @@ ebpf_verify_and_load_program( } for (uint32_t helper_id = 0; (size_t)helper_id < helper_id_address.size(); helper_id++) { - if (ubpf_register(vm, helper_id, nullptr, reinterpret_cast(helper_id_address[helper_id])) < 0) { + if (ubpf_register( + vm, helper_id, nullptr, reinterpret_cast(helper_id_address[helper_id])) < + 0) { result = EBPF_JIT_COMPILATION_FAILED; goto Exit; }