Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1446856rdb; Sat, 3 Feb 2024 06:40:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGpL1uXFyzMyDsJ2PDwsmRsDrwF5LVsTyuhsh+aCzUA/zCTg4xUFVdie9NtmahtOKHGw4n X-Received: by 2002:a05:6a20:9f45:b0:19c:7560:e7d6 with SMTP id ml5-20020a056a209f4500b0019c7560e7d6mr6852386pzb.1.1706971245288; Sat, 03 Feb 2024 06:40:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706971245; cv=pass; d=google.com; s=arc-20160816; b=ucSAuoCgTvgyT2EiS8JYzKyw1AovvlsRrJaBRB23dUdygmA4Kz40FSmaF2YM/1E61D HBOB8VezhCkKF3u/mtcF1qPQ9kOum8h+VpntkycaortsuMPcRRhLbZUXvwVCmLYVTEf1 4pShZ3XgDAB9FUV2c00f+KNbSW3Zjniq41vuzLguIYhDRO4ACq+s2tX9X3tU7cFHrqAP 2eGPIQWmyLuzyG+PW+NUu12wnW9a3yJ5qe3lbDnI2w6bMkS1oQ7LPWGPUW7UvQ2Kj/zz 6xfW8wge4nnzKteBSfPg+JvlL5ZetVB+2Xr/lsu6qNHx4IHIhomqFJWrCYzlgCJnJaPL wffw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=W9QRnEoj1oim8rFp3GQ1Wc3cLjSRInO2QO0PatD71QY=; fh=VJHpoP62FwS0wQFqLZRR9PId0tvUL/B+NoMzeOFLlgs=; b=dj+HYsVy64jYB4ZX09YLrrtHlM2UzwJRWu72W+UsvaVdtdoYHA5j+2nzaiTpfuOc9A ZT8tUVSBk8gbGsW60+3efz1IpAbNFf+OTtiLmNLIcEU/JGwE/THgvOa4sSENuWOwBWmO frxF4jH5vDSqg4hvM5c97TGBkI3gXhdP+xaGJPAFq/QqqaHrA0VaDbpOHiuhUqAADv1P qc29aUkF7wKSJn6cBbCXhKEo+nIrIlQxSaXHKAI3hhE2L/cr1ydKFD+tkoftDQPBdEYc pcsAeYBQk744K4gMyUsXmacQB9K3O6IsfJlnzCvFtdFOilX9XanLnakraCr4jgxKkuyp vYEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=YYN4u85c; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-kernel+bounces-51116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu X-Forwarded-Encrypted: i=1; AJvYcCXelYeiZrrcVGPvMkM4TkQ0d4Bf8SOjUNKGnIULX3Yk7HQUxkiwZYk0PGV184y/LQTu3zKccrf1F7tiCd0BjYu/VUK04Ssi4FAi4Gzw4A== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lp20-20020a056a003d5400b006e03390378fsi271634pfb.297.2024.02.03.06.40.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 06:40:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=YYN4u85c; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-kernel+bounces-51116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B1CEDB233D2 for ; Sat, 3 Feb 2024 14:36:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5C4D5DF08; Sat, 3 Feb 2024 14:36:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="YYN4u85c" Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D52D12BAEF for ; Sat, 3 Feb 2024 14:36:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706970998; cv=none; b=UB4lUjZmw64KekFHjLMc23qFuDVxwPPqcLdSgjNJ/YEXjOxmGnn6A+esQ7jBPS7/e8wxEr+dYjmP01nhN9liijlznODdM2BJeF4RluzbANCG/UcFrlECF1y2gjosLlZFBo/OjhHBg7euDvQfST/zQ24FrDYL0HQcQ9LwRCdUsls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706970998; c=relaxed/simple; bh=5zVRnjyDndBGcBDaYKnA/6ke/KUEwTKEduciNLtEb20=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=l577PJBBSwDHBwLk9wa4MavSR2Br0xu/bG891gh6bdelyxdg0hvFFS7qiHhPPEOGfKOBUKJXOY12nWFL4IRECgVZ5hhktTuOWcs7jXd1jhyeBscz1iMIQnOTLNbvnEymJPqZrn4KjC9/uj4q68K889I4k++6uzL5ehy2BthN+Fw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b=YYN4u85c; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from cwcc.thunk.org (pool-173-48-82-236.bstnma.fios.verizon.net [173.48.82.236]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 413EZl0m014620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 3 Feb 2024 09:35:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1706970953; bh=W9QRnEoj1oim8rFp3GQ1Wc3cLjSRInO2QO0PatD71QY=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=YYN4u85clNWA8JLLCI02AQorfr9PBNeSBudlXfEAghMoEz0ZTBX7ghOZdHIcOLzER sso4j0KZjG5omETRiKLSrvvArg1CpQdW2ZKYU70F/1fp0It9dsx+x1eYjohjvHk+nf 406gLLSAJ5fqnLdQ1gcAXvLTYBNF9SjoTKDI8WNOxTCktL/Onfows6h/+K6AcFK08V ZYvbJ/8duGPRC2fjNpSO9okEUmqeh8fSquvfsUZ+VDk243VZuek02iZIlznCVtdQS7 xZDoCTyPpPoEfN2tP5um/biKDEPB4YKgDbbh1C4dH1GPafv2aU4xzocVoRJQDCKITn i/su3IuLPf62g== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 3ED9915C02FC; Sat, 3 Feb 2024 09:35:47 -0500 (EST) Date: Sat, 3 Feb 2024 09:35:47 -0500 From: "Theodore Ts'o" To: James Bottomley Cc: "Jason A. Donenfeld" , "Reshetova, Elena" , Dave Hansen , "Kirill A. Shutemov" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , Kuppuswamy Sathyanarayanan , "Nakajima, Jun" , Tom Lendacky , "Kalra, Ashish" , Sean Christopherson , "linux-coco@lists.linux.dev" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] x86/random: Retry on RDSEED failure Message-ID: <20240203143547.GC36616@mit.edu> References: <20240131140756.GB2356784@mit.edu> <20240131171042.GA2371371@mit.edu> <20240201045710.GD2356784@mit.edu> <20240202160515.GC119530@mit.edu> <6ccd8c7998542f1ac68514700fb9e31049a3a3c7.camel@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ccd8c7998542f1ac68514700fb9e31049a3a3c7.camel@linux.ibm.com> On Fri, Feb 02, 2024 at 10:28:01PM +0100, James Bottomley wrote: > > My big concern is older cpus where rdrand/rdseed don't produce useful > entropy. Exhaustion attacks are going to be largely against VMs not > physical systems, so I worry about physical systems with older CPUs > that might have rdrand issues which then trip our Confidential > Computing checks. For (non-CC) VM's the answer is virtio-rng. This solves the exhaustion problem, since if you can't trust the host, the VM's security is taost anyway (again, ignoring Confidential Compute). > The signal for rdseed failing is fairly clear, so if the node has other > entropy sources, it should continue otherwise it should signal failure. > Figuring out how a confidential computing environment signals that > failure is TBD. That's a design decision, and I believe we've been converging on a panic during early boot. Post boot, if we've successfully succeeded in initializing the guest kernel's RNG, we're secure so long as the cryptographic primitives haven't been defeated --- and if we have, such as if Quantuum Computing because practical, we've got bigger problems anyway. - Ted