From 9cac9d72c02d8b8ce7b7aaf10e23e901e20bf152 Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Mon, 13 May 2024 14:45:53 +0100 Subject: [PATCH 1/5] sync: Update libbpf submodule Pull latest libbpf from mirror. Libbpf version: 1.5.0 Libbpf commit: 02724cfd0702c4102138e62c3ae7d2721c7b190e Signed-off-by: Quentin Monnet --- libbpf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbpf b/libbpf index 2fdcc365..02724cfd 160000 --- a/libbpf +++ b/libbpf @@ -1 +1 @@ -Subproject commit 2fdcc365a0c5253314644b8e27b02cf4affecbed +Subproject commit 02724cfd0702c4102138e62c3ae7d2721c7b190e From 9d427bf9c5a89b2d188f6936209543461946a43e Mon Sep 17 00:00:00 2001 From: Philo Lu Date: Fri, 26 Apr 2024 00:17:23 +0800 Subject: [PATCH 2/5] bpf: add mrtt and srtt as BPF_SOCK_OPS_RTT_CB args Two important arguments in RTT estimation, mrtt and srtt, are passed to tcp_bpf_rtt(), so that bpf programs get more information about RTT computation in BPF_SOCK_OPS_RTT_CB. The difference between bpf_sock_ops->srtt_us and the srtt here is: the former is an old rtt before update, while srtt passed by tcp_bpf_rtt() is that after update. Signed-off-by: Philo Lu Link: https://lore.kernel.org/r/20240425161724.73707-2-lulie@linux.alibaba.com Signed-off-by: Martin KaFai Lau --- include/uapi/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index e4ae8355..d94a7259 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -6947,6 +6947,8 @@ enum { * socket transition to LISTEN state. */ BPF_SOCK_OPS_RTT_CB, /* Called on every RTT. + * Arg1: measured RTT input (mrtt) + * Arg2: updated srtt */ BPF_SOCK_OPS_PARSE_HDR_OPT_CB, /* Parse the header option. * It will be called to handle From bc6d2781b274124389f47d36e2db0336e98732a4 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Tue, 30 Apr 2024 13:28:24 +0200 Subject: [PATCH 3/5] bpf: Add support for kprobe session attach Adding support to attach bpf program for entry and return probe of the same function. This is common use case which at the moment requires to create two kprobe multi links. Adding new BPF_TRACE_KPROBE_SESSION attach type that instructs kernel to attach single link program to both entry and exit probe. It's possible to control execution of the bpf program on return probe simply by returning zero or non zero from the entry bpf program execution to execute or not the bpf program on return probe respectively. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20240430112830.1184228-2-jolsa@kernel.org --- include/uapi/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index d94a7259..90706a47 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -1115,6 +1115,7 @@ enum bpf_attach_type { BPF_CGROUP_UNIX_GETSOCKNAME, BPF_NETKIT_PRIMARY, BPF_NETKIT_PEER, + BPF_TRACE_KPROBE_SESSION, __MAX_BPF_ATTACH_TYPE }; From 3ce2aba045a01bfd99224e062f09384fd3b6dfdf Mon Sep 17 00:00:00 2001 From: John Hubbard Date: Sun, 5 May 2024 16:00:54 -0700 Subject: [PATCH 4/5] bpftool, selftests/hid/bpf: Fix 29 clang warnings When building either tools/bpf/bpftool, or tools/testing/selftests/hid, (the same Makefile is used for these), clang generates many instances of the following: "clang: warning: -lLLVM-17: 'linker' input unused" Quentin points out that the LLVM version is only required in $(LIBS), not in $(CFLAGS), so the fix is to remove it from CFLAGS. Suggested-by: Quentin Monnet Signed-off-by: John Hubbard Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20240505230054.13813-1-jhubbard@nvidia.com --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index d48d22ff..85f19bc9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -141,7 +141,7 @@ ifeq ($(feature-llvm),1) # If LLVM is available, use it for JIT disassembly CFLAGS += -DHAVE_LLVM_SUPPORT LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets - CFLAGS += $(shell $(LLVM_CONFIG) --cflags --libs $(LLVM_CONFIG_LIB_COMPONENTS)) + CFLAGS += $(shell $(LLVM_CONFIG) --cflags) LIBS += $(shell $(LLVM_CONFIG) --libs $(LLVM_CONFIG_LIB_COMPONENTS)) ifeq ($(shell $(LLVM_CONFIG) --shared-mode),static) LIBS += $(shell $(LLVM_CONFIG) --system-libs $(LLVM_CONFIG_LIB_COMPONENTS)) From d2b9bf0aa88c7e795b28c3b47a713a16aeae221e Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Mon, 13 May 2024 14:46:19 +0100 Subject: [PATCH 5/5] sync: Pull latest bpftool changes from kernel Syncing latest bpftool commits from kernel repository. Baseline bpf-next commit: 82e38a505c9868e784ec31e743fd8a9fa5ca1084 Checkpoint bpf-next commit: 009367099eb61a4fc2af44d4eb06b6b4de7de6db Baseline bpf commit: 5bcf0dcbf9066348058b88a510c57f70f384c92c Checkpoint bpf commit: 3e9bc0472b910d4115e16e9c2d684c7757cb6c60 Jiri Olsa (1): bpf: Add support for kprobe session attach John Hubbard (1): bpftool, selftests/hid/bpf: Fix 29 clang warnings Philo Lu (1): bpf: add mrtt and srtt as BPF_SOCK_OPS_RTT_CB args include/uapi/linux/bpf.h | 3 +++ src/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) Signed-off-by: Quentin Monnet --- BPF-CHECKPOINT-COMMIT | 2 +- CHECKPOINT-COMMIT | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BPF-CHECKPOINT-COMMIT b/BPF-CHECKPOINT-COMMIT index 8fb5e1e9..31b970e9 100644 --- a/BPF-CHECKPOINT-COMMIT +++ b/BPF-CHECKPOINT-COMMIT @@ -1 +1 @@ -5bcf0dcbf9066348058b88a510c57f70f384c92c +3e9bc0472b910d4115e16e9c2d684c7757cb6c60 diff --git a/CHECKPOINT-COMMIT b/CHECKPOINT-COMMIT index c780583d..0e3fb521 100644 --- a/CHECKPOINT-COMMIT +++ b/CHECKPOINT-COMMIT @@ -1 +1 @@ -82e38a505c9868e784ec31e743fd8a9fa5ca1084 +009367099eb61a4fc2af44d4eb06b6b4de7de6db