Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1161770pxb; Thu, 24 Mar 2022 14:05:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYWWGyQtW60QMmYIaeIFG9/purN789iK6Gd6mrGxx9CxkP8aoFuFumBc4O4+M5YYcVxB6/ X-Received: by 2002:aa7:d5c1:0:b0:419:113:3e2b with SMTP id d1-20020aa7d5c1000000b0041901133e2bmr8914007eds.237.1648155916889; Thu, 24 Mar 2022 14:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648155916; cv=none; d=google.com; s=arc-20160816; b=jESeWWQU81Q6jSYt6+oDYfB8FG3VgFMhzkUnn6xmwIPJ+lOxtL1vvXowZ3H0AjZ/Ac tGQJ6ebbZxODrADV8EgO6RlhubFjxbwVyOQGiYZLts0NidZRl6mI+XyRtigx2vV7E5Ga HLzA9xZqCwwXIFefXigj7VbWCUMFjyHOTQ+0i7UuIZ6plldL43UKdIa7isR8wGLhjUOY tonG0/3Oj8lbRbhtsBxYkMjxSwyIoGTy6j+4/ocGVoHN6P9kwmPkbsZXnOwIpoLDgHwJ i8PSwfkOgDVf4o04CwP8A7/zn4Ah6uBZgGQR9pUQns13Tfb5aY4Apm1+PsbJCEElyb4f X1GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=du9BIh289g8DMxuJxuBx3A9CsdAO9a0JqHE1tS4qM4g=; b=kLSFP0OOfRGMcrIBew7XZW6FTGqv22JlosL7zjJ6RAVvWoTwTDtQ8xHcZb21TqP1PD +VN0Ztcd3maIUl7NrvLJwpMVw0nMKp6F5e8Wy+MIVYi4zzH7dork+88c8oOu6IDfGqdJ kH0p/JZeBmWQze0EEyapt2mw2u1asBri3oEOaBFmXoJvvQISgJV2b4wmQawonE1Qb2q9 UV+YLayonSmx7JC8GN4tPsiezJdChILBUkGq34RjV1lvvi5YsRNGWJvzJv9/nQyIIKVc AYFZ2Yu80cesk91DOXZSXJRNFPnYOBnPxRnnJho2QHtOu2NXekuWjdy6V3XK5Q1uUGHx c1hA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a170906724a00b006df76385d4dsi506084ejk.493.2022.03.24.14.04.43; Thu, 24 Mar 2022 14:05:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234531AbiCWMdq (ORCPT + 99 others); Wed, 23 Mar 2022 08:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231716AbiCWMdq (ORCPT ); Wed, 23 Mar 2022 08:33:46 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 940B57B54D; Wed, 23 Mar 2022 05:32:16 -0700 (PDT) Received: from cwcc.thunk.org (pool-108-7-220-252.bstnma.fios.verizon.net [108.7.220.252]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 22NCVt8l013239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Mar 2022 08:31:55 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id E977015C0038; Wed, 23 Mar 2022 08:31:54 -0400 (EDT) Date: Wed, 23 Mar 2022 08:31:54 -0400 From: "Theodore Ts'o" To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Linus Torvalds , Guenter Roeck , Dominik Brodowski , Jann Horn Subject: Re: [PATCH] random: allow writes to /dev/urandom to influence fast init Message-ID: References: <20220322191436.110963-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Mar 22, 2022 at 10:00:49PM -0600, Jason A. Donenfeld wrote: > > Another variation on that would be to do what this current patch does, > but only crng_pre_init_inject() on CAP_SYS_ADMIN. But this has the same > pitfall of only working as intended at cnrg_init=0 but not crng_init=1. > That's better than nothing, but it's not perfect, and it introduces that > problem with RNDADDTOENTCNT. Well, one could argue that "RNDADDTOENTCNT" is a problem that has always been there, and it already requires CAP_SYS_ADMIN. So I'm not sure it makes it any worse. > > > And perhaps we might consider attempting to deprecate RNDADDTOENTCNT at > > > some point in the future. > > > > That would be a good idea. ?:-) > > Oh cool, I'm glad you agree. Let's do that then. Have a preferred path? > Maybe just a pr_once() saying not to use it? Probably. We could get more aggressive (e.g., WARN), but the first Google search on RNDADDTOENTCNT returned: https://github.com/jumpnow/rndaddtoentcnt So I'm now regretting not silently making it vanish a decade or more ago... - Ted