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: <eb2feccb1874399699731aa9f16049a375b0f9a9.camel@surriel.com>
Date: Sat, 22 Feb 2025 11:05:41 -0500
From: Rik van Riel <riel@...riel.com>
To: Oleksandr Natalenko <oleksandr@...alenko.name>, x86@...nel.org
Cc: linux-kernel@...r.kernel.org, bp@...en8.de, peterz@...radead.org, 
	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@....com
Subject: Re: [PATCH v12 00/16] AMD broadcast TLB invalidation

On Sat, 2025-02-22 at 12:29 +0100, Oleksandr Natalenko wrote:
> 
> [   24.381400] RIP: 0010:get_cpu_cap+0x39b/0x4f0
> 

> $ scripts/faddr2line arch/x86/kernel/cpu/common.o get_cpu_cap+0x39b
> get_cpu_cap+0x39b/0x500:
> get_cpu_cap at …/arch/x86/kernel/cpu/common.c:1063
> 
> 1060         if (c->extended_cpuid_level >= 0x80000008) {
> 1061                 cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
> 1062                 c->x86_capability[CPUID_8000_0008_EBX] = ebx;
> 1063                 invlpgb_count_max = (edx & 0xffff) + 1;
> 1064         }
> ```
> 
> Any idea what I'm looking at?

It's crashing when writing the value to the
invlpgb_count_max variable.

This would be because:
1) invlpgb_count_max is marked __ro_after_init, making
   it read-only after the system has finished booting, but
2) get_cpu_cap gets run at resume and CPU hotplug time!

Borislav, do you prefer I move the initialization of 
invlpgb_count_max back to where it was before, or get
rid of the __ro_after_init thing?

-- 
All Rights Reversed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ