* [kkdwivedi:fermata 18/146] kernel/bpf/ringbuf.c:857:17: error: undefined named operand 'unwound'
@ 2026-10-20 20:15 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-20 20:15 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence bisect report"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Kumar Kartikeya Dwivedi <memxor@gmail.com>
tree: https://github.com/kkdwivedi/linux fermata
head: 7b45e27f0f0faaa13da429815b6143b99eaa232c
commit: 539555d3c94ba07286fc1563a61d9016e586afca [18/146] bpf: Call the callbacks of bpf_find_vma and bpf_user_ringbuf_drain with a pad
:::::: branch date: 6 hours ago
:::::: commit date: 9 hours ago
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20261020/202610202202.TrW5w6UE-lkp@intel.com/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261020/202610202202.TrW5w6UE-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/202610202202.TrW5w6UE-lkp@intel.com/
Note: the kkdwivedi/fermata HEAD 7b45e27f0f0faaa13da429815b6143b99eaa232c builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
kernel/bpf/ringbuf.c: In function '____bpf_user_ringbuf_drain':
>> kernel/bpf/ringbuf.c:857:17: error: undefined named operand 'unwound'
857 | bpf_call_cb(callback, &dynptr, callback_ctx, 0, 0, 0, ret, unwound_at);
| ^~~~~~~~~~~
vim +/unwound +857 kernel/bpf/ringbuf.c
20571567384428 David Vernet 2022-09-19 817
20571567384428 David Vernet 2022-09-19 818 BPF_CALL_4(bpf_user_ringbuf_drain, struct bpf_map *, map,
20571567384428 David Vernet 2022-09-19 819 void *, callback_fn, void *, callback_ctx, u64, flags)
20571567384428 David Vernet 2022-09-19 820 {
20571567384428 David Vernet 2022-09-19 821 struct bpf_ringbuf *rb;
20571567384428 David Vernet 2022-09-19 822 long samples, discarded_samples = 0, ret = 0;
20571567384428 David Vernet 2022-09-19 823 bpf_callback_t callback = (bpf_callback_t)callback_fn;
20571567384428 David Vernet 2022-09-19 824 u64 wakeup_flags = BPF_RB_NO_WAKEUP | BPF_RB_FORCE_WAKEUP;
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 825 bool unwound = false;
20571567384428 David Vernet 2022-09-19 826 int busy = 0;
20571567384428 David Vernet 2022-09-19 827
20571567384428 David Vernet 2022-09-19 828 if (unlikely(flags & ~wakeup_flags))
20571567384428 David Vernet 2022-09-19 829 return -EINVAL;
20571567384428 David Vernet 2022-09-19 830
20571567384428 David Vernet 2022-09-19 831 rb = container_of(map, struct bpf_ringbuf_map, map)->rb;
20571567384428 David Vernet 2022-09-19 832
20571567384428 David Vernet 2022-09-19 833 /* If another consumer is already consuming a sample, wait for them to finish. */
20571567384428 David Vernet 2022-09-19 834 if (!atomic_try_cmpxchg(&rb->busy, &busy, 1))
20571567384428 David Vernet 2022-09-19 835 return -EBUSY;
20571567384428 David Vernet 2022-09-19 836
20571567384428 David Vernet 2022-09-19 837 for (samples = 0; samples < BPF_MAX_USER_RINGBUF_SAMPLES && ret == 0; samples++) {
20571567384428 David Vernet 2022-09-19 838 int err;
20571567384428 David Vernet 2022-09-19 839 u32 size;
20571567384428 David Vernet 2022-09-19 840 void *sample;
20571567384428 David Vernet 2022-09-19 841 struct bpf_dynptr_kern dynptr;
20571567384428 David Vernet 2022-09-19 842
20571567384428 David Vernet 2022-09-19 843 err = __bpf_user_ringbuf_peek(rb, &sample, &size);
20571567384428 David Vernet 2022-09-19 844 if (err) {
20571567384428 David Vernet 2022-09-19 845 if (err == -ENODATA) {
20571567384428 David Vernet 2022-09-19 846 break;
20571567384428 David Vernet 2022-09-19 847 } else if (err == -EAGAIN) {
20571567384428 David Vernet 2022-09-19 848 discarded_samples++;
20571567384428 David Vernet 2022-09-19 849 continue;
20571567384428 David Vernet 2022-09-19 850 } else {
20571567384428 David Vernet 2022-09-19 851 ret = err;
20571567384428 David Vernet 2022-09-19 852 goto schedule_work_return;
20571567384428 David Vernet 2022-09-19 853 }
20571567384428 David Vernet 2022-09-19 854 }
20571567384428 David Vernet 2022-09-19 855
20571567384428 David Vernet 2022-09-19 856 bpf_dynptr_init(&dynptr, sample, BPF_DYNPTR_TYPE_LOCAL, 0, size);
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 @857 bpf_call_cb(callback, &dynptr, callback_ctx, 0, 0, 0, ret, unwound_at);
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 858 if (0) {
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 859 unwound_at:
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 860 /*
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 861 * The callback left with unwind_exit. The sample is
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 862 * consumed like after a return, and the helper leaves
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 863 * through the door below, as the error paths do.
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 864 */
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 865 unwound = true;
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 866 ret = 0;
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 867 }
20571567384428 David Vernet 2022-09-19 868 __bpf_user_ringbuf_sample_release(rb, size, flags);
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 869 if (unwound)
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 870 goto schedule_work_return;
20571567384428 David Vernet 2022-09-19 871 }
20571567384428 David Vernet 2022-09-19 872 ret = samples - discarded_samples;
20571567384428 David Vernet 2022-09-19 873
20571567384428 David Vernet 2022-09-19 874 schedule_work_return:
20571567384428 David Vernet 2022-09-19 875 /* Prevent the clearing of the busy-bit from being reordered before the
20571567384428 David Vernet 2022-09-19 876 * storing of any rb consumer or producer positions.
20571567384428 David Vernet 2022-09-19 877 */
06646da0145868 Paul E. McKenney 2023-10-18 878 atomic_set_release(&rb->busy, 0);
20571567384428 David Vernet 2022-09-19 879
20571567384428 David Vernet 2022-09-19 880 if (flags & BPF_RB_FORCE_WAKEUP)
20571567384428 David Vernet 2022-09-19 881 irq_work_queue(&rb->work);
20571567384428 David Vernet 2022-09-19 882 else if (!(flags & BPF_RB_NO_WAKEUP) && samples > 0)
20571567384428 David Vernet 2022-09-19 883 irq_work_queue(&rb->work);
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 884 if (unwound)
539555d3c94ba0 Kumar Kartikeya Dwivedi 2026-10-20 885 bpf_unwind_leave();
20571567384428 David Vernet 2022-09-19 886 return ret;
20571567384428 David Vernet 2022-09-19 887 }
20571567384428 David Vernet 2022-09-19 888
--
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-10-20 20:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 20:15 [kkdwivedi:fermata 18/146] kernel/bpf/ringbuf.c:857:17: error: undefined named operand 'unwound' kernel test robot
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.