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: <e87ff5822692fdc8dcfed428f8e8b2e2a577a20d.camel@surriel.com>
Date: Fri, 07 Feb 2025 12:46:54 -0500
From: Rik van Riel <riel@...riel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Oleksandr Natalenko <oleksandr@...alenko.name>, 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, 
	jannh@...gle.com, mhklinux@...look.com, andrew.cooper3@...rix.com
Subject: Re: [PATCH v9 00/12] AMD broadcast TLB invalidation

On Fri, 2025-02-07 at 09:16 +0100, Peter Zijlstra wrote:
> On Thu, Feb 06, 2025 at 09:48:25AM -0500, Rik van Riel wrote:
> 
> 
> > we can just round up the
> > end address to the nearest stride boundary
> > there, with a comment explaining why?
> 
> Well, why are we rounding at all? I don't think I've seen an
> explanation
> for that anywhere yet.
> 
> What made you do this?

The only real reason is to not end up with a 0
value for nr in these loops:

        for (addr = info->start; addr < info->end; addr += nr <<
PAGE_SHIFT) {
                nr = min((info->end - addr) >> PAGE_SHIFT,
invlpgb_count_max);
                invlpgb_flush_addr_nosync(addr, nr);
        }       

Which makes me think we could just insert a
"nr = max(nr, 1)" in there, and round up
partial pages that way?

Looking further, I already did that on the
userspace flushing side. Let me do the same
thing on the kernel side, and remove the
other code related to partial pages being
passed in.

-- 
All Rights Reversed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ