summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-03-14 12:12:16 +0000
committerMike Frysinger <vapier@gentoo.org>2014-03-14 12:12:16 +0000
commit71050dc124e2afe8829cc2fc87f118bfcebe2237 (patch)
tree519e95a6b3d1c882c755c076d1e7d11dbbbd7fcf /net-misc/openssh
parentStable for ppc64, wrt bug #495390 (diff)
downloadhistorical-71050dc124e2afe8829cc2fc87f118bfcebe2237.tar.gz
historical-71050dc124e2afe8829cc2fc87f118bfcebe2237.tar.bz2
historical-71050dc124e2afe8829cc2fc87f118bfcebe2237.zip
Avoid unaligned loads/stores in USE=hpn cipher code #498632 by Bruno.
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64 Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'net-misc/openssh')
-rw-r--r--net-misc/openssh/ChangeLog9
-rw-r--r--net-misc/openssh/Manifest31
-rw-r--r--net-misc/openssh/files/openssh-6.5_p1-hpn-cipher-align.patch101
-rw-r--r--net-misc/openssh/openssh-6.5_p1-r1.ebuild (renamed from net-misc/openssh/openssh-6.5_p1.ebuild)3
4 files changed, 127 insertions, 17 deletions
diff --git a/net-misc/openssh/ChangeLog b/net-misc/openssh/ChangeLog
index f8ee609c46b8..5282f4533820 100644
--- a/net-misc/openssh/ChangeLog
+++ b/net-misc/openssh/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/openssh
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.501 2014/03/14 06:56:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.502 2014/03/14 12:12:13 vapier Exp $
+
+*openssh-6.5_p1-r1 (14 Mar 2014)
+
+ 14 Mar 2014; Mike Frysinger <vapier@gentoo.org>
+ +files/openssh-6.5_p1-hpn-cipher-align.patch, +openssh-6.5_p1-r1.ebuild,
+ -openssh-6.5_p1.ebuild:
+ Avoid unaligned loads/stores in USE=hpn cipher code #498632 by Bruno.
*openssh-6.5_p1 (14 Mar 2014)
diff --git a/net-misc/openssh/Manifest b/net-misc/openssh/Manifest
index 051bd09a86d3..35d4511fe72f 100644
--- a/net-misc/openssh/Manifest
+++ b/net-misc/openssh/Manifest
@@ -23,6 +23,7 @@ AUX openssh-6.3_p1-aes-gcm.patch 367 SHA256 11e57d0b1e0de81b3bef67a026fb6e278807
AUX openssh-6.3_p1-x509-glue.patch 555 SHA256 1166dba2fe590dfee70119ce6dd79f535d7146d0afb8d36bf7a28505ba93a273 SHA512 1a3c2467215dde959fecdd563069d605f29632a7ffc385039a6fc90b2317ca56d463d0abb91a8bb594d321f64456f75a973bb62625deebe92f8787439416b82d WHIRLPOOL f894d19843a3c018efbe3ed365c8abbee52b1d7a3afea11b292a085996fef8d3cc9889a0e6ae596d4db876ed96efcb73d1823a677eac6779f8793c2fb3677cda
AUX openssh-6.3_p1-x509-hpn14v2-glue.patch 1451 SHA256 d7179b3c16edd065977aaf56a410e2b9b237206fb619474f312972b430b73c8d SHA512 02577e3f718ff994bb4e962189f17048b4c03104d0a1981683f3c6a1d6d30701db368e132102c8396da2c0f5eb2f6602b26f32f74d19382af34bd9a93fc508f3 WHIRLPOOL b7d224d71634f380bd31b3a1dd3e588a29582255f717a6a308738ad58b485b693d827a53704479995ec2ebca53c9dc9b2113d8de52a1336b67ce83943f946b77
AUX openssh-6.4_p1-x509-glue.patch 1445 SHA256 cf18f17b12514692a4e33d5fb995f5ba1bc1ea258c80babb38516d8def7d0bc3 SHA512 e5c51fd639e95ca9c7820974684117861cc58cf5172c7c44deaaca106c1e91a931421720cb210652aef30ffa41bc96efe04dbedf996120b40143080fc6b2b47d WHIRLPOOL 7c7065a22cc6237a927e6d6c0f7b4bfa7b57e32ffd8b3d70ed9e70b9a882a95ce40478873374460a6173cc5a33c22ddfbbded783568049f1b4fccb5f5253d4bf
+AUX openssh-6.5_p1-hpn-cipher-align.patch 2835 SHA256 5e9fe4c4fc5963b5136fb2390a53ce6d34d0c9a7525860966437718778896917 SHA512 7ce5ad9f16dca91de08dec8a9aff19a7799430a48a81da4bd9bd1bf6190edb69b9b48f5e2f27cfebf5bbefaaa76aa82e61a8a75d563f4ab44dd0bc64b6895855 WHIRLPOOL c1dca13e928e316b9c98b1ef0453a158bb207a2ae2864b68685c56bec0fc283ab052fe45e866bd9729685ac1edc3af420282a7173a32cff60ef02182e97846f5
AUX openssh-6.5_p1-x509-glue.patch 556 SHA256 2eb5937f7c69c45dd53d7f76eb12f0f6fed3b03cb8a8662b2a7df9de2e724b32 SHA512 0582cad1359bb79f6d529fa0263ab4ecabc9f761cdd7413a40784026055ef53ea1a2763dc0d501f4fbec825175dda055302c3a0d7b83c1dc7c0f4a8d464c7681 WHIRLPOOL d32492975d26e01deb9fd0e91f8df5cb27bb8365e98f17a88acbffab8ae475954fb13fd553b9d46f804d9926b169c472d60a46d0a5b77a6efd9a92270486be8b
AUX openssh-6.5_p1-x509-hpn14v4-glue-p2.patch 1083 SHA256 d8df3c116527c8330e9ca7e4dc05b9a84ab26ef94f9c9db7c4203293a755a1d0 SHA512 7b6e8cc4fc81ea1cff4767316f0d3d5e736a68a97f7d84a388b91bc9351672df3f27263c73f3306cd25f73f5399a4b6c2b2a403290a1e31139e18f4d679a4b4f WHIRLPOOL 90a59e37501d86505b47e73b0bd0d5cb1e726aebab594016234b3de23c1e32c3cb13ae6836887451d29a7c88c2a0dc03626053ce512f8d9977e483e50a225703
AUX sshd.confd 396 SHA256 29c6d57ac3ec6018cadc6ba6cd9b90c9ed46e20049b970fdcc68ee2481a2ee41 SHA512 b9ae816af54a55e134a9307e376f05367b815f1b3fd545c2a2c312d18aedcf907f413e8bad8db980cdd9aad4011a72a79e1e94594f69500939a9cb46287f2f81 WHIRLPOOL 69f43e6192e009a4663d130f7e40ee8b13c6eb9cc7d960b5e0e22f5d477649c88806a9d219efef211f4346582c2bb51e40d230a8191e5953dbe08bfff976ae53
@@ -68,23 +69,23 @@ EBUILD openssh-6.1_p1-r1.ebuild 10300 SHA256 898f55671d0726c3b9c4abccf82311a68ec
EBUILD openssh-6.2_p2-r5.ebuild 9454 SHA256 ed6988f5eaa2242f3344c7aa72bf76d83443881d88cd53b0bd4db7a7384a07cb SHA512 d0ccc242efeae257bffd53af70629c508e948835526496c95428be210f4e9c5ad4508f0198db6406cd3bee13da584faba3ee6677e1e79303d281ba4842fc1cc4 WHIRLPOOL 052e89e2eb50b35f73a13a34e6b67aa19750f883781fb7f4fc2234f8ec7df514308c3583e4afa29d3481bd47a20da0e6c87ea806534b23a6a628ef4b64f80493
EBUILD openssh-6.3_p1-r1.ebuild 9457 SHA256 d6c073899d89a323598e5745cb8f10868eda0a89466e7ee1f2fa04b075d62cc3 SHA512 45a18e1a9b931c7be5d938745ce05de893959f20ef528aebc318491ab840a6aecf304df4e4333f2d900d714b0d5a9a869b668b8cfc649034af3c1c29014df916 WHIRLPOOL 6b0141bcc54178f0577d6d0dad6813560b2a94f1ab389e5ac3e06b019b499ac717ec2e9a9e97f91a1c655fbd251b262ad8990b7504f76649ecbb36de97fb786e
EBUILD openssh-6.4_p1-r1.ebuild 9388 SHA256 504efacf3283016b3db83ce84bc083e300e510d041dc6fa9e41f01564a3dc580 SHA512 2455f68a46403649e401fdbcdeb9e6108f1f16df130240bb256fb96f7395dfe9861c725f02b3b8c709256a2187ec1363d1faae9f21f59b55add0161e96f90de2 WHIRLPOOL 6a59666b7a676f42db67063679d7d68e725dd87d67a8033880fa1605683d45540120a08eb6dd9cd37917e6eb99100e38010754da4c72adeb48b6664da89d5192
-EBUILD openssh-6.5_p1.ebuild 9482 SHA256 c4ce138332ef97a42ff9a93d79d63230022d5517dc96432b4dc5831313aad453 SHA512 5575649ed73beca0375d5e4b5fbc55e1aef56daad0e81b60bf214c4d6819bb373feb4e73a0f694b035a36258de7b8821a768481f01ac441c1c607495c7999e90 WHIRLPOOL 4191624554153d39850c27a08a622ec9ba09c3919fa71fc60d99ef6d1848546bcf57d6bc7640717133780b12c4ad846c7b880e409f95bc0a34f5a48f3e0a9316
-MISC ChangeLog 81892 SHA256 b0d74df96da52446d33dd82694f78d76dd0206ff0741131e9997ee02b7912607 SHA512 2abeb80485033667990b1abec9965c85785c6efe5463d1c77ff257e2c4d9807a76d3ce6bc900a29fd861cdd225315e58a26dab89887a0d4fd22ee2d045d198f7 WHIRLPOOL 09918350f9d4feef6788e7601c10adfb8ed7c68890de4d4f3340f3da2f3be6f5bbdf7d8f1b2de9cd8848e635940288ec65ef4738d5d644ffbc930cba387824fb
+EBUILD openssh-6.5_p1-r1.ebuild 9552 SHA256 9b79a091cedf117855efd741332ea5e34103da48d15ea85c409e482286af5ea8 SHA512 7043320ce4a2f013fadbb88c8489b002c16c2f900e0c24c4b496cd500ea8864c998c3c4aa83a2e03eeb8d7149e279877c486c1f4086ae798678657c64ea1484a WHIRLPOOL 8a86b64bd196e5caf50b6c9bf59308a027c6ebc95a15c395f709f21996247714f8a348fde9612f587033012b98efb2c28383b848451f2ac042f7bc0e27573ae7
+MISC ChangeLog 82150 SHA256 420ac99c869423cc788c80777f0c5289b81859cb8065b343ea6667af375481c0 SHA512 666e81d77683a65be4e2185086f0bb08cf99ebb2cc6393eee18115527495de8d1a8d9a50a2683730899d8ac83fb574d6100294c13595b8ab41c717e5fd2e27b8 WHIRLPOOL a5704d9bf8984ad95aa3d61e876ab5966aad3a93f761523c6ec852e32662ca64e80550e9ddf5f5e3ce2bf63666855cdda710e7295898629addc397f2a48ba4e8
MISC metadata.xml 1837 SHA256 5f8be0245926a5dc8007dd78594febffc68bbcb45306630d027666872e664050 SHA512 76e044611e16ede9bb9697c0ad448c149131f1f20b84ef1000fb77d6cec954abd48542fd26299a372b4411aa0ecb161ed38396b2c3b5c11c71a4bc247e0b23ed WHIRLPOOL 46c8b0f7911fec3ca086e1601cfab5d03e01a7d8cd2069460975545438f6fa5964f138d19a70ec7db7f1f8c9c0fbb48dcec6ee8269fa9d7b432214e9e3e46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QkP05tG/yOsevR3LlOkcdwBS4NInBxXKTGDzCfjq4WZqOCPsjOs6z900q6/E9
+yS/HHwrQvALObPwcBZ/n6ebRdo8qKSN8z25x3jiBrChQuPlgZcch5MwfxIJrud8U
+jfjDjiDB6kH2Tj5s/blT4w1cJ22qaQMcJjc0I+/Apm8Z/TVR+mDnivW6Gr1vR0dR
+oqf/2D7jQw3FSDbM+tSvrKGKDeIiFE4siIGGJrAKdieEOZuzbdmixvmsCkZGa7sc
+YC1jv8z2wAmn/pcz9a2S1brIfHD1okDCecS3uhhzoXBpEoeU53I+M9u3y/+UDJF3
+QWBPNrd6vMOj7k1p2Jj2veeVv75tTbDmHyZr08Ajhxqt9Trckoi7KHFpFoiartq2
+N0SCha+Q99GhmyGmby4wBndlPkygivcRTK58+s1Jfn+VTcIhb9STCrpjDUQgz/j7
+bvmtBqgsh7M1bE/T/R/t
+=fcff
-----END PGP SIGNATURE-----
diff --git a/net-misc/openssh/files/openssh-6.5_p1-hpn-cipher-align.patch b/net-misc/openssh/files/openssh-6.5_p1-hpn-cipher-align.patch
new file mode 100644
index 000000000000..6610f07c35b9
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.5_p1-hpn-cipher-align.patch
@@ -0,0 +1,101 @@
+https://bugs.gentoo.org/498632
+
+make sure we do not use unaligned loads/stores as some arches really hate that.
+
+--- a/cipher-ctr-mt.c
++++ b/cipher-ctr-mt.c
+@@ -58,8 +58,10 @@
+ /* Collect thread stats and print at cancellation when in debug mode */
+ /* #define CIPHER_THREAD_STATS */
+
+-/* Use single-byte XOR instead of 8-byte XOR */
+-/* #define CIPHER_BYTE_XOR */
++/* Can the system do unaligned loads natively? */
++#if defined(__x86_64__) || defined(__i386__)
++# define CIPHER_UNALIGNED_OK
++#endif
+ /*-------------------- END TUNABLES --------------------*/
+
+
+@@ -285,8 +286,18 @@ thread_loop(void *x)
+
+ static int
+ ssh_aes_ctr(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
+- u_int len)
++ size_t len)
+ {
++ typedef union {
++ __uint128_t *u128;
++ uint64_t *u64;
++ uint32_t *u32;
++ uint8_t *u8;
++ const uint8_t *cu8;
++ uintptr_t u;
++ } ptrs_t;
++ ptrs_t destp, srcp, bufp;
++ uintptr_t align;
+ struct ssh_aes_ctr_ctx *c;
+ struct kq *q, *oldq;
+ int ridx;
+@@ -301,35 +312,38 @@ ssh_aes_ctr(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
+ ridx = c->ridx;
+
+ /* src already padded to block multiple */
++ srcp.cu8 = src;
++ destp.u8 = dest;
+ while (len > 0) {
+ buf = q->keys[ridx];
++ bufp.u8 = buf;
+
+-#ifdef CIPHER_BYTE_XOR
+- dest[0] = src[0] ^ buf[0];
+- dest[1] = src[1] ^ buf[1];
+- dest[2] = src[2] ^ buf[2];
+- dest[3] = src[3] ^ buf[3];
+- dest[4] = src[4] ^ buf[4];
+- dest[5] = src[5] ^ buf[5];
+- dest[6] = src[6] ^ buf[6];
+- dest[7] = src[7] ^ buf[7];
+- dest[8] = src[8] ^ buf[8];
+- dest[9] = src[9] ^ buf[9];
+- dest[10] = src[10] ^ buf[10];
+- dest[11] = src[11] ^ buf[11];
+- dest[12] = src[12] ^ buf[12];
+- dest[13] = src[13] ^ buf[13];
+- dest[14] = src[14] ^ buf[14];
+- dest[15] = src[15] ^ buf[15];
++#ifdef CIPHER_UNALIGNED_OK
++ destp.u128[0] = srcp.u128[0] ^ bufp.u128[0];
+ #else
+- *(uint64_t *)dest = *(uint64_t *)src ^ *(uint64_t *)buf;
+- *(uint64_t *)(dest + 8) = *(uint64_t *)(src + 8) ^
+- *(uint64_t *)(buf + 8);
++ /* figure out the alignment on the fly */
++ align = destp.u | srcp.u | bufp.u;
++
++ if ((align & 0xf) == 0) {
++ destp.u128[0] = srcp.u128[0] ^ bufp.u128[0];
++ } else if ((align & 0x7) == 0) {
++ destp.u64[0] = srcp.u64[0] ^ bufp.u64[0];
++ destp.u64[1] = srcp.u64[1] ^ bufp.u64[1];
++ } else if ((align & 0x3) == 0) {
++ destp.u32[0] = srcp.u32[0] ^ bufp.u32[0];
++ destp.u32[1] = srcp.u32[1] ^ bufp.u32[1];
++ destp.u32[2] = srcp.u32[2] ^ bufp.u32[2];
++ destp.u32[3] = srcp.u32[3] ^ bufp.u32[3];
++ } else {
++ size_t i;
++ for (i = 0; i < AES_BLOCK_SIZE; ++i)
++ dest[i] = src[i] ^ buf[i];
++ }
+ #endif
+
+- dest += 16;
+- src += 16;
+- len -= 16;
++ destp.u += AES_BLOCK_SIZE;
++ srcp.u += AES_BLOCK_SIZE;
++ len -= AES_BLOCK_SIZE;
+ ssh_ctr_inc(ctx->iv, AES_BLOCK_SIZE);
+
+ /* Increment read index, switch queues on rollover */
diff --git a/net-misc/openssh/openssh-6.5_p1.ebuild b/net-misc/openssh/openssh-6.5_p1-r1.ebuild
index 200856eff0db..082e94a5abc2 100644
--- a/net-misc/openssh/openssh-6.5_p1.ebuild
+++ b/net-misc/openssh/openssh-6.5_p1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-6.5_p1.ebuild,v 1.1 2014/03/14 06:56:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-6.5_p1-r1.ebuild,v 1.1 2014/03/14 12:12:13 vapier Exp $
EAPI="4"
inherit eutils user flag-o-matic multilib autotools pam systemd versionator
@@ -119,6 +119,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
if [[ -n ${HPN_PATCH} ]] && use hpn; then
epatch "${WORKDIR}"/${HPN_PATCH%.*}
+ epatch "${FILESDIR}"/${PN}-6.5_p1-hpn-cipher-align.patch #498632
save_version HPN
fi