public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Vernet <void@manifault.com>, bpf@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev,
	song@kernel.org, yhs@meta.com, john.fastabend@gmail.com,
	kpsingh@kernel.org, sdf@google.com, haoluo@google.com,
	jolsa@kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, tj@kernel.org
Subject: Re: [PATCH bpf-next 4/8] bpf: Enable cpumasks to be queried and used as kptrs
Date: Fri, 20 Jan 2023 10:36:24 +0800	[thread overview]
Message-ID: <202301201053.OKCBdOsh-lkp@intel.com> (raw)
In-Reply-To: <20230119235833.2948341-5-void@manifault.com>

Hi David,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Vernet/bpf-Enable-annotating-trusted-nested-pointers/20230120-080139
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20230119235833.2948341-5-void%40manifault.com
patch subject: [PATCH bpf-next 4/8] bpf: Enable cpumasks to be queried and used as kptrs
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230120/202301201053.OKCBdOsh-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/11541205c58f2226e5ffbc5967317469d65efac6
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review David-Vernet/bpf-Enable-annotating-trusted-nested-pointers/20230120-080139
        git checkout 11541205c58f2226e5ffbc5967317469d65efac6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> kernel/bpf/cpumask.c:38:21: warning: no previous prototype for 'bpf_cpumask_create' [-Wmissing-prototypes]
      38 | struct bpf_cpumask *bpf_cpumask_create(void)
         |                     ^~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:52:21: warning: no previous prototype for 'bpf_cpumask_acquire' [-Wmissing-prototypes]
      52 | struct bpf_cpumask *bpf_cpumask_acquire(struct bpf_cpumask *cpumask)
         |                     ^~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:58:21: warning: no previous prototype for 'bpf_cpumask_kptr_get' [-Wmissing-prototypes]
      58 | struct bpf_cpumask *bpf_cpumask_kptr_get(struct bpf_cpumask **cpumaskp)
         |                     ^~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:76:6: warning: no previous prototype for 'bpf_cpumask_release' [-Wmissing-prototypes]
      76 | void bpf_cpumask_release(struct bpf_cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:88:5: warning: no previous prototype for 'bpf_cpumask_first' [-Wmissing-prototypes]
      88 | u32 bpf_cpumask_first(const struct cpumask *cpumask)
         |     ^~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:93:5: warning: no previous prototype for 'bpf_cpumask_first_zero' [-Wmissing-prototypes]
      93 | u32 bpf_cpumask_first_zero(const struct cpumask *cpumask)
         |     ^~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:98:6: warning: no previous prototype for 'bpf_cpumask_set_cpu' [-Wmissing-prototypes]
      98 | void bpf_cpumask_set_cpu(u32 cpu, struct bpf_cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:106:6: warning: no previous prototype for 'bpf_cpumask_clear_cpu' [-Wmissing-prototypes]
     106 | void bpf_cpumask_clear_cpu(u32 cpu, struct bpf_cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:114:6: warning: no previous prototype for 'bpf_cpumask_test_cpu' [-Wmissing-prototypes]
     114 | bool bpf_cpumask_test_cpu(u32 cpu, const struct cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:122:6: warning: no previous prototype for 'bpf_cpumask_test_and_set_cpu' [-Wmissing-prototypes]
     122 | bool bpf_cpumask_test_and_set_cpu(u32 cpu, struct bpf_cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:130:6: warning: no previous prototype for 'bpf_cpumask_test_and_clear_cpu' [-Wmissing-prototypes]
     130 | bool bpf_cpumask_test_and_clear_cpu(u32 cpu, struct bpf_cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:138:6: warning: no previous prototype for 'bpf_cpumask_setall' [-Wmissing-prototypes]
     138 | void bpf_cpumask_setall(struct bpf_cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:143:6: warning: no previous prototype for 'bpf_cpumask_clear' [-Wmissing-prototypes]
     143 | void bpf_cpumask_clear(struct bpf_cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:148:6: warning: no previous prototype for 'bpf_cpumask_and' [-Wmissing-prototypes]
     148 | bool bpf_cpumask_and(struct bpf_cpumask *dst,
         |      ^~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:155:6: warning: no previous prototype for 'bpf_cpumask_or' [-Wmissing-prototypes]
     155 | void bpf_cpumask_or(struct bpf_cpumask *dst,
         |      ^~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:162:6: warning: no previous prototype for 'bpf_cpumask_xor' [-Wmissing-prototypes]
     162 | void bpf_cpumask_xor(struct bpf_cpumask *dst,
         |      ^~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:169:6: warning: no previous prototype for 'bpf_cpumask_equal' [-Wmissing-prototypes]
     169 | bool bpf_cpumask_equal(const struct cpumask *src1, const struct cpumask *src2)
         |      ^~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:174:6: warning: no previous prototype for 'bpf_cpumask_intersects' [-Wmissing-prototypes]
     174 | bool bpf_cpumask_intersects(const struct cpumask *src1, const struct cpumask *src2)
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:179:6: warning: no previous prototype for 'bpf_cpumask_subset' [-Wmissing-prototypes]
     179 | bool bpf_cpumask_subset(const struct cpumask *src1, const struct cpumask *src2)
         |      ^~~~~~~~~~~~~~~~~~
>> kernel/bpf/cpumask.c:184:6: warning: no previous prototype for 'bpf_cpumask_empty' [-Wmissing-prototypes]
     184 | bool bpf_cpumask_empty(const struct cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~~
   kernel/bpf/cpumask.c:189:6: warning: no previous prototype for 'bpf_cpumask_full' [-Wmissing-prototypes]
     189 | bool bpf_cpumask_full(const struct cpumask *cpumask)
         |      ^~~~~~~~~~~~~~~~
   kernel/bpf/cpumask.c:194:6: warning: no previous prototype for 'bpf_cpumask_copy' [-Wmissing-prototypes]
     194 | void bpf_cpumask_copy(struct bpf_cpumask *dst, const struct cpumask *src)
         |      ^~~~~~~~~~~~~~~~
   kernel/bpf/cpumask.c:199:5: warning: no previous prototype for 'bpf_cpumask_any' [-Wmissing-prototypes]
     199 | u32 bpf_cpumask_any(const struct cpumask *cpumask)
         |     ^~~~~~~~~~~~~~~
   kernel/bpf/cpumask.c:204:5: warning: no previous prototype for 'bpf_cpumask_any_and' [-Wmissing-prototypes]
     204 | u32 bpf_cpumask_any_and(const struct cpumask *src1, const struct cpumask *src2)
         |     ^~~~~~~~~~~~~~~~~~~


vim +/bpf_cpumask_create +38 kernel/bpf/cpumask.c

    37	
  > 38	struct bpf_cpumask *bpf_cpumask_create(void)
    39	{
    40		struct bpf_cpumask *cpumask;
    41	
    42		cpumask = bpf_mem_alloc(&bpf_cpumask_ma, sizeof(*cpumask));
    43		if (!cpumask)
    44			return NULL;
    45	
    46		memset(cpumask, 0, sizeof(*cpumask));
    47		refcount_set(&cpumask->usage, 1);
    48	
    49		return cpumask;
    50	}
    51	
  > 52	struct bpf_cpumask *bpf_cpumask_acquire(struct bpf_cpumask *cpumask)
    53	{
    54		refcount_inc(&cpumask->usage);
    55		return cpumask;
    56	}
    57	
  > 58	struct bpf_cpumask *bpf_cpumask_kptr_get(struct bpf_cpumask **cpumaskp)
    59	{
    60		struct bpf_cpumask *cpumask;
    61	
    62		/* The BPF memory allocator frees memory backing its caches in an RCU
    63		 * callback. Thus, we can safely use RCU to ensure that the cpumask is
    64		 * safe to read.
    65		 */
    66		rcu_read_lock();
    67	
    68		cpumask = READ_ONCE(*cpumaskp);
    69		if (cpumask && !refcount_inc_not_zero(&cpumask->usage))
    70			cpumask = NULL;
    71	
    72		rcu_read_unlock();
    73		return cpumask;
    74	}
    75	
  > 76	void bpf_cpumask_release(struct bpf_cpumask *cpumask)
    77	{
    78		if (!cpumask)
    79			return;
    80	
    81		if (refcount_dec_and_test(&cpumask->usage)) {
    82			migrate_disable();
    83			bpf_mem_free(&bpf_cpumask_ma, cpumask);
    84			migrate_enable();
    85		}
    86	}
    87	
  > 88	u32 bpf_cpumask_first(const struct cpumask *cpumask)
    89	{
    90		return cpumask_first(cpumask);
    91	}
    92	
  > 93	u32 bpf_cpumask_first_zero(const struct cpumask *cpumask)
    94	{
    95		return cpumask_first_zero(cpumask);
    96	}
    97	
  > 98	void bpf_cpumask_set_cpu(u32 cpu, struct bpf_cpumask *cpumask)
    99	{
   100		if (!cpu_valid(cpu))
   101			return;
   102	
   103		cpumask_set_cpu(cpu, (struct cpumask *)cpumask);
   104	}
   105	
 > 106	void bpf_cpumask_clear_cpu(u32 cpu, struct bpf_cpumask *cpumask)
   107	{
   108		if (!cpu_valid(cpu))
   109			return;
   110	
   111		cpumask_clear_cpu(cpu, (struct cpumask *)cpumask);
   112	}
   113	
 > 114	bool bpf_cpumask_test_cpu(u32 cpu, const struct cpumask *cpumask)
   115	{
   116		if (!cpu_valid(cpu))
   117			return false;
   118	
   119		return cpumask_test_cpu(cpu, (struct cpumask *)cpumask);
   120	}
   121	
 > 122	bool bpf_cpumask_test_and_set_cpu(u32 cpu, struct bpf_cpumask *cpumask)
   123	{
   124		if (!cpu_valid(cpu))
   125			return false;
   126	
   127		return cpumask_test_and_set_cpu(cpu, (struct cpumask *)cpumask);
   128	}
   129	
 > 130	bool bpf_cpumask_test_and_clear_cpu(u32 cpu, struct bpf_cpumask *cpumask)
   131	{
   132		if (!cpu_valid(cpu))
   133			return false;
   134	
   135		return cpumask_test_and_clear_cpu(cpu, (struct cpumask *)cpumask);
   136	}
   137	
 > 138	void bpf_cpumask_setall(struct bpf_cpumask *cpumask)
   139	{
   140		cpumask_setall((struct cpumask *)cpumask);
   141	}
   142	
 > 143	void bpf_cpumask_clear(struct bpf_cpumask *cpumask)
   144	{
   145		cpumask_clear((struct cpumask *)cpumask);
   146	}
   147	
 > 148	bool bpf_cpumask_and(struct bpf_cpumask *dst,
   149			     const struct cpumask *src1,
   150			     const struct cpumask *src2)
   151	{
   152		return cpumask_and((struct cpumask *)dst, src1, src2);
   153	}
   154	
 > 155	void bpf_cpumask_or(struct bpf_cpumask *dst,
   156			    const struct cpumask *src1,
   157			    const struct cpumask *src2)
   158	{
   159		cpumask_or((struct cpumask *)dst, src1, src2);
   160	}
   161	
 > 162	void bpf_cpumask_xor(struct bpf_cpumask *dst,
   163			     const struct cpumask *src1,
   164			     const struct cpumask *src2)
   165	{
   166		cpumask_xor((struct cpumask *)dst, src1, src2);
   167	}
   168	
 > 169	bool bpf_cpumask_equal(const struct cpumask *src1, const struct cpumask *src2)
   170	{
   171		return cpumask_equal(src1, src2);
   172	}
   173	
 > 174	bool bpf_cpumask_intersects(const struct cpumask *src1, const struct cpumask *src2)
   175	{
   176		return cpumask_intersects(src1, src2);
   177	}
   178	
 > 179	bool bpf_cpumask_subset(const struct cpumask *src1, const struct cpumask *src2)
   180	{
   181		return cpumask_subset(src1, src2);
   182	}
   183	
 > 184	bool bpf_cpumask_empty(const struct cpumask *cpumask)
   185	{
   186		return cpumask_empty(cpumask);
   187	}
   188	
 > 189	bool bpf_cpumask_full(const struct cpumask *cpumask)
   190	{
   191		return cpumask_full(cpumask);
   192	}
   193	
 > 194	void bpf_cpumask_copy(struct bpf_cpumask *dst, const struct cpumask *src)
   195	{
   196		cpumask_copy((struct cpumask *)dst, src);
   197	}
   198	
 > 199	u32 bpf_cpumask_any(const struct cpumask *cpumask)
   200	{
   201		return cpumask_any(cpumask);
   202	}
   203	
 > 204	u32 bpf_cpumask_any_and(const struct cpumask *src1, const struct cpumask *src2)
   205	{
   206		return cpumask_any_and(src1, src2);
   207	}
   208	

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

  reply	other threads:[~2023-01-20  2:37 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 23:58 [PATCH bpf-next 0/8] Enable cpumasks to be used as kptrs David Vernet
2023-01-19 23:58 ` [PATCH bpf-next 1/8] bpf: Enable annotating trusted nested pointers David Vernet
2023-01-20  1:14   ` kernel test robot
2023-01-20  2:27     ` David Vernet
2023-01-20  6:01   ` kernel test robot
2023-01-19 23:58 ` [PATCH bpf-next 2/8] bpf: Allow trusted args to walk struct when checking BTF IDs David Vernet
2023-01-20  4:58   ` Kumar Kartikeya Dwivedi
2023-01-20  5:23     ` David Vernet
2023-01-20  5:40       ` Alexei Starovoitov
2023-01-20  5:56         ` Kumar Kartikeya Dwivedi
2023-01-20  6:14           ` Alexei Starovoitov
2023-01-20 14:56             ` David Vernet
2023-01-20 15:26               ` David Vernet
2023-01-20 16:17                 ` Alexei Starovoitov
2023-01-19 23:58 ` [PATCH bpf-next 3/8] bpf: Disallow NULL PTR_TO_MEM for trusted kfuncs David Vernet
2023-01-20  5:21   ` Kumar Kartikeya Dwivedi
2023-01-20  5:31     ` David Vernet
2023-01-20  5:44       ` Alexei Starovoitov
2023-01-19 23:58 ` [PATCH bpf-next 4/8] bpf: Enable cpumasks to be queried and used as kptrs David Vernet
2023-01-20  2:36   ` kernel test robot [this message]
2023-01-20  3:39     ` David Vernet
2023-01-20  5:48   ` Alexei Starovoitov
2023-01-20  5:50     ` David Vernet
2023-01-20  5:52       ` Alexei Starovoitov
2023-01-20  6:22   ` kernel test robot
2023-01-19 23:58 ` [PATCH bpf-next 5/8] selftests/bpf: Add nested trust selftests suite David Vernet
2023-01-20  5:51   ` Alexei Starovoitov
2023-01-20  5:56     ` David Vernet
2023-01-19 23:58 ` [PATCH bpf-next 6/8] selftests/bpf: Add selftest suite for cpumask kfuncs David Vernet
2023-01-19 23:58 ` [PATCH bpf-next 7/8] bpf/docs: Document cpumask kfuncs in a new file David Vernet
2023-01-20  5:59   ` Alexei Starovoitov
2023-01-20  6:01     ` David Vernet
2023-01-19 23:58 ` [PATCH bpf-next 8/8] bpf/docs: Document how nested trusted fields may be defined David Vernet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202301201053.OKCBdOsh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=tj@kernel.org \
    --cc=void@manifault.com \
    --cc=yhs@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox