Received: by 10.213.65.68 with SMTP id h4csp766487imn; Sat, 31 Mar 2018 09:20:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+kV7tKiYfNZFncljicc3lGTE+yTE00V9YxiIZpkBIe8D4n2XzG/Y0oPtTxiPceTjG7MFoW X-Received: by 2002:a17:902:7710:: with SMTP id n16-v6mr2060167pll.46.1522513255534; Sat, 31 Mar 2018 09:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522513255; cv=none; d=google.com; s=arc-20160816; b=tXA1/RsAGxOFhQH7IBJkq0ufSnzmyKfzr9VcZeWmyvJm6nmR7/spbBzYO0cjH9RDvQ Jiga77QeupdQRG3T7CU8A5XkMlKk95zsOEdTjt0+A+HoOnQEOKDgvHsN5vjrd9zLkqLk KqUDOpR7A47gkVamFagkWnalxA+REToh17PQJff18JVHtyv/d6rJ6tdfRDWcTCgw+Yjm 2p+Er9nsZJR1f7L1tsmyS/sc6IiRMy3pcKAWUEQoETdMBmRqJGZPXHKI4GTr/2rYUSZA XUrQnaCCE8YiWjlcEwH314+YhloMi4Ea/BjYiQRQRO2D8YmUbGxX1wE8gp98xUVlA05m 5+Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=IoBKXqhhVkG5h0ZmLmxpH01bXkai9CY8Yl7od+5uVns=; b=xW3Q7X3WEb6bcb6sXCgl410/O7vJ+bk7yxE5dhil8r28deJ8UzAA7mYFq1LeeyyDTq YwYHi+i8uRXE++5H93oOcJzKVZmphcTrJmK0y93E1K0PN/ht7C+WbX3ohRT7w95zHT+0 CuygxBa4Ibq0NR2nOgQg0u2AYPCNEHZwyrFq5R6gbDpew6282j8BYck0IECkOLYcYROw aJ7pEXLmOM5bC02Xv8XrKrwcPc3dnIxYRTkHTcYTw95E9omjCj11DeqhLX7scByHNRyA +qMlzXxAnnZPqpVI0OEgOXg/Blv37Y72ADja/vYCpOaHoNQKosFjV9vriRtBEcYqiwzm Czfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ym0xqI9o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6-v6si10581351plt.62.2018.03.31.09.20.41; Sat, 31 Mar 2018 09:20:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ym0xqI9o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753011AbeCaQTc (ORCPT + 99 others); Sat, 31 Mar 2018 12:19:32 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:45243 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412AbeCaQT3 (ORCPT ); Sat, 31 Mar 2018 12:19:29 -0400 Received: by mail-pf0-f182.google.com with SMTP id l27so7272794pfk.12 for ; Sat, 31 Mar 2018 09:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IoBKXqhhVkG5h0ZmLmxpH01bXkai9CY8Yl7od+5uVns=; b=Ym0xqI9oJbx2pg8dME/NWJOW3aQ/gWDKe3s1bhsGh3RrMZqYNB/+34N9KUu5xO4N/l 8r3i8XEj2K4r5zQ3CZPlnWbG6ufrn6oZD156KfhWK+ruE99dcIexD/q65869zWIhmrHh xP6TzJJebdgdnFeb4LGI9lkvlDBJVucnFGnaYpwJsHSaMElMb5FrW2RsVO4DO7PjxFRN AFySPeI8Igh1RDshA8YrRHvPtHMRcQV3FhZ/Lf5xIiWV2PofflnpLxAby3AdvHI1QfZG ro7VKpiqNwCpq8hRyGX8LKC5XoZyokownp2DwCS6mkh05UmDYDScDFfwFWwnxkWLbOQj EfZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IoBKXqhhVkG5h0ZmLmxpH01bXkai9CY8Yl7od+5uVns=; b=QF5zafa0qbm7tyJj4oCRUn7dyZysqRDAGxH/SquyDlbH0dgwIqDGBVrUm/mdRe2dCk f/w3BDlSNJ+jBgpdbXdxWW1fseGEZM5yUkF+8b7k/QLhqptrpIobl2RV3vN/lQw98tPa h9OD/Zh5jZG9cLb+pMp69g8cYec0B3fayoXJYat8sWuJRgeucyus9CZCS3vV9IoALTQI OzOeThqfWorVNkho7IULCkmkrBlK/GVR0Fiz+r6/CWhXMSyQBLwdoQr/k1SBxbiDODkn C/kYHKc00pyLNWKNqbx6klT15u6RF95S5rrBbDcpHF8blCxn3F9FKU1g9djMt75pdAWE n3Xg== X-Gm-Message-State: AElRT7GP2TGdVRkm8mpAtZ877doFiWONaHkT5XWoxH9rQsenmvOuG2KC mUko2fMIdwBbqcsL++FKA7Uv2ty4HMfyQQYNOsiikw== X-Received: by 2002:a17:902:8482:: with SMTP id c2-v6mr3571279plo.295.1522513168817; Sat, 31 Mar 2018 09:19:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.182.136 with HTTP; Sat, 31 Mar 2018 09:19:08 -0700 (PDT) In-Reply-To: References: From: Dmitry Vyukov Date: Sat, 31 Mar 2018 18:19:08 +0200 Message-ID: Subject: Re: general protection fault in native_write_cr4 To: Wanpeng Li Cc: syzbot , "H. Peter Anvin" , kvm , LKML , Ingo Molnar , Paolo Bonzini , Radim Krcmar , syzkaller-bugs@googlegroups.com, Thomas Gleixner , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 27, 2017 at 7:31 PM, Dmitry Vyukov wrote: > On Tue, Dec 26, 2017 at 9:52 AM, Dmitry Vyukov wrote: >> On Wed, Dec 20, 2017 at 8:54 AM, Wanpeng Li wrote: >>> 2017-12-20 15:49 GMT+08:00 syzbot >>> : >>>> Hello, >>>> >>>> syzkaller hit the following crash on >>>> f6f3732162b5ae3c771b9285a5a32d72b8586920 >>>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.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 >>>> >>>> >>> >>> I will have a look again, you continue to run it in kvm guest, right? >> >> >> Our test machines are GCE VMs, so yes, the kernel that catches GPF is >> run as kvm guest. > > up > > one of top crashers with 50K crashes This sets a new record of 130000 crashed machines on syzbot infrastructure: https://syzkaller.appspot.com/bug?id=2bf7b7983c2398ec6f0c4c6c87cb50223e8873f8 >>>> kvm: KVM_SET_TSS_ADDR need to be called before entering vcpu >>>> kasan: CONFIG_KASAN_INLINE enabled >>>> kasan: GPF could be caused by NULL-ptr deref or user memory access >>>> general protection fault: 0000 [#1] SMP KASAN >>>> Dumping ftrace buffer: >>>> (ftrace buffer empty) >>>> Modules linked in: >>>> CPU: 1 PID: 3142 Comm: syzkaller429302 Not tainted 4.15.0-rc3+ #224 >>>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS >>>> Google 01/01/2011 >>>> RIP: 0010:native_write_cr4+0x4/0x10 arch/x86/include/asm/special_insns.h:76 >>>> RSP: 0018:ffff8801ca6f75a0 EFLAGS: 00010093 >>>> RAX: ffff8801ca1c8700 RBX: 00000000001606e0 RCX: ffffffff811a2a92 >>>> RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000001606e0 >>>> RBP: ffff8801ca6f75a0 R08: 1ffff100394dee0f R09: 0000000000000004 >>>> R10: ffff8801ca6f7510 R11: 0000000000000004 R12: 0000000000000093 >>>> R13: ffff8801ca1c8700 R14: ffff8801db514850 R15: ffff8801db514850 >>>> FS: 0000000001031880(0000) GS:ffff8801db500000(0000) knlGS:0000000000000000 >>>> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 >>>> CR2: 0000000000000000 CR3: 0000000005e22006 CR4: 00000000001626e0 >>>> Call Trace: >>>> __write_cr4 arch/x86/include/asm/paravirt.h:76 [inline] >>>> __cr4_set arch/x86/include/asm/tlbflush.h:180 [inline] >>>> cr4_clear_bits arch/x86/include/asm/tlbflush.h:203 [inline] >>>> kvm_cpu_vmxoff arch/x86/kvm/vmx.c:3582 [inline] >>>> hardware_disable+0x34a/0x4b0 arch/x86/kvm/vmx.c:3588 >>>> kvm_arch_hardware_disable+0x35/0xd0 arch/x86/kvm/x86.c:7982 >>>> hardware_disable_nolock+0x30/0x40 >>>> arch/x86/kvm/../../../virt/kvm/kvm_main.c:3310 >>>> on_each_cpu+0xca/0x1b0 kernel/smp.c:604 >>>> hardware_disable_all_nolock+0x3e/0x50 >>>> arch/x86/kvm/../../../virt/kvm/kvm_main.c:3328 >>>> hardware_disable_all arch/x86/kvm/../../../virt/kvm/kvm_main.c:3334 >>>> [inline] >>>> kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:742 [inline] >>>> kvm_put_kvm+0x956/0xdf0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:755 >>>> kvm_vm_release+0x42/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:766 >>>> __fput+0x327/0x7e0 fs/file_table.c:210 >>>> ____fput+0x15/0x20 fs/file_table.c:244 >>>> task_work_run+0x199/0x270 kernel/task_work.c:113 >>>> exit_task_work include/linux/task_work.h:22 [inline] >>>> do_exit+0x9bb/0x1ad0 kernel/exit.c:865 >>>> do_group_exit+0x149/0x400 kernel/exit.c:968 >>>> SYSC_exit_group kernel/exit.c:979 [inline] >>>> SyS_exit_group+0x1d/0x20 kernel/exit.c:977 >>>> entry_SYSCALL_64_fastpath+0x1f/0x96 >>>> RIP: 0033:0x441c78 >>>> RSP: 002b:00007ffe68e20f68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 >>>> RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000441c78 >>>> RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 >>>> RBP: 00000000006cd018 R08: 00000000000000e7 R09: ffffffffffffffd0 >>>> R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000404080 >>>> R13: 0000000000404110 R14: 0000000000000000 R15: 0000000000000000 >>>> Code: 0f 1f 80 00 00 00 00 55 48 89 e5 0f 20 d8 5d c3 0f 1f 80 00 00 00 00 >>>> 55 48 89 e5 0f 22 df 5d c3 0f 1f 80 00 00 00 00 55 48 89 e5 <0f> 22 e7 5d c3 >>>> 0f 1f 80 00 00 00 00 55 48 89 e5 44 0f 20 c0 5d >>>> RIP: native_write_cr4+0x4/0x10 arch/x86/include/asm/special_insns.h:76 RSP: >>>> ffff8801ca6f75a0 >>>> ---[ end trace ca14f0c15b26c251 ]--- >>>> >>>> >>>> --- >>>> This bug is generated by a dumb bot. It may contain errors. >>>> See https://goo.gl/tpsmEJ for details. >>>> Direct all questions to syzkaller@googlegroups.com. >>>> Please credit me with: Reported-by: syzbot >>>> >>>> syzbot will keep track of this bug report. >>>> Once a fix for this bug is merged into any tree, reply to this email with: >>>> #syz fix: exact-commit-title >>>> If you want to test a patch for this bug, please reply with: >>>> #syz test: git://repo/address.git branch >>>> and provide the patch inline or as an attachment. >>>> To mark this as a duplicate of another syzbot report, please reply with: >>>> #syz dup: exact-subject-of-another-report >>>> If it's a one-off invalid bug report, please reply with: >>>> #syz invalid >>>> Note: if the crash happens again, it will cause creation of a new bug >>>> report. >>>> Note: all commands must start from beginning of the line in the email body.