From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF6B7C433EF for ; Wed, 23 Mar 2022 12:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238911AbiCWMds (ORCPT ); Wed, 23 Mar 2022 08:33:48 -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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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