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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 17 Oct 2021 12:28:39 -0700 From: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@...ux.intel.com> To: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, x86@...nel.org, Paolo Bonzini <pbonzini@...hat.com>, David Hildenbrand <david@...hat.com>, Andrea Arcangeli <aarcange@...hat.com>, Josh Poimboeuf <jpoimboe@...hat.com>, "H . Peter Anvin" <hpa@...or.com> Cc: Dave Hansen <dave.hansen@...el.com>, Tony Luck <tony.luck@...el.com>, Dan Williams <dan.j.williams@...el.com>, Andi Kleen <ak@...ux.intel.com>, Kirill Shutemov <kirill.shutemov@...ux.intel.com>, Sean Christopherson <seanjc@...gle.com>, Kuppuswamy Sathyanarayanan <knsathya@...nel.org>, linux-kernel@...r.kernel.org Subject: Re: [PATCH v7 3/6] x86/topology: Disable CPU online/offline control for TDX guest On 10/17/21 12:23 PM, Thomas Gleixner wrote: > Seriously? This lets the unplug start, which starts to kick off tasks > from the CPU just to make it fail a few steps later? > > The obvious place to prevent this is the CPU hotplug code itself, right? > > Thanks, > > tglx > --- > diff --git a/kernel/cpu.c b/kernel/cpu.c > index 192e43a87407..c544eb6c79d3 100644 > --- a/kernel/cpu.c > +++ b/kernel/cpu.c > @@ -1178,6 +1178,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen, > > static int cpu_down_maps_locked(unsigned int cpu, enum cpuhp_state target) > { > + if (cc_platform_has(CC_HOTPLUG_DISABLED)) > + return -ENOTSUPP; > if (cpu_hotplug_disabled) > return -EBUSY; > return _cpu_down(cpu, 0, target); Makes sense. I will use it in next version. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer
Powered by blists - more mailing lists