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: <20250516190755.32917d48@p-imbrenda>
Date: Fri, 16 May 2025 19:07:55 +0200
From: Claudio Imbrenda <imbrenda@...ux.ibm.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
        kvm@...r.kernel.org, linux-mm@...ck.org,
        Christian Borntraeger
 <borntraeger@...ux.ibm.com>,
        Janosch Frank <frankja@...ux.ibm.com>,
        Heiko
 Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander
 Gordeev <agordeev@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>, Thomas Huth <thuth@...hat.com>,
        Matthew Wilcox <willy@...radead.org>, Zi
 Yan <ziy@...dia.com>,
        Sebastian Mitterle <smitterl@...hat.com>
Subject: Re: [PATCH v1 0/3] s390/uv: handle folios that cannot be split
 while dirty

On Fri, 16 May 2025 14:39:43 +0200
David Hildenbrand <david@...hat.com> wrote:

> From patch #3:
> 
> "
> Currently, starting a PV VM on an iomap-based filesystem with large
> folio support, such as XFS, will not work. We'll be stuck in
> unpack_one()->gmap_make_secure(), because we can't seem to make progress
> splitting the large folio.
> 
> The problem is that we require a writable PTE but a writable PTE under such
> filesystems will imply a dirty folio.
> 
> So whenever we have a writable PTE, we'll have a dirty folio, and dirty
> iomap folios cannot currently get split, because
> split_folio()->split_huge_page_to_list_to_order()->filemap_release_folio()
> will fail in iomap_release_folio().
> 
> So we will not make any progress splitting such large folios.
> "
> 
> Let's fix one related problem during unpack first, to then handle such
> folios by triggering writeback before immediately trying to split them
> again.
> 
> This makes it work on XFS with large folios again.
> 
> Long-term, we should cleanly supporting splitting such folios even
> without writeback, but that's a bit harder to implement and not a quick
> fix.

yet another layer of duck tape

I really dislike the current interaction between secure execution and
I/O, I hope I can get a cleaner solution as soon as possible


meanwhile, let's keep the boat afloat; whole series:

Reviewed-by: Claudio Imbrenda <imbrenda@...ux.ibm.com>


David: thanks for fixing this mess!

> 
> Cc: Christian Borntraeger <borntraeger@...ux.ibm.com>
> Cc: Janosch Frank <frankja@...ux.ibm.com>
> Cc: Claudio Imbrenda <imbrenda@...ux.ibm.com>
> Cc: David Hildenbrand <david@...hat.com>
> Cc: Heiko Carstens <hca@...ux.ibm.com>
> Cc: Vasily Gorbik <gor@...ux.ibm.com>
> Cc: Alexander Gordeev <agordeev@...ux.ibm.com>
> Cc: Sven Schnelle <svens@...ux.ibm.com>
> Cc: Thomas Huth <thuth@...hat.com>
> Cc: Matthew Wilcox <willy@...radead.org>
> Cc: Zi Yan <ziy@...dia.com>
> Cc: Sebastian Mitterle <smitterl@...hat.com>
> 
> David Hildenbrand (3):
>   s390/uv: don't return 0 from make_hva_secure() if the operation was
>     not successful
>   s390/uv: always return 0 from s390_wiggle_split_folio() if successful
>   s390/uv: improve splitting of large folios that cannot be split while
>     dirty
> 
>  arch/s390/kernel/uv.c | 85 ++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 72 insertions(+), 13 deletions(-)
> 
> 
> base-commit: 088d13246a4672bc03aec664675138e3f5bff68c


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ