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: <a84047c77c1a5f16b0d25f0cee6fe86487d14a5b.camel@surriel.com>
Date: Sat, 29 Mar 2025 13:29:25 -0400
From: Rik van Riel <riel@...riel.com>
To: Hou Wenlong <houwenlong.hwl@...group.com>, linux-kernel@...r.kernel.org
Cc: Dave Hansen <dave.hansen@...ux.intel.com>, Andy Lutomirski
 <luto@...nel.org>,  Peter Zijlstra <peterz@...radead.org>, Thomas Gleixner
 <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,  Borislav Petkov	
 <bp@...en8.de>, x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH 1/3] x86/mm: Correct the actual count of available
 global ASIDs

On Sat, 2025-03-29 at 21:05 +0800, Hou Wenlong wrote:
> 
> +++ b/arch/x86/mm/tlb.c
> @@ -279,7 +279,7 @@ static DEFINE_RAW_SPINLOCK(global_asid_lock);
>  static u16 last_global_asid = MAX_ASID_AVAILABLE;
>  static DECLARE_BITMAP(global_asid_used, MAX_ASID_AVAILABLE);
>  static DECLARE_BITMAP(global_asid_freed, MAX_ASID_AVAILABLE);
> -static int global_asid_available = MAX_ASID_AVAILABLE -
> TLB_NR_DYN_ASIDS - 1;
> +static int global_asid_available = MAX_ASID_AVAILABLE -
> TLB_NR_DYN_ASIDS;

Unfortunately we are limited by the PCID space.

A process with ASID N will get PCID N+1.

The PCID space has the same size (and maximum value)
as the ASID space.

That means we cannot use the top ASID value.

Alternatively, I suppose we could have ASID and PCID
line up, and always exclude ASID 0 from being used.

That might (maybe) be prettier code, but it isn't what
we have today.


-- 
All Rights Reversed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ