mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
bcc: Add ARM64 syscall prefix detection in C++ API
Fixes issue where bpf.get_syscall_fnname() on ARM64 returns bare syscall name instead of the prefixed _arm64_sys variant, causing kprobe attachment failures. Now detects ARM64 prefix alongside x64 (x64_sys) and generic (sys) prefixes. Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5489] Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
db05f827bb
commit
eed01e5cc0
@ -0,0 +1,35 @@
|
||||
From b901fb0088a7605eec00af7b644e25987995d693 Mon Sep 17 00:00:00 2001
|
||||
From: Harish Sadineni <Harish.Sadineni@windriver.com>
|
||||
Date: Sat, 7 Mar 2026 07:18:43 -0800
|
||||
Subject: [PATCH] Add ARM64 syscall prefix detection in C++ API
|
||||
|
||||
Fixes issue where bpf.get_syscall_fnname() on ARM64 returns bare
|
||||
syscall name instead of the prefixed __arm64_sys_ variant, causing
|
||||
kprobe attachment failures. Now detects ARM64 prefix alongside x64
|
||||
(__x64_sys_) and generic (sys_) prefixes.
|
||||
|
||||
Fixes: #5350
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5489]
|
||||
|
||||
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
|
||||
---
|
||||
src/cc/api/BPF.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/cc/api/BPF.cc b/src/cc/api/BPF.cc
|
||||
index 2a77c2c9..11c6c542 100644
|
||||
--- a/src/cc/api/BPF.cc
|
||||
+++ b/src/cc/api/BPF.cc
|
||||
@@ -780,6 +780,8 @@ std::string BPF::get_syscall_fnname(const std::string& name) {
|
||||
syscall_prefix_.reset(new std::string("sys_"));
|
||||
else if (ksym.resolve_name(nullptr, "__x64_sys_bpf", &addr))
|
||||
syscall_prefix_.reset(new std::string("__x64_sys_"));
|
||||
+ else if (ksym.resolve_name(nullptr, "__arm64_sys_bpf", &addr))
|
||||
+ syscall_prefix_.reset(new std::string("__arm64_sys_"));
|
||||
else
|
||||
syscall_prefix_.reset(new std::string());
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -22,6 +22,7 @@ SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https;tag=v${PV
|
||||
file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \
|
||||
file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \
|
||||
file://0001-Fix-a-build-failure-with-clang21-5369.patch \
|
||||
file://0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch \
|
||||
file://run-ptest \
|
||||
file://ptest_wrapper.sh \
|
||||
file://fix_for_memleak.patch \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user