hiren@/jmg@ noted that the output from certain sysctls appears to be broken in recent versions of CURRENT. In particular, it seems to be returning a single nul terminated string instead of a full string for net.inet.tcp.cc.algorithm (and friends): $ uname -o -r FreeBSD 9.2-RELEASE-p10 $ sysctl net.inet.tcp.cc.algorithm net.inet.tcp.cc.algorithm: newreno # uname -a FreeBSD isilon-fuji-current.local 11.0-CURRENT FreeBSD 11.0-CURRENT #16 r268804+343692e(isilon-atf): Mon Jul 14 12:17:25 PDT 2014 root@isilon-fuji-current.local:/usr/obj/usr/src/sys/FUJI i386 # sysctl net.inet.tcp.cc.algorithm net.inet.tcp.cc.algorithm: n Is some of the new code after recent sysctl(9) refactoring not properly dereferencing memory?
A commit references this bug: Author: hselasky Date: Sun Aug 10 07:51:55 UTC 2014 New revision: 269777 URL: http://svnweb.freebsd.org/changeset/base/269777 Log: Fix string length argument passed to "sysctl_handle_string()" so that the complete string is returned by the function and not just only one byte. PR: 192544 MFC after: 2 weeks Changes: head/sys/netinet/cc/cc.c
Hi, This is a bug in the network driver code and not in the sysctl patch. Anyhow, please test the patch above. --HPS
Renaming title to reflect actual issue.
(In reply to Hans Petter Selasky from comment #2) > Hi, This is a bug in the network driver code and not in the sysctl patch. > Anyhow, please test the patch above. The patch looks ok for net.inet.tcp.cc ; I did code inspection for other potential affected areas but I didn't find any [at first glance].
A commit references this bug: Author: hselasky Date: Wed Aug 27 14:07:24 UTC 2014 New revision: 270711 URL: http://svnweb.freebsd.org/changeset/base/270711 Log: MFC r269777: Fix string length argument passed to "sysctl_handle_string()" so that the complete string is returned by the function and not just only one byte. PR: 192544 Changes: _U stable/10/ stable/10/sys/netinet/cc/cc.c
A commit references this bug: Author: hselasky Date: Wed Aug 27 14:11:26 UTC 2014 New revision: 270712 URL: http://svnweb.freebsd.org/changeset/base/270712 Log: MFC r269777: Fix string length argument passed to "sysctl_handle_string()" so that the complete string is returned by the function and not just only one byte. PR: 192544 Changes: _U stable/9/sys/ stable/9/sys/netinet/cc/cc.c
A commit references this bug: Author: hselasky Date: Wed Aug 27 14:13:48 UTC 2014 New revision: 270713 URL: http://svnweb.freebsd.org/changeset/base/270713 Log: MFC r269777: Fix string length argument passed to "sysctl_handle_string()" so that the complete string is returned by the function and not just only one byte. PR: 192544 Changes: _U stable/8/sys/ _U stable/8/sys/netinet/ stable/8/sys/netinet/cc/cc.c
Please re-open if still an issue. Thank you! --HPS