Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1714666rwb; Mon, 7 Nov 2022 05:05:18 -0800 (PST) X-Google-Smtp-Source: AMsMyM6iisMoy9+1d7bXCpNPkvDK/HSSkRezzhN7jgaTu7eZA29VXlpkrn0IRB6ig/0Y2BAMaRf4 X-Received: by 2002:a17:903:2303:b0:186:e114:bbca with SMTP id d3-20020a170903230300b00186e114bbcamr51401170plh.118.1667826317786; Mon, 07 Nov 2022 05:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667826317; cv=none; d=google.com; s=arc-20160816; b=oI4jAb+hrFNKgs1wkkAoOIRsuVbUAlpY0gG73+DJgkHUQw4RDaBoEAQJ9GlOcBMvyl r8D9jD59n/abWXlJPUf9n1zJseM7UUU94uEtioNrB4O2bF7UEUix94gS+Br/dARsYVfr WJmAUmjDSTAjtuGnlshgwkwSJZfGCd1v/WPYAgh1FzBxDccg0xucy2bb0aF+E5clE7Gx MGL3dg5hNIQvgf0hWRUtHeil4RZt8KQXCa88+s11S19INLu4EXKN6V0M9QG5VFC60gzL 764zaqPJEckbD+hZqWYUT6Sq8k88NNAE+2D35FspM/UR08Bm3wXBxSWa+VNZq8fPrmfN Y/ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=eVFHRqT6qK8YAmmgPDnPJH4AuXaijhL4G9cuTbiOLww=; b=QelFiT0r1qRIGr+p75DDz2f5PZfV92m+5L6Zr7xOaDPi1RMdBwJnh13m8ykWTWJERg fRw2sp55TdIXcuHImsfiuPoxFnis2TWMXfLK2cCR69+f4gnaLoAvQILakH6DwfrrOtDA N8fTkRBD7918gdGqcdHujs/P3GXRplFIEwhl9Dkjh2+woiLMo+6dqK02dj3vSNnNnqPm abRqjd66ADNvqm0xkd1BMGopz2mkvtnayGL46sXb753aY26Plm2DpFKjrEWpnYR5GphH WDUgOAq/hJfKo5aBl6jrlrKnjmAghp47DMk74Aitzq56DmiWAwRyMNw5gTfzff8vT5Oz /lwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=AEg+GrQk; 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=QUARANTINE sp=QUARANTINE 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 q19-20020a170902789300b0017f802fcffesi9784453pll.410.2022.11.07.05.05.03; Mon, 07 Nov 2022 05:05:17 -0800 (PST) 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=AEg+GrQk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231635AbiKGM4M (ORCPT + 99 others); Mon, 7 Nov 2022 07:56:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231186AbiKGM4L (ORCPT ); Mon, 7 Nov 2022 07:56:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A5AF1BEAC for ; Mon, 7 Nov 2022 04:56:10 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 15E2DB8113A for ; Mon, 7 Nov 2022 12:56:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74B9DC433D7 for ; Mon, 7 Nov 2022 12:56:07 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="AEg+GrQk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1667825765; 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=eVFHRqT6qK8YAmmgPDnPJH4AuXaijhL4G9cuTbiOLww=; b=AEg+GrQk1XIWkOYLSu9tayN0PWB2/fdKZpjoEzZVR+Vgz7NKSdxOnS87j1MJ6i1PzEhdsw FJF39SjdKzGav/8N1flzChnNmP5Gsm02jZvhUEQq0o4KzeEg9N4nrgrLFypTVnt9/OWbAT ji4pP8WNKa0cGSB6KJCqTU0GYOgcrwo= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 7c2f3ce9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 7 Nov 2022 12:56:05 +0000 (UTC) Received: by mail-vs1-f43.google.com with SMTP id n68so10293700vsc.3 for ; Mon, 07 Nov 2022 04:56:05 -0800 (PST) X-Gm-Message-State: ACrzQf17BgHtZqJOT2XgtZCMWU9AEUUMt+8g4kS2UU05wXgT15lWqV5e PfZL7/dGIZ6sZ5jmb3KZGNJqL4d4GjRljT96lus= X-Received: by 2002:a67:c297:0:b0:3aa:3cac:97b6 with SMTP id k23-20020a67c297000000b003aa3cac97b6mr26933118vsj.76.1667825764706; Mon, 07 Nov 2022 04:56:04 -0800 (PST) MIME-Version: 1.0 References: <20221106150243.150437-1-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Mon, 7 Nov 2022 13:55:53 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] hw_random: use add_hwgenerator_randomness() for early entropy To: Herbert Xu Cc: linux-crypto@vger.kernel.org, Dominik Brodowski Content-Type: text/plain; charset="UTF-8" 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 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 Herbert, On Mon, Nov 7, 2022 at 3:17 AM Herbert Xu wrote: > > On Sun, Nov 06, 2022 at 04:02:43PM +0100, Jason A. Donenfeld wrote: > > Rather than calling add_device_randomness(), the add_early_randomness() > > function should use add_hwgenerator_randomness(), so that the early > > entropy can be potentially credited, which allows for the RNG to > > initialize earlier without having to wait for the kthread to come up. > > > > This requires some minor API refactoring, by adding a `sleep_after` > > parameter to add_hwgenerator_randomness(), so that we don't hit a > > blocking sleep from add_early_randomness(). > > > > Cc: Herbert Xu > > Cc: Dominik Brodowski > > Signed-off-by: Jason A. Donenfeld > > --- > > Herbert - it might be easiest for me to take this patch if you want? Or > > if this will interfere with what you have going on, you can take it. Let > > me know what you feel like. -Jason > > I don't have anything that touches this file so feel free to push > it through your tree: > > Acked-by: Herbert Xu Okay, will do. But by the way, feel free to change your mind about this if need be. For example, I sent another patch that touches core.c too (the entropy quality one). It touches different lines, so there shouldn't be a conflict, but if it's still annoying for you and you want to take them both, just pipe up and I'll drop this one from my tree. Jason