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 D4248C4332F for ; Mon, 30 Oct 2023 16:24:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 549A46B020D; Mon, 30 Oct 2023 12:24:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4F97A6B020E; Mon, 30 Oct 2023 12:24:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E8B06B020F; Mon, 30 Oct 2023 12:24:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2F9F36B020D for ; Mon, 30 Oct 2023 12:24:43 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 092261403EC for ; Mon, 30 Oct 2023 16:24:43 +0000 (UTC) X-FDA: 81402651246.11.03E15C9 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by imf13.hostedemail.com (Postfix) with ESMTP id 2199C2001F for ; Mon, 30 Oct 2023 16:24:40 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=T8tJMIX5; spf=pass (imf13.hostedemail.com: domain of lkp@intel.com designates 134.134.136.20 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=1698683081; 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=uDc0xX4cWnbbjRcjCebEhRmdCo5DheLreW0qdi2MJHQ=; b=sI/09pbruESu7GVwvtA3ktAhbxN5Gje4FnnTiORTBTJC0UDaEpxn5H1xxC8uk1j2S4EftG uDRIhIpCiIirfHZapPbS8xGIl3Nl45zWcOm2KvsNbK+fsul2T3HU5fCx0JC6VrxSal+/Og QiDsGl2eQ9EoeFOY18rDe/DurWKkjCw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698683081; a=rsa-sha256; cv=none; b=gXL2TVqlrvYzL8J6aOJqiJdR1b0ndVDV36sVQ7rNIQFQ1afW6aiacNRNs5Np9wg1qlnsvQ BsyemjNqyseNNuGb4NRO2CtYvkrdS/y/l972T2BRH8l8+me660tRk4aY39nVxF5hXDMIlm MPYE8KK0DdUf7MbdP7BJlxSUwexj6iI= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=T8tJMIX5; spf=pass (imf13.hostedemail.com: domain of lkp@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698683081; x=1730219081; h=date:from:to:cc:subject:message-id:mime-version; bh=2Zcg66WfYBem0+2bWHQA0RJH+P+Ok/et9+sAXu9vLiU=; b=T8tJMIX5yJCfz4+ZRQ/v2/oB3mcE0ElK6M9b/rFrGf5VwRcTUgupI9nd ukdIWlAung1zOMbpnl89Mq+8nslYeipLfaf9okfaS3It8e3ZjAuqIuWGp hP+7ZatwkwAZhAJW6S9pht/bDUrpHS6aUpQbkMjp6Tu/qFxz6OIEVZncd L2topHYfBWp9AMLbAXllHd4XWV9ZOZS99YdB1ABGrS8OgPpAPrYREE6Bd Wkh2foadpk5+qGVJ1PRJbN9hkyfP3dVEH5YA+J4c5U17yGLAi1U+JL25T 3ldqOks4NDwFE8CU7rDIeG5XtTsaMLR1yhGwuJHofTzGc/o2zrbvsUA9l Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="378482160" X-IronPort-AV: E=Sophos;i="6.03,263,1694761200"; d="scan'208";a="378482160" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 09:24:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,263,1694761200"; d="scan'208";a="1546097" Received: from lkp-server01.sh.intel.com (HELO 8917679a5d3e) ([10.239.97.150]) by fmviesa002.fm.intel.com with ESMTP; 30 Oct 2023 09:24:38 -0700 Received: from kbuild by 8917679a5d3e with local (Exim 4.96) (envelope-from ) id 1qxV47-000DPS-2v; Mon, 30 Oct 2023 16:24:35 +0000 Date: Tue, 31 Oct 2023 00:23:19 +0800 From: kernel test robot To: Chuyi Zhou Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Alexei Starovoitov Subject: [linux-next:master 10527/16121] kernel/bpf/task_iter.c:919:36: error: 'CSS_TASK_ITER_THREADED' undeclared Message-ID: <202310310055.RDWloNPr-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 2199C2001F X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 757xrooqnifdx4hcux8fg8cqsc8fk4he X-HE-Tag: 1698683080-317161 X-HE-Meta: U2FsdGVkX19r+a2gnXs5LaRLZfQ28wXReA57Gn5gx6ZJlks+WgSXNNVH31q+vHY+szPKx2RqHzpN++SvLGWWot0zD/y42XY4fM2ZL9Yurw7lJH6D8XErPt8CQ2cSGzqi3oDtPshHY9EJMqqkfXWGJBR94YpIa1UgDJSQAbYYoLTentZT89OrcWmYANHeR/hyo0bRNROTQqD/Gtxpwx9tnkMTdgVQ37z+9bXSjxqcyRpRBHeCLbp796ETo6e22kWQL67U3zW0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ZQh1xFAF7auK 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: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c503e3eec382ac708ee7adf874add37b77c5d312 commit: 9c66dc94b62aef23300f05f63404afb8990920b4 [10527/16121] bpf: Introduce css_task open-coded iterator kfuncs config: xtensa-randconfig-001-20231030 (https://download.01.org/0day-ci/archive/20231031/202310310055.RDWloNPr-lkp@intel.com/config) compiler: xtensa-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231031/202310310055.RDWloNPr-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202310310055.RDWloNPr-lkp@intel.com/ All errors (new ones prefixed by >>): kernel/bpf/task_iter.c: In function 'bpf_iter_css_task_new': kernel/bpf/task_iter.c:919:14: error: 'CSS_TASK_ITER_PROCS' undeclared (first use in this function) 919 | case CSS_TASK_ITER_PROCS | CSS_TASK_ITER_THREADED: | ^~~~~~~~~~~~~~~~~~~ kernel/bpf/task_iter.c:919:14: note: each undeclared identifier is reported only once for each function it appears in >> kernel/bpf/task_iter.c:919:36: error: 'CSS_TASK_ITER_THREADED' undeclared (first use in this function) 919 | case CSS_TASK_ITER_PROCS | CSS_TASK_ITER_THREADED: | ^~~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf/task_iter.c:927:60: error: invalid application of 'sizeof' to incomplete type 'struct css_task_iter' 927 | kit->css_it = bpf_mem_alloc(&bpf_global_ma, sizeof(struct css_task_iter)); | ^~~~~~ >> kernel/bpf/task_iter.c:930:9: error: implicit declaration of function 'css_task_iter_start'; did you mean 'task_seq_start'? [-Werror=implicit-function-declaration] 930 | css_task_iter_start(css, flags, kit->css_it); | ^~~~~~~~~~~~~~~~~~~ | task_seq_start kernel/bpf/task_iter.c: In function 'bpf_iter_css_task_next': >> kernel/bpf/task_iter.c:940:16: error: implicit declaration of function 'css_task_iter_next'; did you mean 'class_dev_iter_next'? [-Werror=implicit-function-declaration] 940 | return css_task_iter_next(kit->css_it); | ^~~~~~~~~~~~~~~~~~ | class_dev_iter_next kernel/bpf/task_iter.c:940:16: warning: returning 'int' from a function with return type 'struct task_struct *' makes pointer from integer without a cast [-Wint-conversion] 940 | return css_task_iter_next(kit->css_it); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/task_iter.c: In function 'bpf_iter_css_task_destroy': >> kernel/bpf/task_iter.c:949:9: error: implicit declaration of function 'css_task_iter_end' [-Werror=implicit-function-declaration] 949 | css_task_iter_end(kit->css_it); | ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/CSS_TASK_ITER_THREADED +919 kernel/bpf/task_iter.c 904 905 __diag_push(); 906 __diag_ignore_all("-Wmissing-prototypes", 907 "Global functions as their definitions will be in vmlinux BTF"); 908 909 __bpf_kfunc int bpf_iter_css_task_new(struct bpf_iter_css_task *it, 910 struct cgroup_subsys_state *css, unsigned int flags) 911 { 912 struct bpf_iter_css_task_kern *kit = (void *)it; 913 914 BUILD_BUG_ON(sizeof(struct bpf_iter_css_task_kern) != sizeof(struct bpf_iter_css_task)); 915 BUILD_BUG_ON(__alignof__(struct bpf_iter_css_task_kern) != 916 __alignof__(struct bpf_iter_css_task)); 917 kit->css_it = NULL; 918 switch (flags) { > 919 case CSS_TASK_ITER_PROCS | CSS_TASK_ITER_THREADED: 920 case CSS_TASK_ITER_PROCS: 921 case 0: 922 break; 923 default: 924 return -EINVAL; 925 } 926 > 927 kit->css_it = bpf_mem_alloc(&bpf_global_ma, sizeof(struct css_task_iter)); 928 if (!kit->css_it) 929 return -ENOMEM; > 930 css_task_iter_start(css, flags, kit->css_it); 931 return 0; 932 } 933 934 __bpf_kfunc struct task_struct *bpf_iter_css_task_next(struct bpf_iter_css_task *it) 935 { 936 struct bpf_iter_css_task_kern *kit = (void *)it; 937 938 if (!kit->css_it) 939 return NULL; > 940 return css_task_iter_next(kit->css_it); 941 } 942 943 __bpf_kfunc void bpf_iter_css_task_destroy(struct bpf_iter_css_task *it) 944 { 945 struct bpf_iter_css_task_kern *kit = (void *)it; 946 947 if (!kit->css_it) 948 return; > 949 css_task_iter_end(kit->css_it); 950 bpf_mem_free(&bpf_global_ma, kit->css_it); 951 } 952 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki