From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932400AbdJZOer convert rfc822-to-8bit (ORCPT ); Thu, 26 Oct 2017 10:34:47 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47664 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932234AbdJZOeo (ORCPT ); Thu, 26 Oct 2017 10:34:44 -0400 From: Marc Zyngier To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Christoffer Dall , Christian Borntraeger , Cornelia Huck , James Hogan , Paul Mackerras , kernel-hardening@lists.openwall.com, Kees Cook , Christian Borntraeger , Christoffer Dall , Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 1/2] kvm: whitelist struct kvm_vcpu_arch In-Reply-To: <20171026134547.23664-2-pbonzini@redhat.com> (Paolo Bonzini's message of "Thu, 26 Oct 2017 15:45:46 +0200") Organization: ARM Ltd References: <20171026134547.23664-1-pbonzini@redhat.com> <20171026134547.23664-2-pbonzini@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Date: Thu, 26 Oct 2017 15:34:38 +0100 Message-ID: <86h8umasg1.fsf@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 26 2017 at 3:45:46 pm BST, Paolo Bonzini wrote: > On x86, ARM and s390, struct kvm_vcpu_arch has a usercopy region > taht is read and written by the KVM_GET/SET_CPUID2 ioctls (x86) > or KVM_GET/SET_ONE_REG (ARM/s390). Without whitelisting the area, > KVM is completely broken on those architectures with usercopy hardening > enabled. > > For now, allow writing to the entire struct on all architectures. > The KVM tree will not refine this to an architecture-specific > subset of struct kvm_vcpu_arch. > > Cc: kernel-hardening@lists.openwall.com > Cc: Kees Cook > Cc: Christian Borntraeger > Cc: Christoffer Dall > Cc: Radim Krčmář > Signed-off-by: Paolo Bonzini Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny.