Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KVM: rseq: Update rseq when processing NOTIFY_RESUME on xfer to KVM g…
…uest Invoke rseq's NOTIFY_RESUME handler when processing the flag prior to transferring to a KVM guest, which is roughly equivalent to an exit to userspace and processes many of the same pending actions. While the task cannot be in an rseq critical section as the KVM path is reachable only by via ioctl(KVM_RUN), the side effects that apply to rseq outside of a critical section still apply, e.g. the current CPU needs to be updated if the task is migrated. Clearing TIF_NOTIFY_RESUME without informing rseq can lead to segfaults and other badness in userspace VMMs that use rseq in combination with KVM, e.g. due to the CPU ID being stale after task migration. Fixes: 72c3c0f ("x86/kvm: Use generic xfer to guest work function") Reported-by: Peter Foley <[email protected]> Bisected-by: Doug Evans <[email protected]> Acked-by: Mathieu Desnoyers <[email protected]> Cc: Shakeel Butt <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Sean Christopherson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
- Loading branch information