diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2016-09-06 21:54:04 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2016-09-06 21:54:23 -0700 |
commit | fdc9882838209d6a427031ad87a79fa18a443851 (patch) | |
tree | 0bee96cb43d461bbae86801d6904a98172aaf09e /net-misc | |
parent | dev-ruby/patron: add 0.8.0 (diff) | |
download | gentoo-fdc9882838209d6a427031ad87a79fa18a443851.tar.gz gentoo-fdc9882838209d6a427031ad87a79fa18a443851.tar.bz2 gentoo-fdc9882838209d6a427031ad87a79fa18a443851.zip |
net-misc/openssh: Add a workaround to HPN for the OSX threading implemntation
The MT AES-CTR has a section of code that compares the currently running thread's
thread id with the first thread created. It seems on OSX, the first thread will
sometimes run before the thread ID is filled in (hence is zero), so this test
will fail, and the initialization code does not get run. This makes the test
also check if the thread ID of the first thread is 0, and run the initialization
code in that case as well.
Package-Manager: portage-2.3.0
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/openssh/files/openssh-7.3_p1-hpn-update.patch | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net-misc/openssh/files/openssh-7.3_p1-hpn-update.patch b/net-misc/openssh/files/openssh-7.3_p1-hpn-update.patch index 980a666f4924..8ae29e1e0551 100644 --- a/net-misc/openssh/files/openssh-7.3_p1-hpn-update.patch +++ b/net-misc/openssh/files/openssh-7.3_p1-hpn-update.patch @@ -1,5 +1,5 @@ --- openssh-7_2_P2-hpn-14.10.diff.orig 2016-09-01 10:34:05.905112131 -0700 -+++ openssh-7_2_P2-hpn-14.10.diff 2016-09-06 19:35:24.308215237 -0700 ++++ openssh-7_2_P2-hpn-14.10.diff 2016-09-06 21:49:35.583704017 -0700 @@ -156,145 +156,6 @@ compat.o crc32.o deattack.o fatal.o hostfile.o \ log.o match.o md-sha256.o moduli.o nchan.o packet.o opacket.o \ @@ -155,6 +155,15 @@ +/* + * OpenSSH Multi-threaded AES-CTR Cipher + * +@@ -737,7 +598,7 @@ + + * Handle the special case of startup, one thread must fill + + * the first KQ then mark it as draining. Lock held throughout. + + */ +-+ if (pthread_equal(pthread_self(), c->tid[0])) { +++ if (pthread_equal(pthread_self(), c->tid[0]) || c->tid[0] == 0) { + + q = &c->q[0]; + + pthread_mutex_lock(&q->lock); + + if (q->qstate == KQINIT) { @@ -790,6 +651,7 @@ + * can see that it's being filled. + */ |