From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v1 3/6] x86: Enable Supervisor Mode Execution Prevention (SMAP) for Xen Date: Tue, 15 Apr 2014 15:26:53 +0100 Message-ID: <534D41AD.3000002@citrix.com> References: <1397566907-19710-1-git-send-email-feng.wu@intel.com> <534D3B87.7030109@citrix.com> <534D3DA6.3070908@citrix.com> <534D5B5D02000078000090C1@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <534D5B5D02000078000090C1@nat28.tlf.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: Feng Wu , eddie.dong@intel.com, Ian.Campbell@citrix.com, jun.nakajima@intel.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 15/04/14 15:16, Jan Beulich wrote: >>>> On 15.04.14 at 16:09, wrote: >> And having just sent this email, I further realise that functions like >> show_page_walk() need protection against SMAP otherwise we will take a >> recursive fault when trying to dump the error information from the first >> fault. I don't recall any of your other patches dealing with this. > I don't follow: page table walks are done using map_domain_page(), > which ought to not produce user mode accessible mappings. Or did > you mean to say "may" instead of "will", and meant to do this just to > be on the safe side? > > Jan > Hmm yes - in retrospect we shouldn't actually take faults from domain mapped pages. However for the safe side of things, we don't want to be taking recursive faults in a panic scenario, so it might be a good idea to preemptively stac() on terminal error paths. ~Andrew