Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp433306rwr; Wed, 26 Apr 2023 01:05:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4dkYZcvBaJ1AfJyNUgX0t6P6iZQmFUCDTMldgmrPXgQng4sn0aNad7ffWUUvJYMOX1Dr2b X-Received: by 2002:a17:903:27c3:b0:1a9:8d57:6d6c with SMTP id km3-20020a17090327c300b001a98d576d6cmr4349937plb.24.1682496346174; Wed, 26 Apr 2023 01:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682496346; cv=none; d=google.com; s=arc-20160816; b=xM5JjC3CA2+ALxl1tHjQSNSomf4w88BV9p+L7e9SF+xOH2IPlSk9jRaaC5JANMyKTl vYCJZ6aUvTkipGwDIM62pKC/fZcMh9nXZW/URmpGoSxzbLL96+30Jl6zDZgLkjGKjp6r H6/SOYW+mUbTqHhkWvOfDrlIkTK0Dac/08IMM++1Gfc6C7IUBufxCbwUHd4hW+ahJgw9 mcJgLrbAMGHy+Ekm2/NCi1D6DWPW9DqJWZOP/A80IEg7ehe2oD06ES8SlH4FSl3lVzWV lrFmzjpjueo6+0J3Y0OdEwa3XhB7WT+4H8mjNIov30VDLVjk6Rpg0NeqVUsEYwC2K5Tc lzFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=GtmyALnEb3lVAwgz9CdMDSbnojRUyAAbigavXD0r/R0=; b=gTx+gMRLiKYOosGykrF7u2EMkyLMv73FMbW/URRxwOGwRnZmfxUfDaJAt8rQO9eoXl Qa0j4Cr0jqzu5MV35w38NXfLjlwksn+rLXaDSI4a+ND9T3oj5I9m6/8fE0Uwtr5BV6ip wEH5NOkT51AngE2GsWnFeVry5GhLz+dzIzDOr5nxtdpyGGUQRoTdcCZv2brnxETVHviO NCkhb+QJ4/84rKM6hDrYiAFm/1HxXOlCjeNw/E/F06LE1jm1d+Wx759VTZ2rEi6wPW1A 0XncnXyx+QOHnrQxYIZ8AhR9UKD3IJ+G/jk321geg+NmALg9pDGu3pospcISLy+F3pO5 QBYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a170902ce9200b001a9975ef97bsi2534439plg.396.2023.04.26.01.05.32; Wed, 26 Apr 2023 01:05:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239801AbjDZH7l (ORCPT + 99 others); Wed, 26 Apr 2023 03:59:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239446AbjDZH7j (ORCPT ); Wed, 26 Apr 2023 03:59:39 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 284F130EB; Wed, 26 Apr 2023 00:59:37 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 680B44B3; Wed, 26 Apr 2023 01:00:21 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.23.120]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A76593F587; Wed, 26 Apr 2023 00:59:32 -0700 (PDT) Date: Wed, 26 Apr 2023 08:59:26 +0100 From: Mark Rutland To: Thomas Gleixner Cc: LKML , x86@kernel.org, David Woodhouse , Andrew Cooper , Brian Gerst , Arjan van de Veen , Paolo Bonzini , Paul McKenney , Tom Lendacky , Sean Christopherson , Oleksandr Natalenko , Paul Menzel , "Guilherme G. Piccoli" , Piotr Gorski , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, David Woodhouse , Usama Arif , Juergen Gross , Boris Ostrovsky , xen-devel@lists.xenproject.org, Russell King , Arnd Bergmann , Guo Ren , linux-csky@vger.kernel.org, Thomas Bogendoerfer , linux-mips@vger.kernel.org, "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Sabin Rapan Subject: Re: [patch 22/37] arm64: smp: Switch to hotplug core state synchronization Message-ID: References: <20230414225551.858160935@linutronix.de> <20230414232310.569498144@linutronix.de> <87ttx3zqof.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ttx3zqof.ffs@tglx> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 25, 2023 at 09:51:12PM +0200, Thomas Gleixner wrote: > On Mon, Apr 17 2023 at 16:50, Mark Rutland wrote: > > As a tangent/aside, we might need to improve that for confidential compute > > architectures, and we might want to generically track cpus which might still be > > using kernel text/data. On arm64 we ensure that via our cpu_kill() callback > > (which'll use PSCI CPU_AFFINITY_INFO), but I'm not sure if TDX and/or SEV-SNP > > have a similar mechanism. > > > > Otherwise, a malicious hypervisor can pause a vCPU just before it leaves the > > kernel (e.g. immediately after the arch_cpuhp_cleanup_dead_cpu() call), wait > > for a kexec (or resuse of stack memroy), and unpause the vCPU to cause things > > to blow up. > > There are a gazillion ways for a malicious hypervisor to blow up a > 'squint enough to be confident' guest. > > The real question is whether it can utilize such a blow up to extract > confidential information from the guest. > > If not then it's just yet another way of DoS which is an "acceptable" > attack as it only affects availability but not confidentiality. Sure. My thinking is that this is an attack against the *integrity* of the guest (since the vCPU that gets unpasued may write to memory), and so it's potentially more than just a DoS. I only mention this because I'd like to account for that on arm64, and if other architectures also wanted to handle that it might make sense to have some common infrastructure to track whether CPUs are potentially still within the kernel. Thanks, Mark.