Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jul 2015 20:28:31 +0100
From:      Mark R V Murray <markm@FreeBSD.org>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r285439 - head/sys/dev/random
Message-ID:  <21377AEE-2E04-47C1-9730-B2EB164D305A@FreeBSD.org>
In-Reply-To: <20150713192538.GF22240@server.rulingia.com>
References:  <201507130838.t6D8cLEZ076018@repo.freebsd.org> <20150713192538.GF22240@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 13 Jul 2015, at 20:25, Peter Jeremy <peter@rulingia.com> wrote:
>=20
> On 2015-Jul-13 08:38:21 +0000, Mark Murray <markm@FreeBSD.org> wrote:
>> +			/*
>> +			 * Belt-and-braces.
>> +			 * Round up the read length to a crypto block =
size multiple,
>> +			 * which is what the underlying generator is =
expecting.
>> +			 * See the random_buf size requirements in the =
Yarrow/Fortuna code.
>> +			 */
>> +			read_len +=3D RANDOM_BLOCKSIZE;
>> +			read_len -=3D read_len % RANDOM_BLOCKSIZE;
>=20
> Note that if read_len was already a multiple of RANDOM_BLOCKSIZE, this =
will
> pad it by an additional RANDOM_BLOCKSIZE.  I don't think this matters =
but
> it's not what the comment implies.  (The comment also goes over 80 =
columns).

Yes - this is overly conservative ;-)

I=E2=80=99ve done a further tightening up, but I want to let it settle =
and not
churn the code.

M
--=20
Mark R V Murray




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21377AEE-2E04-47C1-9730-B2EB164D305A>