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]
Date:   Fri, 10 Sep 2021 16:23:20 -0700 (PDT)
From:   Stefano Stabellini <sstabellini@...nel.org>
To:     Jan Beulich <jbeulich@...e.com>
cc:     Juergen Gross <jgross@...e.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        "xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>
Subject: Re: [PATCH 06/12] swiotlb-xen: limit init retries

On Tue, 7 Sep 2021, Jan Beulich wrote:
> Due to the use of max(1024, ...) there's no point retrying (and issuing
> bogus log messages) when the number of slabs is already no larger than
> this minimum value.
> 
> Signed-off-by: Jan Beulich <jbeulich@...e.com>

Reviewed-by: Stefano Stabellini <sstabellini@...nel.org>


> --- a/drivers/xen/swiotlb-xen.c
> +++ b/drivers/xen/swiotlb-xen.c
> @@ -207,7 +207,7 @@ retry:
>  	swiotlb_set_max_segment(PAGE_SIZE);
>  	return 0;
>  error:
> -	if (repeat--) {
> +	if (nslabs > 1024 && repeat--) {
>  		/* Min is 2MB */
>  		nslabs = max(1024UL, ALIGN(nslabs >> 1, IO_TLB_SEGSIZE));
>  		bytes = nslabs << IO_TLB_SHIFT;
> @@ -243,7 +243,7 @@ retry:
>  	rc = xen_swiotlb_fixup(start, nslabs);
>  	if (rc) {
>  		memblock_free(__pa(start), PAGE_ALIGN(bytes));
> -		if (repeat--) {
> +		if (nslabs > 1024 && repeat--) {
>  			/* Min is 2MB */
>  			nslabs = max(1024UL, ALIGN(nslabs >> 1, IO_TLB_SEGSIZE));
>  			bytes = nslabs << IO_TLB_SHIFT;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ