Skip to content

Fix single vs multi attach type issues in newer kernels#201

Merged
gnurizen merged 3 commits intomainfrom
log-usdt-attach
Feb 13, 2026
Merged

Fix single vs multi attach type issues in newer kernels#201
gnurizen merged 3 commits intomainfrom
log-usdt-attach

Conversation

@gnurizen
Copy link
Collaborator

@gnurizen gnurizen commented Feb 12, 2026

Fix ebpf attachment on newer kernels that don't allow cross attach
type tail call invocations.

Now we have to be consistent with the attach type we use for both the
main program and the tail call. We could just get rid of the multi
attach stuff but we'll eventually want it when we have hundreds of
programs we want to attach all over the place.

This broke with this kernel change:

commit 4540aed51b12bc13364149bf95f6ecef013197c0
Author: Daniel Borkmann <daniel@iogearbox.net>
Date:   Fri Sep 26 19:12:00 2025 +0200

bpf: Enforce expected_attach_type for tailcall compatibility

Yinhao et al. recently reported:

  Our fuzzer tool discovered an uninitialized pointer issue in the
  bpf_prog_test_run_xdp() function within the Linux kernel's BPF subsystem.
  This leads to a NULL pointer dereference when a BPF program attempts to
  deference the txq member of struct xdp_buff object.

...

@gnurizen gnurizen changed the title Debug usdt attach Fix single vs multi attach type issues in newer kernels Feb 13, 2026
type tail call invocations.

Now we have to be consistent with the attach type we use for both the
main program and the tail call.  We could just get rid of the multi
attach stuff but we'll eventually want it when we have hundreds of
programs we want to attach all over the place.

This broke with this kernel change:

    commit 4540aed51b12bc13364149bf95f6ecef013197c0
    Author: Daniel Borkmann <daniel@iogearbox.net>
    Date:   Fri Sep 26 19:12:00 2025 +0200

    bpf: Enforce expected_attach_type for tailcall compatibility

    Yinhao et al. recently reported:

      Our fuzzer tool discovered an uninitialized pointer issue in the
      bpf_prog_test_run_xdp() function within the Linux kernel's BPF subsystem.
      This leads to a NULL pointer dereference when a BPF program attempts to
      deference the txq member of struct xdp_buff object.

    ...
@gnurizen gnurizen force-pushed the log-usdt-attach branch 2 times, most recently from 0f9996d to 480dfed Compare February 13, 2026 15:26
@gnurizen gnurizen merged commit de73771 into main Feb 13, 2026
46 checks passed
@brancz brancz deleted the log-usdt-attach branch February 13, 2026 16:32
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.

2 participants