[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E057FAB4-C522-4CE7-ADFE-BDEC7C207A0C@oracle.com>
Date: Thu, 6 Oct 2022 15:44:06 +0000
From: Chuck Lever III <chuck.lever@...cle.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"patches@...ts.linux.dev" <patches@...ts.linux.dev>,
Andreas Noever <andreas.noever@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Borislav Petkov <bp@...en8.de>,
Christoph Böhmwalder
<christoph.boehmwalder@...bit.com>, Christoph Hellwig <hch@....de>,
Daniel Borkmann <daniel@...earbox.net>,
Dave Airlie <airlied@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Florian Westphal <fw@...len.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"H. Peter Anvin" <hpa@...or.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Hugh Dickins <hughd@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
"James E . J . Bottomley" <jejb@...ux.ibm.com>,
Jan Kara <jack@...e.com>, Jason Gunthorpe <jgg@...pe.ca>,
Jens Axboe <axboe@...nel.dk>,
Johannes Berg <johannes@...solutions.net>,
Jonathan Corbet <corbet@....net>,
Jozsef Kadlecsik <kadlec@...filter.org>,
KP Singh <kpsingh@...nel.org>,
Kees Cook <keescook@...omium.org>,
Marco Elver <elver@...gle.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>,
Pablo Neira Ayuso <pablo@...filter.org>,
Paolo Abeni <pabeni@...hat.com>, Theodore Ts'o <tytso@....edu>,
Thomas Gleixner <tglx@...utronix.de>,
Thomas Graf <tgraf@...g.ch>,
Ulf Hansson <ulf.hansson@...aro.org>,
Vignesh Raghavendra <vigneshr@...com>,
Yury Norov <yury.norov@...il.com>,
dri-devel <dri-devel@...ts.freedesktop.org>,
"kasan-dev@...glegroups.com" <kasan-dev@...glegroups.com>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
Linux Memory Management List <linux-mm@...ck.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
linux-rdma <linux-rdma@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 3/5] treewide: use get_random_u32() when possible
> On Oct 6, 2022, at 9:25 AM, Jason A. Donenfeld <Jason@...c4.com> wrote:
>
> The prandom_u32() function has been a deprecated inline wrapper around
> get_random_u32() for several releases now, and compiles down to the
> exact same code. Replace the deprecated wrapper with a direct call to
> the real function.
>
> Reviewed-by: Kees Cook <keescook@...omium.org>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> ---
> Documentation/networking/filter.rst | 2 +-
> drivers/infiniband/hw/cxgb4/cm.c | 4 ++--
> drivers/infiniband/hw/hfi1/tid_rdma.c | 2 +-
> drivers/infiniband/hw/mlx4/mad.c | 2 +-
> drivers/infiniband/ulp/ipoib/ipoib_cm.c | 2 +-
> drivers/md/raid5-cache.c | 2 +-
> drivers/mtd/nand/raw/nandsim.c | 2 +-
> drivers/net/bonding/bond_main.c | 2 +-
> drivers/net/ethernet/broadcom/cnic.c | 2 +-
> .../chelsio/inline_crypto/chtls/chtls_cm.c | 2 +-
> drivers/net/ethernet/rocker/rocker_main.c | 6 +++---
> .../net/wireless/marvell/mwifiex/cfg80211.c | 4 ++--
> .../net/wireless/microchip/wilc1000/cfg80211.c | 2 +-
> .../net/wireless/quantenna/qtnfmac/cfg80211.c | 2 +-
> drivers/nvme/common/auth.c | 2 +-
> drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 4 ++--
> drivers/target/iscsi/cxgbit/cxgbit_cm.c | 2 +-
> drivers/thunderbolt/xdomain.c | 2 +-
> drivers/video/fbdev/uvesafb.c | 2 +-
> fs/exfat/inode.c | 2 +-
> fs/ext4/ialloc.c | 2 +-
> fs/ext4/ioctl.c | 4 ++--
> fs/ext4/mmp.c | 2 +-
> fs/f2fs/namei.c | 2 +-
> fs/fat/inode.c | 2 +-
> fs/nfsd/nfs4state.c | 4 ++--
> fs/ubifs/journal.c | 2 +-
> fs/xfs/libxfs/xfs_ialloc.c | 2 +-
> fs/xfs/xfs_icache.c | 2 +-
> fs/xfs/xfs_log.c | 2 +-
> include/net/netfilter/nf_queue.h | 2 +-
> include/net/red.h | 2 +-
> include/net/sock.h | 2 +-
> kernel/kcsan/selftest.c | 2 +-
> lib/random32.c | 2 +-
> lib/reed_solomon/test_rslib.c | 6 +++---
> lib/test_fprobe.c | 2 +-
> lib/test_kprobes.c | 2 +-
> lib/test_rhashtable.c | 6 +++---
> mm/shmem.c | 2 +-
> net/802/garp.c | 2 +-
> net/802/mrp.c | 2 +-
> net/core/pktgen.c | 4 ++--
> net/ipv4/tcp_cdg.c | 2 +-
> net/ipv4/udp.c | 2 +-
> net/ipv6/ip6_flowlabel.c | 2 +-
> net/ipv6/output_core.c | 2 +-
> net/netfilter/ipvs/ip_vs_conn.c | 2 +-
> net/netfilter/xt_statistic.c | 2 +-
> net/openvswitch/actions.c | 2 +-
> net/rds/bind.c | 2 +-
> net/sched/sch_cake.c | 2 +-
> net/sched/sch_netem.c | 18 +++++++++---------
> net/sunrpc/auth_gss/gss_krb5_wrap.c | 4 ++--
> net/sunrpc/xprt.c | 2 +-
> net/unix/af_unix.c | 2 +-
> 56 files changed, 77 insertions(+), 77 deletions(-)
...
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index c5d199d7e6b4..e10c16cd7881 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -4346,8 +4346,8 @@ void nfsd4_init_leases_net(struct nfsd_net *nn)
> nn->nfsd4_grace = 90;
> nn->somebody_reclaimed = false;
> nn->track_reclaim_completes = false;
> - nn->clverifier_counter = prandom_u32();
> - nn->clientid_base = prandom_u32();
> + nn->clverifier_counter = get_random_u32();
> + nn->clientid_base = get_random_u32();
> nn->clientid_counter = nn->clientid_base + 1;
> nn->s2s_cp_cl_id = nn->clientid_counter++;
>
For the NFSD hunk:
Acked-by: Chuck Lever <chuck.lever@...cle.com>
--
Chuck Lever
Powered by blists - more mailing lists