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: <20241021094133.6950-A-hca@linux.ibm.com>
Date: Mon, 21 Oct 2024 11:41:33 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: Claudio Imbrenda <imbrenda@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, borntraeger@...ibm.com, nsg@...ux.ibm.com,
        nrb@...ux.ibm.com, frankja@...ux.ibm.com, seiden@...ux.ibm.com,
        agordeev@...ux.ibm.com, gor@...ux.ibm.com,
        gerald.schaefer@...ux.ibm.com, kvm@...r.kernel.org,
        linux-s390@...r.kernel.org
Subject: Re: [PATCH v3 03/11] s390/mm/gmap: Refactor gmap_fault() and add
 support for pfault

On Tue, Oct 15, 2024 at 06:43:18PM +0200, Claudio Imbrenda wrote:
> When specifying FAULT_FLAG_RETRY_NOWAIT as flag for gmap_fault(), the
> gmap fault will be processed only if it can be resolved quickly and
> without sleeping. This will be needed for pfault.
> 
> Refactor gmap_fault() to improve readability.
> 
> Signed-off-by: Claudio Imbrenda <imbrenda@...ux.ibm.com>
> Acked-by: Alexander Gordeev <agordeev@...ux.ibm.com>
> ---
>  arch/s390/mm/gmap.c | 119 +++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 100 insertions(+), 19 deletions(-)
...

> +static int fixup_user_fault_nowait(struct mm_struct *mm, unsigned long address,
> +				   unsigned int fault_flags, bool *unlocked)
> +{
> +	struct vm_area_struct *vma;
> +	unsigned int test_flags;
> +	vm_fault_t fault;
> +	int rc;
> +
> +	fault_flags |= FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_RETRY_NOWAIT;
                                                ^^^^^^^^^^^^^^^^^^^^^^^

This is not necessary, because of

> +	if (fault_flags & FAULT_FLAG_RETRY_NOWAIT) {
> +		rc = fixup_user_fault_nowait(gmap->mm, vmaddr, fault_flags, &unlocked);

this.

In any case:
Reviewed-by: Heiko Carstens <hca@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ