Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp185002rbb; Fri, 23 Feb 2024 17:16:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXF7FpCByBClLwec/wcsXJ0Dr2zfiuUFmqq1ymd83Mt1+QOo19sXqmxLd6uebWsS1cXESfbgqMRSgM/beevXc3Tk4ahB4UNm3KbxHtaxA== X-Google-Smtp-Source: AGHT+IFvua9IEpTGUC7XTdcLvzvqtw7U38Dyt3sEVOjxffl0VfQ5X0j6LUKtcfdLciysL/opqrH9 X-Received: by 2002:a05:620a:1251:b0:787:4161:9344 with SMTP id a17-20020a05620a125100b0078741619344mr1549782qkl.5.1708737360798; Fri, 23 Feb 2024 17:16:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708737360; cv=pass; d=google.com; s=arc-20160816; b=ZVt5Y5eZz2tsFiWwrJ1L8vN/01bYoA45mYLmXvu3XhuybWCv6kj8NWHZDP2isdxenq xD+KzWnYlFvVqBXB5eIMNQ7ubMl8zeo8iAvsMkPq7VOC/40FudzNWlOW+fZEy8jFvbvm K0rZFT9LNjoOuorb5pI3x8vnjwDAuTbexZVeRTiwmgS9oMGO8XRf0+3UqTiBNLHgMIch vOfgqXM0w635pkAagfVkMjoGcQUnWmCW2+7nhMqZxkrjI7Pw0FDpjn0pofi22s6c183d vVPUF7hXSX8AmMQ3CHlACcdXPIhdTHTXHsX5EamWzZqsKh+pCuIy3kbFSWjdBAfR7YMe UmOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=CGk4NO32L+GTr1TJMRmS6aztEVWTdCZhKoXaii4F4RU=; fh=Xy6fXt5TDDKG9P7py1fDI+d3o68z5/DsL9c0tFQT60A=; b=XHslJpAXyRl1OwEpv8s0QPFwuNxtH5LAcaJdxtTTN4HfUkLDV+Fc1AM7fqX0A72Id6 n396fh8FghG/T8mEYgakLIxyMVNVqM36dSt5k7kkraR3//0ahGQFVR/a12+1MQM+yvSL E5ht+ZMYDlqlpCvDxu69eYSV/vsoU3z5UpahxMEEFCOpa4NSeBNzi/IsJyKq6aSFkSz4 P4YsImnsEiPzFpBWtIrENU9IAUIJi77Bg/7fIaH0DC8NC0vjjflHOyjeEj309yw+wpro dpRgBcRaUWYm5PRp9T2RfInV3EjA0fZsxuHejhPFP+oxrjaBR4cioLQ312F6K+/SIvxH rJnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Z0erciKR; arc=pass (i=1 dkim=pass dkdomain=zx2c4.com); spf=pass (google.com: domain of linux-kernel+bounces-79408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a5-20020a05620a102500b007877cdf78d0si132439qkk.81.2024.02.23.17.16.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 17:16:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79408-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=@zx2c4.com header.s=20210105 header.b=Z0erciKR; arc=pass (i=1 dkim=pass dkdomain=zx2c4.com); spf=pass (google.com: domain of linux-kernel+bounces-79408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.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 8C1E61C222BB for ; Sat, 24 Feb 2024 01:16:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5878E8F7A; Sat, 24 Feb 2024 01:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Z0erciKR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 666476FB8; Sat, 24 Feb 2024 01:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708737315; cv=none; b=DWQWs2B1PBMLSMF/361WPvYDRu5v1Pe6BJyj/0pAfAMeNJtZsBogkU7azgUC+3w8x9gyd1WB+0EaFNFo/veO3fzBKyRoTYMBfIa3wJbO4owpmknrlOfEvxoXW162Htwhhi1m4me79gqeITmstprUgotDA3bY0gWFKVFtgacniLg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708737315; c=relaxed/simple; bh=+9h2xKjOMwpJ6vwxTee5GD98+h73IuypecWdP3G2C1s=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=u9CDyxZEFYpzTfp+6kilbHhy17SWp2uIouIbBgcd0x/tIN+jLf97deVL1GbQdDbQ+pfJmkVdIEv2qbQnzuWixsk+7J403f+PEiwrkN74n6+tfocikoOKnSFB78ATC67ObwIiTdzqbLVhzkcTwLJCDBl0ErJqFzrrYu0K6VfoeZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b=Z0erciKR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 143CBC43394; Sat, 24 Feb 2024 01:15:15 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Z0erciKR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1708737310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CGk4NO32L+GTr1TJMRmS6aztEVWTdCZhKoXaii4F4RU=; b=Z0erciKRHPcL03p/Km/9laNjKwRKAAKzxR/3cuVhoON+3+vQXgmmw61V83+ZOcmcqM+1/f NWLqfHwaqdar+ay2Murv7jjYPjZiQ0aLyYpAjaAJ9Ja+Mx72TeEwSw5Fb2vSn0KBcFz1PJ jTs91fAt5OxAsYyk0Wb34Lckpm4yDKA= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 8615405f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 24 Feb 2024 01:15:09 +0000 (UTC) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-60853ad17f9so16506907b3.0; Fri, 23 Feb 2024 17:15:09 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWap626kgmEYf7VRI2uAc8KLNSFXhTENYLIW3nB4cJthcpfDKcJz8FuWF/PmDG424DOul5LxAyubCqMdFK9C80LdwdVo3mRQ+oA8p8YGubMSCQlGRCw9ZNOOnoJa3tM57QsgrLL X-Gm-Message-State: AOJu0YyvYfyPyiXrF+RqPpjukk1dthhlYZy3uUdt5APMCtJLiS9SfvWB 1vHoya125MBylKclqjIy2mRXORI4xwU9RTTISEJeBOLJKG5RBIJKIYoQRPijukjJ/bTs0gb9+HE k+rBzuppn4rRsyMyFlzhrOVSnZ5s= X-Received: by 2002:a81:f20e:0:b0:607:7c26:7e14 with SMTP id i14-20020a81f20e000000b006077c267e14mr1356621ywm.34.1708737307407; Fri, 23 Feb 2024 17:15:07 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <5648f43d-76e4-4396-b626-411d60657c93@intel.com> <20240222020616.2315199-1-Jason@zx2c4.com> <9cec487f-ce7d-809d-b4a7-9b7a8a6c9c93@amd.com> In-Reply-To: <9cec487f-ce7d-809d-b4a7-9b7a8a6c9c93@amd.com> From: "Jason A. Donenfeld" Date: Sat, 24 Feb 2024 02:14:55 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4] x86/coco: Require seeding RNG with RDRAND on CoCo systems To: Tom Lendacky Cc: x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, Borislav Petkov , =?UTF-8?Q?Daniel_P_=2E_Berrang=C3=A9?= , Dave Hansen , "H . Peter Anvin" , Ingo Molnar , Thomas Gleixner , stable@vger.kernel.org, Elena Reshetova , "Kirill A . Shutemov" , "Theodore Ts'o" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Tom, On Fri, Feb 23, 2024 at 11:05=E2=80=AFPM Tom Lendacky wrote: > > On 2/21/24 20:05, Jason A. Donenfeld wrote: > > + > > + if (cc_vendor =3D=3D CC_VENDOR_NONE) > > I responded to an earlier version of this patch, adding that response her= e: > > You probably want to use: > > if (!cc_platform_has(CC_GUEST_MEM_ENCRYPT)) > return; > > Otherwise, you can hit the bare-metal case where AMD SME is active and > then cc_vendor will not be CC_VENDOR_NONE. Nice catch, thanks. I'll do that for v+1. Jason