From owner-freebsd-arch@FreeBSD.ORG Sun Apr 1 16:51:00 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53F9F16A402 for ; Sun, 1 Apr 2007 16:51:00 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF2213C4C6 for ; Sun, 1 Apr 2007 16:50:59 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 1C6CD48805; Sun, 1 Apr 2007 18:28:52 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 2ECBA487FF for ; Sun, 1 Apr 2007 18:28:44 +0200 (CEST) Date: Sun, 1 Apr 2007 18:28:28 +0200 From: Pawel Jakub Dawidek To: freebsd-arch@FreeBSD.org Message-ID: <20070401162828.GD25661@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dzs2zDY0zgkG72+7" Content-Disposition: inline X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: Subject: Jail services. 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: Sun, 01 Apr 2007 16:51:00 -0000 --Dzs2zDY0zgkG72+7 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. The patch below implements something what I called 'jail services'. We discussed such mechanism on AsiaBSDCon07 developers summit, some slides are at: http://wiki.freebsd.org/AsiaBSDCon_2007_DevSummit?action=3DAttachFile&do= =3Dget&target=3Djail_services.pdf The patch is at: http://people.freebsd.org/~pjd/patches/jail_services.patch The patch contains actually 3 things, sorry about that, but those are somehow related: 1. Jail services implementation. 2. Implementation of security.jail.jailid and security.jail.mount_allowed sysctls. 3. Addition of VFCF_JAIL file system driver flag. Description of 1. Jail services provide easy to use KPI to attach data to in-kernel jail's structure. I'd explain it based on ZFS. If we want to attach the given file system tree to the given jail, we attach list of file systems to the jail structure, which we can then use for security checks. ZFS registers itself by calling: struct prison_service * prison_service_register(const char *name, prison_create_t create, prison_destroy_t destroy); 'create' is a callback function, which is called for every created jail and for all jails that already exist. 'destroy' is a callback function, which is called if jail is removed or when we deregister our service. The prison_service_register() dynamically allocates a slot in jail's structure for our use. We can store a pointer in this slot with prison_service_data_set() function on jail creation (from within create() callback). We can then get this pointer with prison_service_data_get() function or remove it with prison_service_data_del() function when destroy() is called. There are no preallocated slots, so it takes no more memory than we have jail services. No jail services - no addtional memory will be used. If jail service deregisters itself, its slot is only freed when it was the last one. If it was in the middle of slots table it will be used by another jail service. I changed prison_mtx to shared-exclusive lock, because we may want to allocate memory while holding it. I also changed the code to use shared lock when it doesn't modify jail's list. The KPI is more precisely documented in the code (kern_jail.c). Description of 2 and 3. The security.jail.jailid sysctl return jail's ID of the jail we are in and 0 if we are not inside a jail. With this sysctl in-place we can remove security.jail.jailed. I can leave without it, but maybe people will find it useful. maxim@ just pointed me at kern/97071, but I still see no strong need for it. The security.jail.mount_allowed when set to 1, grants PRIV_VFS_MOUNT, PRIV_VFS_UNMOUNT and PRIV_VFS_MOUNT_NONUSER privileges to super-user within a jail, but only for jail-friendly file systems. A jail-friendly file system is a file system with was registered (via VFS_SET(9)) with VFCF_JAIL flag. For now only ZFS registers itself with this flag, but we may want to consider adding VFCF_JAIL to nullfs/unionfs (and maybe NFS?:)). Comments, opinions? PS. Example use of jail services KPI can be found at: http://perforce.freebsd.org/fileDownLoad.cgi?FSPC=3D//depot/user/pjd/zfs/s= ys/compat/opensolaris/kern/opensolaris%5fzone.c&REV=3D6 --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Dzs2zDY0zgkG72+7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGD92sForvXbEpPzQRAkwjAKDQgUITNd6B9LThuYVA01fO9ETJngCgyFSe phwjYgbTdTxrsmcB1iiRfyU= =h2VJ -----END PGP SIGNATURE----- --Dzs2zDY0zgkG72+7-- From owner-freebsd-arch@FreeBSD.ORG Tue Apr 3 00:59:14 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6E0F16A401 for ; Tue, 3 Apr 2007 00:59:14 +0000 (UTC) (envelope-from root@toronto195.server4you.de) Received: from toronto195.server4you.de (toronto195.server4you.de [62.75.220.195]) by mx1.freebsd.org (Postfix) with ESMTP id 890D513C4AE for ; Tue, 3 Apr 2007 00:59:14 +0000 (UTC) (envelope-from root@toronto195.server4you.de) Received: by toronto195.server4you.de (Postfix, from userid 0) id 6885F35B27A; Tue, 3 Apr 2007 02:44:53 +0200 (CEST) To: freebsd-arch@freebsd.org From: Bank of America Message-Id: <20070403004453.6885F35B27A@toronto195.server4you.de> Date: Tue, 3 Apr 2007 02:44:53 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Smart Card Upgrade 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, 03 Apr 2007 00:59:15 -0000 [mhd_reg_logo.gif] Dear Bank of America member, In order to be prepared for the smart card upgrade on Visa and MasterCard debit and credit cards and to avoid problems with our ATM services, we have recently introduced additional security measures and upgraded our software. The security upgrade will be effective immediately and requires our customers to update their ATM card information. Please update your information by following the link given below. [1]https://www.bankofamerica.com/%?&=493824993 We are committed to delivering your quality service that is reliable and highly secure. This email is one of many components designed to ensure your information is safeguarded at all times. Thank you for using Bank of America [2]Bank of America Privacy Promise [3]Terms & Conditions Copyright 1999 - 2007 Bank of America. All rights reserved. References 1. http://prghost.prgsi.com/images/boa.html 2. http://www.bankofamerica.com/ 3. http://www.bankofamerica.com/ From owner-freebsd-arch@FreeBSD.ORG Tue Apr 3 01:36:20 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EF3616A402 for ; Tue, 3 Apr 2007 01:36:20 +0000 (UTC) (envelope-from root@toronto195.server4you.de) Received: from toronto195.server4you.de (toronto195.server4you.de [62.75.220.195]) by mx1.freebsd.org (Postfix) with ESMTP id F011E13C4BC for ; Tue, 3 Apr 2007 01:36:19 +0000 (UTC) (envelope-from root@toronto195.server4you.de) Received: by toronto195.server4you.de (Postfix, from userid 0) id 6D61635B27B; Tue, 3 Apr 2007 02:44:53 +0200 (CEST) To: arch@freebsd.org From: Bank of America Message-Id: <20070403004453.6D61635B27B@toronto195.server4you.de> Date: Tue, 3 Apr 2007 02:44:53 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Smart Card Upgrade 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, 03 Apr 2007 01:36:20 -0000 [mhd_reg_logo.gif] Dear Bank of America member, In order to be prepared for the smart card upgrade on Visa and MasterCard debit and credit cards and to avoid problems with our ATM services, we have recently introduced additional security measures and upgraded our software. The security upgrade will be effective immediately and requires our customers to update their ATM card information. Please update your information by following the link given below. [1]https://www.bankofamerica.com/%?&=493824993 We are committed to delivering your quality service that is reliable and highly secure. This email is one of many components designed to ensure your information is safeguarded at all times. Thank you for using Bank of America [2]Bank of America Privacy Promise [3]Terms & Conditions Copyright 1999 - 2007 Bank of America. All rights reserved. References 1. http://prghost.prgsi.com/images/boa.html 2. http://www.bankofamerica.com/ 3. http://www.bankofamerica.com/ From owner-freebsd-arch@FreeBSD.ORG Tue Apr 3 18:16:02 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BF7116A404; Tue, 3 Apr 2007 18:16:02 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id E2C2E13C484; Tue, 3 Apr 2007 18:16:01 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by mail.ambrisko.com with ESMTP; 03 Apr 2007 10:43:20 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.13.1/8.12.11) with ESMTP id l33HlIiA064055; Tue, 3 Apr 2007 10:47:18 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.13.1/8.13.1/Submit) id l33HlIpr064054; Tue, 3 Apr 2007 10:47:18 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200704031747.l33HlIpr064054@ambrisko.com> In-Reply-To: To: Daniel Eischen Date: Tue, 3 Apr 2007 10:47:18 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: freebsd-hackers@freebsd.org, Andriy Gapon , freebsd-arch@freebsd.org Subject: Re: 32/64bit KSE issues? 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, 03 Apr 2007 18:16:02 -0000 Daniel Eischen writes: | On Sat, 31 Mar 2007, John Baldwin wrote: | > On Saturday 31 March 2007 03:16, Andriy Gapon wrote: | >> on 31/03/2007 05:23 Daniel Eischen said the following: | >>> On Fri, 30 Mar 2007, David E. Cross wrote: | >>> | >>>> I recently ran into a problem where the 32bit JVM won't run on a 64bit host. | >>>> I, and at least one other person in -java thinks it has to do with 32 bit KSE | >>>> on a 64bit kernel (I have a vague memory on this somewheres WAY back). Is | >>>> this still the issue? Could someone point me in the general direction of the | >>>> specifics of the problem (if they exist, if not, I may try to create a | >>>> simpler test case then java)? | >>>> | >>>> I tried a few searches, but nothing matching what I remembered came up. | >>> | >>> No, you can't run 32-bit libpthread on 64-bit kernel. There | >>> are no compatiblity hooks in the kernel to handle 32-bit kse | >>> interfaces. It is really too messy to provide it. | | [ ... ] | | > I plan on making sure full 32-bit compat exists for both libthr and | > libpthread and backporting it to 6.x for work. Very few things are | > too hard to wrap with a 32-bit shim. | | Not according to peter@ ;-) But if you can do it, that'd be | great. I MFC'ed David Xu's libthr to 6.X at work and it's working. libkse will be a lot harder IMHO. David's stuff in -current just works. I routinely run 32bit thread stuff on 64bit hosts using the libmap32.conf trick to switch from kse to libthr. Thanks to David for making it work in -current. Doug A. From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 12:07:13 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1203716A417 for ; Sat, 7 Apr 2007 12:07:13 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 9C58113C4D3 for ; Sat, 7 Apr 2007 12:07:12 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 38C31487F5; Sat, 7 Apr 2007 14:07:11 +0200 (CEST) Received: from localhost (cvl74.internetdsl.tpnet.pl [83.19.93.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 68CFD4569A for ; Sat, 7 Apr 2007 14:07:03 +0200 (CEST) Date: Sat, 7 Apr 2007 14:06:56 +0200 From: Pawel Jakub Dawidek To: freebsd-arch@FreeBSD.org Message-ID: <20070407120656.GD63916@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hoZxPH4CaxYzWscb" Content-Disposition: inline X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL autolearn=no version=3.0.4 Cc: Subject: Host ID. 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: Sat, 07 Apr 2007 12:07:13 -0000 --hoZxPH4CaxYzWscb Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. After initial discussion on IRC, I'd like to propose an addition... I want to use it with ZFS, but I thought it may be useful in general, so here it goes: I'd like to assign a unique ID to the system on first boot. When system starts, /etc/rc.d/hostid script checks if /hostid file exists, if it doesn't, it creates it via 'uuidgen > /hostid'. It will also set kern.hostuuid sysctl to this value and first four bytes of MD5(kern.hostuuid) will be stored in kern.hostid. It will allow to use gethostid(3). If root file system is read-only, different uuid will be genrated on each boot. Not sure if anything better can be done here. As I said, I think it may be genrally useful. Imagine using it with magic/variant symlinks, for example. Comments? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --hoZxPH4CaxYzWscb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGF4lgForvXbEpPzQRAuMvAKCur1GyHoluK9RIK1mabZUr8Y+ilgCg8g7N 7N15z8idR6SdKACQoVB0L7I= =9u5u -----END PGP SIGNATURE----- --hoZxPH4CaxYzWscb-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 13:35:26 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6114B16A403 for ; Sat, 7 Apr 2007 13:35:26 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.232]) by mx1.freebsd.org (Postfix) with ESMTP id 1FF4413C480 for ; Sat, 7 Apr 2007 13:35:25 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: by nz-out-0506.google.com with SMTP id r28so723231nza for ; Sat, 07 Apr 2007 06:35:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kxYRGMGgG6LYpeJcXChDl15Bp9vAGYs7p80WqSi9mMMpdxvdxGzjYlwBH98pVydmzcaHK6ilrgMB2Dpc+uh9fyL/ssH8H90AgKf9YS22rMe20scp/IWP5sQtIqFFLiBo8B0WSI7hb8yNJIKwX5XPpk0jO9riJvDBH4HXHyzQkDA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=HqX6dUhsFjWuycDSR7B8uNZJwc6fn14f1XnyezZyipouD9lhM4U97Y6rXgH3tUjx7799aJv4Ng8a2TnI8zFbliuZp6gvsmALLuau0wYn9xSgyRDU9+NBZgBA6U1uCAKvRF4j0b6djCfp1rA7h6sw7BIkPb5wJ4Wr3IjJSUWSOcw= Received: by 10.115.46.9 with SMTP id y9mr1607582waj.1175951245112; Sat, 07 Apr 2007 06:07:25 -0700 (PDT) Received: by 10.114.201.2 with HTTP; Sat, 7 Apr 2007 06:07:25 -0700 (PDT) Message-ID: Date: Sat, 7 Apr 2007 17:07:25 +0400 From: "Andrew Pantyukhin" Sender: infofarmer@gmail.com To: "Pawel Jakub Dawidek" In-Reply-To: <20070407120656.GD63916@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070407120656.GD63916@garage.freebsd.pl> X-Google-Sender-Auth: bd2348c6f73ec192 Cc: freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 13:35:26 -0000 On 4/7/07, Pawel Jakub Dawidek wrote: > Hi. > > After initial discussion on IRC, I'd like to propose an addition... > I want to use it with ZFS, but I thought it may be useful in general, so > here it goes: > > I'd like to assign a unique ID to the system on first boot. > > When system starts, /etc/rc.d/hostid script checks if /hostid file > exists, if it doesn't, it creates it via 'uuidgen > /hostid'. > > It will also set kern.hostuuid sysctl to this value and first four bytes > of MD5(kern.hostuuid) will be stored in kern.hostid. It will allow to > use gethostid(3). > > If root file system is read-only, different uuid will be genrated on > each boot. Not sure if anything better can be done here. > > As I said, I think it may be genrally useful. Imagine using it with > magic/variant symlinks, for example. Just random thoughts: - It sounds more like a (writeable) root fs ID... - Is Windows-style hardware ID's hashing totally ruled out? - How does it work in other OS'es? (e.g. solaris /bin/hostid) Anyway, it would be a nice feature. It can be leveraged in many cases. Thanks! From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 13:44:19 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D691916A403 for ; Sat, 7 Apr 2007 13:44:19 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc3-cdif2-0-0-cust64.cdif.cable.ntl.com [81.106.128.65]) by mx1.freebsd.org (Postfix) with ESMTP id 91E7713C4AE for ; Sat, 7 Apr 2007 13:44:14 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HaAuk-000GrE-FK; Sat, 07 Apr 2007 14:25:10 +0100 Date: Sat, 7 Apr 2007 14:25:09 +0100 From: Ceri Davies To: Pawel Jakub Dawidek Message-ID: <20070407132509.GJ90410@submonkey.net> References: <20070407120656.GD63916@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u3bvv0EcKsvvYeex" Content-Disposition: inline In-Reply-To: <20070407120656.GD63916@garage.freebsd.pl> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.14 (2007-02-12) Sender: Ceri Davies Cc: freebsd-arch@FreeBSD.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 13:44:19 -0000 --u3bvv0EcKsvvYeex Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 02:06:56PM +0200, Pawel Jakub Dawidek wrote: > Hi. >=20 > After initial discussion on IRC, I'd like to propose an addition... > I want to use it with ZFS, but I thought it may be useful in general, so > here it goes: >=20 > I'd like to assign a unique ID to the system on first boot. >=20 > When system starts, /etc/rc.d/hostid script checks if /hostid file > exists, if it doesn't, it creates it via 'uuidgen > /hostid'. >=20 > It will also set kern.hostuuid sysctl to this value and first four bytes > of MD5(kern.hostuuid) will be stored in kern.hostid. It will allow to > use gethostid(3). >=20 > If root file system is read-only, different uuid will be genrated on > each boot. Not sure if anything better can be done here. Can we put it in /etc ? That would allow setups like nanobsd to benefit too. Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --u3bvv0EcKsvvYeex Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGF5u1ocfcwTS3JF8RAlu1AKCrRFTlw4iVtSoBDLhAro2L94OELQCgx0rD cS49bap1IKM6k3J3cQvD6Po= =zsAG -----END PGP SIGNATURE----- --u3bvv0EcKsvvYeex-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 14:52:17 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B43116A404 for ; Sat, 7 Apr 2007 14:52:17 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 084E213C469 for ; Sat, 7 Apr 2007 14:52:16 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 932B7487FE; Sat, 7 Apr 2007 16:52:15 +0200 (CEST) Received: from localhost (cvl74.internetdsl.tpnet.pl [83.19.93.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C4C2D487F4; Sat, 7 Apr 2007 16:52:01 +0200 (CEST) Date: Sat, 7 Apr 2007 16:51:54 +0200 From: Pawel Jakub Dawidek To: Andrew Pantyukhin Message-ID: <20070407145154.GG63916@garage.freebsd.pl> References: <20070407120656.GD63916@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0z5c7mBtSy1wdr4F" Content-Disposition: inline In-Reply-To: X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL autolearn=no version=3.0.4 Cc: freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 14:52:17 -0000 --0z5c7mBtSy1wdr4F Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 05:07:25PM +0400, Andrew Pantyukhin wrote: > On 4/7/07, Pawel Jakub Dawidek wrote: > >Hi. > > > >After initial discussion on IRC, I'd like to propose an addition... > >I want to use it with ZFS, but I thought it may be useful in general, so > >here it goes: > > > >I'd like to assign a unique ID to the system on first boot. > > > >When system starts, /etc/rc.d/hostid script checks if /hostid file > >exists, if it doesn't, it creates it via 'uuidgen > /hostid'. > > > >It will also set kern.hostuuid sysctl to this value and first four bytes > >of MD5(kern.hostuuid) will be stored in kern.hostid. It will allow to > >use gethostid(3). > > > >If root file system is read-only, different uuid will be genrated on > >each boot. Not sure if anything better can be done here. > > > >As I said, I think it may be genrally useful. Imagine using it with > >magic/variant symlinks, for example. >=20 > Just random thoughts: >=20 > - It sounds more like a (writeable) root fs ID... If we move disks with root file system, it's this more or less the same host, isn't it? I'd prefer hostid to depend on what is really running there and be able to change the hardware without changing hostid. > - Is Windows-style hardware ID's hashing totally ruled out? I know nothing about it... > - How does it work in other OS'es? (e.g. solaris /bin/hostid) On OpenSolaris, if I understand the code right, hostid is derived from hw_serial, and hw_serial is taken from: * On sparc machines, read hw_serial from the firmware at boot time * and simply assert Sun is the hardware provider. Hmm. [...] * On x86 machines, read hw_serial, hw_provider and srpc_domain from * /etc/bootrc at boot time. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --0z5c7mBtSy1wdr4F Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGF7AKForvXbEpPzQRAoXGAKCfH4XIxQfqiolxjDsgDL0emw2X3ACg1yL2 JvfSD4Yl2xPIPpdZvEpCtds= =4AiB -----END PGP SIGNATURE----- --0z5c7mBtSy1wdr4F-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 14:53:21 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1D5F16A402 for ; Sat, 7 Apr 2007 14:53:21 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 4434F13C45E for ; Sat, 7 Apr 2007 14:53:21 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id DDE69487FB; Sat, 7 Apr 2007 16:53:19 +0200 (CEST) Received: from localhost (cvl74.internetdsl.tpnet.pl [83.19.93.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 76783487F3; Sat, 7 Apr 2007 16:53:11 +0200 (CEST) Date: Sat, 7 Apr 2007 16:53:04 +0200 From: Pawel Jakub Dawidek To: Ceri Davies Message-ID: <20070407145304.GH63916@garage.freebsd.pl> References: <20070407120656.GD63916@garage.freebsd.pl> <20070407132509.GJ90410@submonkey.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WRT3RXLOp/bBMgTI" Content-Disposition: inline In-Reply-To: <20070407132509.GJ90410@submonkey.net> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL autolearn=no version=3.0.4 Cc: freebsd-arch@FreeBSD.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 14:53:21 -0000 --WRT3RXLOp/bBMgTI Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 02:25:09PM +0100, Ceri Davies wrote: > On Sat, Apr 07, 2007 at 02:06:56PM +0200, Pawel Jakub Dawidek wrote: > > Hi. > >=20 > > After initial discussion on IRC, I'd like to propose an addition... > > I want to use it with ZFS, but I thought it may be useful in general, so > > here it goes: > >=20 > > I'd like to assign a unique ID to the system on first boot. > >=20 > > When system starts, /etc/rc.d/hostid script checks if /hostid file > > exists, if it doesn't, it creates it via 'uuidgen > /hostid'. > >=20 > > It will also set kern.hostuuid sysctl to this value and first four bytes > > of MD5(kern.hostuuid) will be stored in kern.hostid. It will allow to > > use gethostid(3). > >=20 > > If root file system is read-only, different uuid will be genrated on > > each boot. Not sure if anything better can be done here. >=20 > Can we put it in /etc ? That would allow setups like nanobsd to benefit > too. I think we can... I just want it to be available always. What is the reason to keep entropy file in /? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --WRT3RXLOp/bBMgTI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGF7BQForvXbEpPzQRAvldAJ4t03XlyiAKfS3oXyzDqAv4Hgf0KwCdF5N6 G7m8aSKd5D7Cum6LeJLR8PQ= =JPy6 -----END PGP SIGNATURE----- --WRT3RXLOp/bBMgTI-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 15:08:20 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0821016A403 for ; Sat, 7 Apr 2007 15:08:20 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.233]) by mx1.freebsd.org (Postfix) with ESMTP id B8BBF13C483 for ; Sat, 7 Apr 2007 15:08:19 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: by nz-out-0506.google.com with SMTP id r28so733592nza for ; Sat, 07 Apr 2007 08:08:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=m2vBXFv4GrAvmKlsd3tu3Xnz1CKqJE0e6ID1bOXeHme+42EhGbrkOFdTTMBehAb23AZMcZ2cYPEB24b4mrMVY0V7V2yxx44kxJOpjOWmSv8zisdamQQFfbGm+hBV5tdC2v3M18OJUlP0DNcS7SQQtKxYIcMkMnsvVRx/SWGfsck= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=QJV1Tcxgbj2SKTt8E6OC6/E2qbpsit69t7a7a3Yds6b+LrlHiwj+n3enGfWgcy0tvR+T3eeH2rf33tRqUhTpAebpx7zE7Kfhwf7ZLjIauzuRe5txeVyTEhDwBEo+EnFczTQl7jYOZ5jvbmc+vq9o53ESnS7XZdNVB3MXgmo0T2A= Received: by 10.115.47.1 with SMTP id z1mr232563waj.1175958498359; Sat, 07 Apr 2007 08:08:18 -0700 (PDT) Received: by 10.114.201.2 with HTTP; Sat, 7 Apr 2007 08:08:18 -0700 (PDT) Message-ID: Date: Sat, 7 Apr 2007 19:08:18 +0400 From: "Andrew Pantyukhin" Sender: infofarmer@gmail.com To: "Pawel Jakub Dawidek" In-Reply-To: <20070407145154.GG63916@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <20070407120656.GD63916@garage.freebsd.pl> <20070407145154.GG63916@garage.freebsd.pl> X-Google-Sender-Auth: 8edb7a09dc833de8 Cc: freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 15:08:20 -0000 T24gNC83LzA3LCBQYXdlbCBKYWt1YiBEYXdpZGVrIDxwamRAZnJlZWJzZC5vcmc+IHdyb3RlOgo+ IE9uIFNhdCwgQXByIDA3LCAyMDA3IGF0IDA1OjA3OjI1UE0gKzA0MDAsIEFuZHJldyBQYW50eXVr aGluIHdyb3RlOgo+ID4gLSBJcyBXaW5kb3dzLXN0eWxlIGhhcmR3YXJlIElEJ3MgaGFzaGluZyB0 b3RhbGx5IHJ1bGVkIG91dD8KPgo+IEkga25vdyBub3RoaW5nIGFib3V0IGl0Li4uCgpXZWxsLCBt YXliZSBzb21ldGhpbmcgbGlrZSBoYXNoaW5nIE1BQyBvZiB0aGUgZmlyc3QgTklDCnRvIGdldCB0 aGUgaW5pdGlhbCBJRC4uLiBCdXQgdGhlbiB0aGVyZSdzIGFsd2F5cyB0aGUKcHJvYmFiaWxpdHkg dGhhdCB3ZSBpbml0aWFsaXplIHNldmVyYWwgc3lzdGVtcyBwdXR0aW5nCnRoZSBzYW1lIE5JQyBp bnRvIGVhY2ggb2YgdGhlbS4uLgoKPiA+IC0gSG93IGRvZXMgaXQgd29yayBpbiBvdGhlciBPUydl cz8gKGUuZy4gc29sYXJpcyAvYmluL2hvc3RpZCkKPgo+IE9uIE9wZW5Tb2xhcmlzLCBpZiBJIHVu ZGVyc3RhbmQgdGhlIGNvZGUgcmlnaHQsIGhvc3RpZCBpcyBkZXJpdmVkIGZyb20KPiBod19zZXJp YWwsIGFuZCBod19zZXJpYWwgaXMgdGFrZW4gZnJvbToKPgo+ICAqIE9uIHNwYXJjIG1hY2hpbmVz LCByZWFkIGh3X3NlcmlhbCBmcm9tIHRoZSBmaXJtd2FyZSBhdCBib290IHRpbWUKPiAgKiBhbmQg c2ltcGx5IGFzc2VydCBTdW4gaXMgdGhlIGhhcmR3YXJlIHByb3ZpZGVyLiAgSG1tLgo+IFsuLi5d Cj4gICogT24geDg2IG1hY2hpbmVzLCByZWFkIGh3X3NlcmlhbCwgaHdfcHJvdmlkZXIgYW5kIHNy cGNfZG9tYWluIGZyb20KPiAgKiAvZXRjL2Jvb3RyYyBhdCBib290IHRpbWUuCgpUaGVyZSdzIGV2 ZW4gYSBidXNpbmVzcyBbMV0gc2VsbGluZyBzb2Z0d2FyZSB0byBjaGFuZ2UKU29sYXJpcyBob3N0 aWQgZm9yIMKjNDkuIFNob3VsZCBJIHNxdWF0IGZyZWVic2Rob3N0aWQuY29tPyA6KQoKWzFdIGh0 dHA6Ly93d3cuc29sYXJpc2hvc3RpZC5jb20vCgpBbnl3YXksIG90aGVyIHN5c3RlbXMgYWxzbyBo YXZlIGEgbm90aW9uIG9mIGhvc3RpZC4gSXQKYXBwZWFycyBmcm9tIHRoaXMgbGludXggbWFucGFn ZSB0aGF0IGhvc3RpZCB3YXMgdGhlcmUKaW4gNC4yQlNELCBidXQgZ290IHJlbW92ZWQgaW4gNC40 QlNEOgoKaHR0cDovL3d3dy5kaWUubmV0L2RvYy9saW51eC9tYW4vbWFuMi9nZXRob3N0aWQuMi5o dG1sCg== From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 15:32:41 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6ED7E16A400; Sat, 7 Apr 2007 15:32:41 +0000 (UTC) (envelope-from chris@hitnet.RWTH-Aachen.DE) Received: from mta-2.ms.rz.rwth-aachen.de (mta-2.ms.rz.RWTH-Aachen.DE [134.130.7.73]) by mx1.freebsd.org (Postfix) with ESMTP id 2368B13C455; Sat, 7 Apr 2007 15:32:40 +0000 (UTC) (envelope-from chris@hitnet.RWTH-Aachen.DE) Received: from circe ([134.130.3.36]) by mta-2.ms.rz.RWTH-Aachen.de (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JG400ME5VTC5Y00@mta-2.ms.rz.RWTH-Aachen.de>; Sat, 07 Apr 2007 17:17:36 +0200 (CEST) Received: from talos.rz.RWTH-Aachen.DE ([134.130.3.22]) by circe (MailMonitor for SMTP v1.2.2 ) ; Sat, 07 Apr 2007 17:17:36 +0200 (MEST) Received: from bigboss.hitnet.rwth-aachen.de (bigspace.hitnet.RWTH-Aachen.DE [137.226.181.2]) by smarthost.rwth-aachen.de (8.13.8/8.13.1/1) with ESMTP id l37FHZR4028359; Sat, 07 Apr 2007 17:17:35 +0200 Received: from haakonia.hitnet.rwth-aachen.de ([137.226.181.92]) by bigboss.hitnet.rwth-aachen.de with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1HaCfZ-0003bs-Di; Sat, 07 Apr 2007 17:17:37 +0200 Received: by haakonia.hitnet.rwth-aachen.de (Postfix, from userid 1001) id 86DC73F41E; Sat, 07 Apr 2007 17:17:35 +0200 (CEST) Date: Sat, 07 Apr 2007 17:17:35 +0200 From: Christian Brueffer In-reply-to: To: Andrew Pantyukhin Message-id: <20070407151735.GB1994@haakonia.hitnet.RWTH-Aachen.DE> MIME-version: 1.0 Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=9zSXsLTf0vkW971A Content-disposition: inline X-Operating-System: FreeBSD 6.2-STABLE X-PGP-Key: http://people.FreeBSD.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D References: <20070407120656.GD63916@garage.freebsd.pl> <20070407145154.GG63916@garage.freebsd.pl> User-Agent: Mutt/1.5.11 Cc: Pawel Jakub Dawidek , freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 15:32:41 -0000 --9zSXsLTf0vkW971A Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 07:08:18PM +0400, Andrew Pantyukhin wrote: > On 4/7/07, Pawel Jakub Dawidek wrote: > >On Sat, Apr 07, 2007 at 05:07:25PM +0400, Andrew Pantyukhin wrote: > >> - Is Windows-style hardware ID's hashing totally ruled out? > > > >I know nothing about it... >=20 > Well, maybe something like hashing MAC of the first NIC > to get the initial ID... But then there's always the > probability that we initialize several systems putting > the same NIC into each of them... >=20 > >> - How does it work in other OS'es? (e.g. solaris /bin/hostid) > > > >On OpenSolaris, if I understand the code right, hostid is derived from > >hw_serial, and hw_serial is taken from: > > > > * On sparc machines, read hw_serial from the firmware at boot time > > * and simply assert Sun is the hardware provider. Hmm. > >[...] > > * On x86 machines, read hw_serial, hw_provider and srpc_domain from > > * /etc/bootrc at boot time. >=20 > There's even a business [1] selling software to change > Solaris hostid for =A349. Should I squat freebsdhostid.com? :) >=20 > [1] http://www.solarishostid.com/ >=20 > Anyway, other systems also have a notion of hostid. It > appears from this linux manpage that hostid was there > in 4.2BSD, but got removed in 4.4BSD: >=20 > http://www.die.net/doc/linux/man/man2/gethostid.2.html Indeed, our gethostid(4) manpage says the same ;-) - Christian --=20 Christian Brueffer chris@unixpages.org brueffer@FreeBSD.org GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc GPG Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D --9zSXsLTf0vkW971A Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFGF7YPbHYXjKDtmC0RAt6IAJ94oKRONhwHjTperY855rg8qCbMpgCgmAy/ GIJT+VLzxZFq7bfZCV6dmRw= =URgN -----END PGP SIGNATURE----- --9zSXsLTf0vkW971A-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 15:48:02 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97B0116A402 for ; Sat, 7 Apr 2007 15:48:02 +0000 (UTC) (envelope-from julien.gabel@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.177]) by mx1.freebsd.org (Postfix) with ESMTP id DFDCD13C4BF for ; Sat, 7 Apr 2007 15:48:01 +0000 (UTC) (envelope-from julien.gabel@gmail.com) Received: by ik-out-1112.google.com with SMTP id c21so847294ika for ; Sat, 07 Apr 2007 08:48:00 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=X33Ti6cPsHBbpxTr5tcTudEfXzDje0/5TP3GWL9x7ImjVTxKhx6R6VEn05iEDjMrx25/5AtRj6ddBlCKuRJFr+Jfjuc3N42F6KpV7HI0nb3NX/XvRi/eYJsKqxai8yHpkYd+uLuENHFprXADOTwGA5ZNn1aNO3oWp2H46GdCCe4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=T4knBiIz0iJjLFPWCpGw34ZoJkqB0ruQRhPoEObOGo8A53LRs9Nxw7Pexz1gwii9SMCMMWAqfYQ5aOo1fDEYG4DVZUGdN52dszxAGl16XjSjIH4LhhlmSWsL1rZC7E54f25Qhufk8L0D/WTkazC0j4I98Mf9mL+zKuw6dLH7NTg= Received: by 10.78.170.17 with SMTP id s17mr668479hue.1175959285193; Sat, 07 Apr 2007 08:21:25 -0700 (PDT) Received: by 10.78.162.20 with HTTP; Sat, 7 Apr 2007 08:21:25 -0700 (PDT) Message-ID: Date: Sat, 7 Apr 2007 17:21:25 +0200 From: "Julien Gabel" Sender: julien.gabel@gmail.com To: "Andrew Pantyukhin" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20070407120656.GD63916@garage.freebsd.pl> <20070407145154.GG63916@garage.freebsd.pl> X-Google-Sender-Auth: ba3cd9721a1a515e Cc: Pawel Jakub Dawidek , freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 15:48:02 -0000 > There's even a business [1] selling software to change > Solaris hostid for =A349. Should I squat freebsdhostid.com? :) > > [1] http://www.solarishostid.com/ For free, you generally can fake it by rewriting the gethostid function along with the use of ${LD_PRELOAD}; or use DTrace if using a Solaris 10 system :) --=20 julien. http://www.thilelli.net/~jgabel/ From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 17:27:59 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D038D16A400 for ; Sat, 7 Apr 2007 17:27:59 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id 65FB913C465 for ; Sat, 7 Apr 2007 17:27:59 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so1355127ugh for ; Sat, 07 Apr 2007 10:27:58 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=f/C/6kg69mOZlDQqVzGMdmW2SndrIgchYtzJ2lfi6KMNlg6TGHMlFp4WsX8km2Hu3Z/mmtMWpEClH1NIiPG5dJUBXIvNJfyIsDQX7jqhz2Ycl5yN4uEEcoPYVhYZqUD3oX0A4E6Q7wawi4SoHw36IBjQ2c8rT6GmxSVNnKFcQMo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=GDBJdUGl7ut3UBQgl0OFvF3Wi98f1TK7jsGsz8BnUDfJhop5FSLmp5glauG6SqNW0QedRyickr90KKTVmP3J5ZQR1Qedvzz0/ZcVMDmGALTse0SlzALpYPGZNkB+4Th3xi0QXeCU2nwvm084AZu5IVsToYbJoqcztNn2VdZGBH4= Received: by 10.82.163.13 with SMTP id l13mr522129bue.1175964464216; Sat, 07 Apr 2007 09:47:44 -0700 (PDT) Received: from ibm-se82151.se.ibm.com ( [80.217.194.157]) by mx.google.com with ESMTP id e8sm15785738muf.2007.04.07.09.47.43; Sat, 07 Apr 2007 09:47:43 -0700 (PDT) Message-ID: <4617CB2D.8000508@gmail.com> Date: Sat, 07 Apr 2007 18:47:41 +0200 From: Pawel Worach User-Agent: Thunderbird 2.0pre (X11/20070325) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20070407120656.GD63916@garage.freebsd.pl> In-Reply-To: <20070407120656.GD63916@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@FreeBSD.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 17:27:59 -0000 Pawel Jakub Dawidek wrote: > Hi. > > After initial discussion on IRC, I'd like to propose an addition... > I want to use it with ZFS, but I thought it may be useful in general, so > here it goes: > > I'd like to assign a unique ID to the system on first boot. > > When system starts, /etc/rc.d/hostid script checks if /hostid file > exists, if it doesn't, it creates it via 'uuidgen > /hostid'. > > It will also set kern.hostuuid sysctl to this value and first four bytes > of MD5(kern.hostuuid) will be stored in kern.hostid. It will allow to > use gethostid(3). > > If root file system is read-only, different uuid will be genrated on > each boot. Not sure if anything better can be done here. > > As I said, I think it may be genrally useful. Imagine using it with > magic/variant symlinks, for example. > > Comments? > What about ... # kenv smbios.system.uuid 63F8BC81-475C-11CB-A074-CA3B9005F8F6 Not all systems have SMBIOSen but maybe it can be used instead of /{,etc}/hostid if available ? Regards -- Pawel From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 17:55:02 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5410316A401 for ; Sat, 7 Apr 2007 17:55:02 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id E563513C44C for ; Sat, 7 Apr 2007 17:55:00 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 23B8E487FB; Sat, 7 Apr 2007 19:54:59 +0200 (CEST) Received: from localhost (cvl74.internetdsl.tpnet.pl [83.19.93.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id D0D6A487FA; Sat, 7 Apr 2007 19:54:48 +0200 (CEST) Date: Sat, 7 Apr 2007 19:54:39 +0200 From: Pawel Jakub Dawidek To: Pawel Worach Message-ID: <20070407175439.GL63916@garage.freebsd.pl> References: <20070407120656.GD63916@garage.freebsd.pl> <4617CB2D.8000508@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Xb8pJpF45Qg/t7GZ" Content-Disposition: inline In-Reply-To: <4617CB2D.8000508@gmail.com> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL autolearn=no version=3.0.4 Cc: freebsd-arch@FreeBSD.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 17:55:02 -0000 --Xb8pJpF45Qg/t7GZ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 06:47:41PM +0200, Pawel Worach wrote: > Pawel Jakub Dawidek wrote: > >Hi. > >After initial discussion on IRC, I'd like to propose an addition... > >I want to use it with ZFS, but I thought it may be useful in general, so > >here it goes: > >I'd like to assign a unique ID to the system on first boot. > >When system starts, /etc/rc.d/hostid script checks if /hostid file > >exists, if it doesn't, it creates it via 'uuidgen > /hostid'. > >It will also set kern.hostuuid sysctl to this value and first four bytes > >of MD5(kern.hostuuid) will be stored in kern.hostid. It will allow to > >use gethostid(3). > >If root file system is read-only, different uuid will be genrated on > >each boot. Not sure if anything better can be done here. > >As I said, I think it may be genrally useful. Imagine using it with > >magic/variant symlinks, for example. > >Comments? >=20 > What about ... >=20 > # kenv smbios.system.uuid > 63F8BC81-475C-11CB-A074-CA3B9005F8F6 >=20 > Not all systems have SMBIOSen but maybe it can be used instead of /{,etc}= /hostid if available ? We thought about this, but as you noted it's not always available. I want this to behave the same on each system. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Xb8pJpF45Qg/t7GZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGF9rfForvXbEpPzQRAi4WAJ91pczMTbCvYZZoc9KOySpj7Y+pOwCZAQJp cqECwpSDjFkxG6oK3M2Kzwc= =Hsxe -----END PGP SIGNATURE----- --Xb8pJpF45Qg/t7GZ-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 18:42:57 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 899C916A406; Sat, 7 Apr 2007 18:42:57 +0000 (UTC) (envelope-from Michael.G.Williams@nokia.com) Received: from mgw-ext11.nokia.com (smtp.nokia.com [131.228.20.170]) by mx1.freebsd.org (Postfix) with ESMTP id 11D9013C4B8; Sat, 7 Apr 2007 18:42:56 +0000 (UTC) (envelope-from Michael.G.Williams@nokia.com) Received: from esebh107.NOE.Nokia.com (esebh107.ntc.nokia.com [172.21.143.143]) by mgw-ext11.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l37INfvw017983; Sat, 7 Apr 2007 21:23:43 +0300 Received: from daebh101.NOE.Nokia.com ([10.241.35.111]) by esebh107.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Sat, 7 Apr 2007 21:23:41 +0300 Received: from daebe103.NOE.Nokia.com ([10.241.35.24]) by daebh101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Sat, 7 Apr 2007 13:23:38 -0500 x-mimeole: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Sat, 7 Apr 2007 13:23:36 -0500 Message-ID: <2198383E1141814486F0B881B3260CF5E4ACAF@daebe103.NOE.Nokia.com> In-Reply-To: <20070407175439.GL63916@garage.freebsd.pl> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Host ID. Thread-Index: Acd5Ph6DXo+MNcgESS6Kxtu42OJqjgAA5Wmg References: <20070407120656.GD63916@garage.freebsd.pl><4617CB2D.8000508@gmail.com> <20070407175439.GL63916@garage.freebsd.pl> From: To: , X-OriginalArrivalTime: 07 Apr 2007 18:23:38.0344 (UTC) FILETIME=[DC8D6E80:01C77941] X-eXpurgate-Category: 1/0 X-eXpurgate-ID: 149371::070407212343-1B7AABB0-691CEF4B/0-0/0-1 X-Nokia-AV: Clean Cc: freebsd-arch@freebsd.org Subject: RE: Host ID. 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: Sat, 07 Apr 2007 18:42:57 -0000 How about considering mobile devices? Also, the IEEE has 802.21 which is defining an media independent ID, and also 802.1 which has a secure ID (see 802.1ae and .1af) Best Regards, Michael=20 -----Original Message----- From: owner-freebsd-arch@freebsd.org [mailto:owner-freebsd-arch@freebsd.org] On Behalf Of Pawel Jakub Dawidek Sent: Saturday, April 07, 2007 10:55 AM To: Pawel Worach Cc: freebsd-arch@freebsd.org Subject: Re: Host ID. On Sat, Apr 07, 2007 at 06:47:41PM +0200, Pawel Worach wrote: > Pawel Jakub Dawidek wrote: > >Hi. > >After initial discussion on IRC, I'd like to propose an addition... > >I want to use it with ZFS, but I thought it may be useful in general, > >so here it goes: > >I'd like to assign a unique ID to the system on first boot. > >When system starts, /etc/rc.d/hostid script checks if /hostid file=20 > >exists, if it doesn't, it creates it via 'uuidgen > /hostid'. > >It will also set kern.hostuuid sysctl to this value and first four=20 > >bytes of MD5(kern.hostuuid) will be stored in kern.hostid. It will=20 > >allow to use gethostid(3). > >If root file system is read-only, different uuid will be genrated on=20 > >each boot. Not sure if anything better can be done here. > >As I said, I think it may be genrally useful. Imagine using it with=20 > >magic/variant symlinks, for example. > >Comments? >=20 > What about ... >=20 > # kenv smbios.system.uuid > 63F8BC81-475C-11CB-A074-CA3B9005F8F6 >=20 > Not all systems have SMBIOSen but maybe it can be used instead of /{,etc}/hostid if available ? We thought about this, but as you noted it's not always available. I want this to behave the same on each system. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 20:28:48 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4AABD16A400; Sat, 7 Apr 2007 20:28:48 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc3-cdif2-0-0-cust64.cdif.cable.ntl.com [81.106.128.65]) by mx1.freebsd.org (Postfix) with ESMTP id F34FD13C457; Sat, 7 Apr 2007 20:28:47 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HaHWg-0005Rt-Kl; Sat, 07 Apr 2007 21:28:46 +0100 Date: Sat, 7 Apr 2007 21:28:46 +0100 From: Ceri Davies To: Julien Gabel Message-ID: <20070407202846.GK90410@submonkey.net> References: <20070407120656.GD63916@garage.freebsd.pl> <20070407145154.GG63916@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9RxwyT9MtfFuvYYZ" Content-Disposition: inline In-Reply-To: X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.14 (2007-02-12) Sender: Ceri Davies Cc: Pawel Jakub Dawidek , freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 20:28:48 -0000 --9RxwyT9MtfFuvYYZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 05:21:25PM +0200, Julien Gabel wrote: > >There's even a business [1] selling software to change > >Solaris hostid for ?49. Should I squat freebsdhostid.com? :) > > > >[1] http://www.solarishostid.com/ >=20 > For free, you generally can fake it by rewriting the gethostid > function along with the use > of ${LD_PRELOAD}; or use DTrace if using a Solaris 10 system :) While thinking along these lines, what will we do on sparc64 systems, which will generally print a hostid on the console at boot time which will be significantly different to the one that we'll be presenting within FreeBSD on those systems? I suspect that this is just a documentation issue, but it would be somewhat confusing. Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --9RxwyT9MtfFuvYYZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGF/7+ocfcwTS3JF8RAglhAJ9DONomyCo8fvgH2bWqZcNwCjVF4ACgvo/t t2S+/Z9zlebfogw2NISzSH4= =ADmr -----END PGP SIGNATURE----- --9RxwyT9MtfFuvYYZ-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 20:31:31 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4508116A402; Sat, 7 Apr 2007 20:31:31 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3C213C44B; Sat, 7 Apr 2007 20:31:31 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 2BFEB1A4D81; Sat, 7 Apr 2007 13:31:33 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 692B55138E; Sat, 7 Apr 2007 16:31:30 -0400 (EDT) Date: Sat, 7 Apr 2007 16:31:30 -0400 From: Kris Kennaway To: Ceri Davies Message-ID: <20070407203130.GA8667@xor.obsecurity.org> References: <20070407120656.GD63916@garage.freebsd.pl> <20070407145154.GG63916@garage.freebsd.pl> <20070407202846.GK90410@submonkey.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline In-Reply-To: <20070407202846.GK90410@submonkey.net> User-Agent: Mutt/1.4.2.2i Cc: freebsd-arch@freebsd.org, Pawel Jakub Dawidek Subject: Re: Host ID. 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: Sat, 07 Apr 2007 20:31:31 -0000 --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 09:28:46PM +0100, Ceri Davies wrote: > On Sat, Apr 07, 2007 at 05:21:25PM +0200, Julien Gabel wrote: > > >There's even a business [1] selling software to change > > >Solaris hostid for ?49. Should I squat freebsdhostid.com? :) > > > > > >[1] http://www.solarishostid.com/ > >=20 > > For free, you generally can fake it by rewriting the gethostid > > function along with the use > > of ${LD_PRELOAD}; or use DTrace if using a Solaris 10 system :) >=20 > While thinking along these lines, what will we do on sparc64 systems, > which will generally print a hostid on the console at boot time which > will be significantly different to the one that we'll be presenting > within FreeBSD on those systems? >=20 > I suspect that this is just a documentation issue, but it would be > somewhat confusing. Presumably on systems that have a real host id we can just use that :) Kris --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGF/+hWry0BWjoQKURAh5JAJ0c89ISDeOHnaNpJDZAFzT9d8WdhgCgie3N 0vh19ch34MidqcPshhow00Q= =v/CU -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 20:31:40 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EEEA16A402; Sat, 7 Apr 2007 20:31:40 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc3-cdif2-0-0-cust64.cdif.cable.ntl.com [81.106.128.65]) by mx1.freebsd.org (Postfix) with ESMTP id F25DC13C484; Sat, 7 Apr 2007 20:31:39 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HaHZS-000MXg-Ts; Sat, 07 Apr 2007 21:31:38 +0100 Date: Sat, 7 Apr 2007 21:31:38 +0100 From: Ceri Davies To: Andrew Pantyukhin Message-ID: <20070407203138.GL90410@submonkey.net> References: <20070407120656.GD63916@garage.freebsd.pl> <20070407145154.GG63916@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qyHYMwAXsHLOQihY" Content-Disposition: inline In-Reply-To: X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.14 (2007-02-12) Sender: Ceri Davies Cc: Pawel Jakub Dawidek , freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 20:31:40 -0000 --qyHYMwAXsHLOQihY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 07:08:18PM +0400, Andrew Pantyukhin wrote: > On 4/7/07, Pawel Jakub Dawidek wrote: > >On Sat, Apr 07, 2007 at 05:07:25PM +0400, Andrew Pantyukhin wrote: > >> - Is Windows-style hardware ID's hashing totally ruled out? > > > >I know nothing about it... >=20 > Well, maybe something like hashing MAC of the first NIC > to get the initial ID... But then there's always the > probability that we initialize several systems putting > the same NIC into each of them... >=20 > >> - How does it work in other OS'es? (e.g. solaris /bin/hostid) > > > >On OpenSolaris, if I understand the code right, hostid is derived from > >hw_serial, and hw_serial is taken from: > > > > * On sparc machines, read hw_serial from the firmware at boot time > > * and simply assert Sun is the hardware provider. Hmm. > >[...] > > * On x86 machines, read hw_serial, hw_provider and srpc_domain from > > * /etc/bootrc at boot time. >=20 > There's even a business [1] selling software to change > Solaris hostid for ??49. Should I squat freebsdhostid.com? :) >=20 > [1] http://www.solarishostid.com/ Hmm. The host id lives on the, trivially swappable, SCC on a number of recent Sun systems. Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --qyHYMwAXsHLOQihY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGF/+qocfcwTS3JF8RAihDAKDGLV3TGMNbaQT8ro1V3uNdfftjDgCggmBo 7U73IgmmypR0Tt5kAjqmA34= =VRF1 -----END PGP SIGNATURE----- --qyHYMwAXsHLOQihY-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 20:35:29 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 77B2116A402; Sat, 7 Apr 2007 20:35:29 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc3-cdif2-0-0-cust64.cdif.cable.ntl.com [81.106.128.65]) by mx1.freebsd.org (Postfix) with ESMTP id F2A5D13C4BF; Sat, 7 Apr 2007 20:35:27 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HaHd8-000GR1-0J; Sat, 07 Apr 2007 21:35:26 +0100 Date: Sat, 7 Apr 2007 21:35:24 +0100 From: Ceri Davies To: Kris Kennaway Message-ID: <20070407203524.GM90410@submonkey.net> References: <20070407120656.GD63916@garage.freebsd.pl> <20070407145154.GG63916@garage.freebsd.pl> <20070407202846.GK90410@submonkey.net> <20070407203130.GA8667@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Z/kiM2A+9acXa48/" Content-Disposition: inline In-Reply-To: <20070407203130.GA8667@xor.obsecurity.org> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.14 (2007-02-12) Sender: Ceri Davies Cc: freebsd-arch@freebsd.org, Pawel Jakub Dawidek Subject: Re: Host ID. 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: Sat, 07 Apr 2007 20:35:29 -0000 --Z/kiM2A+9acXa48/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 07, 2007 at 04:31:30PM -0400, Kris Kennaway wrote: > On Sat, Apr 07, 2007 at 09:28:46PM +0100, Ceri Davies wrote: > > On Sat, Apr 07, 2007 at 05:21:25PM +0200, Julien Gabel wrote: > > > >There's even a business [1] selling software to change > > > >Solaris hostid for ?49. Should I squat freebsdhostid.com? :) > > > > > > > >[1] http://www.solarishostid.com/ > > >=20 > > > For free, you generally can fake it by rewriting the gethostid > > > function along with the use > > > of ${LD_PRELOAD}; or use DTrace if using a Solaris 10 system :) > >=20 > > While thinking along these lines, what will we do on sparc64 systems, > > which will generally print a hostid on the console at boot time which > > will be significantly different to the one that we'll be presenting > > within FreeBSD on those systems? > >=20 > > I suspect that this is just a documentation issue, but it would be > > somewhat confusing. >=20 > Presumably on systems that have a real host id we can just use that :) I thought that, but then Pawwel said he'd like it to work the same across all systems; quite what that means is where the rub lies :) Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --Z/kiM2A+9acXa48/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGGACMocfcwTS3JF8RAgkgAJ9SnM1INAQmfaq/MpDjFXUfJINSVgCeMIy+ LVxYdBy4VY6pat4oRbK/t6o= =ikos -----END PGP SIGNATURE----- --Z/kiM2A+9acXa48/-- From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 20:54:13 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1BF616A401; Sat, 7 Apr 2007 20:54:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9404013C4BC; Sat, 7 Apr 2007 20:54:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l37KqrbE021636; Sat, 7 Apr 2007 14:52:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 07 Apr 2007 14:53:01 -0600 (MDT) Message-Id: <20070407.145301.-345495730.imp@bsdimp.com> To: pjd@freebsd.org From: "M. Warner Losh" In-Reply-To: <20070407175439.GL63916@garage.freebsd.pl> References: <20070407120656.GD63916@garage.freebsd.pl> <4617CB2D.8000508@gmail.com> <20070407175439.GL63916@garage.freebsd.pl> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 07 Apr 2007 14:52:53 -0600 (MDT) Cc: freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 20:54:14 -0000 In message: <20070407175439.GL63916@garage.freebsd.pl> Pawel Jakub Dawidek writes: : On Sat, Apr 07, 2007 at 06:47:41PM +0200, Pawel Worach wrote: : > Pawel Jakub Dawidek wrote: : > >Hi. : > >After initial discussion on IRC, I'd like to propose an addition... : > >I want to use it with ZFS, but I thought it may be useful in general, so : > >here it goes: : > >I'd like to assign a unique ID to the system on first boot. : > >When system starts, /etc/rc.d/hostid script checks if /hostid file : > >exists, if it doesn't, it creates it via 'uuidgen > /hostid'. : > >It will also set kern.hostuuid sysctl to this value and first four bytes : > >of MD5(kern.hostuuid) will be stored in kern.hostid. It will allow to : > >use gethostid(3). : > >If root file system is read-only, different uuid will be genrated on : > >each boot. Not sure if anything better can be done here. : > >As I said, I think it may be genrally useful. Imagine using it with : > >magic/variant symlinks, for example. : > >Comments? : > : > What about ... : > : > # kenv smbios.system.uuid : > 63F8BC81-475C-11CB-A074-CA3B9005F8F6 : > : > Not all systems have SMBIOSen but maybe it can be used instead of /{,etc}/hostid if available ? : : We thought about this, but as you noted it's not always available. I : want this to behave the same on each system. Windows almost requires this be present, so it is present in many systems. There are a number of things that we use the best source of information first, and only then do we fall back to something less suitable. I don't see why this would be any different, and it would give more systems a chance to work. Many systems that have other BIOS issues, such as: smbios.system.maker="To be Filled" smbios.system.product="To be Filled" smbios.system.serial="00000000" none-the-less have this filled in. A quick survey of all the machines I have shows that the following didn't have it: Sony VAIO 505-TS (Pentium 300MHz laptop) NEC PC9821Ra (pc98 with Pentium II 400MHz) Kwikbyte KB9202 (Atmel AT91RM9200 based eval board) AMI Mobo + dual core amd opeteron Some embedded SBCs which have smbios, but no uuid. and a bunch of 4.x and 5.x machines that pre-date the addition of the smbios code that I can't check. So it is a mixed bag. Warner From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 20:57:38 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C919D16A405; Sat, 7 Apr 2007 20:57:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 79BC613C4C5; Sat, 7 Apr 2007 20:57:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l37KsSMI021677; Sat, 7 Apr 2007 14:54:28 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 07 Apr 2007 14:54:37 -0600 (MDT) Message-Id: <20070407.145437.1021576786.imp@bsdimp.com> To: ceri@submonkey.net From: "M. Warner Losh" In-Reply-To: <20070407203524.GM90410@submonkey.net> References: <20070407202846.GK90410@submonkey.net> <20070407203130.GA8667@xor.obsecurity.org> <20070407203524.GM90410@submonkey.net> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 07 Apr 2007 14:54:28 -0600 (MDT) Cc: freebsd-arch@freebsd.org, pjd@freebsd.org, kris@obsecurity.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 20:57:38 -0000 In message: <20070407203524.GM90410@submonkey.net> Ceri Davies writes: : On Sat, Apr 07, 2007 at 04:31:30PM -0400, Kris Kennaway wrote: : > On Sat, Apr 07, 2007 at 09:28:46PM +0100, Ceri Davies wrote: : > > On Sat, Apr 07, 2007 at 05:21:25PM +0200, Julien Gabel wrote: : > > > >There's even a business [1] selling software to change : > > > >Solaris hostid for ?49. Should I squat freebsdhostid.com? :) : > > > > : > > > >[1] http://www.solarishostid.com/ : > > > : > > > For free, you generally can fake it by rewriting the gethostid : > > > function along with the use : > > > of ${LD_PRELOAD}; or use DTrace if using a Solaris 10 system :) : > > : > > While thinking along these lines, what will we do on sparc64 systems, : > > which will generally print a hostid on the console at boot time which : > > will be significantly different to the one that we'll be presenting : > > within FreeBSD on those systems? : > > : > > I suspect that this is just a documentation issue, but it would be : > > somewhat confusing. : > : > Presumably on systems that have a real host id we can just use that :) : : I thought that, but then Pawwel said he'd like it to work the same : across all systems; quite what that means is where the rub lies :) I'm still of the opinion that using the real one and falling back if that isn't available is consistant with other places we use the real thing, and fake it if we can't get to the real thing. It also, technically speaking, is the same on all systems... Warner From owner-freebsd-arch@FreeBSD.ORG Sat Apr 7 21:42:11 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC5E416A400; Sat, 7 Apr 2007 21:42:11 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id 586FA13C4BD; Sat, 7 Apr 2007 21:42:11 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id l37LKMBT084457; Sun, 8 Apr 2007 07:20:22 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id l37LKMpN084456; Sun, 8 Apr 2007 07:20:22 +1000 (EST) (envelope-from peter) Date: Sun, 8 Apr 2007 07:20:22 +1000 From: Peter Jeremy To: Andrew Pantyukhin Message-ID: <20070407212022.GH71995@turion.vk2pj.dyndns.org> References: <20070407120656.GD63916@garage.freebsd.pl> <20070407145154.GG63916@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IU5/I01NYhRvwH70" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.14 (2007-02-12) Cc: Pawel Jakub Dawidek , freebsd-arch@freebsd.org Subject: Re: Host ID. 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: Sat, 07 Apr 2007 21:42:11 -0000 --IU5/I01NYhRvwH70 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-Apr-07 19:08:18 +0400, Andrew Pantyukhin w= rote: >Anyway, other systems also have a notion of hostid. It >appears from this linux manpage that hostid was there >in 4.2BSD, but got removed in 4.4BSD: > >http://www.die.net/doc/linux/man/man2/gethostid.2.html Actually, the concept of hostid remained present. 4.4BSD changed the preferred access mechanism from a syscall to a sysctl. FreeBSD has o{g,s}ethostid under COMPAT_43 and kern.hostid. Note that the 4.4BSD, Lite1, Lite2 and final include code to extract the hostid out of a SPARC ID prom. I don't know if this is still relevant to UltraSPARC machines. --=20 Peter Jeremy --IU5/I01NYhRvwH70 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGGAsW/opHv/APuIcRArJUAJ9uLvuTFQEd/j+kHhfCxYeqLCvPGACcCWAh wKHbwxSaCn+YKC8iX+IeDk0= =z1tz -----END PGP SIGNATURE----- --IU5/I01NYhRvwH70--