Re: WARNING in __switch_to (2)

From: Eric Biggers
Date: Wed Jan 31 2018 - 00:42:35 EST


On Thu, Jan 04, 2018 at 08:58:00PM -0800, syzbot wrote:
> Hello,
>
> syzkaller hit the following crash on
> 37759fa6d0fa9e4d6036d19ac12f555bfc0aeafd
> git://git.cmpxchg.org/linux-mmots.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
> C reproducer is attached
> syzkaller reproducer is attached. See https://goo.gl/kgGztJ
> for information about syzkaller reproducers
>
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+1d7d9ce4ce4a23cb7d3b@xxxxxxxxxxxxxxxxxxxxxxxxx
> It will help syzbot understand when the bug is fixed. See footer for
> details.
> If you forward the report, please keep this part and the footer.
>
> WARNING: CPU: 0 PID: 3192 at ./arch/x86/include/asm/fpu/internal.h:340
> paravirt_write_msr arch/x86/include/asm/paravirt.h:21 [inline]
> WARNING: CPU: 0 PID: 3192 at ./arch/x86/include/asm/fpu/internal.h:340
> wrmsrl arch/x86/include/asm/paravirt.h:149 [inline]
> WARNING: CPU: 0 PID: 3192 at ./arch/x86/include/asm/fpu/internal.h:340
> load_seg_legacy arch/x86/kernel/process_64.c:255 [inline]
> WARNING: CPU: 0 PID: 3192 at ./arch/x86/include/asm/fpu/internal.h:340
> __switch_to+0x10bd/0x13c0 arch/x86/kernel/process_64.c:455
> Kernel panic - not syncing: panic_on_warn set ...
>
> CPU: 0 PID: 3192 Comm: syzkaller835319 Not tainted 4.15.0-rc4-mm1+ #49
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> Google 01/01/2011
> Call Trace:
> Shutting down cpus with NMI
> kasan: CONFIG_KASAN_INLINE enabled
> kasan: GPF could be caused by NULL-ptr deref or user [me m or41y
> .3ac65ce0s98s
> ]
> Rebooting in 86400 seconds..
> ---[ end trace 2d2aa5997809e25d ]---

For some reason I'm not able to reproduce this crash with the reproducer and
commit given -- even after making sure I had set kvm_intel.nested=1 on the host
since the reproducer uses KVM. And syzbot only hit this from Jan 1 through
Jan 3. So I'll assume it was introduced and fixed by the x86 changes around
that time, and I'll invalidate the bug for syzbot; it will send a new report if
this crash happens again...

#syz invalid

- Eric