From owner-svn-src-all@freebsd.org Mon Jul 13 19:26:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3628D99CC28; Mon, 13 Jul 2015 19:26:03 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps.rulingia.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A4860262; Mon, 13 Jul 2015 19:26:02 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (c220-239-242-83.belrs5.nsw.optusnet.com.au [220.239.242.83]) by vps.rulingia.com (8.15.2/8.14.9) with ESMTPS id t6DJPi71015998 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jul 2015 05:25:50 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.9/8.14.9) with ESMTP id t6DJPdXs044560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 14 Jul 2015 05:25:39 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.9/8.14.9/Submit) id t6DJPcTF044559; Tue, 14 Jul 2015 05:25:38 +1000 (AEST) (envelope-from peter) Date: Tue, 14 Jul 2015 05:25:38 +1000 From: Peter Jeremy To: Mark Murray 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: <20150713192538.GF22240@server.rulingia.com> References: <201507130838.t6D8cLEZ076018@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XvKFcGCOAo53UbWW" Content-Disposition: inline In-Reply-To: <201507130838.t6D8cLEZ076018@repo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2015 19:26:03 -0000 --XvKFcGCOAo53UbWW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2015-Jul-13 08:38:21 +0000, Mark Murray 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; 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). --=20 Peter Jeremy --XvKFcGCOAo53UbWW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVpBCyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0viwP+QGhNPciPwB55B7xQicXu5j0 +u3q/yPDnS5rMoh++DpLwYtwrs/X5aYz/1lgblH/Hp+qdiNBYwpOq+9mAMti/v6n YDAU3/PmVpBxp9lCcIRCs1fLlloeulJp2PnHHSwyXixdkJ26Lj4en3nnAlG8ZG1E Ysx1XeZIAHjGxcR518DTd5UriXjkncczOGYXXBo5YkkYC2uK8yxBWD7U/MexOAxh IyMGbV0eymAsAFVLvq3XAtyI4bRIp8eTM9iNz+6phrpx9opZUesDlk4b7bJY7KtC 9lTglEElHdUV/4qftq/WlNNDYdBcFbf5WiKctnS68yyoLl3NNqJ+fViXKZ39OOku 5cvfFWzsuBm1rLARr589yoZNoP+lntpoGxXNNVPzFbBlQVw+oDAb+kLfrL/hrTxX OT9Q1nypwyDJGQSsYOU3PQIPryFPwQxOaZsuSmJMN0Q+GoTxB5umCaQutkoshu2p VGjdKYjDULrky1Kkfhi0fhhJYALciNMvkGfBETCikB1LxjV8JyZRoO7wvlsgIpB7 Um+WIUEpb1aN1pvCseWEI6avWA32XB5u4dSReJj0dQR4WWpn0SE0YDuseej8A0OY ye9ylbrl7xluvzw1/wmo7wZ3ruI8VyGSLdOas51KnioQ+YIm8843rm9NOEM034th NIAvaKAlqR12qBNXIAOs =9Tr6 -----END PGP SIGNATURE----- --XvKFcGCOAo53UbWW--