Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp452669rdh; Wed, 14 Feb 2024 01:38:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWeZQmnp+XxxA4A49boTKH1B/KqzJYkxM+WmWeueZvU5+vUzhxfS3ZVcTfUBmvmhmxL4Jgo9a6T37DvfzQ32JM6PHo79aCiSWUThHAPhw== X-Google-Smtp-Source: AGHT+IEph8gulyQuOytI6H33nMK2jPPbx2Tigp0mZBU+oLWM9qTarG0nUtO+SlQxgky0dzYmaFB0 X-Received: by 2002:a05:6a00:856:b0:6e0:2edd:6ee1 with SMTP id q22-20020a056a00085600b006e02edd6ee1mr1897361pfk.22.1707903526476; Wed, 14 Feb 2024 01:38:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707903526; cv=pass; d=google.com; s=arc-20160816; b=HxObYb/3ueOIwfK3+LDFL2FXmu2AaLq30gTkunLHvfZr/5j+Dxlqaur05vzVneShND UBhQ5aAAEitoPjKGT+U6904zMZTPr+uPXOY9VSfcIKNzubHqsGUJU+IkUZojgl7ZtVMt C2ZbX+G3FpkdmRm0WdK377NiBINyoA/6pyESUsaXQmwTOsIoVrJ+CzHuSB9KbJtG1Auu uGluwQAF9fkOoXinaiFmSqKpEblSvKtcuj43ps/P6Ub43UcwtT74Cm65laXnpHrDVKSz sL6vbc0FKsgt/4dPW0Ug1rLBzQtixhCkvNAwxxjgzwZT5ZbHj4/JDhIOrNx2FaiogWND Sx8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :reply-to:message-id:subject:cc:to:from:date; bh=NvmzewU1o0oAUjgq70AM2rfRhHjzSGIS0YvpJXhnZwc=; fh=T5Ci635gPaxKVSDZykq43aozDED/MwdN+MOXi7oa/Lg=; b=u9sl0XlPHCfts+vY8/M221hyjfK0tE4yz8p2UWO0YgcuNyo0NBeRwh7Cj4A60UgFLS My4lSF3BdDaDN7/COwd99iPpkHrJzM/xwDWF8DwSy+hsTn6KTKK7htvyGJwHGeQDTvTG NBPBIYcxJBIOS2AQBWaqIbFazhXy3WB9jRRfOD/Fal2mi7gKa83azFqUR6qggXjpIjnF R8PrPRTi3DrtdtUmqAAD6QIT9yI7Ax04oamvHHfFDG34IIjv9nxkjMVGve8dcpemjsb1 ERvDFl37fCH8FnBYBRXi+LLev4bVnVE2JPW1OX7s6JR1mADd/p5Iz24CgM+PkTHVbm50 YI0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=wind.enjellic.com); spf=pass (google.com: domain of linux-kernel+bounces-64983-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64983-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXM2oaJnPIdBy3QZU+jgZEuT3CmzpDvy+zKJt/nWAl/mszVJ7VSTFYDDoCr0hTj00b3SOtcMSw6jxetgT/szEsQhAKu9eY2zI1eSgxugg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a25-20020a637059000000b005cfbe985481si3362117pgn.46.2024.02.14.01.38.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 01:38:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64983-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=wind.enjellic.com); spf=pass (google.com: domain of linux-kernel+bounces-64983-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64983-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6AE9C288F87 for ; Wed, 14 Feb 2024 09:36:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B895914015; Wed, 14 Feb 2024 09:35:27 +0000 (UTC) Received: from wind.enjellic.com (wind.enjellic.com [76.10.64.91]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66DA411CA9 for ; Wed, 14 Feb 2024 09:35:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=76.10.64.91 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707903327; cv=none; b=CeNhuoOn6FRYu0yoXtyAU+liWe/UAQ88T21OnMDqSGEyVA/qB56xzFcWV3OPZKJqyl/zdbCveRpco+p2ownH0JtEMUJL9E7ZYzjP4BMV4AFIwTFE0Y7ZYfp3xmBPWIllU4HUj0QdZGq2bWQ78yQ1U92sF3naNisZJuKfFpG5yjM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707903327; c=relaxed/simple; bh=BhPisRloYBOp5JHEYXaJkZ4QaiijqmCKzndK4WLH23A=; h=Date:From:To:Cc:Subject:Message-ID:References:Mime-Version: Content-Type:Content-Disposition:In-Reply-To; b=s3stkZEVtbUwHtta6RX9MgeVIGTDj4rpzEei3VYhPI147Y4s4/5KPhZIqrNG3L9BabvNr1AFVLb5Xz9A1AJmULErEzrd0FMCj9SmWxAL06/3fncDwxJOV9f0D0eS1IWu8s7oNo1LsqBb40Y+5hxBGoDpucygMVvbPbq8Kdq5w3Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=enjellic.com; spf=pass smtp.mailfrom=wind.enjellic.com; arc=none smtp.client-ip=76.10.64.91 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=enjellic.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wind.enjellic.com Received: from wind.enjellic.com (localhost [127.0.0.1]) by wind.enjellic.com (8.15.2/8.15.2) with ESMTP id 41E9YACA010558; Wed, 14 Feb 2024 03:34:10 -0600 Received: (from greg@localhost) by wind.enjellic.com (8.15.2/8.15.2/Submit) id 41E9Y9d2010555; Wed, 14 Feb 2024 03:34:09 -0600 Date: Wed, 14 Feb 2024 03:34:09 -0600 From: "Dr. Greg" To: Nikolay Borisov Cc: "Theodore Ts'o" , Dan Williams , "Reshetova, Elena" , "Jason A. Donenfeld" , "Kirill A. Shutemov" , "H. Peter Anvin" , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "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: <20240214093409.GA10124@wind.enjellic.com> Reply-To: "Dr. Greg" References: <20240202153927.GA119530@mit.edu> <20240212163236.GA444708@mit.edu> <65cb1a1fe2dda_29b1294e@dwillia2-mobl3.amr.corp.intel.com.notmuch> <20240213231341.GB394352@mit.edu> <65cc0ef2c7be_29b12948d@dwillia2-mobl3.amr.corp.intel.com.notmuch> <20240214043245.GC394352@mit.edu> 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: User-Agent: Mutt/1.4i X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.3 (wind.enjellic.com [127.0.0.1]); Wed, 14 Feb 2024 03:34:10 -0600 (CST) On Wed, Feb 14, 2024 at 10:34:48AM +0200, Nikolay Borisov wrote: Hi, I hope the week is going well for everyone. > On 14.02.24 ??. 6:32 ??., Theodore Ts'o wrote: > >On Tue, Feb 13, 2024 at 04:53:06PM -0800, Dan Williams wrote: > >> > >>Indeed it is. Typically when you have x86, riscv, arm, and s390 folks > >>all show up at a Linux Plumbers session [1] to talk about their approach > >>to handling a new platform paradigm, that is a decent indication that > >>the technology is more real than not. Point taken that it is not here > >>today, but it is also not multiple hardware generations away as the > >>Plumbers participation indicated. > > > >My big concerns with TDISP which make me believe it may not be a > >silver bullet is that (a) it's hyper-complex (although to be fair > >Confidential Compute isn't exactly simple, and (b) it's one thing to > >digitally sign software so you know that it comes from a trusted > >source; but it's a **lot** harder to prove that hardware hasn't been > >tampered with --- a digital siganture can't tell you much about > >whether or not the hardware is in an as-built state coming from the > >factory --- this requires things like wrapping the device with > >resistive wire in multiple directions with a whetstone bridge to > >detect if the wire has gotten cut or shorted, then dunking the whole > >thing in epoxy, so that any attempt to tamper with the hardware will > >result it self-destructing (via a thermite charge or equivalent :-) > This really reminds me of the engineering that goes into the > omnipresent POS terminals ate every store, since they store > certificates from the card (Visa/Master) operators. So I wonder if > at somepoint we'll have a pos-like device (by merit of its > engineering) in every server.... It already exists. CoCo, at least the Intel implementation, is dependent on what amounts to this concept. > >Remember, the whole conceit of Confidential Compute is that you don't > >trust the cloud provider --- but if that entity controls the PCI cards > >installed in their servers, and and that entity has the ability to > >*modify* the PCI cards in the server, all of the digital signatures > >and fancy-schmancy TDISP complexity isn't necessarily going to save > >you. > Can't the same argument go for the CPU, though it's a lot more > "integrated" into the silicong substrate, yet we somehow believe > CoCo ascertains that a vm is running on trusted hardware? But > ultimately the CPU is still a part that comes from the untrusted > CSP. The attestation model for TDX is largely built on top of SGX. The Intel predicate with respect to SGX/TDX is that you have to trust the CPU silicon implementation, if you can't entertain that level of trust, it is game over for security. To support that security model, Intel provides infrastructure that proves that the software is running on a 'Genuine Intel' CPU. Roughly, a root key is burned into the silicon that is used as the basis for additional derived keys. The key access and derivation processes can only occur when the process is running software with a known signature in a protected region of memory (enclave). The model is to fill a structure with data that defines the hardware/software state. A keyed checksum is run over the structure that allows a relying party to verify that the data structure contents could have only been generated on a valid Intel CPU. This process verifies that the CPU is from a known vendor, which is of course only the initial starting point for verifying that something like a VM is running in a known and trusted state. But, if you can't start with that predicate you have nothing to build on. The actual implementation nowadays is a bit more complex, given that all of this has to happen on multi-socket systems which involve more than one CPU, but the concept is the same. Have a good day. As always, Dr. Greg The Quixote Project - Flailing at the Travails of Cybersecurity https://github.com/Quixote-Project