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

Re: [PATCH 06/16] x86/traps: Implement #CP handler and extend #PF for shadow stacks

On 11.05.2020 19:20, Andrew Cooper wrote:
> On 04/05/2020 15:10, Jan Beulich wrote:
>> On 02.05.2020 00:58, Andrew Cooper wrote:
>>> @@ -1457,6 +1451,10 @@ void do_page_fault(struct cpu_user_regs *regs)
>>>      {
>>>          enum pf_type pf_type = spurious_page_fault(addr, regs);
>>> +        /* Any fault on a shadow stack access is a bug in Xen. */
>>> +        if ( error_code & PFEC_shstk )
>>> +            goto fatal;
>> Not going through the full spurious_page_fault() in this case
>> would seem desirable, as would be at least a respective
>> adjustment to __page_fault_type(). Perhaps such an adjustment
>> could then avoid the change (and the need for goto) here?
> This seems to do a lot of things which have little/nothing to do with
> spurious faults.
> In particular, we don't need to disable interrupts to look at
> PFEC_shstk, or RSVD for that matter.

Perhaps even more so a reason to make spurious_page_fault()
return a new enum pf_type enumerator? In any event your reply
looks more like a "yes" to my suggestion than an objection,
but I may be getting it entirely wrong ...




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