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: <3e26626aa1c01aaa5d1e7b42d3ffbd632c3264fb.camel@surriel.com>
Date: Fri, 14 Feb 2025 20:25:51 -0500
From: Rik van Riel <riel@...riel.com>
To: Dave Hansen <dave.hansen@...el.com>, Peter Zijlstra
 <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, bp@...en8.de, 
	dave.hansen@...ux.intel.com, zhengqi.arch@...edance.com,
 nadav.amit@...il.com, 	thomas.lendacky@....com, kernel-team@...a.com,
 linux-mm@...ck.org, 	akpm@...ux-foundation.org, jackmanb@...gle.com,
 jannh@...gle.com, 	mhklinux@...look.com, andrew.cooper3@...rix.com, Manali
 Shukla	 <Manali.Shukla@....com>
Subject: Re: [PATCH v11 06/12] x86/mm: use INVLPGB for kernel TLB flushes

On Fri, 2025-02-14 at 11:55 -0800, Dave Hansen wrote:
> 
> Fair enough. If we don't have a better name, we can at least do:
> 
> 	if (new_bad_name()) {
> 		new_thing();
> 	} else {
> 		old_thing();
> 	}
> 
> My real heartburn is with:
> 
> 	if (new_bad_name()) {
> 		new_thing();
> 	} else if (need_thing_1()) {
> 		old_thing1();
> 	} else {
> 		old_thing2();
> 	}
> 
> Where new and old are logically squished together.
> 
Do we want to group this code by history, or
by function?

I would argue that new_thing() and old_thing1()
are closer to each other functionally (they both
do remote TLB invalidation) than they are to 
old_thing2(), which does local-only invalidation.

I can organize the code however people want,
but I would like a second opinion on this idea :)
-- 
All Rights Reversed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ