Skip to content
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

Bpftool sync 2024-11-14 #174

Merged
merged 7 commits into from
Nov 14, 2024

Commits on Oct 11, 2024

  1. tools headers UAPI: Sync linux/const.h with the kernel headers

    To pick up the changes in:
    
      947697c6f0f75f98 ("uapi: Define GENMASK_U128")
    
    That causes no changes in tooling, just addresses this perf build
    warning:
    
      Warning: Kernel ABI header differences:
        diff -u tools/include/uapi/linux/const.h include/uapi/linux/const.h
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Anshuman Khandual <anshuman.khandual@arm.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Yury Norov <yury.norov@gmail.com>
    Link: https://lore.kernel.org/lkml/ZwltGNJwujKu1Fgn@x1
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    acmel authored and qmonnet committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    b7942ef View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. bpf, bpftool: Fix incorrect disasm pc

    This patch addresses the bpftool issue "Wrong callq address displayed"[0].
    
    The issue stemmed from an incorrect program counter (PC) value used during
    disassembly with LLVM or libbfd.
    
    For LLVM: The PC argument must represent the actual address in the kernel
    to compute the correct relative address.
    
    For libbfd: The relative address can be adjusted by adding func_ksym within
    the custom info->print_address_func to yield the correct address.
    
    Links:
    [0] libbpf#109
    
    Changes:
    v2 -> v3:
      * Address comment from Quentin:
        * Remove the typedef.
    
    v1 -> v2:
      * Fix the broken libbfd disassembler.
    
    Fixes: e1947c750ffe ("bpftool: Refactor disassembler for JIT-ed programs")
    Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Tested-by: Quentin Monnet <qmo@kernel.org>
    Reviewed-by: Quentin Monnet <qmo@kernel.org>
    Acked-by: Yonghong Song <yonghong.song@linux.dev>
    Link: https://lore.kernel.org/bpf/20241031152844.68817-1-leon.hwang@linux.dev
    Asphaltt authored and qmonnet committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    0508951 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2024

  1. bpftool: Prevent setting duplicate _GNU_SOURCE in Makefile

    When building selftests with CFLAGS set via env variable, the value of
    CFLAGS is propagated into bpftool Makefile (called from selftests
    Makefile). This makes the compilation fail as _GNU_SOURCE is defined two
    times - once from selftests Makefile (by including lib.mk) and once from
    bpftool Makefile (by calling `llvm-config --cflags`):
    
        $ CFLAGS="" make -C tools/testing/selftests/bpf
        [...]
        CC      /bpf-next/tools/testing/selftests/bpf/tools/build/bpftool/btf.o
        <command-line>: error: "_GNU_SOURCE" redefined [-Werror]
        <command-line>: note: this is the location of the previous definition
        cc1: all warnings being treated as errors
        [...]
    
    Filter out -D_GNU_SOURCE from the result of `llvm-config --cflags` in
    bpftool Makefile to prevent this error.
    
    Signed-off-by: Viktor Malik <vmalik@redhat.com>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Acked-by: Quentin Monnet <qmo@kernel.org>
    Acked-by: Jiri Olsa <jolsa@kernel.org>
    Link: https://lore.kernel.org/bpf/acec3108b62d4df1436cda777e58e93e033ac7a7.1730449390.git.vmalik@redhat.com
    viktormalik authored and qmonnet committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    2c25a6a View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. bpf: Add support for uprobe multi 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 uprobe multi links.
    
    Adding new BPF_TRACE_UPROBE_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 <jolsa@kernel.org>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Acked-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20241108134544.480660-4-jolsa@kernel.org
    olsajiri authored and qmonnet committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    3928030 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2024

  1. sync: Update libbpf submodule

    Pull latest libbpf from mirror.
    Libbpf version: 1.6.0
    Libbpf commit:  244485ce7224fc2ef28bf9f917bfdb62d4cc2f22
    
    Signed-off-by: Quentin Monnet <qmo@kernel.org>
    qmonnet committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    fdbeefc View commit details
    Browse the repository at this point in the history
  2. sync: update .mailmap

    Update .mailmap based on bpftool's list of contributors and on the
    latest .mailmap version in the upstream repository.
    
    Signed-off-by: Quentin Monnet <qmo@kernel.org>
    qmonnet committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    e47c8bb View commit details
    Browse the repository at this point in the history
  3. sync: Pull latest bpftool changes from kernel

    Syncing latest bpftool commits from kernel repository.
    Baseline bpf-next commit:   c6fb8030b4baa01c850f99fc6da051b1017edc46
    Checkpoint bpf-next commit: a1087da9d11e5bcacc706002bc0f84b790881f69
    Baseline bpf commit:        d5fb316e2af1d947f0f6c3666e373a54d9f27c6f
    Checkpoint bpf commit:      fb86c42a2a5d44e849ddfbc98b8d2f4f40d36ee3
    
    Arnaldo Carvalho de Melo (1):
      tools headers UAPI: Sync linux/const.h with the kernel headers
    
    Jiri Olsa (1):
      bpf: Add support for uprobe multi session attach
    
    Leon Hwang (1):
      bpf, bpftool: Fix incorrect disasm pc
    
    Viktor Malik (1):
      bpftool: Prevent setting duplicate _GNU_SOURCE in Makefile
    
     include/uapi/linux/bpf.h   |  1 +
     include/uapi/linux/const.h | 17 ++++++++++++++++
     src/Makefile               |  6 +++++-
     src/jit_disasm.c           | 40 +++++++++++++++++++++++++++-----------
     4 files changed, 52 insertions(+), 12 deletions(-)
    
    Signed-off-by: Quentin Monnet <qmo@kernel.org>
    qmonnet committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    3484d73 View commit details
    Browse the repository at this point in the history