From: Tim Deegan Subject: Re: [PATCH v2 2/4] x86: allow 64-bit PV guest kernels to suppress user mode exposure of M2P Date: Fri, 20 Mar 2015 15:35:29 +0000 Message-ID: <20150320153529.GB10538@deinos.phlegethon.org> References: <550C481D020000780006C1DD@mail.emea.novell.com> <550C4939020000780006C204@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YYyxQ-00036H-3k for xen-devel@lists.xenproject.org; Fri, 20 Mar 2015 15:35:32 +0000 Content-Disposition: inline In-Reply-To: <550C4939020000780006C204@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Ian Campbell , xen-devel , Keir Fraser , Ian Jackson , Andrew Cooper List-Id: xen-devel@lists.xenproject.org At 15:22 +0000 on 20 Mar (1426864937), Jan Beulich wrote: > Xen L4 entries being uniformly installed into any L4 table and 64-bit > PV kernels running in ring 3 means that user mode was able to see the > read-only M2P presented by Xen to the guests. While apparently not > really representing an exploitable information leak, this still very > certainly was never meant to be that way. > > Building on the fact that these guests already have separate kernel and > user mode page tables we can allow guest kernels to tell Xen that they > don't want user mode to see this table. We can't, however, do this by > default: There is no ABI requirement that kernel and user mode page > tables be separate. Therefore introduce a new VM-assist flag allowing > the guest to control respective hypervisor behavior: > - when not set, L4 tables get created with the respective slot blank, > and whenever the L4 table gets used as a kernel one the missing > mapping gets inserted, > - when set, L4 tables get created with the respective slot initialized > as before, and whenever the L4 table gets used as a user one the > mapping gets zapped. > > Signed-off-by: Jan Beulich Much nicer, thanks. Reviewed-by: Tim Deegan , for this and the two patches that follow it. Cheers, Tim.