From: kernel test robot <lkp@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
0day robot <lkp@intel.com>
Subject: kernel/bpf/verifier.c:1776:21: error: unused variable 'kfunc_btf'
Date: Sat, 9 Oct 2021 11:59:09 +0800 [thread overview]
Message-ID: <202110091158.BSPrMUTN-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3528 bytes --]
tree: https://github.com/0day-ci/linux/commits/UPDATE-20211009-062812/Kumar-Kartikeya-Dwivedi/bpf-Silence-Coverity-warning-for-find_kfunc_desc_btf/20211009-010928
head: aff5b53e62a423701f59205b644916bae36c96c3
commit: aff5b53e62a423701f59205b644916bae36c96c3 bpf: Silence Coverity warning for find_kfunc_desc_btf
date: 6 hours ago
config: microblaze-buildonly-randconfig-r003-20211008 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/aff5b53e62a423701f59205b644916bae36c96c3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20211009-062812/Kumar-Kartikeya-Dwivedi/bpf-Silence-Coverity-warning-for-find_kfunc_desc_btf/20211009-010928
git checkout aff5b53e62a423701f59205b644916bae36c96c3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel/bpf/verifier.c: In function 'find_kfunc_desc_btf':
>> kernel/bpf/verifier.c:1776:21: error: unused variable 'kfunc_btf' [-Werror=unused-variable]
1776 | struct btf *kfunc_btf;
| ^~~~~~~~~
cc1: all warnings being treated as errors
vim +/kfunc_btf +1776 kernel/bpf/verifier.c
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1771
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1772 static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env,
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1773 u32 func_id, s16 offset,
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1774 struct module **btf_modp)
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1775 {
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 @1776 struct btf *kfunc_btf;
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1777
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1778 if (offset) {
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1779 if (offset < 0) {
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1780 /* In the future, this can be allowed to increase limit
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1781 * of fd index into fd_array, interpreted as u16.
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1782 */
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1783 verbose(env, "negative offset disallowed for kernel module function call\n");
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1784 return ERR_PTR(-EINVAL);
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1785 }
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1786
aff5b53e62a42370 Kumar Kartikeya Dwivedi 2021-10-09 1787 return __find_kfunc_desc_btf(env, offset, btf_modp);
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1788 }
2357672c54c3f748 Kumar Kartikeya Dwivedi 2021-10-02 1789 return btf_vmlinux ?: ERR_PTR(-ENOENT);
e6ac2450d6dee312 Martin KaFai Lau 2021-03-24 1790 }
e6ac2450d6dee312 Martin KaFai Lau 2021-03-24 1791
---
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: 38211 bytes --]
reply other threads:[~2021-10-09 3:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202110091158.BSPrMUTN-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=memxor@gmail.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