Received: by 10.213.65.68 with SMTP id h4csp2637988imn; Mon, 2 Apr 2018 11:06:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx485JjZXbrsCo1QPL8DEpS6hvV3zdRE2ZB6lMhFsQ/4Ea1GX4oU1It1QmTtii8O2jcKH/6ey X-Received: by 10.98.170.13 with SMTP id e13mr8059481pff.137.1522692383587; Mon, 02 Apr 2018 11:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522692383; cv=none; d=google.com; s=arc-20160816; b=VBJZ2sSg7EoPh47yuMBlsh/Wcro1kymbFgC2/WjH+KC11I/WXLCyUemaVPwfbXu9P2 TqxYrEZVnR9nbCQdFTWyNlfx/GLvd7zB2uC85zvQ4fMVLHT7AOH0yMat2Y3rf1pXLSqu S+8yZxQpuVV5cvFsTSl1CJIWKC/ExvgYMtJFmwWb20qHFpk8u7noPmS8wHGDHI15HX1Y 6nSPvmwBVi2b1FNvKXD7x+B7LrkA5tHyt8cIC5A3J1u2dqyLNBQszTU2+SPZw+Ra33Vv aDkqTmqPtnnUE8Qxj9jgYNATnSlqcTtegXxm4ceuP83muSn3VDxMktw/tpaTlqjJI1av XMcw== 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=DwKlMyvBAQ0oc0YBPcrWafDL/jRvExrp44xg2Qm8ZkU=; b=mLkuylwhu8Ac0m96bKt5j7WXEqzQcfG20I35cTq1UAKYrr1c8Va1T7Gd76QqWkeIia 5OBjKHmUm/jfE0wxG1zHZCr8I37HIeo2cH0kxhoXlb0L6TcVyPEBn8jLyhZVf8n6npR8 VNHbZbQLEs6kc+3CWiBZRWO+QFSCGYPTUgU0inahYQHrVIjdZms4R1mjvjpgrWZgFz/y 7pJBmBT45O8b2bp2K7ZHbzKw2FzQ4mvj6NQ8fyEf0atc8cltTbln4JmYlS/DeiptgJVl Mu6L6OK2Ptm2+4ZWzAusHcAtWxZdyAczo+3Bbxd5FPROodPm8H1Rw02NkDb+q2tzX9oB rHpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BEmSg+hY; 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 n10-v6si722432plk.141.2018.04.02.11.06.09; Mon, 02 Apr 2018 11:06:23 -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=BEmSg+hY; 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 S1754175AbeDBSEs (ORCPT + 99 others); Mon, 2 Apr 2018 14:04:48 -0400 Received: from mail-pl0-f53.google.com ([209.85.160.53]:45781 "EHLO mail-pl0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753164AbeDBSEq (ORCPT ); Mon, 2 Apr 2018 14:04:46 -0400 Received: by mail-pl0-f53.google.com with SMTP id v18-v6so3138431ply.12 for ; Mon, 02 Apr 2018 11:04:46 -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=DwKlMyvBAQ0oc0YBPcrWafDL/jRvExrp44xg2Qm8ZkU=; b=BEmSg+hYx8RYG+Yw+o/lA9gq9O9O3KexgQtwbpAW9AAYXLlzFN6Z9liVmlYH5vknXR fAlU3Z11Y0Of2aRrlcn787ED+QRhn/ZkE7SDOs8dIBwcqKKVfwX/wKP1je34JW+SdTps kVWUgkKUysAFk63Q5072H/ZQpmWUUM9YI3UX0rnlF4NogdAAJS5NbSlFkZ8WYw6wN9M+ 0/eojUBA4deoG+1le37sQuUCbE9/dcUi7b8FAACe8AOs89omJC9sYkbaBu9b3FJ+Kh1h 4SFz7WiCWkOg7yGa44rwH3oquyE7oCIGhsR4oFtii+w+30p13p+SH3zcxfseTGWo3TcD ChcQ== 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=DwKlMyvBAQ0oc0YBPcrWafDL/jRvExrp44xg2Qm8ZkU=; b=aMXMDfYBDhODJmqS87jjTDB91Z7wQIORkvKQypM3NsptIuaGytx+SSltlULbAQJAUk UoopP/TaFaPU4FC39ygY2aW2QUMhqrVbTyY2WK9BsFxB6qQc0d/rISYK/x5/0KVrTQH5 WNyh5qgA5xHXo5rm14Slf7Ye7rN3Pic4f2rp2rVagHRTHlc1cvYgGeKMREZw1B6Z0yyo TE2uWarv5veqzlScYxr6Tixw4Jda7dcp05vxs4YE8X12HemYv9EdaXl39vp6s413SgZd BqdxWqpn6CjqSAnJYkg/IR9R8QRVzBwA6A2J2MF1j9qJha7zWu/HUH4x0H/2VrejeSTZ j/EA== X-Gm-Message-State: AElRT7ERQc1QwzZ+XH6/6SWgHoolvEGgky+pmsvZhsM6uRscKr74BgHN mqAKChP30ggoAW8BRyw2EwtlllcBsqJAICF03GFheA== X-Received: by 10.98.13.151 with SMTP id 23mr8129195pfn.120.1522692285548; Mon, 02 Apr 2018 11:04:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.182.136 with HTTP; Mon, 2 Apr 2018 11:04:24 -0700 (PDT) In-Reply-To: <37306EFA9975BE469F115FDE982C075BCE92C301@ORSMSX114.amr.corp.intel.com> References: <37306EFA9975BE469F115FDE982C075BCE92C301@ORSMSX114.amr.corp.intel.com> From: Dmitry Vyukov Date: Mon, 2 Apr 2018 20:04:24 +0200 Message-ID: Subject: Re: general protection fault in native_write_cr4 To: "Christopherson, Sean J" Cc: Wanpeng Li , syzbot , "H. Peter Anvin" , kvm , LKML , Ingo Molnar , Paolo Bonzini , Radim Krcmar , "syzkaller-bugs@googlegroups.com" , Thomas Gleixner , "the arch/x86 maintainers" , Jim Mattson 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 Mon, Apr 2, 2018 at 6:36 PM, Christopherson, Sean J wrote: > On Sat, 2018-03-31, Dmitry Vyukov wrote: >> 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 > > This is more than likely a known bug in the GCE kernel, i.e. the L0 > kernel. The fix that Haozhong referenced needs to be applied to the > L0 kernel (GCE), the L1 kernel (Syzkaller) is irrelevant. You said > that you double checked an upstream kernel, but I'm assuming you were > referring to patching the L1 kernel (Syzkaller). > > https://lkml.org/lkml/2017/10/31/432 Hi Sean, Thanks! Either I did not associate these 2 threads as we shuffle hundreds of bugs, or I did not realize that this needs to be applied to L0. Anyway... I will check with GCE folks. >> >>>> 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.