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: <ZhfYrVERxUijQbAL@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com>
Date: Thu, 11 Apr 2024 14:33:49 +0200
From: Alexander Gordeev <agordeev@...ux.ibm.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Janosch Frank <frankja@...ux.ibm.com>,
        Claudio Imbrenda <imbrenda@...ux.ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Xu <peterx@...hat.com>, Sven Schnelle <svens@...ux.ibm.com>,
        Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
        Andrea Arcangeli <aarcange@...hat.com>, kvm@...r.kernel.org,
        linux-s390@...r.kernel.org
Subject: Re: [PATCH v2 2/2] s390/mm: re-enable the shared zeropage for !PV
 and !skeys KVM guests

On Wed, Mar 27, 2024 at 06:17:37PM +0100, David Hildenbrand wrote:
> index 60950e7a25f5..1a71cb19c089 100644
> --- a/arch/s390/include/asm/pgtable.h
> +++ b/arch/s390/include/asm/pgtable.h
> @@ -566,10 +566,19 @@ static inline pud_t set_pud_bit(pud_t pud, pgprot_t prot)
>  }
>  
>  /*
> - * In the case that a guest uses storage keys
> - * faults should no longer be backed by zero pages
> + * As soon as the guest uses storage keys or enables PV, we deduplicate all
> + * mapped shared zeropages and prevent new shared zeropages from getting
> + * mapped.
>   */
> -#define mm_forbids_zeropage mm_has_pgste

Should it be the below insted?

#define mm_forbids_zeropage mm_forbids_zeropage

Once I add it, it fails to compile, due to the issue in patch #1.

But then I guess this series was tested with the generic
mm_forbids_zeropage() which always returns 0:

#define mm_forbids_zeropage(X)	(0)

> +static inline int mm_forbids_zeropage(struct mm_struct *mm)
> +{
> +#ifdef CONFIG_PGSTE
> +	if (!mm->context.allow_cow_sharing)
> +		return 1;
> +#endif
> +	return 0;
> +}
> +

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ