Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp647540rdb; Fri, 26 Jan 2024 06:47:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaYVHFvNooYzzLFCfH4nJs+I4+5n20Ea7gl21sO4VTedL4fcyoR5bxy8yjghUXA8qs3IOq X-Received: by 2002:a05:6808:6048:b0:3bd:dc47:7f8e with SMTP id dd8-20020a056808604800b003bddc477f8emr1605176oib.28.1706280425618; Fri, 26 Jan 2024 06:47:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706280425; cv=pass; d=google.com; s=arc-20160816; b=cCkFJO9mrHVwRtMgbIVCympdA1JFUJWgSASLVFjNuz5lvtOHeyD4lkpqj2xBLDfnt7 QdIptja7KS4e+gMIdXriz9Hso1e6KBlyaURx4MZTEOMcAKNigEYKqlC8aiu8wdweGi7z Tue7KZtMCtqLIjzHiyWRpMMmfacVIo9SoiNltsvlvrdySfpgClrll+0uvwAXVP87bXKs kNr2mBokFKbd1eHN+WXfWZ716WJrizCupBpiOmjCUZenioJZTMgqu5GHoYVK1wxD8Apw SquWCjrhl2R0rU9oMtmwXLooEw0ubQf8frvSSrZUIoEo1xa7FYH6zdfdDoJM0BPvX0FZ +lWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=GwKl7KA16kSrc3QBUn+TdenGDtEm5u8vFzJscSXHTTY=; fh=oF3n5dJpoDdImK015t+z+kzLsWh/O23bTJu1BuGemic=; b=JUfQwuSB83ZP8Kri0Cy2mVpgIU+8FMAvkaIKIY9UewvUuZIu6qLV3p7hdZd1s7r9M3 JSY1eOsi+9iX1nvnCkVQXI6/xC8xuqvQPM8PlQ3k4ZZ+8jxqyq6QzuWXBzeM4XYOcZRU 4asA/jsY0jjAbHiMip2BWp89e3XNZL8M7i2KcBIMooTVP6G5jdCIzW64VRqJdjFs17ED 29dcAHVN4y+aiFFcaMGWv2Ka7qjzZHmh4wAPkwRfFQur+4CSVwCPGNkhDzXVn7MlCoGC Ank+poMP+gJKhg6BjJ1A/1F8+Fu+2JAsQZpnRBirnzaq+m7S8bRR+NgLVNWX7BNDvvUE rmwg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b="Yp/CFcUx"; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-40224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40224-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n20-20020a05622a11d400b0042a41bae85esi1348368qtk.579.2024.01.26.06.47.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 06:47:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b="Yp/CFcUx"; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-40224-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40224-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 38F871C23498 for ; Fri, 26 Jan 2024 14:47:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AEA61C692; Fri, 26 Jan 2024 14:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Yp/CFcUx" Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E5C8134A6 for ; Fri, 26 Jan 2024 14:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706280417; cv=none; b=SynqwxbWbhHWtmL2xPAVqU18FpMfyhwL/ErVRAhOpHvz7k2yRPknLeJ2tZR7lOVzqurNu4m32hnl1rY9UKrnf6asDHeJAYd7maMSsyWJoxM1ZG0Jcal/2pqkXCPIG/r7yNwsvPWwjEvHx95xR4yxAjL1werhPjrCxZDyCC7UMdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706280417; c=relaxed/simple; bh=W/FdB88dbo4Ofig9JphpMVHHe94m8b1+hdrjMoRC/H4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MssVj79Uk3SF6qVnI6R8NzCTzrQwb9G2jw6C1VkXc4H6K+GSGix5KcnjvkmdW3SZOnU9bpCR3ugsPpmeHz/ql/b3ajlPaAW1YmdprCgx5tWac6vgAdPyDlNw7c37b1jRvIhFriNHnHgSbSYIRsRztZEjeBG0/iDxCbrkAZA1Lpk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Yp/CFcUx; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-33ade380b9fso595568f8f.2 for ; Fri, 26 Jan 2024 06:46:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1706280413; x=1706885213; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GwKl7KA16kSrc3QBUn+TdenGDtEm5u8vFzJscSXHTTY=; b=Yp/CFcUxkz0yT1b9rPh1vhuouStDf6hceu4d9tuBIml6lRs8uGr35B1ZQHfZwdjFBX AeZbLH3enQaGc2JrB7ZKLQrp0zNCXWWhNsxsTHRkVfcyCdl0W9RFwtzjFPUId7YvL0X3 tEQ2P2Bjn8nYIhV4gRCBhaft1WOEPLCdbqNR1M8SpgMJC7fxrC9k0PbcniFZVBEdp0Gx YFzzFX98qRPOutT36yyHIQeEhVS1EAYnMlRNEsw6VABEOtpLpCZuf0wWzKvd4oIQZ+DH 5iOfV+iUBYdFsEYMJOxFOB94V/flwNTQSK6nK6Qw+5hnxA8+SNkbU/VVDdOmDQKPKx+I YUKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706280413; x=1706885213; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GwKl7KA16kSrc3QBUn+TdenGDtEm5u8vFzJscSXHTTY=; b=UzFSPG2h82S+/Iz5gSKAtFBEQxngnVRSo/mVvGc31x33pxrbJJrhcejnujvCvyJazH 6N9eMYgIDchrqrXT45Z7adktWnBLckK5VesoWL3glPOsd99P05fTEQZ7qeWpm3rzaXSQ MCWjKOu5l6GVlhRHSqADUP0uaj3YjXX3vEsayvlJ6nzTMiNLOtyT823AM4bgD6ankE/H CT6lMaiLOylvcm9eYNF3TaW36A0yzezK4KVMmfpbHY9MEH0SNubzIkZa6bb23p1mjQ1v diSkgq20/LvPWjoPd83tx2xw9ZuNH2sM0KZYEK904PsqtI/JiLHH1oln/JAXnmKzwcxu G72w== X-Gm-Message-State: AOJu0YwrwVy6ALJ1Ic+HEV+KpEjCrtncskOuF301E4x5ah7obHXfmfOp GkhgMbioSXP2MRkauz6naQaZOmI/c+H0vbA48vMFTGk8ORud/kntDsPYTOVJ+Qc= X-Received: by 2002:adf:e3c6:0:b0:339:611b:bcb4 with SMTP id k6-20020adfe3c6000000b00339611bbcb4mr568107wrm.117.1706280412721; Fri, 26 Jan 2024 06:46:52 -0800 (PST) Received: from ?IPV6:2a10:bac0:b000:7589:7285:c2ff:fedd:7e3a? ([2a10:bac0:b000:7589:7285:c2ff:fedd:7e3a]) by smtp.gmail.com with ESMTPSA id n11-20020a056000170b00b00337d6db207dsm1437927wrc.30.2024.01.26.06.46.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jan 2024 06:46:52 -0800 (PST) Message-ID: <6afe76be-90a7-4cf7-8c6c-23e6a14f8116@suse.com> Date: Fri, 26 Jan 2024 16:46:50 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] Randomness on confidential computing platforms Content-Language: en-US To: "Kirill A. Shutemov" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , x86@kernel.org, Theodore Ts'o , "Jason A. Donenfeld" Cc: Kuppuswamy Sathyanarayanan , Elena Reshetova , Jun Nakajima , Tom Lendacky , "Kalra, Ashish" , Sean Christopherson , linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org References: <20240126134230.1166943-1-kirill.shutemov@linux.intel.com> From: Nikolay Borisov In-Reply-To: <20240126134230.1166943-1-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 26.01.24 г. 15:42 ч., Kirill A. Shutemov wrote: > 4. Exit to the host/VMM with an error indication after a Confidential > Computing Guest failed to obtain random input from RDRAND/RDSEED > instructions after reasonable number of retries. This option allows > host/VMM to take some correction action for cases when the load on > RDRAND/RDSEED instructions has been put by another actor, i.e. the > other guest VM. The exit to host/VMM in such cases can be made > transparent for the Confidential Computing Guest in the TDX case with > the assistance of the TDX module component. But is this really a viable solution in the face of malicious VMM? It assumes that if the VMM is signaled that randomness has been exhausted it will try to rectify it, what if such a signal can instead be repurposed for malicious purposes? Could it perhaps be used as some sort of a side channel attack ?