lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <udv7injfppiz2zyvo2ta2dvit3tczyfis7kbbumhgxhdfjtslp@xbexiz6iqevt>
Date: Mon, 15 Jul 2024 17:32:43 -0500
From: Michael Roth <michael.roth@....com>
To: Paolo Bonzini <pbonzini@...hat.com>
CC: <linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>, <seanjc@...gle.com>
Subject: Re: [PATCH 02/12] KVM: guest_memfd: delay folio_mark_uptodate()
 until after successful preparation

On Thu, Jul 11, 2024 at 06:27:45PM -0400, Paolo Bonzini wrote:
> The up-to-date flag as is now is not too useful; it tells guest_memfd not
> to overwrite the contents of a folio, but it doesn't say that the page
> is ready to be mapped into the guest.  For encrypted guests, mapping
> a private page requires that the "preparation" phase has succeeded,
> and at the same time the same page cannot be prepared twice.
> 
> So, ensure that folio_mark_uptodate() is only called on a prepared page.  If
> kvm_gmem_prepare_folio() or the post_populate callback fail, the folio
> will not be marked up-to-date; it's not a problem to call clear_highpage()
> again on such a page prior to the next preparation attempt.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>

Reviewed-by: Michael Roth <michael.roth@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ