new file mode 100644
@@ -0,0 +1,135 @@
+From fa20cc5e8c736ec606efaa18427f0fd49cc45d12 Mon Sep 17 00:00:00 2001
+From: Zkingom <15024777017@163.com>
+Date: Thu, 22 Oct 2026 19:20:15 +0800
+Subject: [PATCH] Handle both "bpf-link" and "bpf_link" anon_inode names for
+ BPF links
+
+The kernel uses two different anon_inode name strings for BPF link file
+descriptors due to an inconsistency introduced across two commits:
+
+- commit 70ed506c3bbc ("bpf: Introduce pinnable bpf_link abstraction")
+ introduced bpf_link_new_fd() with anon_inode_getfd("bpf-link", ...),
+ matching the naming convention used by other BPF objects ("bpf-map",
+ "bpf-prog", "bpf-stats").
+- commit babf3164095b ("bpf: Add bpf_link_new_file that doesn't install
+ FD") added bpf_link_new_file(), later renamed to bpf_link_prime(),
+ with anon_inode_getfile("bpf_link", ...), using an underscore instead
+ of a hyphen.
+
+As a result, BPF link file descriptors appear as anon_inode:bpf-link
+when obtained via BPF_LINK_GET_FD_BY_ID or BPF_OBJ_GET from bpffs, and
+as anon_inode:bpf_link when returned by BPF_LINK_CREATE.
+
+Recognize both names to correctly identify BPF link descriptors
+regardless of how they were obtained.
+
+* src/bpf.c (print_bpf_obj_info): Recognize anon_inode:bpf_link.
+* tests/bpf-obj_get_info_by_fd-link.c (main): Obtain the link fd
+path dynamically and skip when procfs is unavailable.
+* tests/gen_tests.in (bpf-obj_get_info_by_fd-link): Filter out
+setup calls preceding the information query.
+* NEWS: Mention the fix.
+
+Signed-off-by: Xu Zhou <15024777017@163.com>
+Signed-off-by: Zkingom <15024777017@163.com>
+Assisted-by: Codex:GPT-6.1-Sol
+
+Upstream-Status: Submitted [https://github.com/strace/strace/pull/429]
+
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ NEWS | 8 ++++++++
+ src/bpf.c | 3 ++-
+ tests/bpf-obj_get_info_by_fd-link.c | 11 ++++++++---
+ tests/gen_tests.in | 2 +-
+ 4 files changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index eb5465a66c..da93026b4f 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,11 @@
++Noteworthy changes in release ?.? (????-??-??)
++==============================================
++
++* Bug fixes
++
++ * Fixed decoding of BPF_OBJ_GET_INFO_BY_FD for BPF links created by
++ BPF_LINK_CREATE.
++
+ Noteworthy changes in release 7.3 (2026-10-22)
+ ==============================================
+
+diff --git a/src/bpf.c b/src/bpf.c
+index 3b09f45955..1498d5c0f2 100644
+--- a/src/bpf.c
++++ b/src/bpf.c
+@@ -1662,7 +1662,8 @@ print_bpf_obj_info(struct tcb * const tcp, uint32_t bpf_fd, uint64_t info,
+ } obj_printers[] = {
+ { "anon_inode:bpf-map", print_bpf_map_info },
+ { "anon_inode:bpf-prog", print_bpf_prog_info },
+- { "anon_inode:bpf-link", print_bpf_link_info }
++ { "anon_inode:bpf-link", print_bpf_link_info },
++ { "anon_inode:bpf_link", print_bpf_link_info }
+ };
+
+ if (entering(tcp)) {
+diff --git a/tests/bpf-obj_get_info_by_fd-link.c b/tests/bpf-obj_get_info_by_fd-link.c
+index 9536f0222f..c5f60ffc95 100644
+--- a/tests/bpf-obj_get_info_by_fd-link.c
++++ b/tests/bpf-obj_get_info_by_fd-link.c
+@@ -14,6 +14,7 @@
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <stdint.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+
+@@ -43,6 +44,8 @@ sys_bpf(kernel_ulong_t cmd, void *attr, kernel_ulong_t size)
+ int
+ main(void)
+ {
++ skip_if_unavailable("/proc/self/fd/");
++
+ static const struct bpf_insn cgroup_prog[] = {
+ { /* r0 = 1 (allow) */
+ .code = BPF_ALU64 | BPF_K | BPF_MOV,
+@@ -97,10 +100,11 @@ main(void)
+ if (ret < 0)
+ perror_msg_and_skip("BPF_OBJ_GET_INFO_BY_FD");
+
++ char *link_fd_path = get_fd_path(link_fd);
+ printf("bpf(BPF_OBJ_GET_INFO_BY_FD"
+- ", {info={bpf_fd=%d<anon_inode:bpf-link>"
++ ", {info={bpf_fd=%d<%s>"
+ ", info_len=%zu",
+- link_fd, LINK_INFO_SZ);
++ link_fd, link_fd_path, LINK_INFO_SZ);
+ if (get_info_attr.info_len != LINK_INFO_SZ)
+ printf(" => %u", get_info_attr.info_len);
+ printf(", info={type=");
+@@ -110,8 +114,9 @@ main(void)
+ printf(", cgroup={cgroup_id=%" PRIu64, link_info->cgroup.cgroup_id);
+ printf(", attach_type=");
+ printxval(bpf_attach_type, link_info->cgroup.attach_type, "BPF_???");
+- printf("}}}, %zu) = %s\n", sizeof(get_info_attr), errstr);
++ printf("}}}}, %zu) = %s\n", sizeof(get_info_attr), errstr);
+
++ free(link_fd_path);
+ puts("+++ exited with 0 +++");
+ return 0;
+ }
+diff --git a/tests/gen_tests.in b/tests/gen_tests.in
+index 71393c72a6..6bf0e91db9 100644
+--- a/tests/gen_tests.in
++++ b/tests/gen_tests.in
+@@ -31,7 +31,7 @@ arch_prctl-success-Xverbose +prctl-success.sh ARCH_PRCTL_INJECT_RETVALS="0 1 2 3
+ at_fdcwd-pathmax -a36 --trace=openat -y -P sample
+ bpf -a20
+ bpf-obj_get_info_by_fd -a20 -y -e trace=bpf
+-bpf-obj_get_info_by_fd-link -a20 -y -v -e trace=bpf
++bpf-obj_get_info_by_fd-link -a20 -y -v -e trace=bpf "QUIRK:START-OF-TEST-OUTPUT:bpf(BPF_OBJ_GET_INFO_BY_FD"
+ bpf-obj_get_info_by_fd-prog -a20 -y -e trace=bpf
+ bpf-obj_get_info_by_fd-prog-v -a20 -y -v -e trace=bpf
+ bpf-obj_get_info_by_fd-v -a20 -y -v -e trace=bpf
deleted file mode 100644
@@ -1,62 +0,0 @@
-From 3c692ce22a70e9fa4cc21afa56d03a9adcd5d2a2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 18 Aug 2025 22:18:58 -0700
-Subject: [PATCH] Ignore pwritev/pwrite64 tests on musl
-
-musl uses wrappers for pwritev and pwrite64 using
-pwritev2 syscall [1], however the test exepcts that the
-program will call pwritev and pwrite64 ( glibc behavior )
-
-This can be fixed if the function calls are changed to
-use syscall() API directly, but that needs change upstream [2]
-
-Issue is reported upstream [3]
-
-[1] https://git.musl-libc.org/cgit/musl/commit/src?id=5370070fded61b569196764673a4fc8440aac79e
-[2] https://github.com/strace/strace/pull/347
-[3] https://github.com/strace/strace/issues/349
-
-Upstream-Status: Inappropriate [Musl Specific]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- tests/pread64-pwrite64.gen.test | 3 +++
- tests/preadv-pwritev.gen.test | 3 +++
- tests/pwritev.gen.test | 3 +++
- 3 files changed, 9 insertions(+)
-
-diff --git a/tests/pread64-pwrite64.gen.test b/tests/pread64-pwrite64.gen.test
-index b53e069..0a1e6e6 100755
---- a/tests/pread64-pwrite64.gen.test
-+++ b/tests/pread64-pwrite64.gen.test
-@@ -1,4 +1,7 @@
- #!/bin/sh -efu
- # Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (pread64-pwrite64 -a21 -eread=0 -ewrite=1 -e trace=pread64,pwrite64 -P pread64-pwrite64-tmpfile -P /dev/zero -P /dev/null); do not edit.
- . "${srcdir=.}/init.sh"
-+
-+skip_ "Test not ported to musl, musl generates pwritev2"
-+
- run_strace_match_diff -a21 -eread=0 -ewrite=1 -e trace=pread64,pwrite64 -P pread64-pwrite64-tmpfile -P /dev/zero -P /dev/null
-diff --git a/tests/preadv-pwritev.gen.test b/tests/preadv-pwritev.gen.test
-index 5ed8297..b83f129 100755
---- a/tests/preadv-pwritev.gen.test
-+++ b/tests/preadv-pwritev.gen.test
-@@ -1,4 +1,7 @@
- #!/bin/sh -efu
- # Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (preadv-pwritev -a19 -eread=0 -ewrite=1 -e trace=preadv,pwritev); do not edit.
- . "${srcdir=.}/init.sh"
-+
-+skip_ "Test not ported to musl, musl generates pwritev2"
-+
- run_strace_match_diff -a19 -eread=0 -ewrite=1 -e trace=preadv,pwritev
-diff --git a/tests/pwritev.gen.test b/tests/pwritev.gen.test
-index e54fd15..4999816 100755
---- a/tests/pwritev.gen.test
-+++ b/tests/pwritev.gen.test
-@@ -1,4 +1,7 @@
- #!/bin/sh -efu
- # Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (pwritev -a22 -s7); do not edit.
- . "${srcdir=.}/init.sh"
-+
-+skip_ "Test not ported to musl, musl generates pwritev2"
-+
- run_strace_match_diff -a22 -s7
@@ -1,4 +1,4 @@
-From 334b66af1329bc6970c9ff9ee668af6cc2133b8f Mon Sep 17 00:00:00 2001
+From dff502ff4ae95a310ea10eeda0aaf5626de3890b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 15 Dec 2022 15:54:27 -0800
Subject: [PATCH] configure: Use autoconf macro to detect largefile support
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 2 insertions(+)
diff --git a/configure.ac b/configure.ac
-index 956bb85..0812725 100644
+index 9bec14b..57406f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,8 @@ AC_PROG_INSTALL
@@ -1,4 +1,4 @@
-From b402cfcdfb782ab3a8b264b23536a4de5f709746 Mon Sep 17 00:00:00 2001
+From de4d51c010e12a8c843dd3e241e392cd8cbcc6ca Mon Sep 17 00:00:00 2001
From: Khem Raj <khem.raj@oss.qualcomm.com>
Date: Fri, 10 Apr 2026 23:39:47 +0000
Subject: [PATCH] m4: Backport ax_prog_cc_for_build.m4 macros
@@ -1,4 +1,4 @@
-From 5905b406c5325442f2001339937ad22b2d068b15 Mon Sep 17 00:00:00 2001
+From a99f2283ed13b03185b67ddda507aed3aa0f595e Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Wed, 11 Mar 2020 19:56:55 +0000
Subject: [PATCH] strace: fix reproducibilty issues
@@ -13,19 +13,19 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/gen_tests.sh b/tests/gen_tests.sh
-index 3c6228a..43b94ea 100755
+index d71e1c1..c191673 100755
--- a/tests/gen_tests.sh
+++ b/tests/gen_tests.sh
-@@ -46,7 +46,7 @@ while read -r name arg0 args; do {
+@@ -52,7 +52,7 @@ while read -r name arg0 args; do {
hdr="\
#!/bin/sh -efu
-# Generated by $0 from $input ($name $arg0 $args); do not edit."
+# Generated by $(basename $0) from $input ($name $arg0 $args); do not edit."
- case "$arg0" in
- +*)
-@@ -102,7 +102,7 @@ while read -r name arg0 args; do {
+ # A generated test may be sourced while another build regenerates it.
+ # Replace the file atomically so the reader keeps its original contents.
+@@ -112,7 +112,7 @@ while read -r name arg0 args; do {
if [ -n "$names" ]; then
{
@@ -1,4 +1,4 @@
-From bcca8619f749ba78a4ce78d39c603e2606175175 Mon Sep 17 00:00:00 2001
+From 85eb02371ea47e79f912fa03dbe03c849c093b36 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 15 Dec 2022 15:56:13 -0800
Subject: [PATCH] tests: Replace off64_t with off_t
@@ -1,4 +1,4 @@
-From 2749699b77b4fcce7e6e960f246259b05f3dafcc Mon Sep 17 00:00:00 2001
+From f7ad423f864c5f882c7e220f564a21e9421ac73b Mon Sep 17 00:00:00 2001
From: Gabriel Barbu <gabriel.barbu@enea.com>
Date: Thu, 25 Jul 2013 15:28:33 +0200
Subject: [PATCH] strace: Add ptest
@@ -13,7 +13,7 @@ Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
1 file changed, 20 insertions(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 84a9638..23fd218 100644
+index 12b63b2..1ddf782 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,6 +18,7 @@ SIZEOF_LONG = @SIZEOF_LONG@
@@ -24,7 +24,7 @@ index 84a9638..23fd218 100644
AM_CFLAGS = $(WARN_CFLAGS) $(TEST_WARN_CFLAGS)
bundled_CPPFLAGS =
if USE_BUNDLED_HEADERS
-@@ -968,3 +969,22 @@ check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
+@@ -982,3 +983,22 @@ check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
CLEANFILES = ksysent.h
include ../src/scno.am
@@ -1,4 +1,4 @@
-From ae538d4dcb0ea7265d72671b7dd3537ca1356437 Mon Sep 17 00:00:00 2001
+From 0bcea4d97bdbfba5920ceb56215a911c9d529dc6 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 29 May 2019 00:10:32 +0100
Subject: [PATCH] strace: Tweak ptest disk space management
@@ -14,10 +14,10 @@ Upstream-Status: Inappropriate [specific to OE image space issues]
1 file changed, 1 insertion(+)
diff --git a/tests/gen_tests.sh b/tests/gen_tests.sh
-index f22ad08..3c6228a 100755
+index 2a7fada..d71e1c1 100755
--- a/tests/gen_tests.sh
+++ b/tests/gen_tests.sh
-@@ -84,6 +84,7 @@ while read -r name arg0 args; do {
+@@ -93,6 +93,7 @@ while read -r name arg0 args; do {
$hdr
. "\${srcdir=.}/init.sh"
run_strace_match_diff $arg0 $args
@@ -1,4 +1,4 @@
-From 2653515537b66a4b1286be107e9ef406c55040b4 Mon Sep 17 00:00:00 2001
+From 5c9048988e5000fb0f175afde05a23be2ef0fa15 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Sat, 30 Aug 2025 00:47:03 +0200
Subject: [PATCH] strace: skip a number of load-sensitive tests
@@ -1,4 +1,4 @@
-From be1b3d74ca4ffb3c8d3e38fdb96f23d5920f8ef1 Mon Sep 17 00:00:00 2001
+From 3c4da31783f127d18cf1b64ca33ac46a512da2cb Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Mon, 18 Jan 2016 11:01:00 -0800
Subject: [PATCH] update gawk paths, /bin/gawk -> /usr/bin/gawk
similarity index 91%
rename from meta/recipes-devtools/strace/strace_7.2.bb
rename to meta/recipes-devtools/strace/strace_7.3.bb
@@ -14,12 +14,10 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/strace-${PV}.tar.xz \
file://skip-load.patch \
file://0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch \
file://0002-tests-Replace-off64_t-with-off_t.patch \
- file://0001-m4-Backport-ax_prog_cc_for_build.m4-macros.patch \
+ file://0001-m4-Backport-ax_prog_cc_for_build.m4-macros.patch \
+ file://0001-Handle-both-bpf-link-and-bpf_link-anon_inode-names.patch \
"
-SRC_URI:append:libc-musl = "\
- file://0001-Ignore-pwritev-pwrite64-tests-on-musl.patch \
- "
-SRC_URI[sha256sum] = "4bde6246926890dcee824f6e6ac42a06752f47d77e5097d86e3c0d6d4b709fe5"
+SRC_URI[sha256sum] = "529634c40910895a9a1f3c5c1e65da2ca9ed72fb158dfc4bcc89efdf05e39b72"
inherit autotools github-releases ptest
NEWS: https://github.com/strace/strace/blob/v7.3/NEWS - Fix indentation for SRC_URI - Refresh existing patches - Add 0001-Handle-both-bpf-link-and-bpf_link-anon_inode-names.patch for ptest fix PR is still open https://github.com/strace/strace/pull/429 - Drop Ignore-pwritev-pwrite64-tests-on-musl.patch as test are running with musl ============================================================================ Testsuite summary for strace 7.3 ============================================================================ TOTAL: 1525 PASS: 1172 SKIP: 352 XFAIL: 0 FAIL: 1 XPASS: 0 ERROR: 0 ============================================================================ musl ptest results ============================================================================ Testsuite summary for strace 7.3 ============================================================================ TOTAL: 1525 PASS: 1172 SKIP: 353 XFAIL: 0 FAIL: 0 XPASS: 0 ERROR: 0 ============================================================================ Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- - Changes since v1: - Drop musl ptest ignore patch ...f-link-and-bpf_link-anon_inode-names.patch | 135 ++++++++++++++++++ ...gnore-pwritev-pwrite64-tests-on-musl.patch | 62 -------- ...toconf-macro-to-detect-largefile-sup.patch | 4 +- ...kport-ax_prog_cc_for_build.m4-macros.patch | 2 +- ...001-strace-fix-reproducibilty-issues.patch | 12 +- ...002-tests-Replace-off64_t-with-off_t.patch | 2 +- .../strace/strace/Makefile-ptest.patch | 6 +- .../strace/strace/ptest-spacesave.patch | 6 +- .../strace/strace/skip-load.patch | 2 +- .../strace/strace/update-gawk-paths.patch | 2 +- .../strace/{strace_7.2.bb => strace_7.3.bb} | 8 +- 11 files changed, 156 insertions(+), 85 deletions(-) create mode 100644 meta/recipes-devtools/strace/strace/0001-Handle-both-bpf-link-and-bpf_link-anon_inode-names.patch delete mode 100644 meta/recipes-devtools/strace/strace/0001-Ignore-pwritev-pwrite64-tests-on-musl.patch rename meta/recipes-devtools/strace/{strace_7.2.bb => strace_7.3.bb} (91%)