[PATCH 05/12] libbpf: Support exclusive map creation

kernel test robot lkp at intel.com
Sat Jun 7 09:16:19 UTC 2025


Hi KP,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/net]
[also build test ERROR on bpf-next/master bpf/master linus/master next-20250606]
[cannot apply to v6.15]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/KP-Singh/bpf-Implement-an-internal-helper-for-SHA256-hashing/20250607-073052
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git net
patch link:    https://lore.kernel.org/r/20250606232914.317094-6-kpsingh%40kernel.org
patch subject: [PATCH 05/12] libbpf: Support exclusive map creation
config: i386-buildonly-randconfig-003-20250607 (https://download.01.org/0day-ci/archive/20250607/202506071746.cWvht6xb-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250607/202506071746.cWvht6xb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506071746.cWvht6xb-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from libbpf_errno.c:14:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from btf_relocate.c:31:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from libbpf_internal.h:43,
                    from nlattr.c:14:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from relo_core.c:64:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from linker.c:24:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from libbpf_internal.h:43,
                    from strset.c:9:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from bpf_prog_linfo.c:8:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from btf_dump.c:22:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from ringbuf.c:21:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from libbpf_internal.h:43,
                    from elf.c:11:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from netlink.c:18:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from features.c:6:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from usdt.c:19:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from gen_loader.c:11:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from btf.c:22:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from libbpf_internal.h:43,
                    from zip.c:16:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from libbpf_probes.c:18:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   In file included from libbpf_internal.h:43,
                    from btf_iter.c:13:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf_errno.o] Error 1 shuffle=3326748311
   In file included from libbpf.c:53:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   In file included from bpf.c:36:
>> libbpf.h:1264:5: error: redundant redeclaration of 'bpf_map__make_exclusive' [-Werror=redundant-decls]
    1264 | int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/nlattr.o] Error 1 shuffle=3326748311
   libbpf.h:1262:16: note: previous declaration of 'bpf_map__make_exclusive' with type 'int(struct bpf_map *, struct bpf_program *)'
    1262 | LIBBPF_API int bpf_map__make_exclusive(struct bpf_map *map, struct bpf_program *prog);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/strset.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/btf_iter.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/bpf_prog_linfo.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/zip.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf_probes.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/elf.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/btf_relocate.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/features.o] Error 1 shuffle=3326748311
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/ringbuf.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/netlink.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/usdt.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/gen_loader.o] Error 1 shuffle=3326748311
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/relo_core.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/btf_dump.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/bpf.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/linker.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/btf.o] Error 1 shuffle=3326748311
   cc1: all warnings being treated as errors
   make[6]: *** [tools/build/Makefile.build:85: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf.o] Error 1 shuffle=3326748311
   make[6]: Target '__build' not remade because of errors.
   make[5]: *** [Makefile:152: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2 shuffle=3326748311
   make[5]: Target 'tools/bpf/resolve_btfids/libbpf/libbpf.a' not remade because of errors.
   make[4]: *** [Makefile:61: tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2 shuffle=3326748311
   make[4]: Target 'all' not remade because of errors.
   make[3]: *** [Makefile:76: bpf/resolve_btfids] Error 2 shuffle=3326748311
   make[2]: *** [Makefile:1448: tools/bpf/resolve_btfids] Error 2 shuffle=3326748311
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:248: __sub-make] Error 2 shuffle=3326748311
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:248: __sub-make] Error 2 shuffle=3326748311
   make: Target 'prepare' not remade because of errors.

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the Linux-security-module-archive mailing list