1 |
commit: fdc9882838209d6a427031ad87a79fa18a443851 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 7 04:54:04 2016 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 7 04:54:23 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdc98828 |
7 |
|
8 |
net-misc/openssh: Add a workaround to HPN for the OSX threading implemntation |
9 |
|
10 |
The MT AES-CTR has a section of code that compares the currently running thread's |
11 |
thread id with the first thread created. It seems on OSX, the first thread will |
12 |
sometimes run before the thread ID is filled in (hence is zero), so this test |
13 |
will fail, and the initialization code does not get run. This makes the test |
14 |
also check if the thread ID of the first thread is 0, and run the initialization |
15 |
code in that case as well. |
16 |
|
17 |
Package-Manager: portage-2.3.0 |
18 |
|
19 |
net-misc/openssh/files/openssh-7.3_p1-hpn-update.patch | 11 ++++++++++- |
20 |
1 file changed, 10 insertions(+), 1 deletion(-) |
21 |
|
22 |
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 |
23 |
index 980a666..8ae29e1 100644 |
24 |
--- a/net-misc/openssh/files/openssh-7.3_p1-hpn-update.patch |
25 |
+++ b/net-misc/openssh/files/openssh-7.3_p1-hpn-update.patch |
26 |
@@ -1,5 +1,5 @@ |
27 |
--- openssh-7_2_P2-hpn-14.10.diff.orig 2016-09-01 10:34:05.905112131 -0700 |
28 |
-+++ openssh-7_2_P2-hpn-14.10.diff 2016-09-06 19:35:24.308215237 -0700 |
29 |
++++ openssh-7_2_P2-hpn-14.10.diff 2016-09-06 21:49:35.583704017 -0700 |
30 |
@@ -156,145 +156,6 @@ |
31 |
compat.o crc32.o deattack.o fatal.o hostfile.o \ |
32 |
log.o match.o md-sha256.o moduli.o nchan.o packet.o opacket.o \ |
33 |
@@ -155,6 +155,15 @@ |
34 |
+/* |
35 |
+ * OpenSSH Multi-threaded AES-CTR Cipher |
36 |
+ * |
37 |
+@@ -737,7 +598,7 @@ |
38 |
+ + * Handle the special case of startup, one thread must fill |
39 |
+ + * the first KQ then mark it as draining. Lock held throughout. |
40 |
+ + */ |
41 |
+-+ if (pthread_equal(pthread_self(), c->tid[0])) { |
42 |
+++ if (pthread_equal(pthread_self(), c->tid[0]) || c->tid[0] == 0) { |
43 |
+ + q = &c->q[0]; |
44 |
+ + pthread_mutex_lock(&q->lock); |
45 |
+ + if (q->qstate == KQINIT) { |
46 |
@@ -790,6 +651,7 @@ |
47 |
+ * can see that it's being filled. |
48 |
+ */ |