Skip to content

bindsnoop: include/linux/ns_common.h:25:23: error: no member named 'ns_id' in 'struct ns_common' #5488

@vt-alt

Description

@vt-alt

bindsnoop fail when run on 6.19.5

# /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:38:
In file included from include/net/net_namespace.h:41:
In file included from include/linux/ns_common.h:5:
include/linux/ns/ns_common_types.h:117:3: warning: declaration does not declare anything [-Wmissing-declarations]
  117 |                 struct ns_tree;
      |                 ^~~~~~~~~~~~~~
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:38:
In file included from include/net/net_namespace.h:41:
include/linux/ns_common.h:25:23: error: no member named 'ns_id' in 'struct ns_common'
   25 |         VFS_WARN_ON_ONCE(ns->ns_id == 0);
      |                          ~~  ^
include/linux/vfsdebug.h:37:53: note: expanded from macro 'VFS_WARN_ON_ONCE'
   37 | #define VFS_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond)
      |                                                     ^~~~
include/linux/build_bug.h:30:63: note: expanded from macro 'BUILD_BUG_ON_INVALID'
   30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
      |                                                               ^
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:38:
In file included from include/net/net_namespace.h:41:
include/linux/ns_common.h:26:13: error: no member named 'ns_id' in 'struct ns_common'
   26 |         return ns->ns_id <= NS_LAST_INIT_ID;
      |                ~~  ^
include/linux/ns_common.h:60:26: error: no member named '__ns_ref_active' in 'struct ns_common'
   60 |         return atomic_read(&ns->__ns_ref_active);
      |                             ~~  ^

ps. Also, 49 warnings like this:

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:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:5:
In file included from include/linux/fs.h:5:
In file included from include/linux/fs/super.h:5:
In file included from include/linux/fs/super_types.h:13:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:98:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
   98 |                 return (set->sig[3] | set->sig[2] |
      |                         ^        ~
arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
   24 |         unsigned long sig[_NSIG_WORDS];
      |         ^
50 warnings and 3 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