Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B443F5232 for ; Sat, 7 Oct 2023 21:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OWMy/6Bw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696713333; x=1728249333; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=V9wrXxYZL76JDREfQ5j+mCFT3ps3onT8YAaqsBOx3g4=; b=OWMy/6Bw0aE/z6d4+PhttEmhxXDXQmkeWb3RGtRUPB1SD+3NB3OUVK1e 8hGxtIPvMyjWZPE8PPoHZ2aa8RT6du7p6kLG8k6hSeRCaEcSVVdiEq+US mjTpiEoxML2yQMp1xyH7gqXf92w25Zn0/zotIRZgWOsVitXiujd0W+O0H KXdo7SOAiC4zwxAzl7OYbpWax+GxpVCZwZV1+V5VFRRU7+iY+9v5qq0wf wua6IsrC+oJc5vpHewgPk5sHot3zUl01pMO/JRKA8Fz054oOfXY4u9TzL V1I4nEccsSob8pQyXO7MQLl32X9o31pRe6kHObEJ3VJfGKocucVzeYePh w==; X-IronPort-AV: E=McAfee;i="6600,9927,10856"; a="387824261" X-IronPort-AV: E=Sophos;i="6.03,207,1694761200"; d="scan'208";a="387824261" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2023 14:15:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10856"; a="868771909" X-IronPort-AV: E=Sophos;i="6.03,207,1694761200"; d="scan'208";a="868771909" Received: from lkp-server01.sh.intel.com (HELO 8a3a91ad4240) ([10.239.97.150]) by fmsmga002.fm.intel.com with ESMTP; 07 Oct 2023 14:15:31 -0700 Received: from kbuild by 8a3a91ad4240 with local (Exim 4.96) (envelope-from ) id 1qpEe1-0004nJ-0R; Sat, 07 Oct 2023 21:15:29 +0000 Date: Sun, 8 Oct 2023 05:15:11 +0800 From: kernel test robot To: Yafang Shao Cc: oe-kbuild-all@lists.linux.dev Subject: Re: [RFC PATCH bpf-next 3/8] bpf: Add kfuncs for cgroup1 hierarchy Message-ID: <202310080536.BvkfVd6L-lkp@intel.com> References: <20231007140304.4390-4-laoar.shao@gmail.com> Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231007140304.4390-4-laoar.shao@gmail.com> Hi Yafang, [This is a private test report for your RFC patch.] kernel test robot noticed the following build warnings: [auto build test WARNING on bpf-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Yafang-Shao/cgroup-Don-t-have-to-hold-cgroup_mutex-in-task_cgroup_from_root/20231007-220510 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master patch link: https://lore.kernel.org/r/20231007140304.4390-4-laoar.shao%40gmail.com patch subject: [RFC PATCH bpf-next 3/8] bpf: Add kfuncs for cgroup1 hierarchy config: x86_64-randconfig-004-20231008 (https://download.01.org/0day-ci/archive/20231008/202310080536.BvkfVd6L-lkp@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231008/202310080536.BvkfVd6L-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/202310080536.BvkfVd6L-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/bpf/helpers.c:1892:19: warning: no previous declaration for 'bpf_obj_new_impl' [-Wmissing-declarations] __bpf_kfunc void *bpf_obj_new_impl(u64 local_type_id__k, void *meta__ign) ^~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:1906:19: warning: no previous declaration for 'bpf_percpu_obj_new_impl' [-Wmissing-declarations] __bpf_kfunc void *bpf_percpu_obj_new_impl(u64 local_type_id__k, void *meta__ign) ^~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:1934:18: warning: no previous declaration for 'bpf_obj_drop_impl' [-Wmissing-declarations] __bpf_kfunc void bpf_obj_drop_impl(void *p__alloc, void *meta__ign) ^~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:1942:18: warning: no previous declaration for 'bpf_percpu_obj_drop_impl' [-Wmissing-declarations] __bpf_kfunc void bpf_percpu_obj_drop_impl(void *p__alloc, void *meta__ign) ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:1948:19: warning: no previous declaration for 'bpf_refcount_acquire_impl' [-Wmissing-declarations] __bpf_kfunc void *bpf_refcount_acquire_impl(void *p__refcounted_kptr, void *meta__ign) ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:1993:17: warning: no previous declaration for 'bpf_list_push_front_impl' [-Wmissing-declarations] __bpf_kfunc int bpf_list_push_front_impl(struct bpf_list_head *head, ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2003:17: warning: no previous declaration for 'bpf_list_push_back_impl' [-Wmissing-declarations] __bpf_kfunc int bpf_list_push_back_impl(struct bpf_list_head *head, ^~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2036:35: warning: no previous declaration for 'bpf_list_pop_front' [-Wmissing-declarations] __bpf_kfunc struct bpf_list_node *bpf_list_pop_front(struct bpf_list_head *head) ^~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2041:35: warning: no previous declaration for 'bpf_list_pop_back' [-Wmissing-declarations] __bpf_kfunc struct bpf_list_node *bpf_list_pop_back(struct bpf_list_head *head) ^~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2046:33: warning: no previous declaration for 'bpf_rbtree_remove' [-Wmissing-declarations] __bpf_kfunc struct bpf_rb_node *bpf_rbtree_remove(struct bpf_rb_root *root, ^~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2102:17: warning: no previous declaration for 'bpf_rbtree_add_impl' [-Wmissing-declarations] __bpf_kfunc int bpf_rbtree_add_impl(struct bpf_rb_root *root, struct bpf_rb_node *node, ^~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2112:33: warning: no previous declaration for 'bpf_rbtree_first' [-Wmissing-declarations] __bpf_kfunc struct bpf_rb_node *bpf_rbtree_first(struct bpf_rb_root *root) ^~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2125:33: warning: no previous declaration for 'bpf_task_acquire' [-Wmissing-declarations] __bpf_kfunc struct task_struct *bpf_task_acquire(struct task_struct *p) ^~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2136:18: warning: no previous declaration for 'bpf_task_release' [-Wmissing-declarations] __bpf_kfunc void bpf_task_release(struct task_struct *p) ^~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2148:28: warning: no previous declaration for 'bpf_cgroup_acquire' [-Wmissing-declarations] __bpf_kfunc struct cgroup *bpf_cgroup_acquire(struct cgroup *cgrp) ^~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2160:18: warning: no previous declaration for 'bpf_cgroup_release' [-Wmissing-declarations] __bpf_kfunc void bpf_cgroup_release(struct cgroup *cgrp) ^~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2172:28: warning: no previous declaration for 'bpf_cgroup_ancestor' [-Wmissing-declarations] __bpf_kfunc struct cgroup *bpf_cgroup_ancestor(struct cgroup *cgrp, int level) ^~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2192:28: warning: no previous declaration for 'bpf_cgroup_from_id' [-Wmissing-declarations] __bpf_kfunc struct cgroup *bpf_cgroup_from_id(u64 cgid) ^~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2212:18: warning: no previous declaration for 'bpf_task_under_cgroup' [-Wmissing-declarations] __bpf_kfunc long bpf_task_under_cgroup(struct task_struct *task, ^~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf/helpers.c:2224:17: warning: no previous declaration for 'bpf_task_cgroup1_id_within_hierarchy' [-Wmissing-declarations] __bpf_kfunc u64 bpf_task_cgroup1_id_within_hierarchy(struct task_struct *task, int hierarchy_id) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf/helpers.c:2236:17: warning: no previous declaration for 'bpf_task_ancestor_cgroup1_id_within_hierarchy' [-Wmissing-declarations] __bpf_kfunc u64 bpf_task_ancestor_cgroup1_id_within_hierarchy(struct task_struct *task, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2249:33: warning: no previous declaration for 'bpf_task_from_pid' [-Wmissing-declarations] __bpf_kfunc struct task_struct *bpf_task_from_pid(s32 pid) ^~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2290:19: warning: no previous declaration for 'bpf_dynptr_slice' [-Wmissing-declarations] __bpf_kfunc void *bpf_dynptr_slice(const struct bpf_dynptr_kern *ptr, u32 offset, ^~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2374:19: warning: no previous declaration for 'bpf_dynptr_slice_rdwr' [-Wmissing-declarations] __bpf_kfunc void *bpf_dynptr_slice_rdwr(const struct bpf_dynptr_kern *ptr, u32 offset, ^~~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2405:17: warning: no previous declaration for 'bpf_dynptr_adjust' [-Wmissing-declarations] __bpf_kfunc int bpf_dynptr_adjust(struct bpf_dynptr_kern *ptr, u32 start, u32 end) ^~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2423:18: warning: no previous declaration for 'bpf_dynptr_is_null' [-Wmissing-declarations] __bpf_kfunc bool bpf_dynptr_is_null(struct bpf_dynptr_kern *ptr) ^~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2428:18: warning: no previous declaration for 'bpf_dynptr_is_rdonly' [-Wmissing-declarations] __bpf_kfunc bool bpf_dynptr_is_rdonly(struct bpf_dynptr_kern *ptr) ^~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2436:19: warning: no previous declaration for 'bpf_dynptr_size' [-Wmissing-declarations] __bpf_kfunc __u32 bpf_dynptr_size(const struct bpf_dynptr_kern *ptr) ^~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2444:17: warning: no previous declaration for 'bpf_dynptr_clone' [-Wmissing-declarations] __bpf_kfunc int bpf_dynptr_clone(struct bpf_dynptr_kern *ptr, ^~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2457:19: warning: no previous declaration for 'bpf_cast_to_kern_ctx' [-Wmissing-declarations] __bpf_kfunc void *bpf_cast_to_kern_ctx(void *obj) ^~~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2462:19: warning: no previous declaration for 'bpf_rdonly_cast' [-Wmissing-declarations] __bpf_kfunc void *bpf_rdonly_cast(void *obj__ign, u32 btf_id__k) ^~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2467:18: warning: no previous declaration for 'bpf_rcu_read_lock' [-Wmissing-declarations] __bpf_kfunc void bpf_rcu_read_lock(void) ^~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2472:18: warning: no previous declaration for 'bpf_rcu_read_unlock' [-Wmissing-declarations] __bpf_kfunc void bpf_rcu_read_unlock(void) ^~~~~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:2501:18: warning: no previous declaration for 'bpf_throw' [-Wmissing-declarations] __bpf_kfunc void bpf_throw(u64 cookie) ^~~~~~~~~ vim +/bpf_task_cgroup1_id_within_hierarchy +2224 kernel/bpf/helpers.c 2217 2218 /** 2219 * bpf_task_cgroup_id_within_hierarchy - Retrieves the associated cgroup ID of a 2220 * task within a specific cgroup1 hierarchy. 2221 * @task: The target task 2222 * @hierarchy_id: The ID of a cgroup1 hierarchy 2223 */ > 2224 __bpf_kfunc u64 bpf_task_cgroup1_id_within_hierarchy(struct task_struct *task, int hierarchy_id) 2225 { 2226 return task_cgroup1_id_within_hierarchy(task, hierarchy_id); 2227 } 2228 2229 /** 2230 * bpf_task_ancestor_cgroup_id_within_hierarchy - Retrieves the associated 2231 * ancestor cgroup ID of a task within a specific cgroup1 hierarchy. 2232 * @task: The target task 2233 * @hierarchy_id: The ID of a cgroup1 hierarchy 2234 * @ancestor_level: The cgroup level of the ancestor in the cgroup1 hierarchy 2235 */ > 2236 __bpf_kfunc u64 bpf_task_ancestor_cgroup1_id_within_hierarchy(struct task_struct *task, 2237 int hierarchy_id, int ancestor_level) 2238 { 2239 return task_ancestor_cgroup1_id_within_hierarchy(task, hierarchy_id, ancestor_level); 2240 } 2241 #endif /* CONFIG_CGROUPS */ 2242 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki