8000 Libbpf sync 2025-06-13T21:51:44.090Z by ameryhung · Pull Request #905 · libbpf/libbpf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Libbpf sync 2025-06-13T21:51:44.090Z #905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ameryhung
Copy link
Contributor
@ameryhung ameryhung commented Jun 13, 2025
Dumping existing libbpf commit signatures...
WORKDIR:          /data/users/ameryhung/libbpf-gh/libbpf
LINUX REPO:       /data/users/ameryhung/linux
LIBBPF REPO:      /data/users/ameryhung/libbpf-gh/libbpf
TEMP DIR:         /tmp/tmp.2nVobFyy9C
SUFFIX:           2025-06-13T21-51-44.090Z
BASE COMMIT:      '9325d53fe9ad ("Merge branch 's390-bpf-remove-the-orig_call-null-check'")'
TIP COMMIT:       '4a4b84ba9e45 ("selftests/bpf: verify jset handling in CFG computation")'
BPF BASE COMMIT:  'b4432656b36e ("Linux 6.15-rc4")'
BPF TIP COMMIT:   'd60d09eadb7c ("bpf: Mark dentry->d_inode as trusted_or_null")'
SQUASH COMMIT:    3fd5d8fa88d7e7e90be4aa7464b6dee21a23155e
BASELINE TAG:     libbpf-baseline-2025-06-13T21-51-44.090Z
TIP TAG:          libbpf-tip-2025-06-13T21-51-44.090Z
BPF BASELINE TAG: libbpf-bpf-baseline-2025-06-13T21-51-44.090Z
BPF TIP TAG:      libbpf-bpf-tip-2025-06-13T21-51-44.090Z
SQUASH BASE TAG:  libbpf-squash-base-2025-06-13T21-51-44.090Z
SQUASH TIP TAG:   libbpf-squash-tip-2025-06-13T21-51-44.090Z
VIEW TAG:         libbpf-view-2025-06-13T21-51-44.090Z
LIBBPF SYNC TAG:  libbpf-sync-2025-06-13T21-51-44.090Z
PATCHES:          /tmp/tmp.2nVobFyy9C/patches
Picking 'f5c79ffdc250 ("bpf: Clarify handling of mark and tstamp by redirect_peer")'...
Picking 'f4b18ff2c147 ("perf/uapi: Fix PERF_RECORD_SAMPLE comments in <uapi/linux/perf_event.h>")'...
Picking '44889ff67cee ("perf/uapi: Clean up <uapi/linux/perf_event.h> a bit")'...
Picking '4b15121da7e5 ("libbpf: Support creating and destroying qdisc")'...
Picking '8802087d20c0 ("net: devmem: TCP tx netlink api")'...
Picking 'acea6b132d81 ("selftests/bpf: Fix bpf selftest build warning")'...
Picking '4e29128a9ace ("libbpf/btf: Fix string handling to support multi-split BTF")'...
Picking '3c0421c93ce4 ("libbpf: Use mmap to parse vmlinux BTF from sysfs")'...
Picking '2fe1c5934736 ("bpf: Add cookie to raw_tp bpf_link_info")'...
Picking '919319b4edfa ("libbpf: Correct some typos and syntax issues in usdt doc")'...
Picking '87c9c79a02b4 ("libbpf: Add support for printing BTF character arrays as strings")'...
Picking '120933984460 ("bpf: Implement mprog API on top of existing cgroup progs")'...
Picking '1d6711667cb3 ("libbpf: Support link-based cgroup attach with options")'...
Picking 'c7beb48344d2 ("bpf: Add cookie to tracing bpf_link_info")'...
Picking '2d72dd14d77f ("bpf: adjust path to trace_output sample eBPF program")'...
Commit 'f5c79ffdc250 ("bpf: Clarify handling of mark and tstamp by redirect_peer")' is synced into libbpf as:
- LINUX_4d4c448151aa ("bpf: Clarify handling of mark and tstamp by redirect_peer")
Skipping 'f5c79ffdc250 ("bpf: Clarify handling of mark and tstamp by redirect_peer")' due to unique match...
Commit 'f4b18ff2c147 ("perf/uapi: Fix PERF_RECORD_SAMPLE comments in <uapi/linux/perf_event.h>")' is synced into libbpf as:
- LINUX_89d840c24a01 ("perf/uapi: Fix PERF_RECORD_SAMPLE comments in <uapi/linux/perf_event.h>")
Skipping 'f4b18ff2c147 ("perf/uapi: Fix PERF_RECORD_SAMPLE comments in <uapi/linux/perf_event.h>")' due to unique match...
Commit '44889ff67cee ("perf/uapi: Clean up <uapi/linux/perf_event.h> a bit")' is synced into libbpf as:
- LINUX_5b974d23bfdf ("perf/uapi: Clean up <uapi/linux/perf_event.h> a bit")
Skipping '44889ff67cee ("perf/uapi: Clean up <uapi/linux/perf_event.h> a bit")' due to unique match...
Commit '4b15121da7e5 ("libbpf: Support creating and destroying qdisc")' is synced into libbpf as:
- LINUX_702b6ca5de62 ("libbpf: Support creating and destroying qdisc")
Skipping '4b15121da7e5 ("libbpf: Support creating and destroying qdisc")' due to unique match...
Commit '8802087d20c0 ("net: devmem: TCP tx netlink api")' is synced into libbpf as:
- LINUX_68e9ec161cb6 ("net: devmem: TCP tx netlink api")
Skipping '8802087d20c0 ("net: devmem: TCP tx netlink api")' due to unique match...
Commit 'acea6b132d81 ("selftests/bpf: Fix bpf selftest build warning")' is synced into libbpf as:
- LINUX_135af419d538 ("selftests/bpf: Fix bpf selftest build warning")
Skipping 'acea6b132d81 ("selftests/bpf: Fix bpf selftest build warning")' due to unique match...
Commit '75011ad69bc5 ("libbpf: Fix implicit memfd_create() for bionic")' is synced into libbpf as:
- 732d6c0 ("libbpf: Fix implicit memfd_create() for bionic")
Skipping '75011ad69bc5 ("libbpf: Fix implicit memfd_create() for bionic")' due to unique match...
Commit '62aa5790cec8 ("bpf: Fix a comment describing bpf_attr")' is synced into libbpf as:
- 4687560 ("bpf: Fix a comment describing bpf_attr")
Skipping '62aa5790cec8 ("bpf: Fix a comment describing bpf_attr")' due to unique match...
Commit 'dafae1ae2ad3 ("libbpf: Add likely/unlikely macros and use them in selftests")' is synced into libbpf as:
- 7a1388d ("libbpf: Add likely/unlikely macros and use them in selftests")
Skipping 'dafae1ae2ad3 ("libbpf: Add likely/unlikely macros and use them in selftests")' due to unique match...
Commit '243d720e2e53 ("libbpf: Add getters for BTF.ext func and line info")' is synced into libbpf as:
- abdb15b ("libbpf: Add getters for BTF.ext func and line info")
Skipping '243d720e2e53 ("libbpf: Add getters for BTF.ext func and line info")' due to unique match...
Commit 'b412fd6bcc4c ("bpf: Clarify role of BPF_F_RECOMPUTE_CSUM")' is synced into libbpf as:
- 7de6a44 ("bpf: Clarify role of BPF_F_RECOMPUTE_CSUM")
Skipping 'b412fd6bcc4c ("bpf: Clarify role of BPF_F_RECOMPUTE_CSUM")' due to unique match...
Commit '5a15a050df71 ("bpf: Clarify the meaning of BPF_F_PSEUDO_HDR")' is synced into libbpf as:
- 0c85f5a ("bpf: Clarify the meaning of BPF_F_PSEUDO_HDR")
Skipping '5a15a050df71 ("bpf: Clarify the meaning of BPF_F_PSEUDO_HDR")' due to unique match...
Commit 'ee684de5c1b0 ("libbpf: Fix buffer overflow in bpf_object__init_prog")' is synced into libbpf as:
- 806b4e0 ("libbpf: Fix buffer overflow in bpf_object__init_prog")
Skipping 'ee684de5c1b0 ("libbpf: Fix buffer overflow in bpf_object__init_prog")' due to unique match...
Commit '8582d9ab3efd ("libbpf: Verify section type in btf_find_elf_sections")' is synced into libbpf as:
- 02bc656 ("libbpf: Verify section type in btf_find_elf_sections")
Skipping '8582d9ab3efd ("libbpf: Verify section type in btf_find_elf_sections")' due to unique match...
Commit '4dde20b1aa85 ("libbpf: Fix event name too long error")' is synced into libbpf as:
- 715808d ("libbpf: Fix event name too long error")
Skipping '4dde20b1aa85 ("libbpf: Fix event name too long error")' due to unique match...
Commit '64821d25f05a ("libbpf: Remove sample_period init in perf_buffer")' is synced into libbpf as:
- a2dc135 ("libbpf: Remove sample_period init in perf_buffer")
Skipping '64821d25f05a ("libbpf: Remove sample_period init in perf_buffer")' due to unique match...
Commit '91dbac407653 ("Use thread-safe function pointer in libbpf_print")' is synced into libbpf as:
- 88ae865 ("Use thread-safe function pointer in libbpf_print")
Skipping '91dbac407653 ("Use thread-safe function pointer in libbpf_print")' due to unique match...
Commit '8e64c387c942 ("libbpf: Add identical pointer detection to btf_dedup_is_equiv()")' is synced into libbpf as:
- c8a2881 ("libbpf: Add identical pointer detection to btf_dedup_is_equiv()")
Skipping '8e64c387c942 ("libbpf: Add identical pointer detection to btf_dedup_is_equiv()")' due to unique match...
Commit '358b1c0f56eb ("libbpf: Use proper errno value in linker")' is synced into libbpf as:
- 28deee2 ("libbpf: Use proper errno value in linker")
Skipping '358b1c0f56eb ("libbpf: Use proper errno value in linker")' due to unique match...
Commit '41d4ce6df3f4 ("bpf: Fix uninitialized values in BPF_{CORE,PROBE}_READ")' is synced into libbpf as:
- d88ca95 ("bpf: Fix uninitialized values in BPF_{CORE,PROBE}_READ")
Skipping '41d4ce6df3f4 ("bpf: Fix uninitialized values in BPF_{CORE,PROBE}_READ")' due to unique match...
Commit '62e23f183839 ("libbpf: Improve BTF dedup handling of "identical" BTF types")' is synced into libbpf as:
- 5ee9fbf ("libbpf: Improve BTF dedup handling of "identical" BTF types")
Skipping '62e23f183839 ("libbpf: Improve BTF dedup handling of "identical" BTF types")' due to unique match...
Commit '823153334042 ("bpf: Add support to retrieve ref_ctr_offset for uprobe perf link")' is synced into libbpf as:
- eda0e4c ("bpf: Add support to retrieve ref_ctr_offset for uprobe perf link")
Skipping '823153334042 ("bpf: Add support to retrieve ref_ctr_offset for uprobe perf link")' due to unique match...
Commit 'fd5fd538a1f4 ("libbpf: Use proper errno value in nlattr")' is synced into libbpf as:
- 8e34ca4 ("libbpf: Use proper errno value in nlattr")
Skipping 'fd5fd538a1f4 ("libbpf: Use proper errno value in nlattr")' due to unique match...
Commit 'd0445d7dd3fd ("libbpf: Check bpf_map_skeleton link for NULL")' is synced into libbpf as:
- 453601a ("libbpf: Check bpf_map_skeleton link for NULL")
Skipping 'd0445d7dd3fd ("libbpf: Check bpf_map_skeleton link for NULL")' due to unique match...
Commit '4e29128a9ace ("libbpf/btf: Fix string handling to support multi-split BTF")' is synced into libbpf as:
- LINUX_d3dbf2d7c598 ("libbpf/btf: Fix string handling to support multi-split BTF")
Skipping '4e29128a9ace ("libbpf/btf: Fix string handling to support multi-split BTF")' due to unique match...
Commit '3c0421c93ce4 ("libbpf: Use mmap to parse vmlinux BTF from sysfs")' is synced into libbpf as:
- LINUX_fb8ffaea31ce ("libbpf: Use mmap to parse vmlinux BTF from sysfs")
Skipping '3c0421c93ce4 ("libbpf: Use mmap to parse vmlinux BTF from sysfs")' due to unique match...
Picking 'ead7f9b8de65 ("bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE")'...
Warning! Cherry-picking 'ead7f9b8de65 ("bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE") failed, checking if it's non-libbpf files causing problems...
Looks like only non-libbpf files have conflicts, ignoring...
Success! All cherry-pick conflicts were resolved for 'ead7f9b8de65 ("bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE")'!
Picking '02670deede22 ("libbpf: Handle unsupported mmap-based /sys/kernel/btf/vmlinux correctly")'...
Rewrite 3fd5d8fa88d7e7e90be4aa7464b6dee21a23155e (1/18) (0 seconds passed, remaining 0 predicted)
Rewrite 4d4c448151aa5ce342c77a972963c1a5a8274300 (2/18) (10 seconds passed, remaining 80 predicted)
Rewrite 89d840c24a0121b97b7026b8d5acf0c47db553ff (3/18) (12 seconds passed, remaining 60 predicted)
Rewrite 5b974d23bfdf319b3bf31450807c278c32e44763 (4/18) (14 seconds passed, remaining 49 predicted)
Rewrite 702b6ca5de623969575a083a683fb583f3e6a50c (5/18) (16 seconds passed, remaining 41 predicted)
Rewrite 68e9ec161cb67f44cbae39e64fc42402fe859ed9 (6/18) (18 seconds passed, remaining 36 predicted)
Rewrite 135af419d53822f2e69a6442643c22846c180786 (7/18) (20 seconds passed, remaining 31 predicted)
Rewrite d3dbf2d7c5989076fdc292e338a2282c0be74c98 (8/18) (21 seconds passed, remaining 26 predicted)
Rewrite fb8ffaea31ce103f23ce368c74541b06935c367b (9/18) (23 seconds passed, remaining 23 predicted)
Rewrite fca6175c4c33b3bd4923bb6843980c00331ce6ac (10/18) (25 seconds passed, remaining 20 predicted)
Rewrite 620e8cc522220978948ef34375063b85a48321c9 (11/18) (27 seconds passed, remaining 17 predicted)
Rewrite df590a5de482d7bacf4097ab109533daadcb01ed (12/18) (29 seconds passed, remaining 14 predicted)
Rewrite 4ae2dc033f63bce20a9bd743a1efcff9df917b91 (13/18) (30 seconds passed, remaining 11 predicted)
Rewrite fbf89327912f7aea4b0c895a1e9065116b99c7c9 (14/18) (32 seconds passed, remaining 9 predicted)
Rewrite 68c3b2beb9727fa900a3e3a56ea7875246f0b344 (15/18) (34 seconds passed, remaining 6 predicted)
Rewrite 1fca7cc25a9000e0f1443ec35f7389580daf3786 (16/18) (36 seconds passed, remaining 4 predicted)
Rewrite 0d35947557acdcb44990179b16abb62a39ba82bd (17/18) (38 seconds passed, remaining 2 predicted)
Rewrite c512aa2377b35ddb0ccfb65c4d01ccf700681896 (18/18) (39 seconds passed, remaining 0 predicted)
Ref 'refs/heads/libbpf-squash-tip-2025-06-13T21-51-44.090Z' was rewritten
Ref 'refs/heads/libbpf-squash-base-2025-06-13T21-51-44.090Z' was rewritten
Rewrite 02f2f9c539340c4c38f6b065d3134cc6d4e1a754 (1/18) (0 seconds passed, remaining 0 predicted)
Rewrite 00c38c898665980654517ffc95790274e9301c53 (2/18) (0 seconds passed, remaining 0 predicted)
Rewrite 3604d0db2ea087917a5ac4b9e5eb8961278b2f10 (3/18) (0 seconds passed, remaining 0 predicted)
Rewrite 7eadf1abf2d4831544f7543e5d1f92ecce72d40e (4/18) (1 seconds passed, remaining 3 predicted)
Rewrite 0c3a59a6f22f0d582a6eaee0e8504ac563241df7 (4/18) (1 seconds passed, remaining 3 predicted)
Rewrite 427720ba8d0266378cca8c7787adcaaa87bb995a (4/18) (1 seconds passed, remaining 3 predicted)
Rewrite 021cf19ea053cdc2a6917c5d3cfd063cb759fcf9 (4/18) (1 seconds passed, remaining 3 predicted)
Rewrite d23610831fe152468299708131ebd34eb1a8f423 (4/18) (1 seconds passed, remaining 3 predicted)
Rewrite 48702229992265c2c7a3cd13763272a83bf389b7 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite a33ec19170d15a2d7cb0cf36390d52a7368e3208 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 13b4c44992e4a43fd96327b9ef258b01a4183a04 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 6848c92456a383aa15e59bb2e13fb6dbcf54f69e (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 65c3292791e5e5bfe4cffcbdbb5df735b5934f8c (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite a84f8075bddbf2a5a3c0755c53f9aa319b4147ce (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 5b79dd14ae2abc812f2180370f3a52f6214510c0 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 738e84a1d0e935fd3deed696a6b667cec7f8a378 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 1fa7d760588327e347ee80fa8c9fce04d7e62cea (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite e4acdec3ff35504527cfab0588a087bf6569d4c7 (9/18) (1 seconds passed, remaining 1 predicted)
Ref 'refs/heads/libbpf-squash-tip-2025-06-13T21-51-44.090Z' was rewritten
Ref 'refs/heads/libbpf-squash-base-2025-06-13T21-51-44.090Z' was rewritten
/tmp/tmp.2nVobFyy9C/patches/0000-cover-letter.patch
/tmp/tmp.2nVobFyy9C/patches/0001-bpf-Clarify-handling-of-mark-and-tstamp-by-redirect_.patch
/tmp/tmp.2nVobFyy9C/patches/0002-perf-uapi-Fix-PERF_RECORD_SAMPLE-comments-in-uapi-li.patch
/tmp/tmp.2nVobFyy9C/patches/0003-perf-uapi-Clean-up-uapi-linux-perf_event.h-a-bit.patch
/tmp/tmp.2nVobFyy9C/patches/0004-libbpf-Support-creating-and-destroying-qdisc.patch
/tmp/tmp.2nVobFyy9C/patches/0005-net-devmem-TCP-tx-netlink-api.patch
/tmp/tmp.2nVobFyy9C/patches/0006-selftests-bpf-Fix-bpf-selftest-build-warning.patch
/tmp/tmp.2nVobFyy9C/patches/0007-libbpf-btf-Fix-string-handling-to-support-multi-spli.patch
/tmp/tmp.2nVobFyy9C/patches/0008-libbpf-Use-mmap-to-parse-vmlinux-BTF-from-sysfs.patch
/tmp/tmp.2nVobFyy9C/patches/0009-bpf-Add-cookie-to-raw_tp-bpf_link_info.patch
/tmp/tmp.2nVobFyy9C/patches/0010-libbpf-Correct-some-typos-and-syntax-issues-in-usdt-.patch
/tmp/tmp.2nVobFyy9C/patches/0011-libbpf-Add-support-for-printing-BTF-character-arrays.patch
/tmp/tmp.2nVobFyy9C/patches/0012-bpf-Implement-mprog-API-on-top-of-existing-cgroup-pr.patch
/tmp/tmp.2nVobFyy9C/patches/0013-libbpf-Support-link-based-cgroup-attach-with-options.patch
/tmp/tmp.2nVobFyy9C/patches/0014-bpf-Add-cookie-to-tracing-bpf_link_info.patch
/tmp/tmp.2nVobFyy9C/patches/0015-bpf-adjust-path-to-trace_output-sample-eBPF-program.patch
/tmp/tmp.2nVobFyy9C/patches/0016-bpf-Fix-L4-csum-update-on-IPv6-in-CHECKSUM_COMPLETE.patch
/tmp/tmp.2nVobFyy9C/patches/0017-libbpf-Handle-unsupported-mmap-based-sys-kernel-btf-.patch
Applying: bpf: Clarify handling of mark and tstamp by redirect_peer
Applying: perf/uapi: Fix PERF_RECORD_SAMPLE comments in <uapi/linux/perf_event.h>
Applying: perf/uapi: Clean up <uapi/linux/perf_event.h> a bit
Applying: libbpf: Support creating and destroying qdisc
Applying: net: devmem: TCP tx netlink api
Applying: selftests/bpf: Fix bpf selftest build warning
Applying: libbpf/btf: Fix string handling to support multi-split BTF
Applying: libbpf: Use mmap to parse vmlinux BTF from sysfs
Applying: bpf: Add cookie to raw_tp bpf_link_info
Applying: libbpf: Correct some typos and syntax issues in usdt doc
Applying: libbpf: Add support for printing BTF character arrays as strings
Applying: bpf: Implement mprog API on top of existing cgroup progs
Applying: libbpf: Support link-based cgroup attach with options
Applying: bpf: Add cookie to tracing bpf_link_info
Applying: bpf: adjust path to trace_output sample eBPF program
Applying: bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE
Applying: libbpf: Handle unsupported mmap-based /sys/kernel/btf/vmlinux correctly
[libbpf-sync-2025-06-13T21-51-44.090Z 4f095f4] sync: auto-generate latest BPF helpers
 1 file changed, 5 insertions(+), 1 deletion(-)
Regenerating .mailmap...
Your branch is up to date with 'bpf-next/master'.
[libbpf-sync-2025-06-13T21-51-44.090Z 066ea3e] sync: latest libbpf changes from kernel
 2 files changed, 2 insertions(+), 2 deletions(-)
SUCCESS! 17 commits synced.
Verifying Linux's and Github's libbpf state
Rewrite
8000
 4a4b84ba9e453295c746d81cb245c0c5d80050f0 (1/1) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/libbpf-view-2025-06-13T21-51-44.090Z' was rewritten
Rewrite b7e50f4f0cd660df7989ad8e5a8d8592524beca0 (1/1) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/libbpf-view-2025-06-13T21-51-44.090Z' was rewritten
Comparing list of files...
Comparing file contents...
--- /dev/fd/63  2025-06-13 14:53:16.675387797 -0700
+++ /data/users/ameryhung/libbpf-gh/libbpf/include/uapi/linux/bpf.h     2025-06-13 14:52:51.099371875 -0700
@@ -2063,6 +2063,7 @@
  *             for updates resulting in a null checksum the value is set to
  *             **CSUM_MANGLED_0** instead. Flag **BPF_F_PSEUDO_HDR** indicates
  *             that the modified header field is part of the pseudo-header.
+ *             Flag **BPF_F_IPV6** should be set for IPv6 packets.
  *
  *             This helper works in combination with **bpf_csum_diff**\ (),
  *             which does not update the checksum in-place, but offers more
@@ -6079,6 +6080,7 @@
        BPF_F_PSEUDO_HDR                = (1ULL << 4),
        BPF_F_MARK_MANGLED_0            = (1ULL << 5),
        BPF_F_MARK_ENFORCE              = (1ULL << 6),
+       BPF_F_IPV6                      = (1ULL << 7),
 };

 /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
/data/users/ameryhung/linux/include/uapi/linux/bpf.h and /data/users/ameryhung/libbpf-gh/libbpf/include/uapi/linux/bpf.h are different!
--- /dev/fd/63  2025-06-13 14:53:16.729387831 -0700
+++ /data/users/ameryhung/libbpf-gh/libbpf/src/btf.c    2025-06-13 14:52:51.129371894 -0700
@@ -1384,12 +1384,12 @@

        fd = open(path, O_RDONLY);
        if (fd < 0)
-               return libbpf_err_ptr(-errno);
+               return ERR_PTR(-errno);

        if (fstat(fd, &st) < 0) {
                err = -errno;
                close(fd);
-               return libbpf_err_ptr(err);
+               return ERR_PTR(err);
        }

        data = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
@@ -1397,7 +1397,7 @@
        close(fd);

        if (data == MAP_FAILED)
-               return libbpf_err_ptr(err);
+               return ERR_PTR(err);

        btf = btf_new(data, st.st_size, base_btf, true);
        if (IS_ERR(btf))
/data/users/ameryhung/linux/src/btf.c and /data/users/ameryhung/libbpf-gh/libbpf/src/btf.c are different!
Unfortunately, there are some inconsistencies, please double check.
Ok, proceeding...
Cleaning up...
Your branch is up to date with 'bpf-next/master'.
Deleted branch libbpf-baseline-2025-06-13T21-51-44.090Z (was 9325d53fe9ad).
Deleted branch libbpf-tip-2025-06-13T21-51-44.090Z (was 4a4b84ba9e45).
Deleted branch libbpf-bpf-baseline-2025-06-13T21-51-44.090Z (was b4432656b36e).
Deleted branch libbpf-bpf-tip-2025-06-13T21-51-44.090Z (was d60d09eadb7c).
Deleted branch libbpf-squash-base-2025-06-13T21-51-44.090Z (was 688d6c643547).
Deleted branch libbpf-squash-tip-2025-06-13T21-51-44.090Z (was 4e9b6ec31d9a).
Deleted branch libbpf-view-2025-06-13T21-51-44.090Z (was aa3d78490045).
DONE.

pchaigno and others added 17 commits May 5, 2025 21:58
When switching network namespaces with the bpf_redirect_peer helper, the
skb->mark and skb->tstamp fields are not zeroed out like they can be on
a typical netns switch. This patch clarifies that in the helper
description.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/ccc86af26d43c5c0b776bcba2601b7479c0d46d0.1746460653.git.paul.chaignon@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Add bind-tx netlink call to attach dmabuf for TX; queue is not
required, only ifindex and dmabuf fd for attachment.

Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250508004830.4100853-4-almasrymina@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Teach libbpf to use mmap when parsing vmlinux BTF from /sys. We don't
apply this to fall-back paths on the regular file system because there
is no way to ensure that modifications underlying the MAP_PRIVATE
mapping are not visible to the process.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250520-vmlinux-mmap-v5-3-e8c941acc414@isovalent.com
AAUX data for PERF_SAMPLE_AUX appears last. PERF_SAMPLE_CGROUP is
missing from the comment.

This makes the <uapi/linux/perf_event.h> comment match that in the
perf_event_open man page.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-perf-users@vger.kernel.org
Link: https://lore.kernel.org/r/20250521221529.2547099-1-irogers@google.com
When applying a recent commit to the <uapi/linux/perf_event.h>
header I noticed that we have accumulated quite a bit of
historic noise in this header, so do a bit of spring cleaning:

 - Define bitfields in a vertically aligned fashion, like
   perf_event_mmap_page::capabilities already does. This
   makes it easier to see the distribution and sizing of
   bits within a word, at a glance. The following is much
   more readable:

			__u64	cap_bit0		: 1,
				cap_bit0_is_deprecated	: 1,
				cap_user_rdpmc		: 1,
				cap_user_time		: 1,
				cap_user_time_zero	: 1,
				cap_user_time_short	: 1,
				cap_____res		: 58;

   Than:

			__u64	cap_bit0:1,
				cap_bit0_is_deprecated:1,
				cap_user_rdpmc:1,
				cap_user_time:1,
				cap_user_time_zero:1,
				cap_user_time_short:1,
				cap_____res:58;

   So convert all bitfield definitions from the latter style to the
   former style.

 - Fix typos and grammar

 - Fix capitalization

 - Remove whitespace noise

 - Harmonize the definitions of various generations and groups of
   PERF_MEM_ ABI values.

 - Vertically align all definitions and assignments to the same
   column (48), as the first definition (enum perf_type_id),
   throughout the entire header.

 - And in general make the code and comments to be more in sync
   with each other and to be more readable overall.

No change in functionality.

Copy the changes over to tools/include/uapi/linux/perf_event.h.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250521221529.2547099-1-irogers@google.com
Extend struct bpf_tc_hook with handle, qdisc name and a new attach type,
BPF_TC_QDISC, to allow users to add or remove any qdisc specified in
addition to clsact.

Signed-off-by: Amery Hung <amery.hung@bytedance.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://patch.msgid.link/20250409214606.2000194-8-ameryhung@gmail.com
On linux-next, build for bpf selftest displays a warning:

Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h'
differs from latest version at 'include/uapi/linux/if_xdp.h'.

Commit 8066e388be48 ("net: add UAPI to the header guard in various network headers")
changed the header guard from _LINUX_IF_XDP_H to _UAPI_LINUX_IF_XDP_H
in include/uapi/linux/if_xdp.h.

To resolve the warning, update tools/include/uapi/linux/if_xdp.h
to align with the changes in include/uapi/linux/if_xdp.h

Fixes: 8066e388be48 ("net: add UAPI to the header guard in various network headers")
Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Closes: https://lore.kernel.org/all/c2bc466d-dff2-4d0d-a797-9af7f676c065@linux.ibm.com/
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Saket Kumar Bhaskar <skb99@linux.ibm.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://patch.msgid.link/20250527054138.1086006-1-skb99@linux.ibm.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
libbpf handling of split BTF has been written largely with the
assumption that multiple splits are possible, i.e. split BTF on top of
split BTF on top of base BTF.  One area where this does not quite work
is string handling in split BTF; the start string offset should be the
base BTF string section length + the base BTF string offset.  This
worked in the past because for a single split BTF with base the start
string offset was always 0.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250519165935.261614-2-alan.maguire@oracle.com
After commit 68ca5d4eebb8 ("bpf: support BPF cookie in raw tracepoint
(raw_tp, tp_btf) programs"), we can show the cookie in bpf_link_info
like kprobe etc.

Signed-off-by: Tao Chen <chen.dylane@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20250603154309.3063644-1-chen.dylane@linux.dev
Fix some incorrect words, such as "and" -> "an", "it's" -> "its".  Fix
some grammar issues, such as removing redundant "will", "would
complicated" -> "would complicate".

Signed-off-by: Jiawei Zhao <Phoenix500526@163.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250531095111.57824-1-Phoenix500526@163.com
The BTF dumper code currently displays arrays of characters as just that -
arrays, with each character formatted individually. Sometimes this is what
makes sense, but it's nice to be able to treat that array as a string.

This change adds a special case to the btf_dump functionality to allow
0-terminated arrays of single-byte integer values to be printed as
character strings. Characters for which isprint() returns false are
printed as hex-escaped values. This is enabled when the new ".emit_strings"
is set to 1 in the btf_dump_type_data_opts structure.

As an example, here's what it looks like to dump the string "hello" using
a few different field values for btf_dump_type_data_opts (.compact = 1):

- .emit_strings = 0, .skip_names = 0:  (char[6])['h','e','l','l','o',]
- .emit_strings = 0, .skip_names = 1:  ['h','e','l','l','o',]
- .emit_strings = 1, .skip_names = 0:  (char[6])"hello"
- .emit_strings = 1, .skip_names = 1:  "hello"

Here's the string "h\xff", dumped with .compact = 1 and .skip_names = 1:

- .emit_strings = 0:  ['h',-1,]
- .emit_strings = 1:  "h\xff"

Signed-off-by: Blake Jones <blakejones@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250603203701.520541-1-blakejones@google.com
Current cgroup prog ordering is appending at attachment time. This is not
ideal. In some cases, users want specific ordering at a particular cgroup
level. To address this, the existing mprog API seems an ideal solution with
supporting BPF_F_BEFORE and BPF_F_AFTER flags.

But there are a few obstacles to directly use kernel mprog interface.
Currently cgroup bpf progs already support prog attach/detach/replace
and link-based attach/detach/replace. For example, in struct
bpf_prog_array_item, the cgroup_storage field needs to be together
with bpf prog. But the mprog API struct bpf_mprog_fp only has bpf_prog
as the member, which makes it difficult to use kernel mprog interface.

In another case, the current cgroup prog detach tries to use the
same flag as in attach. This is different from mprog kernel interface
which uses flags passed from user space.

So to avoid modifying existing behavior, I made the following changes to
support mprog API for cgroup progs:
 - The support is for prog list at cgroup level. Cross-level prog list
   (a.k.a. effective prog list) is not supported.
 - Previously, BPF_F_PREORDER is supported only for prog attach, now
   BPF_F_PREORDER is also supported by link-based attach.
 - For attach, BPF_F_BEFORE/BPF_F_AFTER/BPF_F_ID/BPF_F_LINK is supported
   similar to kernel mprog but with different implementation.
 - For detach and replace, use the existing implementation.
 - For attach, detach and replace, the revision for a particular prog
   list, associated with a particular attach type, will be updated
   by increasing count by 1.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250606163141.2428937-1-yonghong.song@linux.dev
Currently libbpf supports bpf_program__attach_cgroup() with signature:
  LIBBPF_API struct bpf_link *
  bpf_program__attach_cgroup(const struct bpf_program *prog, int cgroup_fd);

To support mprog style attachment, additionsl fields like flags,
relative_{fd,id} and expected_revision are needed.

Add a new API:
  LIBBPF_API struct bpf_link *
  bpf_program__attach_cgroup_opts(const struct bpf_program *prog, int cgroup_fd,
                                  const struct bpf_cgroup_opts *opts);
where bpf_cgroup_opts contains all above needed fields.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250606163146.2429212-1-yonghong.song@linux.dev
bpf_tramp_link includes cookie info, we can add it in bpf_link_info.

Signed-off-by: Tao Chen <chen.dylane@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250606165818.3394397-1-chen.dylane@linux.dev
libbpf_err_ptr() helpers are meant to return NULL and set errno, if
there is an error. But btf_p
8000
arse_raw_mmap() is meant to be used
internally and is expected to return ERR_PTR() values. Because of this
mismatch, when libbpf tries to mmap /sys/kernel/btf/vmlinux, we don't
detect the error correctly with IS_ERR() check, and never fallback to
old non-mmap-based way of loading vmlinux BTF.

Fix this by using proper ERR_PTR() returns internally.

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Fixes: 3c0421c93ce4 ("libbpf: Use mmap to parse vmlinux BTF from sysfs")
Cc: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20250606202134.2738910-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
The sample file was renamed from trace_output_kern.c to
trace_output.bpf.c in commit d4fffba4d04b ("samples/bpf: Change _kern
suffix to .bpf with syscall tracing program"). Adjust the path in the
documentation comment for bpf_perf_event_output.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Link: https://lore.kernel.org/r/20250610140756.16332-1-tklauser@distanz.ch
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
In Cilium, we use bpf_csum_diff + bpf_l4_csum_replace to, among other
things, update the L4 checksum after reverse SNATing IPv6 packets. That
use case is however not currently supported and leads to invalid
skb->csum values in some cases. This patch adds support for IPv6 address
changes in bpf_l4_csum_update via a new flag.

When calling bpf_l4_csum_replace in Cilium, it ends up calling
inet_proto_csum_replace_by_diff:

    1:  void inet_proto_csum_replace_by_diff(__sum16 *sum, struct sk_buff *skb,
    2:                                       __wsum diff, bool pseudohdr)
    3:  {
    4:      if (skb->ip_summed != CHECKSUM_PARTIAL) {
    5:          csum_replace_by_diff(sum, diff);
    6:          if (skb->ip_summed == CHECKSUM_COMPLETE && pseudohdr)
    7:              skb->csum = ~csum_sub(diff, skb->csum);
    8:      } else if (pseudohdr) {
    9:          *sum = ~csum_fold(csum_add(diff, csum_unfold(*sum)));
    10:     }
    11: }

The bug happens when we're in the CHECKSUM_COMPLETE state. We've just
updated one of the IPv6 addresses. The helper now updates the L4 header
checksum on line 5. Next, it updates skb->csum on line 7. It shouldn't.

For an IPv6 packet, the updates of the IPv6 address and of the L4
checksum will cancel each other. The checksums are set such that
computing a checksum over the packet including its checksum will result
in a sum of 0. So the same is true here when we update the L4 checksum
on line 5. We'll update it as to cancel the previous IPv6 address
update. Hence skb->csum should remain untouched in this case.

The same bug doesn't affect IPv4 packets because, in that case, three
fields are updated: the IPv4 address, the IP checksum, and the L4
checksum. The change to the IPv4 address and one of the checksums still
cancel each other in skb->csum, but we're left with one checksum update
and should therefore update skb->csum accordingly. That's exactly what
inet_proto_csum_replace_by_diff does.

This special case for IPv6 L4 checksums is also described atop
inet_proto_csum_replace16, the function we should be using in this case.

This patch introduces a new bpf_l4_csum_replace flag, BPF_F_IPV6,
to indicate that we're updating the L4 checksum of an IPv6 packet. When
the flag is set, inet_proto_csum_replace_by_diff will skip the
skb->csum update.

Fixes: 7d672345ed295 ("bpf: add generic bpf_csum_diff helper")
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://patch.msgid.link/96a6bc3a443e6f0b21ff7b7834000e17fb549e05.1748509484.git.paul.chaignon@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
@@ -7,8 +7,8 @@
* Magnus Karlsson <magnus.karlsson@intel.com>
*/

#ifndef _LINUX_IF_XDP_H
#define _LINUX_IF_XDP_H
#ifndef _UAPI_LINUX_IF_XDP_H
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we raced a bit, I just landed an update to sync script that strips _UAPI prefix here, because we ran into issues internally. Can you please re-run with the lates script again (no need to recreate the PR, just force-push into it and maybe update the PR description with latest log)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have rerun the script. The title and the description of the PR has been updated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still _UAPI_LINUX_IF_XDP_H, while it should be _LINUX_IF_XDP_H... I guess I need to fix up my script, s/_UAPI__LINUX/__LINUX/ doesn't catch this case

Latest changes to BPF helper definitions.

Signed-off-by: Amery Hung <ameryhung@gmail.com>
Syncing latest libbpf commits from kernel repository.
Baseline bpf-next commit:   9325d53fe9adff354b6a93fda5f38c165947da0f
Checkpoint bpf-next commit: 4a4b84ba9e453295c746d81cb245c0c5d80050f0
Baseline bpf commit:        b4432656b36e5cc1d50a1f2dc15357543add530e
Checkpoint bpf commit:      d60d09eadb7cb17690c847f1623436cd4b58c19c

Alan Maguire (1):
  libbpf/btf: Fix string handling to support multi-split BTF

Amery Hung (1):
  libbpf: Support creating and destroying qdisc

Andrii Nakryiko (1):
  libbpf: Handle unsupported mmap-based /sys/kernel/btf/vmlinux
    correctly

Blake Jones (1):
  libbpf: Add support for printing BTF character arrays as strings

Ian Rogers (1):
  perf/uapi: Fix PERF_RECORD_SAMPLE comments in
    <uapi/linux/perf_event.h>

Ingo Molnar (1):
  perf/uapi: Clean up <uapi/linux/perf_event.h> a bit

Jiawei Zhao (1):
  libbpf: Correct some typos and syntax issues in usdt doc

Lorenz Bauer (1):
  libbpf: Use mmap to parse vmlinux BTF from sysfs

Paul Chaignon (2):
  bpf: Clarify handling of mark and tstamp by redirect_peer
  bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE

Saket Kumar Bhaskar (1):
  selftests/bpf: Fix bpf selftest build warning

Stanislav Fomichev (1):
  net: devmem: TCP tx netlink api

Tao Chen (2):
  bpf: Add cookie to raw_tp bpf_link_info
  bpf: Add cookie to tracing bpf_link_info

Tobias Klauser (1):
  bpf: adjust path to trace_output sample eBPF program

Yonghong Song (2):
  bpf: Implement mprog API on top of existing cgroup progs
  libbpf: Support link-based cgroup attach with options

 include/uapi/linux/bpf.h        |  18 +-
 include/uapi/linux/if_xdp.h     |   6 +-
 include/uapi/linux/netdev.h     |   1 +
 include/uapi/linux/perf_event.h | 657 ++++++++++++++++----------------
 src/bpf.c                       |  44 +++
 src/bpf.h                       |   5 +
 src/btf.c                       |  91 ++++-
 src/btf.h                       |   3 +-
 src/btf_dump.c                  |  55 ++-
 src/libbpf.c                    |  28 ++
 src/libbpf.h                    |  20 +-
 src/libbpf.map                  |   1 +
 src/netlink.c                   |  20 +-
 src/usdt.c                      |  10 +-
 14 files changed, 602 insertions(+), 357 deletions(-)

Signed-off-by: Amery Hung <ameryhung@gmail.com>
@ameryhung ameryhung force-pushed the libbpf-sync-2025-06-13T17-56-37.539Z branch from f41d1a8 to 066ea3e Compare June 13, 2025 21:59
@ameryhung ameryhung changed the title Libbpf sync 2025-06-13T17:56:37.539Z Libbpf sync 2025-06-13T21:51:44.090Z Jun 13, 2025
@anakryiko anakryiko merged commit c88ddbc into libbpf:master Jun 16, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants
0