Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1047000ybc; Tue, 12 Nov 2019 13:22:42 -0800 (PST) X-Google-Smtp-Source: APXvYqz43Bv4uEs+gVR7aeodE8wkZBVV5TINVVBHenz2wnQSS/i51URecNwNo49FQJPBzMy4D6YA X-Received: by 2002:a50:fc02:: with SMTP id i2mr36472709edr.284.1573593762134; Tue, 12 Nov 2019 13:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573593762; cv=none; d=google.com; s=arc-20160816; b=rjfRakFUZZOV7vKzmRq66Ft8kkNbQD2lPASVyo2zAW/6tc5eJqSxDFbFiLMUpSIPQO I0JcgQjyEq34EqS895s1BJhokkPv/80lir5K7+keaiNChj/osPBGeOC/7fPG7rzfsak1 0eV6t6UV8wJl7I1qFj4YYc0GsIVv/doCWc4OXFqUPe68IV06L+85bkrePOBubGRxboUW vC1Xi/mkqYOgnAMiGHgtQZnslV1dbLjXMyE38TOnN1avw09nEO4xgX11I8FMwzn/N9gw ezquEFcCCv/WSpSbVv+1eAI912zbQG1TQx213x4GTNzJ1l1eN+3dmaH3XtFUe1aZS/OM XkSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=dEhpPGqL2EnHvM+RMKgKzToY3FC78Q0MvKFrMXo/rVg=; b=M4bvdyn+nfuzi/xmt2MulNNITaCKJuXztW2niau51AkQK5ilsvlc4OGq0QGfshQXX9 TUY7Lq/JF0qLj7b1hzcndr1LNIl5Joz0dgzOieu5sdvPf05yRzNh0lSNppMT1n3sPxjt pBNLi3Y9p4F/6ij2MoiA4qA91AW7+T4WHa9Rp6SU9P22jKdM6pccQLoTe7ylhlf2FHnc RE83OI0zAzR2ouPVw1LgcQUH3Wy9bnhe5FM4nOe4WANqTJQPjGRNLgducslqMb4sVvRT xbhIsNhTkLqjq7sDykp8vSLpXwcLTopoYbhRqjw6yDeYKnahwYNqo69PQDhVMHCy0kBm Bp+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WNXrjKl+; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j18si14721886eda.278.2019.11.12.13.22.17; Tue, 12 Nov 2019 13:22:42 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=WNXrjKl+; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727046AbfKLVVm (ORCPT + 99 others); Tue, 12 Nov 2019 16:21:42 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39793 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbfKLVVm (ORCPT ); Tue, 12 Nov 2019 16:21:42 -0500 Received: by mail-wm1-f68.google.com with SMTP id t26so4507908wmi.4; Tue, 12 Nov 2019 13:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id; bh=dEhpPGqL2EnHvM+RMKgKzToY3FC78Q0MvKFrMXo/rVg=; b=WNXrjKl+NzL/krxGUzhS16CUd+Jmzist2kq/sBXSoMZtW6q7/qk0LYsrJUjp6RaDSF wU2j3rZDNhCBT5Hxma+ntzFVX9U/ojQsXSlFObe8jY2aANnAT7V30CUKIi9EC3x8StDO Jx6TtutddTKB6mI81DjwmmdqECeKojN7giKo6++9/yUISdjlezNNnzxgviegpvJiCpec WCrrFtrxJyoDbERz9Zmrl7kmOml5h30B+D+PDeXzbw2qa75qfKj0QwLMLduL8K4P129O x5h+XEQTiV4+US7m+IE6OwiDruA9TGuxPIsVrJf8wqP3licqss6d3+EaR/W99bssTB+L ggig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id; bh=dEhpPGqL2EnHvM+RMKgKzToY3FC78Q0MvKFrMXo/rVg=; b=p+C/kwHDv4lTvlfbT7fhAuZJ2ZtwvclkLHugsuxAbp640Z6sxqO3DncFKxHXWobuab 1kQxSLhnLZqJV9mcMXBjVXrFkHf/PJ5MU1G9eOgpzc4riHEH6UalEcaAHETRhGhFjEJq noycLOJbTRGeLMKkIFmVX2lJZ1WMnSQmRZwzjDJ4iaBzHpJtgORgRsdF9zu/4pDuxbQH WiecM0k77ZF68tHBcxKh/cMEy84zRC38+bhp7gMExM5Gcj/rxdNEzntD99BjgPiPYEdJ uR8lesy1BVITJde09HfHgi0je2yBA36hxFNVuAYpcY906w1SFCB+665ysoJFhFqcQQ+h P+Dg== X-Gm-Message-State: APjAAAUEmaiP9CHWDBVO4OkFcKHGkfmMu2N39uEMX/LXF+4alm1o4Cdg DZdVfJrUcgO5wwZHtq/7TOQwmoNt X-Received: by 2002:a7b:cf35:: with SMTP id m21mr4156466wmg.141.1573593699205; Tue, 12 Nov 2019 13:21:39 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id q25sm198664wra.3.2019.11.12.13.21.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Nov 2019 13:21:38 -0800 (PST) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [FYI PATCH 0/7] Mitigation for CVE-2018-12207 Date: Tue, 12 Nov 2019 22:21:30 +0100 Message-Id: <1573593697-25061-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CVE-2018-12207 is a microarchitectural implementation issue that could allow an unprivileged local attacker to cause system wide denial-of-service condition. Privileged software may change the page size (ex. 4KB, 2MB, 1GB) in the paging structures, without following such paging structure changes with invalidation of the TLB entries corresponding to the changed pages. In this case, the attacker could invoke instruction fetch, which will result in the processor hitting multiple TLB entries, reporting a machine check error exception, and ultimately hanging the system. The attached patches mitigate the vulnerability by making huge pages non-executable. The processor will not be able to execute an instruction residing in a large page (ie. 2MB, 1GB, etc.) without causing a trap into the host kernel/hypervisor; KVM will then break the large page into 4KB pages and gives executable permission to 4KB pages. Thanks to everyone that was involved in the development of these patches, especially Junaid Shahid, who provided the first version of the code, and Thomas Gleixner. Paolo Gomez Iglesias, Antonio (1): Documentation: Add ITLB_MULTIHIT documentation Junaid Shahid (2): kvm: Add helper function for creating VM worker threads kvm: x86: mmu: Recovery of shattered NX large pages Paolo Bonzini (1): kvm: mmu: ITLB_MULTIHIT mitigation Pawan Gupta (1): x86/cpu: Add Tremont to the cpu vulnerability whitelist Tyler Hicks (1): cpu/speculation: Uninline and export CPU mitigations helpers Vineela Tummalapalli (1): x86/bugs: Add ITLB_MULTIHIT bug infrastructure Documentation/ABI/testing/sysfs-devices-system-cpu | 1 + Documentation/admin-guide/hw-vuln/index.rst | 1 + Documentation/admin-guide/hw-vuln/multihit.rst | 163 +++++++++++++ Documentation/admin-guide/kernel-parameters.txt | 25 ++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/kvm_host.h | 6 + arch/x86/include/asm/msr-index.h | 7 + arch/x86/kernel/cpu/bugs.c | 24 ++ arch/x86/kernel/cpu/common.c | 67 ++--- arch/x86/kvm/mmu.c | 270 ++++++++++++++++++++- arch/x86/kvm/mmu.h | 4 + arch/x86/kvm/paging_tmpl.h | 29 ++- arch/x86/kvm/x86.c | 20 ++ drivers/base/cpu.c | 8 + include/linux/cpu.h | 27 +-- include/linux/kvm_host.h | 6 + kernel/cpu.c | 27 ++- virt/kvm/kvm_main.c | 112 +++++++++ 18 files changed, 732 insertions(+), 66 deletions(-) create mode 100644 Documentation/admin-guide/hw-vuln/multihit.rst -- 1.8.3.1