|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] x86/traps: Rework #PF[Rsvd] bit handling
On 21.05.2020 17:43, Andrew Cooper wrote:
> @@ -1439,6 +1418,21 @@ void do_page_fault(struct cpu_user_regs *regs)
> if ( unlikely(fixup_page_fault(addr, regs) != 0) )
> return;
>
> + /*
> + * Xen doesn't have reserved bits set in its pagetables, nor do we permit
> + * PV guests to write any. Such entries would generally be vulnerable to
> + * the L1TF sidechannel.
> + *
> + * The shadow pagetable logic may use reserved bits as part of
> + * SHOPT_FAST_FAULT_PATH. Pagefaults arising from these will be resolved
> + * via the fixup_page_fault() path.
> + *
> + * Anything remaining is an error, constituting corruption of the
> + * pagetables and probably an L1TF vulnerable gadget.
> + */
> + if ( error_code & PFEC_reserved_bit )
> + goto fatal;
> +
> if ( unlikely(!guest_mode(regs)) )
> {
> enum pf_type pf_type = spurious_page_fault(addr, regs);
> @@ -1457,13 +1451,12 @@ void do_page_fault(struct cpu_user_regs *regs)
> if ( likely((fixup = search_exception_table(regs)) != 0) )
While I continue to not fully agree with not trying to fix up such
faults if the fault location has recovery code attached, I realize
that we're not going to reach agreement here, so somewhat hesitantly
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |