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

============================================================================
Testsuite summary for strace 7.3
============================================================================
 TOTAL: 1525
 PASS:  1172
 SKIP:  352
 XFAIL: 0
 FAIL:  1
 XPASS: 0
 ERROR: 0
============================================================================

Signed-off-by: Jaipaul Cheernam <[email protected]>
---
 ...f-link-and-bpf_link-anon_inode-names.patch | 135 ++++++++++++++++++
 ...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}   |   5 +-
 10 files changed, 156 insertions(+), 20 deletions(-)
 create mode 100644 
meta/recipes-devtools/strace/strace/0001-Handle-both-bpf-link-and-bpf_link-anon_inode-names.patch
 rename meta/recipes-devtools/strace/{strace_7.2.bb => strace_7.3.bb} (92%)

diff --git 
a/meta/recipes-devtools/strace/strace/0001-Handle-both-bpf-link-and-bpf_link-anon_inode-names.patch
 
b/meta/recipes-devtools/strace/strace/0001-Handle-both-bpf-link-and-bpf_link-anon_inode-names.patch
new file mode 100644
index 00000000000..4e5235b9683
--- /dev/null
+++ 
b/meta/recipes-devtools/strace/strace/0001-Handle-both-bpf-link-and-bpf_link-anon_inode-names.patch
@@ -0,0 +1,135 @@
+From fa20cc5e8c736ec606efaa18427f0fd49cc45d12 Mon Sep 17 00:00:00 2001
+From: Zkingom <[email protected]>
+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 <[email protected]>
+Signed-off-by: Zkingom <[email protected]>
+Assisted-by: Codex:GPT-6.1-Sol
+
+Upstream-Status: Submitted [https://github.com/strace/strace/pull/429]
+
+Signed-off-by: Jaipaul Cheernam <[email protected]>
+---
+ 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
diff --git 
a/meta/recipes-devtools/strace/strace/0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch
 
b/meta/recipes-devtools/strace/strace/0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch
index 25f32d17348..ebcd316e9fb 100644
--- 
a/meta/recipes-devtools/strace/strace/0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch
+++ 
b/meta/recipes-devtools/strace/strace/0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch
@@ -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 <[email protected]>
 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 <[email protected]>
  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
diff --git 
a/meta/recipes-devtools/strace/strace/0001-m4-Backport-ax_prog_cc_for_build.m4-macros.patch
 
b/meta/recipes-devtools/strace/strace/0001-m4-Backport-ax_prog_cc_for_build.m4-macros.patch
index 60e51411973..478bb7b9d9b 100644
--- 
a/meta/recipes-devtools/strace/strace/0001-m4-Backport-ax_prog_cc_for_build.m4-macros.patch
+++ 
b/meta/recipes-devtools/strace/strace/0001-m4-Backport-ax_prog_cc_for_build.m4-macros.patch
@@ -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 <[email protected]>
 Date: Fri, 10 Apr 2026 23:39:47 +0000
 Subject: [PATCH] m4: Backport ax_prog_cc_for_build.m4 macros
diff --git 
a/meta/recipes-devtools/strace/strace/0001-strace-fix-reproducibilty-issues.patch
 
b/meta/recipes-devtools/strace/strace/0001-strace-fix-reproducibilty-issues.patch
index 4907b16a1c7..8a8b18d698e 100644
--- 
a/meta/recipes-devtools/strace/strace/0001-strace-fix-reproducibilty-issues.patch
+++ 
b/meta/recipes-devtools/strace/strace/0001-strace-fix-reproducibilty-issues.patch
@@ -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 <[email protected]>
 Date: Wed, 11 Mar 2020 19:56:55 +0000
 Subject: [PATCH] strace: fix reproducibilty issues
@@ -13,19 +13,19 @@ Signed-off-by: Jeremy Puhlman <[email protected]>
  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
        {
diff --git 
a/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch
 
b/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch
index e7842688550..88a81519bf9 100644
--- 
a/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch
+++ 
b/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch
@@ -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 <[email protected]>
 Date: Thu, 15 Dec 2022 15:56:13 -0800
 Subject: [PATCH] tests: Replace off64_t with off_t
diff --git a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch 
b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index 1e3c8ee2aa8..0352a82234b 100644
--- a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -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 <[email protected]>
 Date: Thu, 25 Jul 2013 15:28:33 +0200
 Subject: [PATCH] strace: Add ptest
@@ -13,7 +13,7 @@ Signed-off-by: Anuj Mittal <[email protected]>
  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
diff --git a/meta/recipes-devtools/strace/strace/ptest-spacesave.patch 
b/meta/recipes-devtools/strace/strace/ptest-spacesave.patch
index 00f404c0036..3f6289d3a1a 100644
--- a/meta/recipes-devtools/strace/strace/ptest-spacesave.patch
+++ b/meta/recipes-devtools/strace/strace/ptest-spacesave.patch
@@ -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 <[email protected]>
 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
diff --git a/meta/recipes-devtools/strace/strace/skip-load.patch 
b/meta/recipes-devtools/strace/strace/skip-load.patch
index 610dd94fe9d..cab890f1482 100644
--- a/meta/recipes-devtools/strace/strace/skip-load.patch
+++ b/meta/recipes-devtools/strace/strace/skip-load.patch
@@ -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 <[email protected]>
 Date: Sat, 30 Aug 2025 00:47:03 +0200
 Subject: [PATCH] strace: skip a number of load-sensitive tests
diff --git a/meta/recipes-devtools/strace/strace/update-gawk-paths.patch 
b/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
index 8895b0ff9e2..764f0af1163 100644
--- a/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
+++ b/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
@@ -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 <[email protected]>
 Date: Mon, 18 Jan 2016 11:01:00 -0800
 Subject: [PATCH] update gawk paths, /bin/gawk -> /usr/bin/gawk
diff --git a/meta/recipes-devtools/strace/strace_7.2.bb 
b/meta/recipes-devtools/strace/strace_7.3.bb
similarity index 92%
rename from meta/recipes-devtools/strace/strace_7.2.bb
rename to meta/recipes-devtools/strace/strace_7.3.bb
index 3f7aaab3e6c..61c8b744b5e 100644
--- a/meta/recipes-devtools/strace/strace_7.2.bb
+++ b/meta/recipes-devtools/strace/strace_7.3.bb
@@ -14,12 +14,13 @@ 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
 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#248546): 
https://lists.openembedded.org/g/openembedded-core/message/248546
Mute This Topic: https://lists.openembedded.org/mt/121898413/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to