[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVL1iwSicgWg1qx+@osiris>
Date: Tue, 28 Sep 2021 12:59:23 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: David Hildenbrand <david@...hat.com>,
Christian Borntraeger <borntraeger@...ibm.com>
Cc: linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
kvm@...r.kernel.org, linux-mm@...ck.org,
Janosch Frank <frankja@...ux.ibm.com>,
Cornelia Huck <cohuck@...hat.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Niklas Schnelle <schnelle@...ux.ibm.com>,
Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
Ulrich Weigand <Ulrich.Weigand@...ibm.com>
Subject: Re: [PATCH resend RFC 0/9] s390: fixes, cleanups and optimizations
for page table walkers
On Thu, Sep 09, 2021 at 06:22:39PM +0200, David Hildenbrand wrote:
> Resend because I missed ccing people on the actual patches ...
>
> RFC because the patches are essentially untested and I did not actually
> try to trigger any of the things these patches are supposed to fix. It
> merely matches my current understanding (and what other code does :) ). I
> did compile-test as far as possible.
>
> After learning more about the wonderful world of page tables and their
> interaction with the mmap_sem and VMAs, I spotted some issues in our
> page table walkers that allow user space to trigger nasty behavior when
> playing dirty tricks with munmap() or mmap() of hugetlb. While some issues
> should be hard to trigger, others are fairly easy because we provide
> conventient interfaces (e.g., KVM_S390_GET_SKEYS and KVM_S390_SET_SKEYS).
>
> Future work:
> - Don't use get_locked_pte() when it's not required to actually allocate
> page tables -- similar to how storage keys are now handled. Examples are
> get_pgste() and __gmap_zap.
> - Don't use get_locked_pte() and instead let page fault logic allocate page
> tables when we actually do need page tables -- also, similar to how
> storage keys are now handled. Examples are set_pgste_bits() and
> pgste_perform_essa().
> - Maybe switch to mm/pagewalk.c to avoid custom page table walkers. For
> __gmap_zap() that's very easy.
>
> Cc: Christian Borntraeger <borntraeger@...ibm.com>
> Cc: Janosch Frank <frankja@...ux.ibm.com>
> Cc: Cornelia Huck <cohuck@...hat.com>
> Cc: Claudio Imbrenda <imbrenda@...ux.ibm.com>
> Cc: Heiko Carstens <hca@...ux.ibm.com>
> Cc: Vasily Gorbik <gor@...ux.ibm.com>
> Cc: Niklas Schnelle <schnelle@...ux.ibm.com>
> Cc: Gerald Schaefer <gerald.schaefer@...ux.ibm.com>
> Cc: Ulrich Weigand <Ulrich.Weigand@...ibm.com>
For the whole series:
Acked-by: Heiko Carstens <hca@...ux.ibm.com>
Christian, given that this is mostly about KVM I'd assume this should
go via the KVM tree. Patch 6 (pci_mmio) is already upstream.
Powered by blists - more mailing lists