From owner-freebsd-amd64@FreeBSD.ORG Tue Jul 20 18:17:12 2010 Return-Path: Delivered-To: amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B147E106567B for ; Tue, 20 Jul 2010 18:17:12 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 680C38FC1E for ; Tue, 20 Jul 2010 18:17:12 +0000 (UTC) Received: by ywf9 with SMTP id 9so696548ywf.13 for ; Tue, 20 Jul 2010 11:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=hziPvfyRd1ng0BjCPJVIPXK3XBtkxtO8ZQgYTtn2lgQ=; b=iGR5pGzKjSTcDaEF/ed3BUMneZPv/x4ISokbfKB7aoYkx0PzoI6l9OmCk2RmKKcMfY 2H9GBordPMfpLqaYbHFJGm/8xKTDbD4SY5Dsg/CYVNA9sSMH2OojNL8kwEFWfaFRnvs2 Mns045hXOMg3+7zL3m95/9+ALAHIolKi6oh0Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=EO/hx2/VgIw8tTs9iSTtI4P/zbDaCqP/8kDGbn/ySkdsyUDhA3HVwOnCoxLmmWB4fn vUJvEIx+KikereabKv8tW3JQ/9OZPgDH2QWhs45pL/ufP17jb71SkQUnp/2TOpP2dmqj XIXWyScqfAFTE415JV4AqDJVrWwMknPYRGE2Q= MIME-Version: 1.0 Received: by 10.150.214.11 with SMTP id m11mr698798ybg.315.1279648287133; Tue, 20 Jul 2010 10:51:27 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.231.169.18 with HTTP; Tue, 20 Jul 2010 10:51:27 -0700 (PDT) In-Reply-To: <201007200907.24715.jhb@freebsd.org> References: <20100719213054.GB2381@deviant.kiev.zoral.com.ua> <201007200907.24715.jhb@freebsd.org> Date: Tue, 20 Jul 2010 10:51:27 -0700 X-Google-Sender-Auth: rLpPLJW_ZxNxl4vYjyckGykUX0g Message-ID: From: Garrett Cooper To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 20 Jul 2010 18:23:36 +0000 Cc: amd64@freebsd.org, freebsd-arch@freebsd.org Subject: Re: uname -m/-p for compat32 binaries X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:17:12 -0000 On Tue, Jul 20, 2010 at 6:07 AM, 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? =A0It = looks > fine to me. =A0I suspect Y! used the UNAME_* approach as it didn't add ye= t- > another local diff to maintain in the kernel, and the uname fixes at Y! m= ight > have predated SCTL_MASK32. I thought amd64 was a special case because we run biarch, whereas ia64 was always 64-bit... Wouldn't this change also create problems later on down the line when we're no longer biarch? Thanks, -Garrett