diff options
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch new file mode 100644 index 0000000000..d6b52438c4 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From b901fb0088a7605eec00af7b644e25987995d693 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Harish Sadineni <Harish.Sadineni@windriver.com> | ||
| 3 | Date: Sat, 7 Mar 2026 07:18:43 -0800 | ||
| 4 | Subject: [PATCH] Add ARM64 syscall prefix detection in C++ API | ||
| 5 | |||
| 6 | Fixes issue where bpf.get_syscall_fnname() on ARM64 returns bare | ||
| 7 | syscall name instead of the prefixed __arm64_sys_ variant, causing | ||
| 8 | kprobe attachment failures. Now detects ARM64 prefix alongside x64 | ||
| 9 | (__x64_sys_) and generic (sys_) prefixes. | ||
| 10 | |||
| 11 | Fixes: #5350 | ||
| 12 | |||
| 13 | Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5489] | ||
| 14 | |||
| 15 | Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> | ||
| 16 | --- | ||
| 17 | src/cc/api/BPF.cc | 2 ++ | ||
| 18 | 1 file changed, 2 insertions(+) | ||
| 19 | |||
| 20 | diff --git a/src/cc/api/BPF.cc b/src/cc/api/BPF.cc | ||
| 21 | index 2a77c2c9..11c6c542 100644 | ||
| 22 | --- a/src/cc/api/BPF.cc | ||
| 23 | +++ b/src/cc/api/BPF.cc | ||
| 24 | @@ -780,6 +780,8 @@ std::string BPF::get_syscall_fnname(const std::string& name) { | ||
| 25 | syscall_prefix_.reset(new std::string("sys_")); | ||
| 26 | else if (ksym.resolve_name(nullptr, "__x64_sys_bpf", &addr)) | ||
| 27 | syscall_prefix_.reset(new std::string("__x64_sys_")); | ||
| 28 | + else if (ksym.resolve_name(nullptr, "__arm64_sys_bpf", &addr)) | ||
| 29 | + syscall_prefix_.reset(new std::string("__arm64_sys_")); | ||
| 30 | else | ||
| 31 | syscall_prefix_.reset(new std::string()); | ||
| 32 | } | ||
| 33 | -- | ||
| 34 | 2.49.0 | ||
| 35 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb index 8c6e44edbc..25528e1b10 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.35.0.bb | |||
| @@ -22,6 +22,7 @@ SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https;tag=v${PV | |||
| 22 | file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ | 22 | file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ |
| 23 | file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \ | 23 | file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \ |
| 24 | file://0001-Fix-a-build-failure-with-clang21-5369.patch \ | 24 | file://0001-Fix-a-build-failure-with-clang21-5369.patch \ |
| 25 | file://0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch \ | ||
| 25 | file://run-ptest \ | 26 | file://run-ptest \ |
| 26 | file://ptest_wrapper.sh \ | 27 | file://ptest_wrapper.sh \ |
| 27 | file://fix_for_memleak.patch \ | 28 | file://fix_for_memleak.patch \ |
