From owner-freebsd-arch@FreeBSD.ORG Tue Jul 20 11:48:55 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9E56106566C; Tue, 20 Jul 2010 11:48:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3DBD78FC14; Tue, 20 Jul 2010 11:48:54 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6KBmp6K048237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jul 2010 14:48:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6KBmoEb087189; Tue, 20 Jul 2010 14:48:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6KBmoH3087188; Tue, 20 Jul 2010 14:48:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 20 Jul 2010 14:48:50 +0300 From: Kostik Belousov To: Scott Long Message-ID: <20100720114850.GE2381@deviant.kiev.zoral.com.ua> References: <20100719213054.GB2381@deviant.kiev.zoral.com.ua> <20100719215746.GC2381@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NfRCDefLLAVdwZEC" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: amd64@freebsd.org, 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: Tue, 20 Jul 2010 11:48:55 -0000 --NfRCDefLLAVdwZEC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 19, 2010 at 04:17:16PM -0600, Scott Long wrote: > Just checked, and I was a little off. We don't actually do this in the > kernel, we override it in the environment UNAME_ variables. All of our > software that wants to look at the machine arch uses uname to do it, > so we go that route. That way, we're not really lying to anything that > wants to get the definitive answer from the hw.machine architecture. > I can't defend it any further than that, maybe Peter or Paul or John > can comment on it. I personally don't see one way as being better than > the other, as they both have potential problems. As you noted in your > previous email, it's an easy change that could have been done long ago; > maybe the fact that it hasn't points to a good reason not to. I know about environment variables affecting uname output, and use it if possible. Unfortunately, there are some situations where environment not propagated to the childs, or explicitely cleaned, e.g. sudo without -E. Or, it is hard to establish environment at the first place. I plan to commit it tomorrow. >=20 >=20 > Scott >=20 >=20 >=20 > On Jul 19, 2010, at 3:57 PM, Kostik Belousov wrote: >=20 > > On Mon, Jul 19, 2010 at 03:52:31PM -0600, Scott Long wrote: > >> We do something similar at yahoo, and it's code that we're working > >> on packaging up to put back into FreeBSD. I don't know how your code > >> differs from ours, and I obviously cannot stop you from committing > >> yours, but you're welcome to look at our code. > > There is obviously no rush to commit this snippet, and I obviously would > > abstain if this would make larger integration harder. > >=20 > > Where to look ? Or should I just sit and wait ? >=20 --NfRCDefLLAVdwZEC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxFjSEACgkQC3+MBN1Mb4iyCACgxnwhT9FJ7RCrhSY68etBSx3i NSIAnRz/niqDmFWHCOD9bo+WEF5J3CXj =vtyI -----END PGP SIGNATURE----- --NfRCDefLLAVdwZEC--