Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp643675imm; Wed, 18 Jul 2018 08:16:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeOpQsIPEVTrpAcnboOMF9XWwdv7LSUJfejmcCLBtf7LkeiLseVnfSHguYvHTAJmXf5UIxY X-Received: by 2002:a63:7007:: with SMTP id l7-v6mr6233235pgc.206.1531927008202; Wed, 18 Jul 2018 08:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531927008; cv=none; d=google.com; s=arc-20160816; b=C7HqCaFqdNaoZKHlpxY1aW70oLTRXDoWtq/3aOltYoGArvkjPqWnVFkvutJw124cD+ Y75MydAcnv4+KXysWNu5QJdHCdspIV4j4eziiI88neQsFFJSHM/9Qj/416U01q9+pTfn fRZzKBeYUm+LBZmT5BDH9XtJcKO94MddQY3YiXaUEAAaKDe93PL6FnLLmGqk6Ek6X98d cbH3W53DcxrcnVLP3fBms7CVLEj1oTvOuMGDXbCFjmeeAt9ic7MxZMs86AGCz314p4L8 zy6tYJxfLBBso/Q1tWBdrMsVPfmejAvuXOwriXGbWNi6Fv6sD4D4PT1uPjgwiRVqmhrN gUcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=v9b4OM9embvafK7QSVNlISE3DfCT+Qb/+rVechN0YeM=; b=ZZaKninVoe37Eo2E48eNCuc2nF8s/41B+vfXgncYwjBh/FTGK4jXVcknuV5XiU4vVP wVIQGtzlyzBeF82JoFjuSMcNqrUow9BrX5uS0xIO6GcGB0qcasB2+JiJjmyxQH7lx4xH L0Nv5bc67i/LnwZOA3TdZ4MWbbckeQIeuS3eAMgf4bNRidRBeHnmAeJXOV0oc57niqHe YROI7zVGyzpPDO7uAPNcw25xJFFs4R5/6dtjQm7AYzcxvql5dNs08BkMB6rxZtiGD28R Ce3bMXfD8UsxPf4O3OET2qI8zRIG0IQJzuHL0PE/TCp4Tqti3su+qe815EsWSlo0xppF 2YSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NJsEnwpH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l196-v6si3387746pga.38.2018.07.18.08.16.33; Wed, 18 Jul 2018 08:16:48 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NJsEnwpH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731205AbeGRPwn (ORCPT + 99 others); Wed, 18 Jul 2018 11:52:43 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45955 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731154AbeGRPwn (ORCPT ); Wed, 18 Jul 2018 11:52:43 -0400 Received: by mail-wr1-f65.google.com with SMTP id c4-v6so5047251wrs.12; Wed, 18 Jul 2018 08:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=v9b4OM9embvafK7QSVNlISE3DfCT+Qb/+rVechN0YeM=; b=NJsEnwpHqUAU9OanU3Hh5o5aGhxTFp5ebQWSjrqQ3rJyrzI8GmeV7J6Z3K+i/ktpWQ U9a32tP1CNkJGkrOrEZz0gQ3ASxFCJKsZ3+57OBGeqclE9yhrxnYUBs12eneWYdDkPDY CsUzbEEH5Tfm/fjkQ6tCGglpyC83LeNtQ/+AxGccFmpYi8QniXJV4OhAEX0NIWDDNTvH keabTAiIr+nOGSH16BeH3N2fft2nsuB83ak2T/I1GzHL02Uq/IwbO2xo19C7SAm8XmLt KSUwlaeKmIiXsSIzY5Ec2wiNwsFiTYqT9ES7jDW9HEBr//jABG4WLLWO2hzZGyR1+alF Vduw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=v9b4OM9embvafK7QSVNlISE3DfCT+Qb/+rVechN0YeM=; b=hN4xe/YdJVFJ8y8dMOjEMlPGBh3tqVF4v0PjQ+8Fh8Z/r+RhJ1RHr7z4aYP/YPfHg4 24HOOy6fT/Rih/8/3rZAO2+PT+ozeZkyWneByHQGJTEBEU8WJUtrx5wYb1huoXEOV1IQ pOTAe0hTjpmU70N4Os2cG/IN0e8cIZuA2p0EFE60I9kb02vF6XFzH4MnUXUQOHVdEg9G DqgYZ+sCBTFGK2XMW9mtjE9FpIyVeZ+LZV4Z5XfwcdzmdtNOzkDxbLBg+wncSw2GDO8T 78MHBYVA6vGg/qtuTLA4yrIm4ChAsDuA+y3BVL+yFNnwCczhhh0RoikzRC3fKk4tX8/U 0uRA== X-Gm-Message-State: AOUpUlFyX+6hhcqhq9M98DwTTJRArk5g5jr3HMuT7LF4nglYE4TiGC3C uepKgCypXNpIbbNwjblnnp0hdi+ElwOk+A9RZ/o= X-Received: by 2002:adf:9b11:: with SMTP id b17-v6mr4745613wrc.119.1531926860645; Wed, 18 Jul 2018 08:14:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9784:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 08:14:20 -0700 (PDT) In-Reply-To: <20180718015154.GE3489@thunk.org> References: <20180718014344.1309-1-tytso@mit.edu> <20180718015154.GE3489@thunk.org> From: Sandy Harris Date: Wed, 18 Jul 2018 11:14:20 -0400 Message-ID: Subject: Re: [PATCH] random: add a config option to trust the CPU's hwrng To: "Theodore Y. Ts'o" , Linux Crypto Mailing List , Linux Kernel Developers List , labbott@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 17, 2018 at 9:51 PM, Theodore Y. Ts'o wrote: > On Tue, Jul 17, 2018 at 09:43:44PM -0400, Theodore Ts'o wrote: >> This gives the user building their own kernel (or a Linux >> distribution) the option of deciding whether or not to trust the CPU's >> hardware random number generator (e.g., RDRAND for x86 CPU's) as being >> correctly implemented and not having a back door introduced (perhaps >> courtesy of a Nation State's law enforcement or intelligence >> agencies). >> >> This will prevent getrandom(2) from blocking, if there is a >> willingness to trust the CPU manufacturer. >> >> Signed-off-by: Theodore Ts'o > > Note, I had meant to tag this with an RFC. I'm not sure I really want > to push this to Linus yet. If you have an opinion, let me know. I had something like this in patches I suggested as RFC a couple of years back. Those patches were rejected for other reasons, quite likely valid ones. My version was not binary like this: >> +config RANDOM_TRUST_CPU >> + bool "Trust the CPU manufacturer to initialize Linux's CRNG" Instead, I had a compile-time option to choose a number 0-32 for how much entropy to assume a 32-bit value from the HWRNG contains. Default was something less than 32. I debated values in the 24-30 range, don't recall what I chose & don't think it Matters hugely. Is that a better approach than the binary choice?