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: <09807556-46fe-46ae-ae3f-7083a1b12253@citrix.com>
Date: Mon, 13 Jan 2025 11:32:00 +0000
From: Andrew Cooper <andrew.cooper3@...rix.com>
To: riel@...riel.com
Cc: akpm@...ux-foundation.org, bp@...en8.de, dave.hansen@...ux.intel.com,
 jannh@...gle.com, kernel-team@...a.com, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org, nadav.amit@...il.com, peterz@...radead.org,
 thomas.lendacky@....com, x86@...nel.org, zhengqi.arch@...edance.com
Subject: Re: [PATCH v4 11/12] x86/mm: enable AMD translation cache extensions

> diff
> <https://lore.kernel.org/lkml/20250112155453.1104139-1-riel@surriel.com/T/#iZ2e.:..:20250112155453.1104139-12-riel::40surriel.com:1arch:x86:kernel:cpu:amd.c>
> --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index
> bcf73775b4f8..b7e84d43a22d 100644 --- a/arch/x86/kernel/cpu/amd.c +++
> b/arch/x86/kernel/cpu/amd.c @@ -1071,6 +1071,9 @@ static void
> init_amd(struct cpuinfo_x86 *c)  
>  	/* AMD CPUs don't need fencing after x2APIC/TSC_DEADLINE MSR writes. */
>  	clear_cpu_cap(c, X86_FEATURE_APIC_MSRS_FENCE);
> + + if (cpu_feature_enabled(X86_FEATURE_INVLPGB)) +
> msr_set_bit(MSR_EFER, _EFER_TCE);  }
>  
>  #ifdef CONFIG_X86_32

I don't think this is wise.  TCE is orthogonal to INVLPGB.

Either Linux is safe with TCE turned on, and it should be turned on
everywhere (it goes back to Fam10h CPUs IIRC), or Linux isn't safe with
TCE turned on, and this needs to depend on some other condition.

Or, is this a typo and did you mean to check the TCE CPUID bit, rather
than the INVLPGB CPUID bit?

~Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ