Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751927AbeADBRL (ORCPT + 1 other); Wed, 3 Jan 2018 20:17:11 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:41848 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbeADBRJ (ORCPT ); Wed, 3 Jan 2018 20:17:09 -0500 X-Google-Smtp-Source: ACJfBovoBxXKZXKGTG5SgGF8vAKghPZhgTkfYzqTtCaPaH8Rj8vn6LsOrBm7X0ypAeMlA+YZqa3iSQ== Subject: Re: [PATCH v2] KVM: x86: do not read FS/GS base MSRs when saving them To: Andy Lutomirski Cc: Andy Lutomirski , LKML , kvm list References: <1514901591-12866-1-git-send-email-pbonzini@redhat.com> <6d10cdd5-e8d8-f5ed-e039-c71df9d0ea9e@redhat.com> <598B48F9-4552-4442-82D2-60A2674C6241@amacapital.net> From: Paolo Bonzini Message-ID: Date: Thu, 4 Jan 2018 02:17:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <598B48F9-4552-4442-82D2-60A2674C6241@amacapital.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 04/01/2018 01:16, Andy Lutomirski wrote: >> Note that the value I'm storing in HOST_FS_BASE and HOST_GS_BASE is >> only used if FS/GS selector is zero. If FS/GS selector is not >> zero, it is not used. Does that avoid this issue? >> > I'm not convinced that this is correct. It's not obviously a > security problem in the context of KVM, but a lot of state can leak > this way. > > My general preference would be to make the code obviously fully > reload the host state. I'll try to write a v3 that looks more obviously correct. Paolo