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: <20250103111457.GC22934@noisy.programming.kicks-ass.net>
Date: Fri, 3 Jan 2025 12:14:57 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Mike Rapoport <rppt@...nel.org>
Cc: Qi Zheng <zhengqi.arch@...edance.com>, agordeev@...ux.ibm.com,
	kevin.brodsky@....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, ryan.roberts@....com,
	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 v3 15/17] mm: pgtable: remove tlb_remove_page_ptdesc()

On Sat, Dec 28, 2024 at 11:26:22AM +0200, Mike Rapoport wrote:
> On Mon, Dec 23, 2024 at 05:41:01PM +0800, Qi Zheng wrote:
> > Here we are explicitly dealing with struct page, and the following logic
> > semms strange:
> > 
> > tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte)));
> > 
> > tlb_remove_page_ptdesc
> > --> tlb_remove_page(tlb, ptdesc_page(pt));
> > 
> > So remove tlb_remove_page_ptdesc() and make callers call tlb_remove_page()
> > directly.
> 
> Please don't. The ptdesc wrappers are there as a part of reducing the size
> of struct page project [1]. 
> 
> For now struct ptdesc overlaps struct page, but the goal is to have them
> separate and always operate on struct ptdesc when working with page tables.

I don't see how the current idiotic code helps with that at all.

Fundamentally tlb_remove_page() is about removing *pages* as from a PTE,
there should not be a page-table anywhere near here *ever*.

Yes, some architectures use tlb_remove_page() for page-tables too, but
that is more or less an implementation detail that can be fixed.

So no, please keep these patches and kill this utterly idiotic code.

The only thing that should eventually care about page-tables is
tlb_remove_table(), and that takes a 'void *' and is expected to match
whatever __tlb_remove_table() does.

Flipping those to pgdesc, once its actually a thing, should be fairly
straight forward.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ