[openssh-commits] [openssh] 01/02: Remove the NetBSD BROKEN_READ_COMPARISON workaround.

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Sep 22 14:26:32 AEST 2026


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch V_10_5
in repository openssh.

commit 3372299a51672fbc87f5001682c7ddcd8a47a0ef
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Tue Sep 22 11:44:31 2026 +1000

    Remove the NetBSD BROKEN_READ_COMPARISON workaround.
    
    It does not seem to be needed on current versions, and it can cause
    pre-auth CPU spinning now that we're using atomicio() in the banner
    exchange.  ok djm@
---
 atomicio.c   | 4 ----
 configure.ac | 2 --
 2 files changed, 6 deletions(-)

diff --git a/atomicio.c b/atomicio.c
index 58a9512d3..ac1f0a317 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -51,11 +51,7 @@ atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n,
 	struct pollfd pfd;
 
 	pfd.fd = fd;
-#ifndef BROKEN_READ_COMPARISON
 	pfd.events = f == read ? POLLIN : POLLOUT;
-#else
-	pfd.events = POLLIN|POLLOUT;
-#endif
 	while (n > pos) {
 		res = (f) (fd, s + pos, n - pos);
 		switch (res) {
diff --git a/configure.ac b/configure.ac
index a0fc91a37..7e0399198 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1145,8 +1145,6 @@ mips-sony-bsd|mips-sony-newsos4)
 	AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
 	    [Prepend the address family to IP tunnel traffic])
 	TEST_MALLOC_OPTIONS="AJRX"
-	AC_DEFINE([BROKEN_READ_COMPARISON], [1],
-	    [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it])
 	;;
 *-*-freebsd*)
 	AC_DEFINE([LOCKED_PASSWD_PREFIX], ["*LOCKED*"], [Account locked with pw(1)])

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list