From: kernel test robot <lkp@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>, bpf@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, kkd@meta.com,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
kernel-team@fb.com
Subject: Re: [PATCH bpf-next v1 5/7] bpf: Introduce support for bpf_local_irq_{save,restore}
Date: Fri, 22 Nov 2024 06:46:38 +0800 [thread overview]
Message-ID: <202411220652.mArtMRmI-lkp@intel.com> (raw)
In-Reply-To: <20241121005329.408873-6-memxor@gmail.com>
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@intel.com/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@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/202411220652.mArtMRmI-lkp@intel.com/
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 = ®s[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
next prev parent reply other threads:[~2024-11-21 22:47 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 0:53 [PATCH bpf-next v1 0/7] IRQ save/restore Kumar Kartikeya Dwivedi
2024-11-21 0:53 ` [PATCH bpf-next v1 1/7] bpf: Refactor and rename resource management Kumar Kartikeya Dwivedi
2024-11-21 16:57 ` Eduard Zingerman
2024-11-21 17:17 ` Kumar Kartikeya Dwivedi
2024-11-22 0:24 ` Alexei Starovoitov
2024-11-22 0:31 ` Kumar Kartikeya Dwivedi
2024-11-21 0:53 ` [PATCH bpf-next v1 2/7] bpf: Be consistent between {acquire,find,release}_lock_state Kumar Kartikeya Dwivedi
2024-11-21 17:54 ` Eduard Zingerman
2024-11-21 0:53 ` [PATCH bpf-next v1 3/7] bpf: Consolidate RCU and preempt locks in bpf_func_state Kumar Kartikeya Dwivedi
2024-11-21 18:09 ` Eduard Zingerman
2024-11-21 18:12 ` Kumar Kartikeya Dwivedi
2024-11-21 18:54 ` Eduard Zingerman
2024-11-21 22:04 ` Kumar Kartikeya Dwivedi
2024-11-21 0:53 ` [PATCH bpf-next v1 4/7] bpf: Refactor mark_{dynptr,iter}_read Kumar Kartikeya Dwivedi
2024-11-21 18:00 ` Eduard Zingerman
2024-11-21 0:53 ` [PATCH bpf-next v1 5/7] bpf: Introduce support for bpf_local_irq_{save,restore} Kumar Kartikeya Dwivedi
2024-11-21 20:21 ` Eduard Zingerman
2024-11-21 22:06 ` Kumar Kartikeya Dwivedi
2024-11-21 23:08 ` Eduard Zingerman
2024-11-21 23:12 ` Kumar Kartikeya Dwivedi
2024-11-22 0:30 ` Eduard Zingerman
2024-11-22 0:32 ` Alexei Starovoitov
2024-11-22 0:42 ` Kumar Kartikeya Dwivedi
2024-11-21 22:46 ` kernel test robot [this message]
2024-11-21 0:53 ` [PATCH bpf-next v1 6/7] selftests/bpf: Expand coverage of preempt tests to sleepable kfunc Kumar Kartikeya Dwivedi
2024-11-21 20:23 ` Eduard Zingerman
2024-11-21 0:53 ` [PATCH bpf-next v1 7/7] selftests/bpf: Add IRQ save/restore tests Kumar Kartikeya Dwivedi
2024-11-21 20:43 ` Eduard Zingerman
2024-11-21 22:07 ` Kumar Kartikeya Dwivedi
2024-11-21 23:09 ` Eduard Zingerman
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=202411220652.mArtMRmI-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=kernel-team@fb.com \
--cc=kkd@meta.com \
--cc=martin.lau@kernel.org \
--cc=memxor@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.