Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4BADCCFA03 for ; Thu, 6 Nov 2025 08:50:02 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1156583.1485621 (Exim 4.92) (envelope-from ) id 1vGvgh-0004pI-NH; Thu, 06 Nov 2025 08:49:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1156583.1485621; Thu, 06 Nov 2025 08:49:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vGvgh-0004pB-KP; Thu, 06 Nov 2025 08:49:47 +0000 Received: by outflank-mailman (input) for mailman id 1156583; Thu, 06 Nov 2025 08:49:45 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vGvgf-0004p5-OT for xen-devel@lists.xenproject.org; Thu, 06 Nov 2025 08:49:45 +0000 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [2a00:1450:4864:20::62e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 89bfd3cd-baed-11f0-980a-7dc792cee155; Thu, 06 Nov 2025 09:49:43 +0100 (CET) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-b70fb7b531cso121761366b.2 for ; Thu, 06 Nov 2025 00:49:43 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7289644b2esm157194666b.35.2025.11.06.00.49.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Nov 2025 00:49:42 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 89bfd3cd-baed-11f0-980a-7dc792cee155 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1762418982; x=1763023782; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=Di6OuTu7c3EdvvRMPVN61oa5ck866SYuM8BmHC6VLWo=; b=avD3YYr1Sdlvc70JyCy9yXpYm4ehcG2mULMHyTo2UNsDzy/ttSxixR6we4phHmSxMR zw3E5Sgp4efueGqHr1ItrV125gA3dBw6dY/JM0B+Jc4tJ56tuLKNgR7yaidCPWZyE0Hf lHyQva0TlcsyZAOA/BypRxl40stPnv3BX/YDCrL+BfAEDTzESgEzciEN/KBJ3BNbdmFS NlLl7vYsXiw/WBSxd78GM5/89UQ8UDxL6tI4pVchNO/hXKxk3maTPjgPmS9e/g7wef8U lopb/mXZj3Ii3Ni3kkckB0bgJO3fohDrr59aeIutACgHgeuUfd6ul+OmO7d5aZ10WzfB u6Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762418982; x=1763023782; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Di6OuTu7c3EdvvRMPVN61oa5ck866SYuM8BmHC6VLWo=; b=OuyF7z3ooG0oNIqRBe5gwD4vzYeMQtff9FSErkYbgaO74h/pN+bOA3Bcc5EF1UScV/ UPfoUELt23XptfFcNsmAwA3qfv0F9BVHm+Cb8m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0dX/EejovTsCVeOJtEvqDd1FFVwoK8blIqBQ== X-Received: by 2002:a17:907:868f:b0:b57:2d81:41f with SMTP id a640c23a62f3a-b72654e25acmr679240966b.40.1762418982409; Thu, 06 Nov 2025 00:49:42 -0800 (PST) Message-ID: Date: Thu, 6 Nov 2025 09:49:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 for-4.21 0/2] x86/AMD: deal with RDSEED issues To: Andrew Cooper Cc: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Oleksii Kurochko , "xen-devel@lists.xenproject.org" References: <272093dc-c97c-434a-9977-ad1c26e7e229@suse.com> <211906a8-7804-42c6-805c-572b4f673322@citrix.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <211906a8-7804-42c6-805c-572b4f673322@citrix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 03.11.2025 15:10, Andrew Cooper wrote: > On 28/10/2025 3:32 pm, Jan Beulich wrote: >> Both patches also want 'x86/CPU: extend is_forced_cpu_cap()'s "reach"' in >> place. >> >> 1: disable RDSEED on Fam17 model 47 stepping 0 >> 2: disable RDSEED on most of Zen5 > > We have two existing cases for RDRAND issues in Xen: > > 1) IvyBridge SRBDS speculative vulnerability.  Here, the RNG is good, > but use of the RDRAND instruction can allow another entity on the system > to observe the random number.  RDRAND is off by default, but can be > opted in to. > > 2) AMD Fam15/16h Laptop.  Here, the RNG is fine, except after S3 on one > single OEM.  Use of RDRAND can be activated on the command line, but > there's no ability for individual VMs to opt in.  Being a laptop, > migration isn't a major concern. > > > For this seres about RDSEED, we've got: > > 1) Cyan Skillfish, the PlayStation 5 CPU but also in one crypto-mining > rig.  Here, RDSEED is deterministically broken and not getting a fix. > > The chances of Xen running on these systems is almost 0.  We should turn > off RDSEED and be done with it; it's not interesting in the slightest to > be able to turn back on. I disagree to some degree, but the code to allow re-enabling can certainly be moved to the other patch. I don't view it as wrong to have it in the 1st patch, though. > 2) Zen5.  Here, RDSEED gives a higher-than-expected rate of 0's for only > the 32bit and 16bit forms; the 64bit form is unaffected. > > There is microcode to fix it, on server at least.  Firmware fixes for > client are rather further away.  64bit OSes are likely fine (using the > 64bit instruction form).  Some Linux devs think that Linux would be safe > even using the 32bit form, if it really only has a 10% zeroes rate. 10% is a lot. IOW I find this dubious. > There is certainly a risk that software uses the 32b/16b forms, and not > mix it properly with other entropy, but the common case these days (64b) > works just fine.  This means that blanket-disabling does more harm than > good. That's guesswork. I don't see why 64-bit OSes should be expected to prefer the 64-bit form over the 32-bit one. In fact, if one only needs 32 bits of entropy, why would one even try to get 64? That's wasting a potentially precious resource. Furthermore mind me mentioning (again) that 32-bit OSes (including 32-bit environments that may be active during boot) have no way of using the 64- bit form? Jan