Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp981465rwn; Thu, 15 Sep 2022 08:50:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75sl4AkwSPtLWw6CYfib7lOUkJZlNOH8yO4MehozLC7oQ0jRcmlO5EreNNSAWS+1Fnyf7F X-Received: by 2002:a63:5a0b:0:b0:434:4748:4e7a with SMTP id o11-20020a635a0b000000b0043447484e7amr398723pgb.561.1663257014755; Thu, 15 Sep 2022 08:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663257014; cv=none; d=google.com; s=arc-20160816; b=VYcBc6LTROEMh8qeeu4LW5buDGyYSHzQWQu2KMo8F0BGsx63zqSMOu/136r76N71+Q Ggyv7pDaY1gGNaRSk2VELXB/KUbh230QQtBfcWOiMRQACOQ9tAtM4AdDAU3ydTLXBQ2v QFqzdj5bm9EbtYgqmqRt1wHcA2tr0K2+XmuW2zE1u71RZuYvzMZKL0J0xurGYMzt29lc kW5Ot6hzrFWnYLcrpChQNUqxYlwpbtOTv89PrQUpsZh/KSTVnTzclZam2XHsTXwxFwcV OfQG4e9bxJ7tueT4i00ecmb7KevaFyMwXOM1sthQzwI+MwEr+LKjLZrEcBhOqjglzTQ2 BX0Q== 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=/yyWzHROU9kEnjmKKhzTY5LfkMeTLQIiTrmiEeAJ7no=; b=JgxZetrRBrl8Rzm5TbEuu7ihzhses6Dkb3I/72XjXEUM7TSNxDtVDKvFJrjMpKoPIw 5YSXS3QmJShitKAf6iu5jvDwl9S1JyM0B67p2rp7rW8M4MEl6M+I14nGhBn8MOQu9qUj V5Pqrtt6IyoSizVE9yjplDAQoHSR8Oag44hJe8cedNknxXnDhNsaXwvSmyNn3tXDubnH s6jYZc4xq2dTn+fPWQOoWAKwEBRzePDb2AJwmRxItOCzzeNIOG+uY1csDCHYicxCdPtN 4evxArah0ms5E0aZuuP1CvUvZK+StGRiMm1buEgBxHHIOZTcycsL1gWZ5uxxSk6Gk3wX fNKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=QBIF+TRm; 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 d18-20020a170902ced200b0016c00834dd5si14007141plg.18.2022.09.15.08.49.52; Thu, 15 Sep 2022 08:50:14 -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=QBIF+TRm; 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 S229665AbiIOPoV (ORCPT + 99 others); Thu, 15 Sep 2022 11:44:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbiIOPoF (ORCPT ); Thu, 15 Sep 2022 11:44:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B379D8048F; Thu, 15 Sep 2022 08:44:04 -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 5A4CE624B1; Thu, 15 Sep 2022 15:44:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BF35C433D7; Thu, 15 Sep 2022 15:44:02 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="QBIF+TRm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1663256640; 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=/yyWzHROU9kEnjmKKhzTY5LfkMeTLQIiTrmiEeAJ7no=; b=QBIF+TRmrJ9BBoXcNSZPogvyVgAi6lpDHuhq6UZw7vtreOC75hxckoaDqZzRKME02yaXdr APJItTxeyNIC1U5qJo+XwicF9EkTbTxkwVcThRaWmkMEtC7mVjwQ+dNRaSDRM67XIi3b26 f/JxHtHtWv4lRMfWilWmhYYCtkPtAbo= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 9114dced (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 15 Sep 2022 15:44:00 +0000 (UTC) Date: Thu, 15 Sep 2022 16:43:54 +0100 From: "Jason A. Donenfeld" To: Sven van Ashbrook , linux@dominikbrodowski.net Cc: LKML , Herbert Xu , Dominik Brodowski , Olivia Mackall , Alex Levin , Andrey Pronin , Stephen Boyd , Rajat Jain , Eric Biggers , Petr Mladek , Sebastian Andrzej Siewior , Theodore Ts'o , linux-crypto@vger.kernel.org Subject: Re: [PATCH v2 1/2] random: move add_hwgenerator_randomness()'s wait outside function Message-ID: References: <20220915002235.v2.1.I7c0a79e9b3c52584f5b637fde5f1d6f807605806@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220915002235.v2.1.I7c0a79e9b3c52584f5b637fde5f1d6f807605806@changeid> 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 Sven, On Thu, Sep 15, 2022 at 12:22:53AM +0000, Sven van Ashbrook wrote: > add_hwgenerator_randomness() currently blocks until more entropy > is needed. Move the blocking wait out of the function to the caller, > by letting the function return the number of jiffies needed to block. > > This is done to prepare the function's sole kernel caller from a > kthread to self-rearming delayed_work. Isn't Dominik working on the same thing, but slightly different? I recall he sent a patch recently, which looked pretty good, except it just needed to be split up. I'm waiting for his v2. Does this build on that? Jason