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: <6948806da404fd5822b59fd65b8a5a948e6bb317.camel@linux.ibm.com>
Date:   Mon, 16 May 2022 10:04:54 +0200
From:   Nico Boehr <nrb@...ux.ibm.com>
To:     Claudio Imbrenda <imbrenda@...ux.ibm.com>, kvm@...r.kernel.org
Cc:     borntraeger@...ibm.com, frankja@...ux.ibm.com, thuth@...hat.com,
        pasic@...ux.ibm.com, david@...hat.com, linux-s390@...r.kernel.org,
        linux-kernel@...r.kernel.org, scgl@...ux.ibm.com,
        mimu@...ux.ibm.com
Subject: Re: [PATCH v10 04/19] KVM: s390: pv: refactor s390_reset_acc

On Thu, 2022-04-14 at 10:02 +0200, Claudio Imbrenda wrote:
> Refactor s390_reset_acc so that it can be reused in upcoming patches.
> 
> We don't want to hold all the locks used in a walk_page_range for too
> long, and the destroy page UVC does take some time to complete.
> Therefore we quickly gather the pages to destroy, and then destroy
> them
> without holding all the locks.
> 
> The new refactored function optionally allows to return early without
> completing if a fatal signal is pending (and return and appropriate
> error code). Two wrappers are provided to call the new function.
> 
> Signed-off-by: Claudio Imbrenda <imbrenda@...ux.ibm.com>
> Reviewed-by: Janosch Frank <frankja@...ux.ibm.com>

Reviewed-by: Nico Boehr <nrb@...ux.ibm.com>

But see below with one naming suggestion you might want to take into
account.

[...]
> diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
> index e8904cb9dc38..a3a1f90f6ec1 100644
> --- a/arch/s390/mm/gmap.c
> +++ b/arch/s390/mm/gmap.c
> @@ -2676,44 +2676,81 @@ void s390_reset_cmma(struct mm_struct *mm)
>  }
>  EXPORT_SYMBOL_GPL(s390_reset_cmma);
>  
> -/*
> - * make inaccessible pages accessible again
> - */
> -static int __s390_reset_acc(pte_t *ptep, unsigned long addr,
> -                           unsigned long next, struct mm_walk *walk)
> +#define DESTROY_LOOP_THRESHOLD 32

maybe GATHER_NUM_PAGE_REFS_TO_TAKE?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ