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 7D057C433F5 for ; Tue, 11 Jan 2022 04:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231617AbiAKEFr (ORCPT ); Mon, 10 Jan 2022 23:05:47 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:50379 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231165AbiAKEFr (ORCPT ); Mon, 10 Jan 2022 23:05:47 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 20B446pm026610; Tue, 11 Jan 2022 05:04:06 +0100 Date: Tue, 11 Jan 2022 05:04:06 +0100 From: Willy Tarreau To: "Theodore Ts'o" Cc: Andy Lutomirski , "Jason A. Donenfeld" , Marcelo Henrique Cerri , Simo Sorce , Greg Kroah-Hartman , Jeffrey Walton , Stephan Mueller , Linux Crypto Mailing List , Nicolai Stange , Linux Kernel Mailing List , Arnd Bergmann , "Eric W. Biederman" , "Alexander E. Patrakov" , "Ahmed S. Darwish" , Matthew Garrett , Vito Caputo , Andreas Dilger , Jan Kara , Ray Strode , William Jon McCann , zhangjs , Florian Weimer , Lennart Poettering , Peter Matthias , Neil Horman , Randy Dunlap , Julia Lawall , Dan Carpenter , Andy Lavr , Petr Tesarik , John Haxby , Alexander Lobakin , Jirka Hladky , Eric Biggers Subject: Re: [PATCH v43 01/15] Linux Random Number Generator Message-ID: <20220111040406.GB26248@1wt.eu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Jan 10, 2022 at 10:10:15PM -0500, Theodore Ts'o wrote: > If we must support this in the upstream kernel, then configure it via > CONFIG_RANDOM_SECURITY_THEATRE which redirects getrandom(2) and > /dev/[u]random to DRBG. I'd prefer that it be possible for someone to > put "random_security_theatre=0" on the boot command line which would > disable redirecting the interfaces to DRBG so if it turns out that > DRBG *is* less secure, we can give advice on how to turn it off > without requiring a patched kernel. :-) In this case, why not do it the other way around ? Instead of having yet-another config option, just indicate that fips-like randoms are enabled at boot via "random_security_theatre=1". Distros have their solution which can even be documented for their customers and that's done. Nobody uses it by default, the name is discouraging enough, but for those who know they want it, it's easy to turn it on, and at the same time it delivers them the reminder about what all this really is. Willy