From a765b86d03c442bfbe1144ac4f180c8ff9f543c4 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 22 Sep 2026 11:44:31 +1000 Subject: [PATCH] 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 d4ccbe1ca..278d7c73c 100644 --- a/configure.ac +++ b/configure.ac @@ -1134,8 +1134,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)])