Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* kernel/bpf/verifier.c:9023:2: warning: variable '___stack' set but not used
@ 2026-05-05 15:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-05 15:34 UTC (permalink / raw)
  To: Amery Hung; +Cc: llvm, oe-kbuild-all, 0day robot

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-05 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 15:34 kernel/bpf/verifier.c:9023:2: warning: variable '___stack' set but not used 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