From owner-freebsd-arch@FreeBSD.ORG Wed Jul 21 21:30:18 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20D7A1065677; Wed, 21 Jul 2010 21:30:18 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id D2DF68FC13; Wed, 21 Jul 2010 21:30:17 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id CE870582C9; Wed, 21 Jul 2010 16:30:16 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id nwSzQnmcP3xj; Wed, 21 Jul 2010 16:30:16 -0500 (CDT) Received: from wanderer.tachypleus.net (mar92-14-88-173-196-182.fbx.proxad.net [88.173.196.182]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 8AFE8582C8; Wed, 21 Jul 2010 16:30:15 -0500 (CDT) Message-ID: <4C4766DA.3020807@freebsd.org> Date: Wed, 21 Jul 2010 16:30:02 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100627 Thunderbird/3.0.5 MIME-Version: 1.0 To: Kostik Belousov References: <20100719213054.GB2381@deviant.kiev.zoral.com.ua> <201007200907.24715.jhb@freebsd.org> <4C460BB9.1060009@freebsd.org> <20100721120028.GM2381@deviant.kiev.zoral.com.ua> In-Reply-To: <20100721120028.GM2381@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: amd64@freebsd.org, freebsd-arch@freebsd.org Subject: Re: uname -m/-p for compat32 binaries X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 21:30:18 -0000 On 07/21/10 07:00, Kostik Belousov wrote: > On Tue, Jul 20, 2010 at 03:48:57PM -0500, Nathan Whitehorn wrote: > >> On 07/20/10 08:07, John Baldwin wrote: >> >>> On Monday, July 19, 2010 5:30:54 pm Kostik Belousov wrote: >>> >>> >>>> Hi, >>>> I intend to commit the following change, that makes sysctls >>>> hw.machine_arch and hw.machine to return "i386" for 32 bit >>>> binaries run on amd64. In particular, 32 bit uname -m and uname -p >>>> print "i386", that is good for i386 jails on amd64 kernels. >>>> >>>> I find the change very useful for me, but I wonder why such trivial >>>> modification is not yet done. Can anybody note a possible fallout from >>>> it ? >>>> >>>> >>> Presumably ia64 and powerpc64 would need a similar change as well? It >>> looks >>> fine to me. I suspect Y! used the UNAME_* approach as it didn't add yet- >>> another local diff to maintain in the kernel, and the uname fixes at Y! >>> might >>> have predated SCTL_MASK32. >>> >>> >> Maybe it makes sense to define a MACHINE_ARCH32 in machine/param.h, as >> is done for ELF_ARCH32 in machine/elf.h? This would keep the MI code in >> the kernel MI, and ever-so-slightly simplify implementation for ia64, >> mips, and powerpc64. Thanks for doing this! >> > See below. Also, I painted red another wall, adding a sysctl to turn > the adaptive behaviour off. > > I quite like the shade you've chosen! -Nathan