Received: by 10.213.65.68 with SMTP id h4csp2278465imn; Thu, 5 Apr 2018 12:04:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx486jxVdBwOjKh6iN+moPlcRWVEsJLs/pMPy8QxIMaM80R1M7c2JzhY8H42nRKJCt/sc0Hfp X-Received: by 2002:a17:902:96a:: with SMTP id 97-v6mr14861634plm.266.1522955085850; Thu, 05 Apr 2018 12:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522955085; cv=none; d=google.com; s=arc-20160816; b=eWEEqOmJTm7KF/QtEY47bGKMhPzOD3edVkWdnrPAZbCNVUM28fB2Ygcj3OwfZK+n8t stmcLyVVoDW0PHITzydd6r2IjeiSZCF0T0EOysm4N8/bg7VsMgQNmFcqJuhjk+mjsFm2 H47M3ndn2DVVq4jAGJw1mcMV4RD7zmyGz1ci1g/5vAkRH0eciehufoxk0J3CmlcCi49L 2xcNY3xAMBRgYl5NIUJJUdHmlTZS9I/oy0DZBJiroIUMpmJsnTXnpTH70w8cCbWhmivY d44l8J6cxAJBlk3clLy+uRULa4X1Dj1xglt1NhhVC+wNsdJciDvhKFEJ13YIZGDeoDlO IU2w== 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=LKYxInqBc35+Wo20N80nzr5BM2VQ2waG3n1PjErjDOI=; b=RYEghoZuEi4amEpusr322yhVrkhTFDC3QZOrVhD9QJxuQg4JMGY1aOkG8N+nccaqhl K+pSVCXj1c6K2DnEwvgLAktbpK9fSND65DDYKYmQPuIsbYYA3f+e2iUepTjJK1mJSmH6 CMWPG68gJF8myCzk8UISq+0PNkmZ4GNeKV6xcU6FmGTUAIgh+0K7WAGmI+pGSqKsxcpd sHbL1mjw6xTTFQVcHydP6QYBHzE+vZq8pV8wsmypItx05eQ7LAh7iAyt9A4DLt3YuRam DYfFeyAeQTid9Xbq6SxgrmZV0wlN5C1WSkMksdHJD3vK86zX/KyWmiXdKR6eNpoO5aoM M1iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fqjTOXWb; 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 y185si5925044pgd.359.2018.04.05.12.04.31; Thu, 05 Apr 2018 12:04:45 -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=fqjTOXWb; 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 S1752431AbeDETBp (ORCPT + 99 others); Thu, 5 Apr 2018 15:01:45 -0400 Received: from mail-ot0-f174.google.com ([74.125.82.174]:34836 "EHLO mail-ot0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbeDETBk (ORCPT ); Thu, 5 Apr 2018 15:01:40 -0400 Received: by mail-ot0-f174.google.com with SMTP id f47-v6so19638169oth.2 for ; Thu, 05 Apr 2018 12:01:40 -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=LKYxInqBc35+Wo20N80nzr5BM2VQ2waG3n1PjErjDOI=; b=fqjTOXWb2YosQV3ippwM3GDbMySNVbnqHyqY7KGFUauSJKP9iHsMMPto4qwdZPTFII OXxf7BniC/JLnax4rH6Ztn2FXdb4o7TIuyJ15lLgsvnL1PnCQQ3lE4mNLfIw88ANR+Hv CWWMKi4y8cCRDaQ7OU3WsQhtFl7NdbuyTywAXc4JTrXvA4TYOO2GTa/mN15eXiSB0rfB ocKDV38WRlsYCqLb48XuS9wD3trgh6QeNr2D2DvlIntR/BDqsAlZvge6GSN2MSWn5aVd Z9kNXMn15qTn2C9j6Z44BGZzyxV82hDxbbB08rQ9VFaEjWvSOKaYvTyi9Ji0dA4Rix2k wAmQ== 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=LKYxInqBc35+Wo20N80nzr5BM2VQ2waG3n1PjErjDOI=; b=V99bz+mYqKI90i7R+TH2OOvEq++ErKfJ7oYUcWwZE6Lo7NfKZkjJjswhbKypSYsK9b wYc9UpjwnXdKdEAzMp2VWMzZAyMQc9gcWGT/UcLW2jQSO5RuA7jIj/Pfx5Iui+Kaues1 TS/JuKovb6JxG6nUE0TxzLHFtwNS4XHV9FYEVnW/VJ/Z8pMr3z5jYM2jG/OJljJsnSEz KPMqXZ8hIxSmwg1YuHCMBvj6/GW8xB8Jq1n39C40pTe/Cs2YsEHhIRrHH82TLvoUOAYu HcAmuAu/c4f8RPGU6kQ+jIaZP6IXie90jZs9x6HZIv+bAmVpaf/Wy2Xaqe52S5WZRYh0 DyiQ== X-Gm-Message-State: ALQs6tBnpF+LEIRhjblCtWRvAOTGC1QeE+wTL2cyz9LrErdb2KB1+LRi y/EMWipEoyCAWbKr2EcSVUOoFMj8Mg+EnEjpZI2Tig== X-Received: by 2002:a9d:1906:: with SMTP id j6-v6mr4004281ota.200.1522954899790; Thu, 05 Apr 2018 12:01:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.182.136 with HTTP; Thu, 5 Apr 2018 12:00:54 -0700 (PDT) In-Reply-To: References: <37306EFA9975BE469F115FDE982C075BCE92C301@ORSMSX114.amr.corp.intel.com> From: Dmitry Vyukov Date: Thu, 5 Apr 2018 21:00:54 +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 8:04 PM, Dmitry Vyukov wrote: > 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. Let's consider this closed for the purpose of syzbot tracking: #syz fix: KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit >>> >>>> 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.