From: kernel test robot <lkp@intel.com>
To: Charalampos Stylianopoulos <charalampos.stylianopoulos@gmail.com>,
bpf@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Nick Zavaritsky <mejedi@gmail.com>,
Charalampos Stylianopoulos <charalampos.stylianopoulos@gmail.com>
Subject: Re: [PATCH bpf-next 2/4] bpf: Add bpf command to get number of map entries
Date: Wed, 8 Jan 2025 01:52:18 +0800 [thread overview]
Message-ID: <202501080123.MlvmZO4I-lkp@intel.com> (raw)
In-Reply-To: <20250106145328.399610-3-charalampos.stylianopoulos@gmail.com>
Hi Charalampos,
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/Charalampos-Stylianopoulos/bpf-Add-map_num_entries-map-op/20250106-225520
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20250106145328.399610-3-charalampos.stylianopoulos%40gmail.com
patch subject: [PATCH bpf-next 2/4] bpf: Add bpf command to get number of map entries
config: nios2-randconfig-r072-20250107 (https://download.01.org/0day-ci/archive/20250108/202501080123.MlvmZO4I-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 14.2.0
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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501080123.MlvmZO4I-lkp@intel.com/
New smatch warnings:
kernel/bpf/syscall.c:5771 bpf_get_num_entries() warn: unsigned 'num_entries' is never less than zero.
Old smatch warnings:
arch/nios2/include/asm/thread_info.h:62 current_thread_info() error: uninitialized symbol 'sp'.
vim +/num_entries +5771 kernel/bpf/syscall.c
5752
5753 static int bpf_get_num_entries(union bpf_attr *attr, union bpf_attr __user *uattr)
5754 {
5755 __u32 num_entries = 0;
5756 struct bpf_map *map;
5757
5758 if (CHECK_ATTR(BPF_MAP_GET_NUM_ENTRIES))
5759 return -EINVAL;
5760
5761
5762 CLASS(fd, f)(attr->map_fd);
5763 map = __bpf_map_get(f);
5764 if (IS_ERR(map))
5765 return PTR_ERR(map);
5766
5767 if (!map->ops->map_num_entries)
5768 return -EOPNOTSUPP;
5769
5770 num_entries = map->ops->map_num_entries(map);
> 5771 if (num_entries < 0)
5772 return num_entries;
5773
5774 if (put_user(num_entries, &uattr->map_get_num_entries.num_entries))
5775 return -EFAULT;
5776
5777 return 0;
5778 }
5779
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-01-07 17:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 14:53 [PATCH bpf-next 0/4] expose number of map entries to userspace Charalampos Stylianopoulos
2025-01-06 14:53 ` [PATCH bpf-next 1/4] bpf: Add map_num_entries map op Charalampos Stylianopoulos
2025-01-06 14:53 ` [PATCH bpf-next 2/4] bpf: Add bpf command to get number of map entries Charalampos Stylianopoulos
2025-01-07 17:52 ` kernel test robot [this message]
2025-01-06 14:53 ` [PATCH bpf-next 3/4] libbpf: Add support for MAP_GET_NUM_ENTRIES command Charalampos Stylianopoulos
2025-01-06 14:53 ` [PATCH bpf-next 4/4] selftests/bpf: Add tests for bpf_map_get_num_entries Charalampos Stylianopoulos
2025-01-06 16:19 ` [PATCH bpf-next 0/4] expose number of map entries to userspace Daniel Borkmann
2025-01-07 7:43 ` Anton Protopopov
2025-01-07 7:48 ` Anton Protopopov
[not found] ` <CAAvdH+yNG=GefEd5CcP_52gPzzZexWMMxFAxnM3isX04iErMfQ@mail.gmail.com>
2025-01-07 11:10 ` Charalampos Stylianopoulos
2025-01-09 17:37 ` Anton Protopopov
2025-01-14 11:38 ` Nick Zavaritsky
2025-01-16 14:59 ` Anton Protopopov
2025-01-16 17:52 ` Nick Zavaritsky
2025-01-17 10:35 ` Anton Protopopov
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=202501080123.MlvmZO4I-lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=charalampos.stylianopoulos@gmail.com \
--cc=daniel@iogearbox.net \
--cc=mejedi@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.