From: kernel test robot <lkp@intel.com>
To: Amery Hung <ameryhung@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
0day robot <lkp@intel.com>
Subject: kernel/bpf/verifier.c:9023:2: warning: variable '___stack' set but not used
Date: Tue, 05 May 2026 17:34:30 +0200 [thread overview]
Message-ID: <202605051722.33fzvj5H-lkp@intel.com> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Amery-Hung/bpf-Unify-dynptr-handling-in-the-verifier/20260423-084016
head: 2f05b55c2abbebede16518131d4da9dd842759e5
commit: 8d8a026071789397b6558db6fb659dc968dd5042 bpf: Refactor object relationship tracking and fix dynptr UAF bug
date: 13 days ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260505/202605051722.33fzvj5H-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260505/202605051722.33fzvj5H-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/oe-kbuild-all/202605051722.33fzvj5H-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/bpf/verifier.c:9023:2: warning: variable '___stack' set but not used [-Wunused-but-set-variable]
9023 | bpf_for_each_reg_in_vstate(env->cur_state, state, reg, ({
| ^
include/linux/bpf_verifier.h:542:28: note: expanded from macro 'bpf_for_each_reg_in_vstate'
542 | struct bpf_stack_state * ___stack; \
| ^
kernel/bpf/verifier.c:9148:2: warning: variable '___stack' set but not used [-Wunused-but-set-variable]
9148 | bpf_for_each_reg_in_vstate(env->cur_state, unused, reg, ({
| ^
include/linux/bpf_verifier.h:542:28: note: expanded from macro 'bpf_for_each_reg_in_vstate'
542 | struct bpf_stack_state * ___stack; \
| ^
kernel/bpf/verifier.c:10286:5: warning: variable '___stack' set but not used [-Wunused-but-set-variable]
10286 | bpf_for_each_reg_in_vstate(env->cur_state, state, reg, ({
| ^
include/linux/bpf_verifier.h:542:28: note: expanded from macro 'bpf_for_each_reg_in_vstate'
542 | struct bpf_stack_state * ___stack; \
| ^
kernel/bpf/verifier.c:11497:3: warning: variable '___stack' set but not used [-Wunused-but-set-variable]
11497 | bpf_for_each_reg_in_vstate(env->cur_state, unused, reg, ({
| ^
include/linux/bpf_verifier.h:542:28: note: expanded from macro 'bpf_for_each_reg_in_vstate'
542 | struct bpf_stack_state * ___stack; \
| ^
kernel/bpf/verifier.c:12946:27: warning: variable 'stack' set but not used [-Wunused-but-set-variable]
12946 | struct bpf_stack_state *stack;
| ^
kernel/bpf/verifier.c:15324:2: warning: variable '___stack' set but not used [-Wunused-but-set-variable]
15324 | bpf_for_each_reg_in_vstate(vstate, state, reg, ({
| ^
include/linux/bpf_verifier.h:542:28: note: expanded from macro 'bpf_for_each_reg_in_vstate'
542 | struct bpf_stack_state * ___stack; \
| ^
kernel/bpf/verifier.c:15902:2: warning: variable '___stack' set but not used [-Wunused-but-set-variable]
15902 | bpf_for_each_reg_in_vstate(vstate, state, reg, ({
| ^
include/linux/bpf_verifier.h:542:28: note: expanded from macro 'bpf_for_each_reg_in_vstate'
542 | struct bpf_stack_state * ___stack; \
| ^
kernel/bpf/verifier.c:17135:2: warning: variable '___stack' set but not used [-Wunused-but-set-variable]
17135 | bpf_for_each_reg_in_vstate(st, func, reg, ({
| ^
include/linux/bpf_verifier.h:542:28: note: expanded from macro 'bpf_for_each_reg_in_vstate'
542 | struct bpf_stack_state * ___stack; \
| ^
kernel/bpf/verifier.c:17143:2: warning: variable '___stack' set but not used [-Wunused-but-set-variable]
17143 | bpf_for_each_reg_in_vstate(st, func, reg, ({
| ^
include/linux/bpf_verifier.h:542:28: note: expanded from macro 'bpf_for_each_reg_in_vstate'
542 | struct bpf_stack_state * ___stack; \
| ^
9 warnings generated.
vim +/___stack +9023 kernel/bpf/verifier.c
435faee1aae9c1 Daniel Borkmann 2016-04-13 9011
de8f3a83b0a0fd Daniel Borkmann 2017-09-25 9012 /* Packet data might have moved, any old PTR_TO_PACKET[_META,_END]
de8f3a83b0a0fd Daniel Borkmann 2017-09-25 9013 * are now invalid, so turn them into unknown SCALAR_VALUE.
66e3a13e7c2c44 Joanne Koong 2023-03-01 9014 *
66e3a13e7c2c44 Joanne Koong 2023-03-01 9015 * This also applies to dynptr slices belonging to skb and xdp dynptrs,
66e3a13e7c2c44 Joanne Koong 2023-03-01 9016 * since these slices point to packet data.
f1174f77b50c94 Edward Cree 2017-08-07 9017 */
b239da34203f49 Kumar Kartikeya Dwivedi 2022-09-04 9018 static void clear_all_pkt_pointers(struct bpf_verifier_env *env)
969bf05eb3cedd Alexei Starovoitov 2016-05-05 9019 {
b239da34203f49 Kumar Kartikeya Dwivedi 2022-09-04 9020 struct bpf_func_state *state;
b239da34203f49 Kumar Kartikeya Dwivedi 2022-09-04 9021 struct bpf_reg_state *reg;
969bf05eb3cedd Alexei Starovoitov 2016-05-05 9022
b239da34203f49 Kumar Kartikeya Dwivedi 2022-09-04 @9023 bpf_for_each_reg_in_vstate(env->cur_state, state, reg, ({
66e3a13e7c2c44 Joanne Koong 2023-03-01 9024 if (reg_is_pkt_pointer_any(reg) || reg_is_dynptr_slice_pkt(reg))
dbd8d22863e83e Kumar Kartikeya Dwivedi 2023-02-21 9025 mark_reg_invalid(env, reg);
b239da34203f49 Kumar Kartikeya Dwivedi 2022-09-04 9026 }));
f4d7e40a5b7157 Alexei Starovoitov 2017-12-14 9027 }
f4d7e40a5b7157 Alexei Starovoitov 2017-12-14 9028
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-05 15:35 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=202605051722.33fzvj5H-lkp@intel.com \
--to=lkp@intel.com \
--cc=ameryhung@gmail.com \
--cc=llvm@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox