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 21:23:31 +0200 From: Thomas Gleixner <tglx@...utronix.de> To: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>, 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>, Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH v7 3/6] x86/topology: Disable CPU online/offline control for TDX guest On Tue, Oct 05 2021 at 16:05, Kuppuswamy Sathyanarayanan wrote: > > +static int tdx_cpu_offline_prepare(unsigned int cpu) > +{ > + /* > + * Per Intel TDX Virtual Firmware Design Guide, > + * sec 4.3.5 and sec 9.4, Hotplug is not supported > + * in TDX platforms. So don't support CPU > + * offline feature once it is turned on. > + */ > + return -EOPNOTSUPP; > +} > + > unsigned long tdx_get_ve_info(struct ve_info *ve) > { > struct tdx_module_output out = {0}; > @@ -451,5 +464,8 @@ void __init tdx_early_init(void) > pv_ops.irq.safe_halt = tdx_safe_halt; > pv_ops.irq.halt = tdx_halt; > > + cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "tdx:cpu_hotplug", > + NULL, tdx_cpu_offline_prepare); 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);
Powered by blists - more mailing lists