Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1665173ybb; Sun, 29 Mar 2020 10:18:47 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsskQSJNMdXrmkSu0yyf/0mo26MFtHdPR0sPq8SFqggAO3n7H+IuQKtkG+bRqwMJ6f/xnfg X-Received: by 2002:aca:ecd7:: with SMTP id k206mr5268315oih.113.1585502326903; Sun, 29 Mar 2020 10:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585502326; cv=none; d=google.com; s=arc-20160816; b=Bz3AakC+UY37k/QEtBeN/xZQUraJKTV4EZG1IxwHIa0JTp4VwjZutmGqhtFhV0+fx8 6Aos3iv/Wwd/Y0lhpZ9yWj+BVHonCiDl1icUCwNcFO3YgaRW18+0M0/2gUwJTvE7pzkV do4VpawoCbOjt+hLWXE3EGgQqCuCb1S9qZ1nQKVOyAghmX9BlFvjHKbPC+oo6mSCfyRg WHMHBIS2dVZhEZF7TJMGdE9aCc271nt4j2q2Z9vES3kCscodUvGuerWaiVOCTgF+EkQu frnDEJXxRwywiX93aHL2Z7Zi6WlIXWHV0lDfhQr++cT3e8+sbdvee0M5oWhA8gt4lYAd UaUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=InAejxD1pUtEB406oZ67jRHMP4Xqt0NUV4b38/z3Jxw=; b=gaSgvZrfGts03Hz/E+ZFsi6eXMMwTGNWq9EAQwEnejef+c9yzduGJj7h3zhl3lKC9u 181QSAniMEGZzldvmkl3rQtTDYTv1JvPEHIWxIR+RUw5RsThPyJd53oR8kCL+b0O/1iT s3J5A4xecW5BN9RuYVtvKSBp5FYrUL6BA97fllkgzU6t/v5Ri+G6+TG1qkjSzTAFCwJn gETRYGtmxPNO0E0qwPYrbAKxjiZFPCRTw5tOn+FpIa7Y46Ct2HrDERiNZXLYnHF/ne82 EjhKEodP+o5G5zffeH0WXg6ocpRJzBW3D6+N9vJhcHcYVkc3BiBfu7ehCnzT1AQHbePu VVng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b197si4851995oii.198.2020.03.29.10.18.34; Sun, 29 Mar 2020 10:18:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728432AbgC2Q4i (ORCPT + 99 others); Sun, 29 Mar 2020 12:56:38 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:38630 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728310AbgC2Q4i (ORCPT ); Sun, 29 Mar 2020 12:56:38 -0400 Received: from callcc.thunk.org (pool-72-93-95-157.bstnma.fios.verizon.net [72.93.95.157]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 02TGuOFX011538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 29 Mar 2020 12:56:25 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 9A2A7420EBA; Sun, 29 Mar 2020 12:56:24 -0400 (EDT) Date: Sun, 29 Mar 2020 12:56:24 -0400 From: "Theodore Y. Ts'o" To: Alexander Sverdlin Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , Herbert Xu Subject: Re: [PATCH] random: Drop ARCH limitations for CONFIG_RANDOM_TRUST_CPU Message-ID: <20200329165624.GO53396@mit.edu> References: <20200329082909.193910-1-alexander.sverdlin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200329082909.193910-1-alexander.sverdlin@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 29, 2020 at 10:29:09AM +0200, Alexander Sverdlin wrote: > The option itself looks attractive for the embedded devices which often > have HWRNG but less entropy from user-input. And these devices are often > ARM/ARM64 or MIPS. The reason to limit it to X86/S390/PPC is not obvious. > > Signed-off-by: Alexander Sverdlin This feature is *only* applicable if the CPU supports a arch_get_random_seed_long() or arch_get_random_long(). I believe there are some server-class ARM64 CPU's that support such an instruction, but I don't believe any of the embedded arm64 --- and certainly non of the embedded arm --- SOC's support arch_get_random_long(). The reason why we limited it to X86/S390/PPC is because those were the platforms which supported an RDRAND-like instruction at the time. Richard Henderson added support for ARM64 in commit 1a50ec0b3b2e ("arm64: Implement archrandom.h for ARMv8.5-RNG") in late January 2020. So we should either add ARM64 to the dependency list, or we could, as you suggest, simply remove the dependency altogether. The tradeoff is that it will cause an extra CONFIG prompt on a number of platforms (mips, arm, sparc, etc.) where it will be utterly pointless since those architectures have no chance of support a RDRAND-like instruction. Cheers, - Ted