From owner-svn-src-head@FreeBSD.ORG Mon Nov 10 19:56:12 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D07E993A; Mon, 10 Nov 2014 19:56:12 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76C2921F; Mon, 10 Nov 2014 19:56:12 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::96f:bc74:b3c9:9d0e] (unknown [IPv6:2001:7b8:3a7:0:96f:bc74:b3c9:9d0e]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 52654B80A; Mon, 10 Nov 2014 20:56:01 +0100 (CET) Subject: Re: svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Content-Type: multipart/signed; boundary="Apple-Mail=_53257F3D-7477-437C-94B4-60A519E00290"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b1 From: Dimitry Andric In-Reply-To: <3C962D07-3AAF-42EA-9D3E-D8F6D9A812B0@FreeBSD.org> Date: Mon, 10 Nov 2014 20:55:46 +0100 Message-Id: References: <201411100944.sAA9icnN061962@svn.freebsd.org> <3C962D07-3AAF-42EA-9D3E-D8F6D9A812B0@FreeBSD.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1990.1) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 19:56:13 -0000 --Apple-Mail=_53257F3D-7477-437C-94B4-60A519E00290 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 10 Nov 2014, at 16:10, Bjoern A. Zeeb wrote: >=20 > On 10 Nov 2014, at 09:44 , Dag-Erling Sm=F8rgrav = wrote: >=20 >> Author: des >> Date: Mon Nov 10 09:44:38 2014 >> New Revision: 274340 >> URL: https://svnweb.freebsd.org/changeset/base/274340 >>=20 >> Log: >> Constify the AES code and propagate to consumers. This allows us to >> update the Fortuna code to use SHAd-256 as defined in FS&K. >>=20 >> Approved by: so (self) >=20 > This fails to compile on all gcc platforms. >=20 > cc1: warnings being treated as errors > = /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndae= l/rijndael-api-fst.c: In function 'rijndael_padEncrypt': > = /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndae= l/rijndael-api-fst.c:236: warning: cast discards qualifiers from pointer = target type > = /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndae= l/rijndael-api-fst.c:237: warning: cast discards qualifiers from pointer = target type > = /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndae= l/rijndael-api-fst.c:238: warning: cast discards qualifiers from pointer = target type > = /scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndae= l/rijndael-api-fst.c:239: warning: cast discards qualifiers from pointer = target type > --- rijndael-api-fst.o --- > *** [rijndael-api-fst.o] Error code 1 Proposed fix (the lines were too long anyway, so I didn't see reason to = change that): Index: sys/crypto/rijndael/rijndael-api-fst.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/crypto/rijndael/rijndael-api-fst.c (revision 274350) +++ sys/crypto/rijndael/rijndael-api-fst.c (working copy) @@ -233,10 +233,10 @@ case MODE_CBC: iv =3D cipher->IV; for (i =3D numBlocks; i > 0; i--) { - ((u_int32_t*)block)[0] =3D = ((u_int32_t*)input)[0] ^ ((u_int32_t*)iv)[0]; - ((u_int32_t*)block)[1] =3D = ((u_int32_t*)input)[1] ^ ((u_int32_t*)iv)[1]; - ((u_int32_t*)block)[2] =3D = ((u_int32_t*)input)[2] ^ ((u_int32_t*)iv)[2]; - ((u_int32_t*)block)[3] =3D = ((u_int32_t*)input)[3] ^ ((u_int32_t*)iv)[3]; + ((u_int32_t*)block)[0] =3D ((const = u_int32_t*)input)[0] ^ ((u_int32_t*)iv)[0]; + ((u_int32_t*)block)[1] =3D ((const = u_int32_t*)input)[1] ^ ((u_int32_t*)iv)[1]; + ((u_int32_t*)block)[2] =3D ((const = u_int32_t*)input)[2] ^ ((u_int32_t*)iv)[2]; + ((u_int32_t*)block)[3] =3D ((const = u_int32_t*)input)[3] ^ ((u_int32_t*)iv)[3]; rijndaelEncrypt(key->rk, key->Nr, block, = outBuffer); iv =3D outBuffer; input +=3D 16; -Dimitry --Apple-Mail=_53257F3D-7477-437C-94B4-60A519E00290 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlRhGFAACgkQsF6jCi4glqOidACgmCde+diAOGfa+D3zLdIbSusP UBAAn2++W5nL4Qg988Dnhz17VB2LV7om =MUKa -----END PGP SIGNATURE----- --Apple-Mail=_53257F3D-7477-437C-94B4-60A519E00290--