From: kernel test robot <lkp@intel.com>
To: <oe-kbuild@lists.linux.dev>
Cc: <lkp@intel.com>
Subject: [jimc:scratchpad-v10 6/24] include/linux/scratchpad.h:168:14: sparse: sparse: unsigned value that used to be signed checked against zero?
Date: Sun, 23 Aug 2026 20:31:49 +0800 [thread overview]
Message-ID: <202608221913.XLktNQpq-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: include/linux/scratchpad.h:168:14: sparse: sparse: unsigned value that used to be signed checked against zero?"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Jim Cromie <jim.cromie@gmail.com>
TO: "Łukasz Bartosik" <ukaszb@chromium.org>
tree: https://github.com/jimc/linux.git scratchpad-v10
head: a23fc077806416450fbeb0a5a534fd995e465430
commit: 2ff4781936dbd5713098be199d95cd8d516262a3 [6/24] bpf/verifier: Route verifier stack state node allocations to scratchrec
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: m68k-randconfig-r132-20260822 (https://download.01.org/0day-ci/archive/20260822/202608221913.XLktNQpq-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260822/202608221913.XLktNQpq-lkp@intel.com/reproduce)
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/r/202608221913.XLktNQpq-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/bpf/verifier.c:1746:1: sparse: sparse: symbol 'bpf_state_pool_key' was not declared. Should it be static?
kernel/bpf/verifier.c: note: in included file (through include/linux/bpf_verifier.h):
>> include/linux/scratchpad.h:168:14: sparse: sparse: unsigned value that used to be signed checked against zero?
kernel/bpf/verifier.c:1709:55: sparse: signed value source
vim +168 include/linux/scratchpad.h
97f7757fd65ebc Jim Cromie 2026-08-19 153
97f7757fd65ebc Jim Cromie 2026-08-19 154 DEFINE_FREE(scratchpad, struct scratchpad *,
97f7757fd65ebc Jim Cromie 2026-08-19 155 if (!IS_ERR_OR_NULL(_T)) scratchpad_free(_T))
97f7757fd65ebc Jim Cromie 2026-08-19 156
97f7757fd65ebc Jim Cromie 2026-08-19 157 /**
97f7757fd65ebc Jim Cromie 2026-08-19 158 * is_scratch_ptr - Check whether an address resides in a compound scratchpad/scratchrec
97f7757fd65ebc Jim Cromie 2026-08-19 159 * @ptr: Object pointer to test
97f7757fd65ebc Jim Cromie 2026-08-19 160 */
97f7757fd65ebc Jim Cromie 2026-08-19 161 static inline bool is_scratch_ptr(const void *ptr)
97f7757fd65ebc Jim Cromie 2026-08-19 162 {
97f7757fd65ebc Jim Cromie 2026-08-19 163 struct folio *folio;
97f7757fd65ebc Jim Cromie 2026-08-19 164
97f7757fd65ebc Jim Cromie 2026-08-19 165 if (ZERO_OR_NULL_PTR(ptr) || is_vmalloc_addr(ptr))
97f7757fd65ebc Jim Cromie 2026-08-19 166 return false;
97f7757fd65ebc Jim Cromie 2026-08-19 167
97f7757fd65ebc Jim Cromie 2026-08-19 @168 if (!virt_addr_valid(ptr))
97f7757fd65ebc Jim Cromie 2026-08-19 169 return false;
97f7757fd65ebc Jim Cromie 2026-08-19 170
97f7757fd65ebc Jim Cromie 2026-08-19 171 folio = virt_to_folio(ptr);
97f7757fd65ebc Jim Cromie 2026-08-19 172 return !folio_test_slab(folio);
97f7757fd65ebc Jim Cromie 2026-08-19 173 }
97f7757fd65ebc Jim Cromie 2026-08-19 174
:::::: The code at line 168 was first introduced by commit
:::::: 97f7757fd65ebcb2ae4d50d3ca03a8c9cea8e51f scratchpad: add Direct-Map Large Scratchpad and Scratchrec bump allocators
:::::: TO: Jim Cromie <jim.cromie@gmail.com>
:::::: CC: Jim Cromie <jim.cromie@gmail.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-23 12:31 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=202608221913.XLktNQpq-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@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.