[PATCH] KVM: SVM: Mark SEV launch secret pages as dirty.

2020-08-06 Thread Cfir Cohen
The LAUNCH_SECRET command performs encryption of the launch secret memory contents. Mark pinned pages as dirty, before unpinning them. This matches the logic in sev_launch_update(). Signed-off-by: Cfir Cohen --- arch/x86/kvm/svm/sev.c | 15 ++- 1 file changed, 14 insertions(+), 1

[PATCH v2] KVM: SVM: Mark SEV launch secret pages as dirty.

2020-08-07 Thread Cfir Cohen
The LAUNCH_SECRET command performs encryption of the launch secret memory contents. Mark pinned pages as dirty, before unpinning them. This matches the logic in sev_launch_update_data(). Signed-off-by: Cfir Cohen --- Changelog since v1: - Updated commit message. arch/x86/kvm/svm/sev.c | 15

Re: [PATCH v3 08/11] KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercall

2019-07-22 Thread Cfir Cohen
In addition, it seems that svm_page_enc_status_hc() accepts 'gpa', 'npages', 'enc' directly from the guest, and so these can take arbitrary values. A very large 'npages' could lead to an int overflow in 'gfn_end = gfn_start + npages', making gfn_end < gfn_start. This could an OOB access in the bitm

[PATCH] KVM: SVM: Mark SEV launch secret pages as dirty.

2020-09-24 Thread Cfir Cohen
The LAUNCH_SECRET command performs encryption of the launch secret memory contents. Mark pinned pages as dirty, before unpinning them. This matches the logic in sev_launch_update_data(). Fixes: 9c5e0afaf157 ("KVM: SVM: Add support for SEV LAUNCH_SECRET command") Signed-off-by: