* kernel/bpf/verifier.c:1776:21: error: unused variable 'kfunc_btf'
@ 2021-10-09 3:59 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-09 3:59 UTC (permalink / raw)
To: Kumar Kartikeya Dwivedi; +Cc: kbuild-all, linux-kernel, 0day robot
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-09 3:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09 3:59 kernel/bpf/verifier.c:1776:21: error: unused variable 'kfunc_btf' kernel test robot
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).