From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 25 19:50:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E7FB9641 for ; Wed, 25 Sep 2013 19:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C8A642F1B for ; Wed, 25 Sep 2013 19:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8PJo0OL099205 for ; Wed, 25 Sep 2013 19:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8PJo02S099204; Wed, 25 Sep 2013 19:50:00 GMT (envelope-from gnats) Resent-Date: Wed, 25 Sep 2013 19:50:00 GMT Resent-Message-Id: <201309251950.r8PJo02S099204@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jukka Ukkonen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3022C46F for ; Wed, 25 Sep 2013 19:41:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 040E42E91 for ; Wed, 25 Sep 2013 19:41:56 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r8PJftev031122 for ; Wed, 25 Sep 2013 19:41:55 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r8PJftgR031117; Wed, 25 Sep 2013 19:41:55 GMT (envelope-from nobody) Message-Id: <201309251941.r8PJftgR031117@oldred.freebsd.org> Date: Wed, 25 Sep 2013 19:41:55 GMT From: Jukka Ukkonen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/182382: sysctl to set TCP CC method on BIG ENDIAN systems fails X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 19:50:01 -0000 >Number: 182382 >Category: kern >Synopsis: sysctl to set TCP CC method on BIG ENDIAN systems fails >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 25 19:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Jukka Ukkonen >Release: 9.2-PRERELEASE >Organization: ----- >Environment: FreeBSD yggdrasil 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 r255867M: Wed Sep 25 12:57:17 EEST 2013 root@yggdrasil:/usr/obj/usr/src/sys/GENERIC powerpc >Description: sysctl net.inet.tcp.cc.algorithm=...anything... fails on big endian systems. On a PowerPC it only complains... net.inet.tcp.cc.algorithm=htcp: No such process It does not matter what one put in place of "htcp" as the new default CC method. The complaint will always be otherwise exactly the same. All of the required modules are there... 10 7 0xd1a00000 12000 h_ertt.ko 11 1 0xd1a12000 14000 cc_cdg.ko 12 1 0xd1a26000 12000 cc_htcp.ko 13 1 0xd1a38000 12000 cc_cubic.ko 14 1 0xd1a4a000 12000 cc_vegas.ko 15 1 0xd1a5c000 12000 cc_hd.ko 16 1 0xd1a6e000 13000 cc_chd.ko but the CC method will not change. It seems that on PowerPC in the kernel function cc_default_algo() req->newptr will point to a whole lot of \xff bytes. On a sparc64 system the kernel will instantly panic with an MMU error message. On a PPC which is less pedantic about memory reference alignments and stuff one will only get a ESRCH in return, because a landslide of "\xff\xff..." usw. does not match any of the known CC method names. See kern/178079, which someone has marked as networking specific error, for a similar complaint about Sparc64. Notice that this is NOT about networking as such. This is about getting wrong data in the call arguments passed from sysctl() proper to the CC specific function. So, this is about sysctl() internals, not about networking. >How-To-Repeat: Try ... sysctl net.inet.tcp.cc.algorithm=htcp or use your pet CC method name in place of htcp. (cubic, vegas, cdg, chd, ...) Doing this on a PowerPC will only fail to change your CC method. Do this on a Sparc64 and meet Mr. Panic Reboot. >Fix: Not known yet. >Release-Note: >Audit-Trail: >Unformatted: