Skip to content

v0.36.0 on v6.18: bindsnoop - error: invalid application of 'sizeof' to an incomplete type 'struct bpf_task_work' #5451

@vt-alt

Description

@vt-alt

Release v0.36.0 fails to run bindsnoop Python tool it provides on Linux 6.18.7 which it supposed to support:

# /usr/src/tmp/bcc-buildroot/usr/share/bcc/tools/bindsnoop
In file included from /virtual/main.c:17:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:44:
In file included from include/uapi/linux/neighbour.h:6:
In file included from include/linux/netlink.h:9:
In file included from include/net/scm.h:9:
In file included from include/linux/security.h:35:
include/linux/bpf.h:409:10: error: invalid application of 'sizeof' to an incomplete type 'struct bpf_task_work'
  409 |                 return sizeof(struct bpf_task_work);
      |                        ^     ~~~~~~~~~~~~~~~~~~~~~~
include/linux/bpf.h:409:24: note: forward declaration of 'struct bpf_task_work'
  409 |                 return sizeof(struct bpf_task_work);
      |                                      ^
include/linux/bpf.h:443:10: error: invalid application of '__alignof' to an incomplete type 'struct bpf_task_work'
  443 |                 return __alignof__(struct bpf_task_work);
      |                        ^          ~~~~~~~~~~~~~~~~~~~~~~
include/linux/bpf.h:443:29: note: forward declaration of 'struct bpf_task_work'
  443 |                 return __alignof__(struct bpf_task_work);
      |                                           ^
2 errors generated.
Traceback (most recent call last):
  File "/usr/src/tmp/bcc-buildroot/usr/share/bcc/tools/bindsnoop", line 468, in <module>
    b = BPF(text=bpf_text)
  File "/usr/src/tmp/bcc-buildroot/usr/lib64/python3/site-packages/bcc/__init__.py", line 507, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions