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: <Zo0laCcWwAoL0bFu@casper.infradead.org>
Date: Tue, 9 Jul 2024 12:56:24 +0100
From: Matthew Wilcox <willy@...radead.org>
To: zhangchun <zhang.chuna@....com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, jiaoxupo@....com,
	zhang.zhengming@....com, zhang.zhansheng@....com,
	shaohaojize@....com
Subject: Re: [PATCH] mm: Give kmap_lock before call flush_tlb_kernel_rang,avoid kmap_high deadlock.

On Tue, Jul 09, 2024 at 05:17:38PM +0800, zhangchun wrote:
> +++ b/mm/highmem.c
> @@ -220,8 +220,11 @@ static void flush_all_zero_pkmaps(void)
>  		set_page_address(page, NULL);
>  		need_flush = 1;
>  	}
> -	if (need_flush)
> +	if (need_flush) {
> +		spin_unlock(&kmap_lock);

should this be a raw spin_unlock(), or should it be unlock_kmap()?
ie when ARCH_NEEDS_KMAP_HIGH_GET is set, do we also need to re-enable
interrupts here?

>  		flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP));
> +		spin_lock(&kmap_lock);
> +	}
>  }
>  
>  void __kmap_flush_unused(void)
> -- 
> 1.8.3.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ