From mboxrd@z Thu Jan 1 00:00:00 1970 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 196D3C433EF for ; Thu, 19 May 2022 07:11:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230055AbiESHLk (ORCPT ); Thu, 19 May 2022 03:11:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235050AbiESHLW (ORCPT ); Thu, 19 May 2022 03:11:22 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3908A27FE2; Thu, 19 May 2022 00:10:58 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id EEC231F9F4; Thu, 19 May 2022 07:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1652944256; h=from:from:reply-to: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=7THzLll8eKXBdQTV/BzshDjJ4CbuTPvZ2Drio0SjPa0=; b=iNV002yTnGws18wkL+wjwzCUiOQbFnIBzCvzuQ9zC6j/XT6HQQUbg2cKg66scEl5N8L8FM n+XvVSOVMWgXm+ruBU4gtupg0QOVbq17mdJJ0943BsdgRgjFk9aNlQN2NQIMKOBCrmw+u5 a5ne6GRDqf0DnkXzE4Uki5Oltbo2kD8= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id CB1E62C141; Thu, 19 May 2022 07:10:56 +0000 (UTC) Date: Thu, 19 May 2022 09:10:56 +0200 From: Petr Mladek To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky Subject: Re: [PATCH v2] random: remove mostly unused async readiness notifier Message-ID: References: <20220518095658.24085-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220518095658.24085-1-Jason@zx2c4.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed 2022-05-18 11:56:58, Jason A. Donenfeld wrote: > The register_random_ready_notifier() notifier is somewhat complicated, > and was already recently rewritten to use notifier blocks. It is only > used now by one consumer in the kernel, vsprintf.c, for which the async > mechanism is really overly complex for what it actually needs. This > commit removes register_random_ready_notifier() and unregister_random_ > ready_notifier(), because it just adds complication with little utility, > and changes vsprintf.c to just check on `!rng_is_initialized() && > !rng_has_arch_random()`, which will eventually be true. Performance- > wise, that code was already using a static branch, so there's basically > no overhead at all to this change. > > Cc: Petr Mladek > Cc: Steven Rostedt > Cc: Sergey Senozhatsky > Acked-by: Petr Mladek # for vsprintf.c > Signed-off-by: Jason A. Donenfeld > --- > Changes v1->v2: > - Use a trylock instead of a spinlock to be NMI safe. Looks good to me. My ack is already there. Feel free to use: Reviewed-by: Petr Mladek if you would prefer it. Thanks a lot for updating the patch. Best Regards, Petr