Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp554516iob; Fri, 13 May 2022 07:31:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg8zCCvAt/dW1l2fF2HU5qRZ4Y2q4mfqQnlFEMnSXv2ZD+ntXVyk28nXL6WeWfBlN6V+fg X-Received: by 2002:a17:906:5616:b0:6f3:8fe2:a8e8 with SMTP id f22-20020a170906561600b006f38fe2a8e8mr4518625ejq.465.1652452316669; Fri, 13 May 2022 07:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652452316; cv=none; d=google.com; s=arc-20160816; b=TU+72VX1RID8jUqar96wA/DO/LswzdtCV+JljdbIMIpxXM7jwmDrAd/Jb8oZQApDMd KzmsQRXhGayHpbXYYSf87Sbl2gajGzyig7ZmKk8OM2dw4/6byQkl45eoNU16cl9ARdGc 6zfhiG3onHx8bwMMAsixITFDkokWp9Y1yOM2PjQsD40x4aGigLjiQ4Q8pKpQMjhw5oBq 5K7d4GYJN96Cm9F0JUuLHluLqCVxk0qLDEMIRBKBmbqZc2GRQQv4FMFFm0pJ/q/CxDW5 65aJ3JbhXI2Kn1ehDg3au4XxugGExz4bCzXZR/9rJ3u6i0XGSyn4xJXUbfYpN6KdSTJG kcQA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7N1zyXIi+oMbfwTrQnEnFevk7qISh3+9W8x85t6Q8bY=; b=LfwK47juXKodyHMySHn3aPfHcvBu86p52K16pTKr3yn6ZZJ21a/TWQ6kNfF7OaI8yl ZPXEQGXXewxYF4BuriZ+Gpui3VjiKPK2/wJhGXlIcV6wYl63Rf0ffK33E8GzZKXbF+tM 90yHeXPXqWvBDlq9q3GR4rGfiJD6oe5Esj2XCExMS1bZig0fdflH6SJADjaWk1uubNIL FQ15lXAM9LaA6p30z8DNNX1Qfy9w6Uf/Ti2uqbECCUQIdmFRSBd6QLLqvTS0QKwq7gEL VHyD860jmO8oLAn/2GZZRCNE+7tQm4rD8mI0vGYDKH2XPQRwgu3uUf959gHYtSOh4xlH FN4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=LwDOuIuH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js6-20020a17090797c600b006f3b74c80e0si2030891ejc.460.2022.05.13.07.31.28; Fri, 13 May 2022 07:31:56 -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; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=LwDOuIuH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379241AbiEMKH5 (ORCPT + 99 others); Fri, 13 May 2022 06:07:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359219AbiEMKHz (ORCPT ); Fri, 13 May 2022 06:07:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E23E66AA46; Fri, 13 May 2022 03:07:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 636066222D; Fri, 13 May 2022 10:07:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D07AC34100; Fri, 13 May 2022 10:07:53 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="LwDOuIuH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1652436471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7N1zyXIi+oMbfwTrQnEnFevk7qISh3+9W8x85t6Q8bY=; b=LwDOuIuHymjucObEZc6dI/e+wZ50PeYNASM60HYX9wYpZsJIZvBVBqAtCFcZsR844wLYPa rCG3RtG3UnuMYyVc6ym4HNSTqGtQD7PeAmohnOeVmGeqSWOj+uHuBU/DUldfXPFlyIREl7 S5KBsIdtQEDxVpxILA3yK/51DIhVYMY= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id ae4f983b (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 13 May 2022 10:07:51 +0000 (UTC) Date: Fri, 13 May 2022 12:07:49 +0200 From: "Jason A. Donenfeld" To: Dominik Brodowski Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, netdev@vger.kernel.org, Jakub Kicinski , Theodore Ts'o Subject: Re: [PATCH] random32: use real rng for non-deterministic randomness Message-ID: References: <20220511143257.88442-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,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 Hi Dominik, On Fri, May 13, 2022 at 08:18:53AM +0200, Dominik Brodowski wrote: > Nice! However, wouldn't it be much better to clean up the indirection > introduced here as well? prandom_u32() as wrapper for get_random_u32() and > prandom_bytes() as wrapper for get_random_bytes() seems unnecessary... Yes; we can look at tree-wide changes for 5.20. The first step in making tree-wide changes is filling in the old function with an inline wrapper, which then gets removed as part of the last step after all the other patches have landed. That's a huge process, so this is just step one. Jason