All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, "Kees Cook" <keescook@chromium.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"Theodore Ts'o" <tytso@mit.edu>,
	"Andreas Dilger" <adilger.kernel@dilger.ca>,
	"Jaegeuk Kim" <jaegeuk@kernel.org>,
	"Richard Weinberger" <richard@nod.at>,
	"Darrick J . Wong" <djwong@kernel.org>,
	"SeongJae Park" <sj@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Helge Deller" <deller@gmx.de>,
	netdev@vger.kernel.org, linux-crypto@vger.kernel.org,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev,
	linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-mmc@vger.kernel.org, linux-parisc@vger.kernel.org
Subject: Re: [PATCH v1 0/5] convert tree to get_random_u32_{below,above,between}()
Date: Mon, 24 Oct 2022 13:37:12 -0300	[thread overview]
Message-ID: <Y1a/OAJdW+dERHiR@nvidia.com> (raw)
In-Reply-To: <20221022014403.3881893-1-Jason@zx2c4.com>

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.
> 
For drivers/infiniband

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: "Darrick J . Wong" <djwong@kernel.org>,
	linux-mips@vger.kernel.org, netdev@vger.kernel.org,
	"Andreas Dilger" <adilger.kernel@dilger.ca>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Richard Weinberger" <richard@nod.at>,
	"Helge Deller" <deller@gmx.de>,
	"Russell King" <linux@armlinux.org.uk>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	linux-media@vger.kernel.org, "Kees Cook" <keescook@chromium.org>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	linux-block@vger.kernel.org, "SeongJae Park" <sj@kernel.org>,
	loongarch@lists.linux.dev, "Jaegeuk Kim" <jaegeuk@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Theodore Ts'o" <tytso@mit.edu>,
	linux-parisc@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Christoph Bö hmwalder" <christoph.boehmwalder@linbit.com>,
	linux-crypto@vger.kernel.org,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	linux-fsdevel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v1 0/5] convert tree to get_random_u32_{below,above,between}()
Date: Mon, 24 Oct 2022 13:37:12 -0300	[thread overview]
Message-ID: <Y1a/OAJdW+dERHiR@nvidia.com> (raw)
In-Reply-To: <20221022014403.3881893-1-Jason@zx2c4.com>

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.
> 
For drivers/infiniband

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, "Kees Cook" <keescook@chromium.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"Theodore Ts'o" <tytso@mit.edu>,
	"Andreas Dilger" <adilger.kernel@dilger.ca>,
	"Jaegeuk Kim" <jaegeuk@kernel.org>,
	"Richard Weinberger" <richard@nod.at>,
	"Darrick J . Wong" <djwong@kernel.org>,
	"SeongJae Park" <sj@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Helge Deller" <deller@gmx.de>,
	netdev@vger.kernel.org, linux-crypto@vger.kernel.org,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev,
	linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-mmc@vger.kernel.org, linux-parisc@vger.kernel.org
Subject: Re: [PATCH v1 0/5] convert tree to get_random_u32_{below,above,between}()
Date: Mon, 24 Oct 2022 13:37:12 -0300	[thread overview]
Message-ID: <Y1a/OAJdW+dERHiR@nvidia.com> (raw)
In-Reply-To: <20221022014403.3881893-1-Jason@zx2c4.com>

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.
> 
For drivers/infiniband

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-10-24 18:03 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-22  1:43 [PATCH v1 0/5] convert tree to get_random_u32_{below,above,between}() Jason A. Donenfeld
2022-10-22  1:43 ` Jason A. Donenfeld
2022-10-22  1:43 ` Jason A. Donenfeld
2022-10-22  1:43 ` [PATCH v1 1/5] treewide: use get_random_u32_below() instead of deprecated function Jason A. Donenfeld
2022-10-22  1:43   ` Jason A. Donenfeld
2022-10-22  2:25   ` Darrick J. Wong
2022-10-22  2:25     ` Darrick J. Wong
2022-10-22 18:44   ` SeongJae Park
2022-10-22 18:44     ` SeongJae Park
2022-10-22 18:44     ` SeongJae Park
2022-10-22  1:44 ` [PATCH v1 2/5] prandom: remove prandom_u32_max() Jason A. Donenfeld
2022-10-22  1:44   ` Jason A. Donenfeld
2022-10-22  1:44   ` Jason A. Donenfeld
2022-10-22  1:44 ` [PATCH v1 3/5] random: add helpers for random numbers with given floor or range Jason A. Donenfeld
2022-10-22  1:44   ` Jason A. Donenfeld
2022-10-22  1:44   ` Jason A. Donenfeld
2022-11-14 18:04   ` Yann Droneaud
2022-11-14 18:38     ` Jason A. Donenfeld
2022-11-15  8:42       ` Yann Droneaud
2022-11-16  0:25         ` Jason A. Donenfeld
2022-10-22  1:44 ` [PATCH v1 4/5] treewide: use get_random_u32_{above,below}() instead of manual loop Jason A. Donenfeld
2022-10-22  1:44   ` Jason A. Donenfeld
2022-10-22  1:44   ` Jason A. Donenfeld
2022-10-22  1:44 ` [PATCH v1 5/5] treewide: use get_random_u32_between() when possible Jason A. Donenfeld
2022-10-22  1:44   ` Jason A. Donenfeld
2022-10-22  1:44   ` Jason A. Donenfeld
2022-10-22  3:55 ` [PATCH v1 0/5] convert tree to get_random_u32_{below,above,between}() Jakub Kicinski
2022-10-22  3:55   ` Jakub Kicinski
2022-10-22  3:55   ` Jakub Kicinski
2022-10-22  4:23   ` Jason A. Donenfeld
2022-10-22  4:23     ` Jason A. Donenfeld
2022-10-22  4:23     ` Jason A. Donenfeld
2022-10-22  5:32     ` Jakub Kicinski
2022-10-22  5:32       ` Jakub Kicinski
2022-10-22  5:32       ` Jakub Kicinski
2022-10-22  5:47       ` Jason A. Donenfeld
2022-10-22  5:47         ` Jason A. Donenfeld
2022-10-22  5:47         ` Jason A. Donenfeld
2022-10-22  6:03         ` Jakub Kicinski
2022-10-22  6:03           ` Jakub Kicinski
2022-10-22  6:03           ` Jakub Kicinski
2022-10-23 21:07           ` Theodore Ts'o
2022-10-23 21:07             ` Theodore Ts'o
2022-10-23 21:07             ` Theodore Ts'o
2022-10-24 16:43             ` Jason A. Donenfeld
2022-10-24 16:43               ` Jason A. Donenfeld
2022-10-24 16:43               ` Jason A. Donenfeld
2022-10-22 10:21 ` Greg Kroah-Hartman
2022-10-22 10:21   ` Greg Kroah-Hartman
2022-10-22 10:21   ` Greg Kroah-Hartman
2022-10-24 16:37 ` Jason Gunthorpe [this message]
2022-10-24 16:37   ` Jason Gunthorpe
2022-10-24 16:37   ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1a/OAJdW+dERHiR@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=Jason@zx2c4.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=christoph.boehmwalder@linbit.com \
    --cc=deller@gmx.de \
    --cc=djwong@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hca@linux.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jaegeuk@kernel.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loongarch@lists.linux.dev \
    --cc=martin.petersen@oracle.com \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sj@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.