[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 7/9] x86: Enable Supervisor Mode Access Prevention (SMAP) for Xen



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 "d<domid>v<vcpuid>" 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.