Re: [PATCH bpf-next v1 5/7] bpf: Introduce support for bpf_local_irq_{save,restore}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kumar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bpf-next/for-next]
[also build test WARNING on bpf-next/master linus/master next-20241121]
[cannot apply to bpf/master v6.12]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Kumar-Kartikeya-Dwivedi/bpf-Refactor-and-rename-resource-management/20241121-140722
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git for-next
patch link:    https://lore.kernel.org/r/20241121005329.408873-6-memxor%40gmail.com
patch subject: [PATCH bpf-next v1 5/7] bpf: Introduce support for bpf_local_irq_{save,restore}
config: arc-randconfig-001-20241122 (https://download.01.org/0day-ci/archive/20241122/202411220652.mArtMRmI-lkp@xxxxxxxxx/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241122/202411220652.mArtMRmI-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411220652.mArtMRmI-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   kernel/bpf/verifier.c: In function 'process_irq_flag':
>> kernel/bpf/verifier.c:11964:32: warning: variable 'irq_restore' set but not used [-Wunused-but-set-variable]
   11964 |         bool irq_save = false, irq_restore = false;
         |                                ^~~~~~~~~~~


vim +/irq_restore +11964 kernel/bpf/verifier.c

 11959	
 11960	static int process_irq_flag(struct bpf_verifier_env *env, int regno,
 11961				     struct bpf_kfunc_call_arg_meta *meta)
 11962	{
 11963		struct bpf_reg_state *regs = cur_regs(env), *reg = &regs[regno];
 11964		bool irq_save = false, irq_restore = false;
 11965		int err;
 11966	
 11967		if (meta->func_id == special_kfunc_list[KF_bpf_local_irq_save]) {
 11968			irq_save = true;
 11969		} else if (meta->func_id == special_kfunc_list[KF_bpf_local_irq_restore]) {
 11970			irq_restore = true;
 11971		} else {
 11972			verbose(env, "verifier internal error: unknown irq flags kfunc\n");
 11973			return -EFAULT;
 11974		}
 11975	
 11976		if (irq_save) {
 11977			if (!is_irq_flag_reg_valid_uninit(env, reg)) {
 11978				verbose(env, "expected uninitialized irq flag as arg#%d\n", regno);
 11979				return -EINVAL;
 11980			}
 11981	
 11982			err = check_mem_access(env, env->insn_idx, regno, 0, BPF_DW, BPF_WRITE, -1, false, false);
 11983			if (err)
 11984				return err;
 11985	
 11986			err = mark_stack_slot_irq_flag(env, meta, reg, env->insn_idx);
 11987			if (err)
 11988				return err;
 11989		} else {
 11990			err = is_irq_flag_reg_valid_init(env, reg);
 11991			if (err) {
 11992				verbose(env, "expected an initialized irq flag as arg#%d\n", regno);
 11993				return err;
 11994			}
 11995	
 11996			err = mark_irq_flag_read(env, reg);
 11997			if (err)
 11998				return err;
 11999	
 12000			err = unmark_stack_slot_irq_flag(env, reg);
 12001			if (err)
 12002				return err;
 12003		}
 12004		return 0;
 12005	}
 12006	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux