From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3 7/9] x86: Enable Supervisor Mode Access Prevention (SMAP) for Xen Date: Mon, 28 Apr 2014 10:53:15 +0100 Message-ID: <535E250B.10900@citrix.com> References: <1398655043-6162-1-git-send-email-feng.wu@intel.com> <535E3E45020000780000CC51@nat28.tlf.novell.com> <535E23DF.3090903@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Wu, Feng" Cc: "Tian, Kevin" , "ian.campbell@citrix.com" , "Dong, Eddie" , "xen-devel@lists.xen.org" , Jan Beulich , "Nakajima, Jun" List-Id: xen-devel@lists.xenproject.org On 28/04/14 10:50, Wu, Feng wrote: >>>> if ( unlikely(current->domain->arch.suppress_spurious_page_faults) ) >>>> { >>>> - pf_type = spurious_page_fault(addr, error_code); >>>> - if ( pf_type == smep_fault ) >>>> + pf_type = spurious_page_fault(addr, regs); >>>> + if ( (pf_type == smep_fault) || (pf_type == smap_fault)) >>>> { >>>> - gdprintk(XENLOG_ERR, "Fatal SMEP fault\n"); >>>> + printk(XENLOG_G_ERR "%p fatal %s fault\n", >>>> + current, (pf_type == smep_fault) ? "SMEP" : >> "SMAP"); >> >> That should be %pv rather than %p, which is an automagic format >> parameter which will get you "dv" formatted. > Thanks Andrew, I thought it was a typo in your last review:) We are slowly accumulating useful custom %p formatting, similar to Linux. docs/misc/printk-formats.txt shows the current extensions supported. ~Andrew