From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39934C6FD1F for ; Thu, 16 Mar 2023 07:00:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F8216B0071; Thu, 16 Mar 2023 03:00:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2A6796B0072; Thu, 16 Mar 2023 03:00:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 147A46B0075; Thu, 16 Mar 2023 03:00:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 0168A6B0071 for ; Thu, 16 Mar 2023 03:00:35 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id A85B71212F5 for ; Thu, 16 Mar 2023 07:00:35 +0000 (UTC) X-FDA: 80573863230.06.F55CC7C Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf25.hostedemail.com (Postfix) with ESMTP id E98FBA0018 for ; Thu, 16 Mar 2023 07:00:31 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=mPsaX9XL; spf=pass (imf25.hostedemail.com: domain of lkp@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678950032; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=zvCvT2lITqQYFgN44pqEkAkIIoE8FdyH0kaDeTvttVo=; b=xga9MOCjqM7Zj071QR/NVG5Xt9JaRy0zs3rBUjJadRmCBwriF69iEO9gk4LZSTvJmFdgWZ UlSReU1IPVAp87X7v5rxlQxxyPDf1hV2TUa/eiR6p52ramktyXK1QFbYnBNoOGkeJ88bTg BSjQAdWTxTgywnUVG09E4bnVh1SmeT8= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=mPsaX9XL; spf=pass (imf25.hostedemail.com: domain of lkp@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678950032; a=rsa-sha256; cv=none; b=aDD/H+8dJiyN8L5X+U4gLzpf3pbGQuvOJgshQ5y/bjnCJ2tSDDQueFTbmO1JiO3R60qrqG ZzM5yy8HCoIPlt6k1PRsDzVRTePbC0SJfwfJb5NCkcOuLOw6D9fYCHRiKc+Cy1JVE6Oytl tLtlR8Y4eIjSMYv+I+b8/A8VcvUtCGY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678950032; x=1710486032; h=date:from:to:cc:subject:message-id:mime-version; bh=dRKM/A5fizMPqe1m8FjHZeYm9IPxADYTIS/OhPFgy24=; b=mPsaX9XLLJ1cZsl9Ac5HwhNGNGoo9LLNc+OKfVYNZGW6TyIRMNYWmEHU QzHZ6RF2TI3F8cTkXA2ynWkKVYlRlxScOxEI0rmqHpnBMlGM8FsW7azey 1qtB548wgGUT/jUNlNQfO5iYqXkef5kTRVdlemeA8bwKowWCIG+Fw27Tl Yd6wKKsqTbcd/0yTjYJJSwlrQq5ExCNGBKpsfvWSG92B3biMsdfbxsmgV traJY9NAqxY6AC5q3W5mXi8P/6bvo4NWsUBqOpkV2DBnmsXonRlzQ8jIg lwvEhTsWRZ7bhQwSu6QPO7tKfXhK2H19qYhUqdu0Ug7yXZJREmL5ASNHK Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="337925648" X-IronPort-AV: E=Sophos;i="5.98,265,1673942400"; d="scan'208";a="337925648" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2023 00:00:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="712216537" X-IronPort-AV: E=Sophos;i="5.98,265,1673942400"; d="scan'208";a="712216537" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 16 Mar 2023 00:00:24 -0700 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1pchb5-0008Nc-2I; Thu, 16 Mar 2023 07:00:23 +0000 Date: Thu, 16 Mar 2023 14:59:48 +0800 From: kernel test robot To: Viktor Malik Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Alexei Starovoitov , Luis Chamberlain Subject: [linux-next:master 3796/4036] kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' Message-ID: <202303161404.OrmfCy09-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Stat-Signature: u49dxtu9ipi9crkcz9ktgjq79zsdntq3 X-Rspam-User: X-Rspamd-Queue-Id: E98FBA0018 X-Rspamd-Server: rspam06 X-HE-Tag: 1678950031-727253 X-HE-Meta: U2FsdGVkX1/hJEPb0hblLsTjoTg0KDhXZCqqWYUcAy0JM5vxCK5CLFrffrBV7OthY92Ht6dnW1tC2rJzybT26DErSTl6NNghC0nTBXQllJjLVsdwwI9vEUEfU/gGuk2e84w/iBOM7HOtCdmgM/YYoyH0J5A0DlmpiQesJbY6E6kJ8FUzPOJvloqZD5UdsD1nH9xTJPDSVcXzSiRRRokQa/WCIhQ14Jus3M0TgMfmuVYdGFWRP5qt1QMopWLRoIc8ry+45VcSu/6KppapadAzg+0lNyYNhjPh6Yobp4TyfFWpuQ6E76IUWpZcS2YqvN5bUzQJpS7o6qw3yQQn8jcA/oIhk3atDBXTmhnS7EC3wNlI37tHcpwp1kB1BI8OIi9QZDZjSFZMPctmwwWMJUnKnN/oyV3/UtMlEhrTDSx/op06OJVKvwd9YTnAJ4KCYHalWeBNbTr7eS0WplvFAW9ebRoH2Y4D45ThAbiR9nZOeUdkXcUyKcUqEe80zGBVJuijYCZlgjo9omlO6YnBPH2gqUFiFzv/XTUNpkm9YeP3FWXI58cba7b94rsYIdFxXBDVyz8O8AWZ2SuqNSpWTTgm7XfM8dj3Z2sBUS06HB0M8PcMJx7A4ydaTjTB4fquoEasmKJcje+UJKIIpoXo9nufY4DUwHdyTqyNk+o+YR9CL7VA29O7cmhH1xWztcUohbyItpFAIRmdxA8iEIm1ILDkXdZ4kEY+xCrI8QQlFX6m0h3z5B6JE3G6XiLVqQFHbjFE6uRK489+VGN1czYQVEIkwv2sBrmvU67EpFyP2rcfIZcmpKFT96Bl2a+q7NHpK4kNukxiAyTiAuyXlYOolHsyuf1zM4Cnu4WAHZPSGcvD0wmDR+bR7gQo2X7h2BJWSZshHNYe+2uXIEh++ff3wjh+OAMOyOwWhVRrG5cdDrKuQRafaJ9lW5gqovpqpLgHi7ICTgfjkd56JSTjX0bUvnm JaLzY1zw p2DE5Hp2TzVHQa1imPy4UfiPfE3zyOOWq0czWQkBHbiPAoiaTX1LdodOMR2z40dv03zGXqhrSjSW166bB9pWXe851HM4YfGdkFhJcig9O5O63qP6QnFyFYXTZhspDoPmZTSVgt+3YMDM1ViYI4KaNbcMOd8UjiviDuec66wE+E86wVDn6QRNwxPKOgvTuH2Ez86LORbiK858HARSSnryKZ4MZB/Lcc07eJ+jTu0d6vMvZFXXZ3PS3kzOE9FH7qogxMp7JXFlIMg/wbZ00ei8lbgaLP/Efr95+hnGn5AfAwjhxnv79RtFnGV4PQSH3rgWCG9jUGXwyZRVMjoIoX3HC9XxyiG7nSYfCq2EixU+7hb/truay6QHdEd+bFsVMRHZ1JLZejAzc98XIYT6fADKllrM2Dg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 6f72958a49f68553f2b6ff713e8c8e51a34c1e1e commit: 2a6427ca8f3a8f08498c7b60e486c95af88d0afd [3796/4036] bpf: Fix attaching fentry/fexit/fmod_ret/lsm to modules config: riscv-randconfig-r042-20230313 (https://download.01.org/0day-ci/archive/20230316/202303161404.OrmfCy09-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2a6427ca8f3a8f08498c7b60e486c95af88d0afd git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 2a6427ca8f3a8f08498c7b60e486c95af88d0afd # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash kernel/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202303161404.OrmfCy09-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:391:13: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu((head)->next, typeof(*pos), member); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:2: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:20:47: note: expanded from macro 'container_of' static_assert(__same_type(*(ptr), ((type *)0)->member) || \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:340:74: note: expanded from macro '__same_type' #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: offsetof of incomplete type 'typeof (*mod)' (aka 'struct module') list_for_each_entry_rcu(mod, &modules, list, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:391:13: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu((head)->next, typeof(*pos), member); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:2: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:23:21: note: expanded from macro 'container_of' ((type *)(__mptr - offsetof(type, member))); }) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/stddef.h:16:32: note: expanded from macro 'offsetof' #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) ^ ~~~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: assigning to 'struct module *' from incompatible type 'void' list_for_each_entry_rcu(mod, &modules, list, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:391:11: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu((head)->next, typeof(*pos), member); \ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:392:7: note: expanded from macro 'list_for_each_entry_rcu' &pos->member != (head); \ ~~~^ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:387:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:379:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:387:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:379:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:387:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:379:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:387:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:379:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:387:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~ include/linux/compiler_types.h:379:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' __READ_ONCE(x); \ ^ include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE' #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) ^ include/linux/compiler_types.h:355:13: note: expanded from macro '__unqual_scalar_typeof' _Generic((x), \ ^ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' __READ_ONCE(x); \ ^ include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE' #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) ^ include/linux/compiler_types.h:362:15: note: expanded from macro '__unqual_scalar_typeof' default: (x))) ^ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' __READ_ONCE(x); \ ^ include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE' #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) ^ include/linux/container_of.h:19:26: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: operand of type 'void' where arithmetic or pointer type is required list_for_each_entry_rcu(mod, &modules, list, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:9: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:2: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/container_of.h:19:25: note: expanded from macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~~~ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:63: note: expanded from macro '__same_type' #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ^~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:63: note: expanded from macro '__same_type' #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ^~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:63: note: expanded from macro '__same_type' #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ^~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:63: note: expanded from macro '__same_type' #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ^~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:63: note: expanded from macro '__same_type' #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ^~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ In file included from kernel/bpf/verifier.c:27: >> kernel/bpf/../module/internal.h:212:2: error: incomplete definition of type 'struct module' list_for_each_entry_rcu(mod, &modules, list, ^ ~~~ include/linux/rculist.h:393:27: note: expanded from macro 'list_for_each_entry_rcu' pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) ~~~^ include/linux/rculist.h:307:25: note: expanded from macro 'list_entry_rcu' container_of(READ_ONCE(ptr), type, member) ^~~ include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE' __READ_ONCE(x); \ ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:63: note: expanded from macro '__same_type' #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ^~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ include/linux/printk.h:348:8: note: forward declaration of 'struct module' struct module; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. vim +212 kernel/bpf/../module/internal.h 58d208de3e8d87 Aaron Tomlin 2022-03-22 204 58d208de3e8d87 Aaron Tomlin 2022-03-22 205 static inline void mod_tree_insert(struct module *mod) { } 58d208de3e8d87 Aaron Tomlin 2022-03-22 206 static inline void mod_tree_remove_init(struct module *mod) { } 58d208de3e8d87 Aaron Tomlin 2022-03-22 207 static inline void mod_tree_remove(struct module *mod) { } 446d55666d5599 Christophe Leroy 2022-02-23 208 static inline struct module *mod_find(unsigned long addr, struct mod_tree_root *tree) 58d208de3e8d87 Aaron Tomlin 2022-03-22 209 { 58d208de3e8d87 Aaron Tomlin 2022-03-22 210 struct module *mod; 58d208de3e8d87 Aaron Tomlin 2022-03-22 211 58d208de3e8d87 Aaron Tomlin 2022-03-22 @212 list_for_each_entry_rcu(mod, &modules, list, 58d208de3e8d87 Aaron Tomlin 2022-03-22 213 lockdep_is_held(&module_mutex)) { 58d208de3e8d87 Aaron Tomlin 2022-03-22 214 if (within_module(addr, mod)) 58d208de3e8d87 Aaron Tomlin 2022-03-22 215 return mod; 58d208de3e8d87 Aaron Tomlin 2022-03-22 216 } 58d208de3e8d87 Aaron Tomlin 2022-03-22 217 58d208de3e8d87 Aaron Tomlin 2022-03-22 218 return NULL; 58d208de3e8d87 Aaron Tomlin 2022-03-22 219 } 58d208de3e8d87 Aaron Tomlin 2022-03-22 220 #endif /* CONFIG_MODULES_TREE_LOOKUP */ b33465fe9c52a3 Aaron Tomlin 2022-03-22 221 :::::: The code at line 212 was first introduced by commit :::::: 58d208de3e8d87dbe196caf0b57cc58c7a3836ca module: Move latched RB-tree support to a separate file :::::: TO: Aaron Tomlin :::::: CC: Luis Chamberlain -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests