[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1PEJxnlY7dh4yK8@kroah.com>
Date: Sat, 22 Oct 2022 12:21:27 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>,
Jakub Kicinski <kuba@...nel.org>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Heiko Carstens <hca@...ux.ibm.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Christoph Böhmwalder
<christoph.boehmwalder@...bit.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Jason Gunthorpe <jgg@...dia.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Richard Weinberger <richard@....at>,
"Darrick J . Wong" <djwong@...nel.org>,
SeongJae Park <sj@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Michael Ellerman <mpe@...erman.id.au>,
Helge Deller <deller@....de>, netdev@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-block@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-media@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, loongarch@...ts.linux.dev,
linux-mips@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-mmc@...r.kernel.org, linux-parisc@...r.kernel.org
Subject: Re: [PATCH v1 0/5] convert tree to
get_random_u32_{below,above,between}()
On Fri, Oct 21, 2022 at 09:43:58PM -0400, Jason A. Donenfeld wrote:
> Hey everyone,
>
> Here's the second and final tranche of tree-wide conversions to get
> random integer handling a bit tamer. It's predominantly another
> Coccinelle-based patchset.
>
> First we s/prandom_u32_max/get_random_u32_below/, since the former is
> just a deprecated alias for the latter. Then in the next commit we can
> remove prandom_u32_max all together. I'm quite happy about finally being
> able to do that. It means that prandom.h is now only for deterministic and
> repeatable randomness, not non-deterministic/cryptographic randomness.
> That line is no longer blurred.
>
> Then, in order to clean up a bunch of inefficient patterns, we introduce
> two trivial static inline helper functions built on top of
> get_random_u32_below: get_random_u32_above and get_random_u32_between.
> These are pretty straight forward to use and understand. Then the final
> two patches convert some gnarly open-coded number juggling to use these
> helpers.
>
> I've used Coccinelle for all the treewide patches, so hopefully review
> is rather uneventful. I didn't accept all of the changes that Coccinelle
> proposed, though, as these tend to be somewhat context-specific. I erred
> on the side of just going with the most obvious cases, at least this
> time through. And then we can address more complicated cases through
> actual maintainer trees.
>
> Since get_random_u32_below() sits in my random.git tree, these patches
> too will flow through that same tree.
>
> Regards,
> Jason
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists