From: "Jan Beulich" Subject: Re: [PATCH v6 08/10] x86: Enable Supervisor Mode Access Prevention (SMAP) for Xen Date: Thu, 08 May 2014 08:06:54 +0100 Message-ID: <536B492E02000078000104EB@mail.emea.novell.com> References: <1399450782-14735-1-git-send-email-feng.wu@intel.com> <1399450782-14735-9-git-send-email-feng.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Feng Wu Cc: Kevin Tian , "ian.campbell@citrix.com" , "andrew.cooper3@citrix.com" , Eddie Dong , "xen-devel@lists.xen.org" , Jun Nakajima List-Id: xen-devel@lists.xenproject.org >>> On 08.05.14 at 08:25, wrote: >> From: Tian, Kevin >> could you double-check whether S3 resume and CPU hotplug are covered >> well? >> > Kevin, thank you very much for point this out! > > I checked the following code path: > wakeup_start --> wakeup_32 --> wakeup_64 --> __ret_point --> > restore_rest_processor_state() > > I thought there was nothing special to do with SMAP here, but after careful > review, I think we should > set X86_EFLAGS_AC for MSR_SYSCALL_MASK in restore_rest_processor_state(), > which can > make AC bit cleared when entering kernel mode via SYSCALL after S3 resume. > However, I think this > change should be included in patch "Clear AC bit in RFLAGS to protect Xen > itself by SMAP", > in which, we did the same thing for MSR_SYSCALL_MASK in > subarch_percpu_traps_init(). Yes, that's indeed where it should be done. Jan