Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1033714iob; Fri, 13 May 2022 20:25:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqHX1Hj6t0NEUPSlMRRNY3jQQO7ofYQ5wsq15UFkFox6ahXi6klLxthOq8tCsDdlSn3KeR X-Received: by 2002:a5d:4e42:0:b0:20a:d87f:84ee with SMTP id r2-20020a5d4e42000000b0020ad87f84eemr6278926wrt.593.1652498749880; Fri, 13 May 2022 20:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652498749; cv=none; d=google.com; s=arc-20160816; b=WBndFAdr0bXxxuO37uGnMZbw4yA59u6b0Pvg/l1zHeICsAhC2P+Mc1S83/LJv+lTGy VS7lRuxbUAYMk/ZFO2Ps40r3SP5LU5yU2vCja58MKTASJMh/4O38su67zmfmqFfl4VmM yY4Lnmf8xYIozEzytGkXJ5+mPs3/582tO/j6PoFMWzShNefpRGCYnR9yatndVdftwpB2 qzvTgc4GST7glQwpTSI6v5gql8vVKEG3JTH78NkrbN9umXVTACLTtMCkUpT8nT7nPIBB 52tWHwz3OLLCXVQYRYMmejOVkfCGVlZvFLPBOXmFS6OOnKhrWOSqEOEBiGB4rNq0pHTZ eiIA== 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=R9guTYSF77xdE/OjLFIshPpl9Sd/e3mIVmMDqCLm7Ek=; b=GIbGPhQSaRYlTLe4k2sP9m+wsb7Nm/Wa77KjcgPMIdVaNdt3ZUrUhvVEjgpumBASr9 JAyRIIvyKmnNtTZdRmq8NpszjDV9BJPs1dER8+6BP5A5wxhM4W+zN7yqccLC6v8rXK7X dsGctVQXuA529um5GgCLHQvpDpVZ7ofa8OxpQgM2Uiyrl5IT+FUkg+ORb2gxZ3pZtO2W dr60VmeHEN46v1GIawIhTvozxx1ZGBCzMBcdLyuU2YWLdbGSC/RPG2gwAq6P+RtCjgWq 8Z6piRlSvDfaRe2sQdNYd8Gel8I+TVJzx9N8YLng2FzQJyIDybVluHf1tXxIvp4qgaEg Ar4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=YEipm3ml; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f11-20020adfb60b000000b0020adeba3aa3si3612144wre.714.2022.05.13.20.25.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=YEipm3ml; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0A9B21A957; Fri, 13 May 2022 17:02:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379404AbiEMKVz (ORCPT + 99 others); Fri, 13 May 2022 06:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379369AbiEMKVr (ORCPT ); Fri, 13 May 2022 06:21:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 933F8166440 for ; Fri, 13 May 2022 03:21:38 -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 6CCEB6222B for ; Fri, 13 May 2022 10:21:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85167C34100; Fri, 13 May 2022 10:21:37 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="YEipm3ml" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1652437295; 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=R9guTYSF77xdE/OjLFIshPpl9Sd/e3mIVmMDqCLm7Ek=; b=YEipm3ml98SQI3klpGvYMjmPPMkQVXuDq8oG4yImUqn1/kH4FS1urx9ZjevF2RZbu54vtn /9kZteamKXdmcnZVE6Yv4pucVMoSgTetaawjSRE/qCu0rSNIQcNzYciWneHCQCXydmKFu6 KiTBdXfcwf+L3F4ACZPEr88Hwhmnrn0= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 34076031 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 13 May 2022 10:21:35 +0000 (UTC) Date: Fri, 13 May 2022 12:21:34 +0200 From: "Jason A. Donenfeld" To: Dominik Brodowski Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] random: move initialization out of reseeding hot path Message-ID: References: <20220509121409.529788-1-Jason@zx2c4.com> <20220509121409.529788-2-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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-kernel@vger.kernel.org Hi Dominik, On Fri, May 13, 2022 at 08:24:19AM +0200, Dominik Brodowski wrote: > > - if (!crng_ready()) { > > - crng_init = CRNG_READY; > > - finalize_init = true; > > - } > > + crng_init = CRNG_READY; > > Why unconditionally To avoid a useless branch. > (you revert that bit in the static branch patch and make > it conditional again; so I see no reason for that here)? With the static branch patch, I can totally remove the branch and the store all together, so we get the best of both worlds. Jason