From: kernel test robot <lkp@intel.com>
To: KP Singh <kpsingh@chromium.org>,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
linux-security-module@vger.kernel.org
Cc: kbuild-all@lists.01.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>, Paul Turner <pjt@google.com>,
Jann Horn <jannh@google.com>,
Florent Revest <revest@chromium.org>
Subject: Re: [PATCH bpf-next v4 1/4] bpf: Generalize bpf_sk_storage
Date: Mon, 20 Jul 2020 19:18:14 +0800 [thread overview]
Message-ID: <202007201950.yFJ7GtUT%lkp@intel.com> (raw)
In-Reply-To: <20200709101239.3829793-2-kpsingh@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 2513 bytes --]
Hi KP,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/KP-Singh/Generalizing-bpf_local_storage/20200709-181906
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: s390-randconfig-s032-20200719 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> kernel/bpf/bpf_local_storage.c:237:16: sparse: sparse: non size-preserving integer to pointer cast
vim +237 kernel/bpf/bpf_local_storage.c
221
222 /* Publish local_storage to the address. This is used because we are already
223 * in a region where we cannot grab a lock on the object owning the storage (
224 * (e.g sk->sk_lock). Hence, atomic ops is used.
225 *
226 * From now on, the addr pointer is protected
227 * by the local_storage->lock. Hence, upon freeing,
228 * the local_storage->lock must be held before unlinking the storage from the
229 * owner.
230 */
231 int bpf_local_storage_publish(struct bpf_local_storage_elem *first_selem,
232 struct bpf_local_storage **addr,
233 struct bpf_local_storage *curr)
234 {
235 struct bpf_local_storage *prev;
236
> 237 prev = cmpxchg(addr, NULL, curr);
238 if (unlikely(prev)) {
239 /* Note that even first_selem was linked to smap's
240 * bucket->list, first_selem can be freed immediately
241 * (instead of kfree_rcu) because
242 * bpf_local_storage_map_free() does a
243 * synchronize_rcu() before walking the bucket->list.
244 * Hence, no one is accessing selem from the
245 * bucket->list under rcu_read_lock().
246 */
247 bpf_selem_unlink_map(first_selem);
248 return -EAGAIN;
249 }
250
251 return 0;
252 }
253
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27346 bytes --]
next prev parent reply other threads:[~2020-07-20 11:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 10:12 [PATCH bpf-next v4 0/4] Generalizing bpf_local_storage KP Singh
2020-07-09 10:12 ` [PATCH bpf-next v4 1/4] bpf: Generalize bpf_sk_storage KP Singh
2020-07-10 6:59 ` Martin KaFai Lau
2020-07-20 11:18 ` kernel test robot [this message]
2020-07-09 10:12 ` [PATCH bpf-next v4 2/4] bpf: Implement bpf_local_storage for inodes KP Singh
2020-07-15 21:57 ` Martin KaFai Lau
2020-07-15 22:59 ` KP Singh
2020-07-20 22:44 ` KP Singh
2020-07-09 10:12 ` [PATCH bpf-next v4 3/4] bpf: Allow local storage to be used from LSM programs KP Singh
2020-07-09 10:12 ` [PATCH bpf-next v4 4/4] bpf: Add selftests for local_storage KP Singh
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=202007201950.yFJ7GtUT%lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jannh@google.com \
--cc=kafai@fb.com \
--cc=kbuild-all@lists.01.org \
--cc=kpsingh@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=pjt@google.com \
--cc=revest@chromium.org \
/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;
as well as URLs for NNTP newsgroup(s).