Source: bpfcc
Version: 0.35.0+ds-1.1
Severity: important
X-Debbugs-Cc: [email protected]

Dear Maintainer,

When running bcc on kernel newer than 6.19, it reports following error
(use execsnoop-bpfcc as an example):

In file included from /virtual/main.c:16:
include/linux/fs.h:2427:2: warning: declaration does not declare anything 
[-Wmissing-declarations]
 2427 |         struct __filename_head;
      |         ^~~~~~~~~~~~~~~~~~~~~~
include/linux/fs.h:2431:15: error: static assertion failed due to requirement 
'sizeof(struct filename)
      % 64 == 0': sizeof(struct filename) % 64 == 0
 2431 | static_assert(sizeof(struct filename) % 64 == 0);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:79:50: note: expanded from macro 'static_assert'
   79 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, 
#expr)
      |                                                  ^~~~
include/linux/build_bug.h:80:56: note: expanded from macro '__static_assert'
   80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
include/linux/fs.h:2431:44: note: expression evaluates to '40 == 0'
 2431 | static_assert(sizeof(struct filename) % 64 == 0);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/build_bug.h:79:50: note: expanded from macro 'static_assert'
   79 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, 
#expr)
      |                                                  ^~~~
include/linux/build_bug.h:80:56: note: expanded from macro '__static_assert'
   80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
      |                                                        ^~~~
1 warning and 1 error generated.
Traceback (most recent call last):
  File "/usr/sbin/execsnoop-bpfcc", line 272, in <module>
    b = BPF(text=bpf_text)
  File "/usr/lib/python3/dist-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>

Upstream issue: https://github.com/iovisor/bcc/issues/5501

Upstream commit to fix: 
https://github.com/iovisor/bcc/commit/c3f35ecca18b1ce926bd272f60f6d4465656a80b

However, the upstream seems has not released a new version yet, so this
might be necessary to be included as a patch. This also affects users of
forky and trixie-backports.

-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 7.0.10+deb14-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Reply via email to