From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wu, Feng" Subject: Re: [PATCH v6 05/10] Clear AC bit in RFLAGS to protect Xen itself by SMAP Date: Thu, 8 May 2014 01:41:22 +0000 Message-ID: References: <1399450782-14735-1-git-send-email-feng.wu@intel.com> <1399450782-14735-6-git-send-email-feng.wu@intel.com> <536A009B.20802@citrix.com> <536A37DD020000780000FE3D@mail.emea.novell.com> <536A1EC4.40304@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <536A1EC4.40304@citrix.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Jan Beulich Cc: "Tian, Kevin" , "Dong, Eddie" , "ian.campbell@citrix.com" , "Nakajima, Jun" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org > -----Original Message----- > From: Andrew Cooper [mailto:andrew.cooper3@citrix.com] > Sent: Wednesday, May 07, 2014 7:54 PM > To: Jan Beulich > Cc: Wu, Feng; ian.campbell@citrix.com; Dong, Eddie; Nakajima, Jun; Tian, > Kevin; xen-devel@lists.xen.org > Subject: Re: [PATCH v6 05/10] Clear AC bit in RFLAGS to protect Xen itself by > SMAP > > On 07/05/14 12:40, Jan Beulich wrote: > >>>> On 07.05.14 at 11:44, wrote: > >> On 07/05/14 09:19, Feng Wu wrote: > >>> @@ -673,6 +675,7 @@ ENTRY(nmi_crash) > >>> ud2 > >>> > >>> ENTRY(machine_check) > >>> + ASM_CLAC > >> This is not needed. the start of handle_ist_exception has a SAVE_ALL, > >> which also covers the nmi entry point. > >> > >> On the subject of IST exceptions, perhaps the double fault explicitly > >> wants a STAC to reduce the likelihood of taking a further fault while > >> trying to dump state. ? > > I agree. And perhaps along with do_double_fault(), fatal_trap() > > should then also get a stac() added? > > > > Jan > > > > With doubt_fault: being sole caller of do_double_fault(), editing the > entry point in entry.S to "ASM_STAC; SAVE_ALL 0" is sufficient to avoid > stac() in do_doube_fault() itself. I think it's better to add "ASM_STAC" just before " call do_double_fault". Do you think this is okay, Andrew? Thanks! > > I would agree that fatal_trap() wants an stac() in it. > > ~Andrew Thanks, Feng