lkml.org 
[lkml]   [2026]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [syzbot] [kernel?] upstream test error: KMSAN: uninit-value in irqentry_exit_to_kernel_mode_preempt
On Wed, Apr 29, 2026 at 8:29 AM Dmitry Vyukov <dvyukov@google.com> wrote:
>
> On Tue, 21 Apr 2026 at 23:37, syzbot
> <syzbot+cdcfd55737fe43eeb3a3@syzkaller.appspotmail.com> wrote:
> >
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: 4ee64205ffaa Merge tag 'clk-for-linus' of git://git.kernel..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1706d702580000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=ce4d707ce513c810
> > dashboard link: https://syzkaller.appspot.com/bug?extid=cdcfd55737fe43eeb3a3
> > compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/eed48de63104/disk-4ee64205.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/6ebe911e6995/vmlinux-4ee64205.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/557a239d8722/bzImage-4ee64205.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+cdcfd55737fe43eeb3a3@syzkaller.appspotmail.com
> >
>
> +kmsan maintainers, not sure where it should be fixed: in irq code or
> in kmsan code

I believe Mark's recent changes introduced this.
irqentry_exit_to_kernel_mode_preempt() is now checking for both `regs`
and `state`.
Because there is a lot of non-instrumented code around, we fail to
initialize these variables.
Instead, irqentry_enter_from_kernel_mode() explicitly calls
kmsan_unpoison_entry_regs(regs) to take care of the registers, but not
the state.
We should probably call `kmsan_unpoison_memory(&state, sizeof(state))`
at the same place.

>
> > =====================================================
> > BUG: KMSAN: uninit-value in irqentry_exit_to_kernel_mode_preempt+0xb0/0xc0 include/linux/irq-entry-common.h:472
> > irqentry_exit_to_kernel_mode_preempt+0xb0/0xc0 include/linux/irq-entry-common.h:472
> > irqentry_exit_to_kernel_mode include/linux/irq-entry-common.h:547 [inline]
> > irqentry_exit+0x7b/0x760 kernel/entry/common.c:164
> > sysvec_apic_timer_interrupt+0x52/0x90 arch/x86/kernel/apic/apic.c:1061
> > asm_sysvec_apic_timer_interrupt+0x1f/0x30 arch/x86/include/asm/idtentry.h:697
> > __sanitizer_cov_trace_pc+0x5/0x70 kernel/kcov.c:210
> > nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:842 [inline]
> > nsim_dev_trap_report drivers/net/netdevsim/dev.c:876 [inline]
> > nsim_dev_trap_report_work+0x8c0/0x1430 drivers/net/netdevsim/dev.c:922
> > process_one_work kernel/workqueue.c:3302 [inline]
> > process_scheduled_works+0xb65/0x1e40 kernel/workqueue.c:3385
> > worker_thread+0xee4/0x1590 kernel/workqueue.c:3466
> > kthread+0x53f/0x600 kernel/kthread.c:436
> > ret_from_fork+0x20f/0x8d0 arch/x86/kernel/process.c:158
> > ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

\
 
 \ /
  Last update: 2026-04-29 10:13    [W:0.054 / U:6.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog