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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b09335c-f0b6-4ccb-9800-5fb22f7e8083@arm.com>
Date: Thu, 2 Jan 2025 17:53:58 +0100
From: Kevin Brodsky <kevin.brodsky@....com>
To: Qi Zheng <zhengqi.arch@...edance.com>, peterz@...radead.org,
 agordeev@...ux.ibm.com, palmer@...belt.com, tglx@...utronix.de,
 david@...hat.com, jannh@...gle.com, hughd@...gle.com, yuzhao@...gle.com,
 willy@...radead.org, muchun.song@...ux.dev, vbabka@...nel.org,
 lorenzo.stoakes@...cle.com, akpm@...ux-foundation.org, rientjes@...gle.com,
 vishal.moola@...il.com, arnd@...db.de, will@...nel.org,
 aneesh.kumar@...nel.org, npiggin@...il.com, dave.hansen@...ux.intel.com,
 rppt@...nel.org, ryan.roberts@....com
Cc: linux-mm@...ck.org, linux-arm-kernel@...ts.infradead.org,
 linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
 linux-s390@...r.kernel.org, sparclinux@...r.kernel.org,
 linux-kernel@...r.kernel.org, x86@...nel.org, linux-arch@...r.kernel.org,
 linux-csky@...r.kernel.org, linux-hexagon@...r.kernel.org,
 loongarch@...ts.linux.dev, linux-m68k@...ts.linux-m68k.org,
 linux-mips@...r.kernel.org, linux-openrisc@...r.kernel.org,
 linux-sh@...r.kernel.org, linux-um@...ts.infradead.org
Subject: Re: [PATCH v4 10/15] riscv: pgtable: move pagetable_dtor() to
 __tlb_remove_table()

On 30/12/2024 10:07, Qi Zheng wrote:
>  static inline void riscv_tlb_remove_ptdesc(struct mmu_gather *tlb, void *pt)
>  {
> -	if (riscv_use_sbi_for_rfence())
> +	if (riscv_use_sbi_for_rfence()) {
>  		tlb_remove_ptdesc(tlb, pt);
> -	else
> +	} else {
> +		pagetable_dtor(pt);
>  		tlb_remove_page_ptdesc(tlb, pt);

I find the imbalance pretty confusing: pagetable_dtor() is called
explicitly before using tlb_remove_page() but not tlb_remove_ptdesc().
Doesn't that assume that CONFIG_MMU_GATHER_HAVE_TABLE_FREE is selected?
Could we not call pagetable_dtor() from __tlb_batch_free_encoded_pages()
to ensure that the dtor is always called just before freeing, and remove
the extra handling from arch code? I may well be missing something, I'm
not super familiar with the tlb handling code.

- Kevin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ