[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200329143621.GF20941@ziepe.ca>
Date: Sun, 29 Mar 2020 11:36:21 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: George Spelvin <lkml@....org>
Cc: linux-kernel@...r.kernel.org, Doug Ledford <dledford@...hat.com>,
linux-rdma@...r.kernel.org, Faisal Latif <faisal.latif@...el.com>,
Shiraz Saleem <shiraz.saleem@...el.com>,
Bart Van Assche <bvanassche@....org>,
Bernard Metzler <bmt@...ich.ibm.com>
Subject: Re: [RFC PATCH v1 42/50] drivers/ininiband: Use get_random_u32()
On Wed, Aug 21, 2019 at 08:21:45PM -0400, George Spelvin wrote:
> There's no need to get_random_bytes() into a temporary buffer.
>
> This is not a no-brainer change; get_random_u32() has slightly weaker
> security guarantees, but code like this is the classic example of when
> it's appropriate: the random value is stored in the kernel for as long
> as it's valuable.
The mechanical transformation looks OK, but can someone who knows the
RNG confirm this statement?
Many of these places are being used in network related contexts, I
suspect the value here is often less about secrecy, more about
unguessability.
Jason
Powered by blists - more mailing lists