ports/159147: Patch cmp to cmpq for security/libgcrypt 1.5.0 fails on earlier Pentium 4

Hirohisa Yamaguchi umq at ueo.co.jp
Mon Jul 25 23:10:11 UTC 2011


The following reply was made to PR ports/159147; it has been noted by GNATS.

From: Hirohisa Yamaguchi <umq at ueo.co.jp>
To: dim at FreeBSD.ORG
Cc: bug-followup at FreeBSD.ORG, davshao at gmail.com
Subject: Re: ports/159147: Patch cmp to cmpq for security/libgcrypt 1.5.0 fails on earlier Pentium 4
Date: Tue, 26 Jul 2011 08:05:51 +0900

 --pgp-sign-Multipart_Tue_Jul_26_08:05:49_2011-1
 Content-Type: multipart/mixed;
  boundary="Multipart_Tue_Jul_26_08:05:49_2011-1"
 
 --Multipart_Tue_Jul_26_08:05:49_2011-1
 Content-Type: text/plain; charset=US-ASCII
 
 Hi,
 
 At Sat, 23 Jul 2011 20:50:10 UT,
 Edwin Groothuis wrote:
 >
 > Maintainer of security/libgcrypt,
 >
 > Please note that PR ports/159147 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/159147
 
 The patch in ports/158994 breaks build with gcc.
 Changing cmpq to cmpl seems to fix the problem.
 
 Attached patch works in my 9-CURRENT(i386) box, both with gcc and
 clang.
 
 
 Dimitry, will you please handle this?
 
 Regards,
 --
 
 	Hirohisa Yamaguchi
 	  umq at ueo.co.jp
 
 --Multipart_Tue_Jul_26_08:05:49_2011-1
 Content-Type: application/octet-stream; type=patch
 Content-Disposition: attachment; filename="security_libgcrypt_159417.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: files/patch-cipher-rijndael.c
 ===================================================================
 RCS file: /home/ncvs/ports/security/libgcrypt/files/patch-cipher-rijndael.c,v
 retrieving revision 1.1
 diff -u -r1.1 patch-cipher-rijndael.c
 --- files/patch-cipher-rijndael.c	21 Jul 2011 20:18:45 -0000	1.1
 +++ files/patch-cipher-rijndael.c	25 Jul 2011 06:47:02 -0000
 @@ -5,14 +5,14 @@
                   aesenc_xmm1_xmm0
                   "movdqa 0xa0(%%esi), %%xmm1\n\t"
  -                "cmp $10, %[rounds]\n\t"
 -+                "cmpq $10, %[rounds]\n\t"
 ++                "cmpl $10, %[rounds]\n\t"
                   "jz .Lenclast%=\n\t"
                   aesenc_xmm1_xmm0
                   "movdqa 0xb0(%%esi), %%xmm1\n\t"
                   aesenc_xmm1_xmm0
                   "movdqa 0xc0(%%esi), %%xmm1\n\t"
  -                "cmp $12, %[rounds]\n\t"
 -+                "cmpq $12, %[rounds]\n\t"
 ++                "cmpl $12, %[rounds]\n\t"
                   "jz .Lenclast%=\n\t"
                   aesenc_xmm1_xmm0
                   "movdqa 0xd0(%%esi), %%xmm1\n\t"
 @@ -21,7 +21,7 @@
                   "pxor %%xmm1, %%xmm0\n\t"        /* xmm0 = input ^ IV  */
 
  -                "cmp $1, %[decrypt]\n\t"
 -+                "cmpq $1, %[decrypt]\n\t"
 ++                "cmpl $1, %[decrypt]\n\t"
                   "jz .Ldecrypt_%=\n\t"
                   "movdqa %%xmm0, %[iv]\n\t"       /* [encrypt] Store IV.  */
                   "jmp .Lleave_%=\n"
 @@ -30,14 +30,14 @@
                   aesenc_xmm1_xmm0
                   "movdqa 0xa0(%%esi), %%xmm1\n\t"
  -                "cmp $10, %[rounds]\n\t"
 -+                "cmpq $10, %[rounds]\n\t"
 ++                "cmpl $10, %[rounds]\n\t"
                   "jz .Lenclast%=\n\t"
                   aesenc_xmm1_xmm0
                   "movdqa 0xb0(%%esi), %%xmm1\n\t"
                   aesenc_xmm1_xmm0
                   "movdqa 0xc0(%%esi), %%xmm1\n\t"
  -                "cmp $12, %[rounds]\n\t"
 -+                "cmpq $12, %[rounds]\n\t"
 ++                "cmpl $12, %[rounds]\n\t"
                   "jz .Lenclast%=\n\t"
                   aesenc_xmm1_xmm0
                   "movdqa 0xd0(%%esi), %%xmm1\n\t"
 @@ -46,7 +46,7 @@
                   aesenc_xmm1_xmm4
                   "movdqa 0xa0(%%esi), %%xmm1\n\t"
  -                "cmp $10, %[rounds]\n\t"
 -+                "cmpq $10, %[rounds]\n\t"
 ++                "cmpl $10, %[rounds]\n\t"
                   "jz .Lenclast%=\n\t"
                   aesenc_xmm1_xmm0
                   aesenc_xmm1_xmm2
 @@ -55,7 +55,7 @@
                   aesenc_xmm1_xmm4
                   "movdqa 0xc0(%%esi), %%xmm1\n\t"
  -                "cmp $12, %[rounds]\n\t"
 -+                "cmpq $12, %[rounds]\n\t"
 ++                "cmpl $12, %[rounds]\n\t"
                   "jz .Lenclast%=\n\t"
                   aesenc_xmm1_xmm0
                   aesenc_xmm1_xmm2
 
 --Multipart_Tue_Jul_26_08:05:49_2011-1--
 
 --pgp-sign-Multipart_Tue_Jul_26_08:05:49_2011-1
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 Content-Description: OpenPGP Digital Signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (FreeBSD)
 
 iQEcBAABAgAGBQJOLfbNAAoJEML/cja+Xi6+hbEH/074619s4agIpP9IXfoX37xf
 s610nQdXJM/SjvSAGc+1BKOS9kHs8X+EJIYXRtMvNrxEQXULEIbQAFuMnbiDPfH3
 SCKKY/cJs8ZMmNnMX0poWwkYKBkzIQX+KiNAu0YqBGMLObWDg1F5Pdbow8P5a3yJ
 BU6H/r4EkYJxF1zFeAg4N3Qeqgm+UK+eXhNFlyFXkyMI7U+OwJrdOyLJfOkuobQg
 GDiwCHZHd/idHFe5YEFZNabX+vWlgHeMN0g38wPOmANqmiDEgiYGnCDjFeReidJO
 5XNdvPrujuWqxA40NQ4cTet5diXq7NtXYPxIdUZHSLyI8XjadSaTn8pqyaeOiZs=
 =lt/C
 -----END PGP SIGNATURE-----
 
 --pgp-sign-Multipart_Tue_Jul_26_08:05:49_2011-1--



More information about the freebsd-ports-bugs mailing list