From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 28 03:53:19 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1537F106566B for ; Sun, 28 Feb 2010 03:53:19 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id E1BDF8FC0C for ; Sun, 28 Feb 2010 03:53:18 +0000 (UTC) Received: by pvg3 with SMTP id 3so515970pvg.13 for ; Sat, 27 Feb 2010 19:53:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=5CoCgYEZ0ynHjZXfG6k3baGtvNrxRiuUqRjiGAMmeX4=; b=w5Qp+Z3WwQbgnb79kVXpFX4SDF6oy5wsQu16st5rm2wmHUSZcNZIl68eQMpSe3U9iE lwp9zh9CwSIlWAKRCXBzpyukHlW4RoUFX5ZvkwDSlucsHh46RA4pX/lsIMICTKrQFu5e VTEN7DhRb8sZfLdakw4sXEMe0orQq1pykhQpY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Sb1vdTOJ9PYJa2fifu6kua3sogz55U6bYTdtkyRmJtByRon3dTegawSxcCtjtyJmkO KiqTHPJEA10tTGIu0gu8LjCowUy6vinCtzrMsW4W0tCpPmYm8rVWIgAbjUVY80M/269T 6Wm0rGHX4KXDg+M2bgTfEO2plqOTFXUc24Sag= MIME-Version: 1.0 Received: by 10.142.74.6 with SMTP id w6mr1508988wfa.7.1267329188423; Sat, 27 Feb 2010 19:53:08 -0800 (PST) In-Reply-To: References: Date: Sat, 27 Feb 2010 19:53:08 -0800 Message-ID: <7d6fde3d1002271953q4e6ec3a5s5f3ea56f3d3e66b6@mail.gmail.com> From: Garrett Cooper To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] extending {amd64|i386} cpu info X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 03:53:19 -0000 On Fri, Feb 26, 2010 at 7:19 PM, Alexander Best wrote: > hi there, > > i always forget how to decipher model and family from the cpu id. of course > there're 3rd party tools to do that for you, but instead i decided to hack the > kernel. ;) > > maybe somebody finds these changes useful. I think that this is very helpful functionality and I vote for it to be committed. Thanks! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 28 11:56:25 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D8E5106564A for ; Sun, 28 Feb 2010 11:56:25 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout5.freenet.de (mout5.freenet.de [IPv6:2001:748:100:40::2:7]) by mx1.freebsd.org (Postfix) with ESMTP id DB71A8FC13 for ; Sun, 28 Feb 2010 11:56:24 +0000 (UTC) Received: from [195.4.92.13] (helo=3.mx.freenet.de) by mout5.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.72 #1) id 1Nlhl1-0005v8-Fq; Sun, 28 Feb 2010 12:56:23 +0100 Received: from p57ae2613.dip0.t-ipconnect.de ([87.174.38.19]:56491 helo=ernst.jennejohn.org) by 3.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.72 #2) id 1Nlhl1-00067W-5A; Sun, 28 Feb 2010 12:56:23 +0100 Date: Sun, 28 Feb 2010 12:56:22 +0100 From: Gary Jennejohn To: Alexander Best Message-ID: <20100228125622.7a8e55b9@ernst.jennejohn.org> In-Reply-To: References: <20100222120300.22d4efb1@ernst.jennejohn.org> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.16.2; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 11:56:25 -0000 On Sat, 27 Feb 2010 14:49:58 +0100 (CET) Alexander Best wrote: > how about something like this? > Based on a quick look it seems OK to me. Have you tested it? --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 28 16:54:40 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD350106566B for ; Sun, 28 Feb 2010 16:54:40 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3678FC15 for ; Sun, 28 Feb 2010 16:54:39 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,556,1262559600"; d="scan'208";a="27173655" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 28 Feb 2010 17:54:39 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 27E081B0768; Sun, 28 Feb 2010 17:54:39 +0100 (CET) Date: Sun, 28 Feb 2010 17:54:38 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: In-Reply-To: <20100228125622.7a8e55b9@ernst.jennejohn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 16:54:40 -0000 Gary Jennejohn schrieb am 2010-02-28: > On Sat, 27 Feb 2010 14:49:58 +0100 (CET) > Alexander Best wrote: > > how about something like this? > Based on a quick look it seems OK to me. > Have you tested it? i did. it works when `make cleanworld` is being run from /usr/src. i'm not sure however what the =2Eif ${.CURDIR} =3D=3D ${.OBJDIR} || ${.CURDIR}/obj =3D=3D ${.OBJDIR} =2Eif exists(${BW_CANONICALOBJDIR}/) statement is for so i didn't include the lib32 cleanup in that clause. my guess is that it's used to catch the case where `make cleanworld` is being = run in /usr/obj/usr/src cheers. alex > --- > Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 28 17:12:19 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AB8E1065670 for ; Sun, 28 Feb 2010 17:12:19 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 0EEAF8FC18 for ; Sun, 28 Feb 2010 17:12:18 +0000 (UTC) Received: by ewy26 with SMTP id 26so891846ewy.3 for ; Sun, 28 Feb 2010 09:12:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=NmcPJ0ipZyu3EHE4Cm2DVsSSvi6dhBqk66DBysFNeKE=; b=N5bxf3UDGSQDfHY4dc+s7tKxgOZo1DTL8O26qUOm7RfLlCNQZOPKfbczLOF7Yi20Il JERt3JnP198+PNW8pscQqhmWnmXL2c9poM2KgdgX2HjgC1IuyMlEZ+Ni+x9P91V9MbDR AQS/666uflLFmX8mFVtzAy7kEa1S1WWDEMq94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=MEHvnYbr9uPXi16n3VpWuUBCvRnsKzolKG8UYIC1GhjXhySyKcluAoGkXr1NGNtqZn BxsLlBGjr3Tk9lFHW333+R9LQYpxErdKC0kryhlr2u1OP9cfpFsBnOcrdztf1bTwOZ6E YooJhnTpVyZ6Ox4YnT1uKBp0s84dUtM6VF3+o= Received: by 10.213.66.1 with SMTP id l1mr1994817ebi.91.1267377130082; Sun, 28 Feb 2010 09:12:10 -0800 (PST) Received: from dragon.dg ([41.216.197.15]) by mx.google.com with ESMTPS id 7sm7794224eyg.24.2010.02.28.09.12.06 (version=SSLv3 cipher=RC4-MD5); Sun, 28 Feb 2010 09:12:08 -0800 (PST) From: David Naylor Organization: Private To: Ulrich =?iso-8859-1?q?Sp=F6rlein?= Date: Sun, 28 Feb 2010 19:12:15 +0200 User-Agent: KMail/1.13.0 (FreeBSD/8.0-STABLE; KDE/4.3.95; amd64; ; ) References: <20100225135303.GM57731@acme.spoerlein.net> In-Reply-To: <20100225135303.GM57731@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5443290.T9Utag5tMc"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201002281912.19406.naylor.b.david@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: [Proof of Concept] Stacked unionfs based 'tinderbox' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:12:19 -0000 --nextPart5443290.T9Utag5tMc Content-Type: multipart/mixed; boundary="Boundary-01=_wPqiLJBMTL+8B5b" Content-Transfer-Encoding: 7bit --Boundary-01=_wPqiLJBMTL+8B5b Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, Apologies for the delayed reply. =20 On Thursday 25 February 2010 15:53:03 Ulrich Sp=F6rlein wrote: > On Thu, 25.02.2010 at 10:08:15 +0200, David Naylor wrote: > > Hi, > >=20 > > As some may have noticed on -current I have been working on using > > stacked unionfs to implement a 'tinderbox' type build system. I have > > successfully used the scripts to build x11/xorg (and have compared the > > results to using the traditional approach using pkg_add). The build > > system is stable except for one nasty corner case: deadlocks. >=20 > When I did this a couple of years ago, the major problems were failing > chdir(2) calls during ports build, etc. I'm hoping time and -current will solve this problem as it is beyond my=20 ability to fix. =20 > > To setup a compatible test environment requires: > > - recompile the kernel with `options KSTACK_PAGES=3D32`, otherwise the > > kernel will panic with a double fault. WITNESS options results in > > substantial performance degradation. > > - patch mtree (see below) [optional] > > - create the appropriate chroot environment (and reboot) [see below > > for corner case] > >=20 > > A performance bottleneck in mtree was identified. This resulted in > > mtree (as run by port install) consuming ~20% of the build time. See > > bin/143732 for a patch and further details. >=20 > Good work! >=20 > > The normal tinderbox approach takes ~80% more time to install compared = to > > the quick and dirty approach. The stacked unionfs approach takes ~170% > > more time (an increase of ~50% over the tinderbox approach). Some > > performance gains can be had if one uses memory backed storage (vs HDD > > in this case). >=20 > Please explain: what is the quick and dirty approach and which one is > faster now? The quick and dirty is `make -C /usr/ports/x11/xorg install clean`. The=20 stacked unionfs is still the slowest (even with a 20% improvement from=20 patching mtree). =20 If one is interested in performance in building ports in a sandbox then the= =20 tinderbox route is the way to go. =20 > As your scripts did not make it through, perhaps you can upload them to > the wiki? What I did back then was using a clean base system as the > underlying unionfs store to avoid re-generating the clean base over and > over again. Nowadays, a ZFS clone would probably be the way to go. I've attached the scripts with a .txt suffix. This should hopefully make i= t=20 past mailman. To which wiki page do you refer? You are welcome to add the= =20 scripts there. =20 I skipped the base system and only unionfs /usr/local. I never cleaned the= =20 base system. I figured that was the easiest to implement when the script r= uns=20 in a chroot. An area for further improvements? =20 > I'm not sure if a recursive approach is feasible here, as you can have > only one underlying unionfs mount. But special casing, e.g., perl may > still give a massive speedup. So for each port that has perl as > dependancy, you would not pull in the clean base + pkg_add perl, but > instead grab the clean-base+perl directory as an underlying unionfs. Have you done any speed comparisons of running programs (such as perl) from= a=20 unionfs. If the disk cache is big enough I don't think there will be a big= =20 performance hit? It is certainly a viable approach. =20 Regards, David --Boundary-01=_wPqiLJBMTL+8B5b Content-Type: text/plain; charset="ISO-8859-1"; name="ports-tinder-builder.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ports-tinder-builder.txt" #!/bin/sh BUILDDIR=${BUILDDIR:-/usr/build} LOCALBASE=${LOCALBASE:-/usr/local} PORTSDIR=${PORTSDIR:-/usr/ports} PORT_DBDIR=${PKG_DBDIR:-$BUILDDIR/db_ports} PKG_DBDIR=${PKG_DBDIR:-$LOCALBASE/db_pkg} PACKAGES=${PACKAGES:-$BUILDDIR/packages} ENV="env LOCALBASE=$LOCALBASE PORTSDIR=$PORTSDIR PORT_DBDIR=$PORT_DBDIR PKG_DBDIR=$PKG_DBDIR PACKAGES=$PACKAGES" MAKE="$ENV make" PKG_ADD="$ENV pkg_add" PKG_DELETE="$ENV pkg_delete" set -e mkdir -p $BUILDDIR $PACKAGES port2name() { echo $1 | sed 's|[/.-]|_|g' } port2pkg() { local pkg_name= local port= port=$1; shift eval pkg_name=PKG$(port2name $port) eval pkg=\$$pkg_name if [ -z "$pkg" ] then pkg=$($MAKE -C $port -V PKGNAME) eval $pkg_name=$pkg fi } depends() { local depend= local depends_name= local _deps= local name= local port= local type type=$1 port=$2 eval depends_name=DEPEND_${type}_$(port2name $port) eval deps=\"\$$depends_name\" if [ -z "$deps" ] then echo "Getting $type dependancies for $port" > /dev/stderr if [ "$type" = "build" ] then depend_list="$($MAKE -C $port -V EXTRACT_DEPENDS -V BUILD_DEPENDS -V LIB_DEPENDS -V RUN_DEPENDS)" else depend_list="$($MAKE -C $port -V LIB_DEPENDS -V RUN_DEPENDS)" fi for depend in $depend_list do name=$(echo $depend | cut -f 2 -d ':') depends runtime $name _deps="$_deps $deps $name" done deps=" " for depend in $_deps do if [ -z "`echo "$deps" | grep " $depend "`" ] then deps="$deps$depend " fi done [ "`echo $deps | tr ' ' '\n' | sort`" = "`echo $deps | tr ' ' '\n' | sort -u`" ] depends_name=$depends_name eval $depends_name=\"$deps \" fi } run() { set +e trap "echo Terminating..." INT TERM EXIT "$@" _status=$? [ $status -ne 0 ] || status=$_status trap - INT TERM EXIT set -e } build() { local _deps= local dep= local port= port=$1 depends build $port _deps="$deps" for dep in $_deps do port2pkg $dep if [ ! -f $PACKAGES/All/$pkg.tbz ] then if ! build $dep then echo "Port $port failed due to dependency $dep" > /dev/stderr return 255 fi fi done echo "Building port $port..." mkdir -p $LOCALBASE $PKG_DBDIR for pkg in $_deps do port2pkg $pkg run $PKG_ADD $PACKAGES/All/$pkg.tbz [ $status -eq 0 ] || break done [ $status -ne 0 ] || run $MAKE -C $port clean build -DNO_DEPENDS -DBATCH if [ $status -eq 0 ] then run $MAKE -C $port install package -DNO_DEPENDS -DBATCH fi if [ $status -eq 0 -o -z "$NO_CLEANUP" ] then port2pkg $port run $PKG_DELETE -f $pkg for pkg in $(echo $_deps | sort -r) do port2pkg $pkg run $PKG_DELETE -f $pkg done run rm -rf $LOCALBASE || (run chflags -R 0 $LOCALBASE; run rm -rf $LOCALBASE) fi if [ $status -ne 0 ] then echo "Port $port failed to build" > /dev/stderr else run $MAKE -C $port clean fi return $status } build /usr/ports/x11/xorg --Boundary-01=_wPqiLJBMTL+8B5b Content-Type: text/plain; charset="ISO-8859-1"; name="ports-union-builder.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ports-union-builder.txt" #!/bin/sh BUILDDIR=${BUILDDIR:-/usr/build} LOCALBASE=${LOCALBASE:-/usr/local} PORTSDIR=${PORTSDIR:-/usr/ports} PORT_DBDIR=${PKG_DBDIR:-$BUILDDIR/db_ports} PKG_DBDIR=${PKG_DBDIR:-$BUILDDIR/db_pkg} PACKAGES=${PACKAGES:-$BUILDDIR/packages} MAKE="env LOCALBASE=$LOCALBASE PORTSDIR=$PORTSDIR PORT_DBDIR=$PORT_DBDIR PKG_DBDIR=$PKG_DBDIR PACKAGES=$PACKAGES make" set -e mkdir -p $BUILDDIR $LOCALBASE $PKG_DBDIR $PACKAGES [ -n "$(kldstat -v | grep unionfs)" ] || kldload unionfs [ ! -e $BUILDDIR/.installing_port ] || rm -r `cat $BUILDDIR/.installing_port` $BUILDDIR/.installing_port port2name() { echo $1 | sed 's|[/.-]|_|g' } port2pkg() { local pkg_name= local port= port=$1; shift eval pkg_name=PKG$(port2name $port) eval pkg=\$$pkg_name if [ -z "$pkg" ] then pkg=$($MAKE -C $port -V PKGNAME) eval $pkg_name=$pkg fi } depends() { local depend= local depends_name= local _deps= local name= local port= local type type=$1 port=$2 eval depends_name=DEPEND_${type}_$(port2name $port) eval deps=\"\$$depends_name\" if [ -z "$deps" ] then echo "Getting $type dependancies for $port" > /dev/stderr if [ "$type" = "build" ] then depend_list="$($MAKE -C $port -V EXTRACT_DEPENDS -V BUILD_DEPENDS -V LIB_DEPENDS -V RUN_DEPENDS)" else depend_list="$($MAKE -C $port -V LIB_DEPENDS -V RUN_DEPENDS)" fi for depend in $depend_list do name=$(echo $depend | cut -f 2 -d ':') depends runtime $name _deps="$_deps $deps $name" done deps=" " for depend in $_deps do if [ -z "`echo "$deps" | grep " $depend "`" ] then deps="$deps$depend " fi done [ "`echo $deps | tr ' ' '\n' | sort`" = "`echo $deps | tr ' ' '\n' | sort -u`" ] depends_name=$depends_name eval $depends_name=\"$deps \" fi } run_make() { set +e trap "true" INT TERM EXIT $MAKE "$@" status=$? trap - INT TERM EXIT set -e } build() { local _deps= local dep= local port= port=$1 depends build $port _deps="$deps" for dep in $_deps do port2pkg $dep if [ ! -d $BUILDDIR/$pkg ] then if ! build $dep then echo "Port $port failed due to dependency $dep" > /dev/stderr return 255 fi fi done echo "Building port $port..." for pkg in $_deps do port2pkg $pkg mount -t unionfs -r -o noatime $BUILDDIR/$pkg $LOCALBASE done run_make -C $port clean build -DNO_DEPENDS -DBATCH if [ $status -eq 0 ] then port2pkg $port mkdir -p $BUILDDIR/$pkg mount -t unionfs -o noatime $BUILDDIR/$pkg $LOCALBASE echo $BUILDDIR/$pkg > $BUILDDIR/.installing_port run_make -C $port install package -DNO_DEPENDS -DBATCH rm $BUILDDIR/.installing_port [ $status -ne 0 -a -n "$NO_CLEANUP" ] || umount $LOCALBASE fi if [ $status -eq 0 -o -z "$NO_CLEANUP" ] then for pkg in $(echo $_deps | sort -r) do umount $LOCALBASE done fi if [ $status -ne 0 ] then echo "Port $port failed to build" > /dev/stderr port2pkg $port rm -rf $BUILDDIR/$pkg || (chflags -R 0 $BUILDDIR/$pkg; rm -rf $BUILDDIR/$pkg) else $MAKE -C $port clean fi return $status } build /usr/ports/x11/xorg --Boundary-01=_wPqiLJBMTL+8B5b-- --nextPart5443290.T9Utag5tMc Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEABECAAYFAkuKo/MACgkQUaaFgP9pFrLNzgCfQHeChGtFdD5ABrtEEwg4+faa iMoAni07Iv4P0P1rKjBwXEUQA85amUO0 =MigZ -----END PGP SIGNATURE----- --nextPart5443290.T9Utag5tMc-- From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 28 17:49:42 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0CB5106564A for ; Sun, 28 Feb 2010 17:49:42 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4908FC35 for ; Sun, 28 Feb 2010 17:49:42 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw03.mail.saunalahti.fi (Postfix) with SMTP id DB08321683E; Sun, 28 Feb 2010 19:49:37 +0200 (EET) Date: Sun, 28 Feb 2010 19:49:37 +0200 From: Jaakko Heinonen To: Bruce Evans Message-ID: <20100228174936.GA1252@a91-153-117-195.elisa-laajakaista.fi> References: <6413.1266433105@critter.freebsd.dk> <20100218064545.J2074@besplex.bde.org> <20100218095538.GA2318@a91-153-117-195.elisa-laajakaista.fi> <20100225195138.GA3323@a91-153-117-195.elisa-laajakaista.fi> <20100226091923.X2605@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100226091923.X2605@delplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@FreeBSD.org, Poul-Henning Kamp Subject: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 17:49:42 -0000 [Moving discussion to -hackers. This is not directly related to the original commit anymore.] On 2010-02-26, Bruce Evans wrote: > > http://people.freebsd.org/~jh/patches/lookup-root.diff > This is in relookup(). I think relookup() is only called from rename(), > so the failing case is unreachable I don't think it's true for unionfs. Looking at the code it seems that it can call relookup() also with CREATE and DELETE nameiops. > % @@ -3618,9 +3618,6 @@ kern_renameat(struct thread *td, int old > % if (fromnd.ni_vp->v_type == VDIR) > % tond.ni_cnd.cn_flags |= WILLBEDIR; > % if ((error = namei(&tond)) != 0) { > % - /* Translate error code for rename("dir1", "dir2/."). */ > % - if (error == EISDIR && fvp->v_type == VDIR) > % - error = EINVAL; > > I think this has nothing to do with the root directory (as its comment says), > but it is to translate the EISDIR returned by ufs_lookup(), etc., when `tond' > is for a (directory) pathname ending in ".". So it should not be removed, > except possibly after changing ufs_lookup(), etc., to return EINVAL. The > EISDIR in ufs_lookup() is only for RENAME, so it is strange that any > translation is needed. I apparently put the translation here to avoid > looking at all leaf file systems. After r199137 the case of "dir2/." is handled in lookup() before the VOP_LOOKUP() call. I am not sure if it should be removed but it seems that there's no need for the translation after r199137. -- Jaakko From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 28 19:18:39 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9990E106566C for ; Sun, 28 Feb 2010 19:18:39 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 2B27E8FC13 for ; Sun, 28 Feb 2010 19:18:38 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,556,1262559600"; d="scan'208";a="27183837" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 28 Feb 2010 20:18:37 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 39C721B07C1; Sun, 28 Feb 2010 20:18:37 +0100 (CET) Date: Sun, 28 Feb 2010 20:18:36 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Feb 2010 19:18:39 -0000 Bruce Evans said that the doesn't like this comment you added in your patchset /* * Check for "" which is a way of talking about the root directory. * We can't provide a parent node for CREATE, DELETE and RENAME * operations. */ and would like to keep "/" the way it is instead of stripping the slash. however this comment /* * Replace multiple slashes by a single slash and trailing slashes * by a null. This must be done before VOP_LOOKUP() because some * fs's don't know about trailing slashes. Remember if there were * trailing slashes to handle symlinks, existing non-directories * and non-existing files that won't be directories specially later. */ says that some fs's can't handle trailing slashes. how exactly can the root dir be expressed on these fs's? is it in fact ""? and which fs's exactly are lacking support for trailing slashes? cheers. alex From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 01:12:01 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D30D106564A for ; Mon, 1 Mar 2010 01:12:01 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 193968FC13 for ; Mon, 1 Mar 2010 01:12:00 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,557,1262559600"; d="scan'208";a="27201438" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 01 Mar 2010 02:11:59 +0100 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 03B7B1B0750; Mon, 1 Mar 2010 02:11:58 +0100 (CET) Date: Mon, 01 Mar 2010 02:11:58 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 01:12:01 -0000 i have a small test app to check {rm|mk}dir()'s errnos with certain args like /, ., /proc and non-empty dirs. i'll submit it to this thread as soon as i also add testcases for syscalls like rename(), unlink(), etc. most of the errno codes returned after applying your patch look correct. i wonder however why rmdir("/proc") returns EACCESS as unprivileged user. wouldn't it make more sense to also return EBUSY? why complain about permission related matters when even root won't be able to perform the operation. also: since namei() takes care of handling the "/" and "." cases couldn't those checks in kern_rmdirat() and kern_unlinkat() be removed? it might also be interesting to look at the changes netbsd, openbsd and dragonflybsd have made to vfs_lookup.c. just had a quick look at revision 1.121 from netbsd and they have split lookup() into loads of smaller functions (see revision 1.117 and 1.118). seems they have been doing a lot of work here (using heavy XXX-commenting however). openbsd hasn't made to many changes to vfs_lookup.c. matthew dillon seems to have done an incredible job on dragonfly in connection with vfs_lookup.c. basically they completely got rid of namei() and are now using nlookup() in commit ad57d0edbfceb0cebfb1dce61490df78fcc4a97. the commit message is quite long and claims due to this change all syscalls which used to call namei() have become a lot less complex after switching to nlookup(). right now vfs_lookup.c in dragonfly contains only some legacy code used for compatibility. again: an incredible job! +1 for adapting those changes. ;) cheers. alex btw.: there're a few NAMEI_DIAGNOSTIC ifdefs in vfs_lookup.c to increase verbosity. From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 01:42:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4B7B106564A for ; Mon, 1 Mar 2010 01:42:38 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gx0-f211.google.com (mail-gx0-f211.google.com [209.85.217.211]) by mx1.freebsd.org (Postfix) with ESMTP id 57B748FC26 for ; Mon, 1 Mar 2010 01:42:38 +0000 (UTC) Received: by gxk3 with SMTP id 3so156776gxk.13 for ; Sun, 28 Feb 2010 17:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=nMmA3HJdClEVMpZGiuxguzqTDgE3SOtWef+tYj10j0I=; b=EAKDmIX9/SXpu6LPYyHnh9CQfNZlN+7B2mq4H765sHgseNUbQkz28R5MQfDfaRlrFr oZ/30G39Z7sqb3FAsaVy4M9oSouSbDKiW0BDPFSxWcKc0pSptRFUGWKHV45fJuahZ2M/ TLd4why79gGocJUlLewLeF4144QhCHlkdXwT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=cx6Sq+xYIuz75jDn3aRmaivF9Ficv1LBJ5SE1Jz0Cn9buGnTvV5guotDZlraqIUFds cX641kX0++CgIeAsmNZZLO7UpOmUo+VTvQRbmspeOeY3wA/f1ZJ65cWu9VFEfXdHaEH6 LupN6JWpY8uETiBRuO7dO2R30nrsVfZ1si/0M= Received: by 10.150.65.3 with SMTP id n3mr3296618yba.322.1267407752954; Sun, 28 Feb 2010 17:42:32 -0800 (PST) Received: from ppp-23.45.dialinfree.com (ppp-23.45.dialinfree.com [209.172.23.45]) by mx.google.com with ESMTPS id 9sm966589ywe.37.2010.02.28.17.42.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Feb 2010 17:42:31 -0800 (PST) Sender: "J. Hellenthal" Date: Sun, 28 Feb 2010 20:42:38 -0500 From: jhell To: Alexander Best In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 01:42:38 -0000 On Sun, 28 Feb 2010 11:54, alexbestms@ wrote: > Gary Jennejohn schrieb am 2010-02-28: >> On Sat, 27 Feb 2010 14:49:58 +0100 (CET) >> Alexander Best wrote: > >>> how about something like this? > > >> Based on a quick look it seems OK to me. > >> Have you tested it? > > i did. it works when `make cleanworld` is being run from /usr/src. i'm not > sure however what the > > .if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR} > .if exists(${BW_CANONICALOBJDIR}/) > > statement is for so i didn't include the lib32 cleanup in that clause. my > guess is that it's used to catch the case where `make cleanworld` is being run > in /usr/obj/usr/src > You can't run make from a obj directory there is no Makefile, Targets or spoons. ;) This line here: BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} Allows the end-user to set MAKEOBJDIRPREFIX in their environment and have the obj directory somewhere other than CANONICALOBJDIR. BW is an abbreviation for "buildworld". > cheers. > alex > >> --- >> Gary Jennejohn > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- jhell From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 01:43:33 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E48E1065670 for ; Mon, 1 Mar 2010 01:43:33 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id B47678FC1F for ; Mon, 1 Mar 2010 01:43:32 +0000 (UTC) Received: by gya1 with SMTP id 1so1146611gya.13 for ; Sun, 28 Feb 2010 17:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=KPOxgYFpSTMOa+p/jHQcN7k3oGU6of9fumyNEHFrzJU=; b=bjlyiOHpYKLhICRWM6vwSePhTF1PbQdUqwtvbflXofvyZswwBi/BN3wo+d2zIJialn Vb2mDZlHsffKPwMOhtnV90/YA2XjZQv80/bIauB+QwTAcbaCEEIywX+L4i5I7ZRZF+zz HQHOzNBOHLQ6Kw8YlB/slwQgec+3TE8WmEBIg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=J/B6vb8H+GtQDql5mIDL61KoHskzkO30FjwsKjirE+RG8zcSzpPazm4/qlHw/lVDuC ed/QUYuMce8leMTtySRdawYyqsiXV0Ga4boSnmdQh5N2AZ87q5EfeQQJJJXhgcFjeDrQ sQlltqwq3siU1HlMgppJXL+pBUjJbuHdbNwbs= Received: by 10.101.131.10 with SMTP id i10mr5079498ann.2.1267407807026; Sun, 28 Feb 2010 17:43:27 -0800 (PST) Received: from ppp-23.45.dialinfree.com (ppp-23.45.dialinfree.com [209.172.23.45]) by mx.google.com with ESMTPS id 4sm969379ywg.39.2010.02.28.17.43.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Feb 2010 17:43:25 -0800 (PST) Sender: "J. Hellenthal" Date: Sun, 28 Feb 2010 20:43:41 -0500 From: jhell To: Alexander Best In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] extending {amd64|i386} cpu info X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 01:43:33 -0000 On Fri, 26 Feb 2010 22:19, alexbestms@ wrote: > hi there, > > i always forget how to decipher model and family from the cpu id. of course > there're 3rd party tools to do that for you, but instead i decided to hack the > kernel. ;) > > maybe somebody finds these changes useful. > > cheers. > alex > What about the other arch's ? I only see i386 and amd64. I would think if this functionality is going to "make it in" that it should be done consistantly across the board, the way it is now. -- jhell From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 02:26:11 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A98A41065672 for ; Mon, 1 Mar 2010 02:26:11 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pz0-f197.google.com (mail-pz0-f197.google.com [209.85.222.197]) by mx1.freebsd.org (Postfix) with ESMTP id 7FBB08FC31 for ; Mon, 1 Mar 2010 02:26:11 +0000 (UTC) Received: by pzk36 with SMTP id 36so448025pzk.8 for ; Sun, 28 Feb 2010 18:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=t91SaagpVEFLLd8WBGf/mEET7Zr+IoKXKwps5HLaEbA=; b=tW5BFhPwQIhqKyc3MvvymUJT6Ph76qGPHvspPDzQKaqpjV9FYsZbhyci0q0jlYYhMO B4rWcrmUcyGCYSDj34mD9qKW2TsAyZZO9r4WFrGAE/rQrK622eaMHn9RGcDn9DFq2pik P30DabATdQyW6X6k6dKs1j0Svo3gI/QPdMmP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=dN5PpcOxdv/YOq7++WjFp3qRCwdQ1hZJ4/MjybADY8in50Bs6O1l5hnwkMO4lUw0DA qWVu5ViEUY72MPeyY5V+GE72K/O+ixwcDr/c+KOhqHgrOENiwxMbBK5GbL7YLCRlj36S 2pUHIZyFwlU2hsApabWzQNTwiEAFat0nwKdds= MIME-Version: 1.0 Received: by 10.142.152.8 with SMTP id z8mr2192358wfd.230.1267410365877; Sun, 28 Feb 2010 18:26:05 -0800 (PST) In-Reply-To: References: Date: Sun, 28 Feb 2010 18:26:05 -0800 Message-ID: <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com> From: Garrett Cooper To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 02:26:11 -0000 On Sun, Feb 28, 2010 at 5:11 PM, Alexander Best wrote: > i have a small test app to check {rm|mk}dir()'s errnos with certain args like > /, ., /proc and non-empty dirs. i'll submit it to this thread as soon as i > also add testcases for syscalls like rename(), unlink(), etc. > > most of the errno codes returned after applying your patch look correct. i > wonder however why rmdir("/proc") returns EACCESS as unprivileged user. > wouldn't it make more sense to also return EBUSY? why complain about > permission related matters when even root won't be able to perform the > operation. Hmm.. good question. POSIX doesn't fully expound on this case (http://www.opengroup.org/onlinepubs/009695399/functions/rmdir.html), and either seem possible... > also: since namei() takes care of handling the "/" and "." cases couldn't > those checks in kern_rmdirat() and kern_unlinkat() be removed? > > it might also be interesting to look at the changes netbsd, openbsd and > dragonflybsd have made to vfs_lookup.c. just had a quick look at revision > 1.121 from netbsd and they have split lookup() into loads of smaller functions > (see revision 1.117 and 1.118). seems they have been doing a lot of work here > (using heavy XXX-commenting however). > > openbsd hasn't made to many changes to vfs_lookup.c. > > matthew dillon seems to have done an incredible job on dragonfly in connection > with vfs_lookup.c. basically they completely got rid of namei() and are now > using nlookup() in commit ad57d0edbfceb0cebfb1dce61490df78fcc4a97. the commit > message is quite long and claims due to this change all syscalls which used to > call namei() have become a lot less complex after switching to nlookup(). > > right now vfs_lookup.c in dragonfly contains only some legacy code used for > compatibility. > > again: an incredible job! > > +1 for adapting those changes. ;) > > cheers. > alex > > btw.: there're a few NAMEI_DIAGNOSTIC ifdefs in vfs_lookup.c to increase > verbosity. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 02:28:19 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 219C0106566B for ; Mon, 1 Mar 2010 02:28:19 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id E2B178FC33 for ; Mon, 1 Mar 2010 02:28:18 +0000 (UTC) Received: by pwj7 with SMTP id 7so1528842pwj.13 for ; Sun, 28 Feb 2010 18:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=sYDr9dVZAMJvPLdIg/hhl/Nig/mdU5H6UbGmQEMxiic=; b=nbjW8BXMJ94VyTSa6rTGytZiErB8Cz6k/JegVfhF+olsBYodZmgj1SvlETzalDKC+b L90hFxqXY8nES7+ixYt9T6Z1aAvET2VRS7xEI0Xtfm8nSSmyt0/zyvPPlnB2NZr51h4E PyFf4fvuUEA5qLXUzSuN/pyc43J8hB97eDtZI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=J5c09nUyUNzdXfmfL/tei+3L40KXZxDQ8pIcJF6ABuG4b09uEa57DB3VNZFhGbcjLq K5Fl9/U6FF9M7CKKcW0kv4GkWqejlpA6q1u3Or2uqPy0/pfn3OpS00XztNE1uXtYMzjU E+RGe9aSKhZq/3nx2oJDPWUwVBswmSEWaKDgw= MIME-Version: 1.0 Received: by 10.142.152.5 with SMTP id z5mr2131065wfd.263.1267410495720; Sun, 28 Feb 2010 18:28:15 -0800 (PST) In-Reply-To: References: Date: Sun, 28 Feb 2010 18:28:15 -0800 Message-ID: <7d6fde3d1002281828hb5278d9sbb7a07f790b0da@mail.gmail.com> From: Garrett Cooper To: jhell Content-Type: text/plain; charset=ISO-8859-1 Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: [patch] extending {amd64|i386} cpu info X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 02:28:19 -0000 On Sun, Feb 28, 2010 at 5:43 PM, jhell wrote: > > On Fri, 26 Feb 2010 22:19, alexbestms@ wrote: >> >> hi there, >> >> i always forget how to decipher model and family from the cpu id. of >> course >> there're 3rd party tools to do that for you, but instead i decided to hack >> the >> kernel. ;) >> >> maybe somebody finds these changes useful. >> >> cheers. >> alex >> > > > What about the other arch's ? I only see i386 and amd64. I would think if > this functionality is going to "make it in" that it should be done > consistantly across the board, the way it is now. This is trivial enough of a change that I think it should be done for amd64/i386. I say that because it may be a bit more difficult for arm, mips, powerpc, sparc64, etc (probably not as much...). Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 10:25:55 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41607106564A for ; Mon, 1 Mar 2010 10:25:55 +0000 (UTC) (envelope-from alexeichi@yahoo.de) Received: from web27603.mail.ukl.yahoo.com (web27603.mail.ukl.yahoo.com [217.146.177.222]) by mx1.freebsd.org (Postfix) with SMTP id A92518FC13 for ; Mon, 1 Mar 2010 10:25:54 +0000 (UTC) Received: (qmail 30920 invoked by uid 60001); 1 Mar 2010 09:59:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1267437550; bh=9Zn6zBImBRnv88l4sFWlLnK6VG3NlW5QhibKoiz4hTs=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=lPOWLrAcYty5CsxfQeLFdmTH437FLGxN73ewDMVGfTk5pfo5rLdXoHTdx8loRJ4oDttUIdJPsajNe2Cgsvvwz1IO5HE+ZcEzIz28XPrf6UPj/3TyJMb6XYnLxdSJhCw4zTOuxTzhheDXtSzqHikEzDMatPMBVAcQJtk68b5tD9c= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=rpOEr6kyq2bDDs52Tb/PDkBxoPhDTBhj3PCEBi/Zqi2KBPVcCRwwRSh5JJ8lL4N1Vn+RDI4bqa7Qg2+uFwgkLZafQW1ZovWACFiPpu6Ad7DfhN1hbu7dZGs7eW+Q9GK/3hOalyMnq243AsVz/er55MrphfmX1JechLaSy4HnEiA=; Message-ID: <317657.30145.qm@web27603.mail.ukl.yahoo.com> X-YMail-OSG: BaQZtX8VM1kDsI0gu3MmxolsXXzjoUjZW.VCh9Nnrqo57cTi_uAmLV0aQicIIF6FxWY0_sUpZs2Gr2XaIJ0nwBbxjTyMk5LIVYftFDKoNEHjO6x0BI6zF._Z0e4kxgveorQFk4jezKX9XsJx_T3s0HQkNkAjjkJWw76HW8ECSLNRV7L.P3Kd.J8.mtwd0LT0kzbSaEbCEwS7TUHrwt6HKpTetoynnDAV9MVIFYdVh0U7z7zQ7Q2gKDjHqt35yzshzKilSnIdR_iD7S0sORyYR36M7q_6IB7mjZWzzLA6AYuZZon5oSo2IwKIHRpgZ4xng51XZg-- Received: from [87.187.210.251] by web27603.mail.ukl.yahoo.com via HTTP; Mon, 01 Mar 2010 09:59:10 GMT X-Mailer: YahooMailClassic/9.2.12 YahooMailWebService/0.8.100.260964 Date: Mon, 1 Mar 2010 09:59:10 +0000 (GMT) From: Alexander Eichner To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Allocating physical memory without a kernel mapping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 10:25:55 -0000 Hi,=0A=0AI'm currently trying to finish the R0 memory implementation[1] of = FreeBSD for VirtualBox. One of the missing methods allocates physical non c= ontiguous pages which don't need to have a kernel mapping (rtR0MemObjNative= AllocPhysNC). I'm using vm_phys_alloc_contig to achieve this. The pages are= than mapped into the user space VM process using pmap_enter (rtR0MemObjNat= iveMapUser) and if they are not needed anymore vm_page_free_toq is used to = free the pages (rtR0MemObjNativeFree).=0AEverything works as long as the VM= runs but if the VM process terminates and I do something else the host wil= l panic at some point (usually when I try to start a gnome session) with "p= map_enter: missing reference to page table page "[2].=0AThere seems to = some problem with the wire count of that page but I can't see what I'm doin= g wrong at the moment.=0AThanks in advance for any help.=0A=0ARegards,=0AAl= exander Eichner=0A=0A[1] http://www.virtualbox.org/browser/trunk/src/VBox/R= untime/r0drv/freebsd/memobj-r0drv-freebsd.c?rev=3D26899=0A[2]http://fxr.wat= son.org/fxr/source/amd64/amd64/pmap.c?im=3Dbigexcerpts#L3076=0A=0A_________= _________________________________________=0ADo You Yahoo!?=0ASie sind Spam = leid? Yahoo! Mail verf=FCgt =FCber einen herausragenden Schutz gegen Massen= mails. =0Ahttp://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 13:34:52 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FF71106564A for ; Mon, 1 Mar 2010 13:34:52 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id C33098FC15 for ; Mon, 1 Mar 2010 13:34:51 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id C2E651FFC22; Mon, 1 Mar 2010 13:34:50 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 7E7CE84500; Mon, 1 Mar 2010 14:34:50 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: xorquewasp@googlemail.com References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> Date: Mon, 01 Mar 2010 14:34:50 +0100 In-Reply-To: <20100227093409.GA40858@logik.internal.network> (xorquewasp@googlemail.com's message of "Sat, 27 Feb 2010 09:34:09 +0000") Message-ID: <864ol0w4g5.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 13:34:52 -0000 % fgrep 'Directory not empty' inkscape.txt=20 rmdir: /work/ports/devel/boost-libs/work: Directory not empty rmdir: /work/ports/x11-toolkits/gtkmm24/work: Directory not empty rmdir: /work/ports/devel/boehm-gc/work: Directory not empty rmdir: /work/ports/math/gsl/work: Directory not empty rmdir: /work/ports/textproc/gtkspell/work: Directory not empty rmdir: /work/ports/graphics/libwpg/work: Directory not empty rmdir: /work/ports/graphics/ImageMagick/work: Directory not empty rmdir: /work/ports/textproc/p5-XML-XQL/work: Directory not empty rmdir: /work/ports/devel/boost-jam/work: Directory not empty rmdir: /work/ports/devel/icu/work: Directory not empty rmdir: /work/ports/devel/glibmm/work: Directory not empty rmdir: /work/ports/graphics/cairomm/work: Directory not empty rmdir: /work/ports/x11-toolkits/pangomm/work: Directory not empty This tells me that either there is another build running in parallel, or /work is mounted from a dodgy NFS server. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 13:54:48 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5C0A1065672 for ; Mon, 1 Mar 2010 13:54:48 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 672878FC14 for ; Mon, 1 Mar 2010 13:54:47 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,560,1262559600"; d="scan'208";a="297873927" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 01 Mar 2010 14:54:46 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 7DC9A1B0768; Mon, 1 Mar 2010 14:54:46 +0100 (CET) Date: Mon, 01 Mar 2010 14:54:45 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: jhell Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 13:54:48 -0000 jhell schrieb am 2010-03-01: > On Sun, 28 Feb 2010 11:54, alexbestms@ wrote: > >Gary Jennejohn schrieb am 2010-02-28: > >>On Sat, 27 Feb 2010 14:49:58 +0100 (CET) > >>Alexander Best wrote: > >>>how about something like this? > >>Based on a quick look it seems OK to me. > >>Have you tested it? > >i did. it works when `make cleanworld` is being run from /usr/src. > >i'm not > >sure however what the > >.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR} > >.if exists(${BW_CANONICALOBJDIR}/) > >statement is for so i didn't include the lib32 cleanup in that > >clause. my > >guess is that it's used to catch the case where `make cleanworld` > >is being run > >in /usr/obj/usr/src > You can't run make from a obj directory there is no Makefile, > Targets or spoons. ;) > This line here: > BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > Allows the end-user to set MAKEOBJDIRPREFIX in their environment and > have the obj directory somewhere other than CANONICALOBJDIR. > BW is an abbreviation for "buildworld". ah. thanks for the hint. i guess i'll change the patch so lib32 gets also removed when the user has specified a different obj directory. > >cheers. > >alex > >>--- > >>Gary Jennejohn > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to > >"freebsd-hackers-unsubscribe@freebsd.org" > -- > jhell From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 13:58:39 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0459106566B; Mon, 1 Mar 2010 13:58:39 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 14DC28FC16; Mon, 1 Mar 2010 13:58:38 +0000 (UTC) Received: by wwb17 with SMTP id 17so56355wwb.13 for ; Mon, 01 Mar 2010 05:58:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to; bh=mDFa91F9HvWYRHUe8XkL0OX5dUF9DcMYuB5MV1hGvL4=; b=iwtjqZUwv7/RxXDT72o9jCoH/dPy7YHkvOGHQNMwsUu1wtWFd9lRV+iqIGmQneI59X 79y/7XOClZQdXP9krwVT5zKJLoml0U8u8CIuWwvEdm1AXgV3zdMkcXBkVd7OgBT8Dxhk l1cYJHufE9tH3m7D/H5+nVMncM2ydTzuuAzAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to; b=fSRliToDJ/zqBH2Dpn3UJTP3DQ+1UvKDbK6T82JA8+0cH/Kd8FocSLI7mX1zxkd92P z5TJrMQbhk8CwVSQK/XdbuoFrdrVbxu9Sr6YT5/dxw51R27ShUj8iDkXYoitBSS+U8pH h6OmDhSwvJq3M0KWG+Jg5+Njtwa2wGy7cPVso= Received: by 10.216.161.196 with SMTP id w46mr1108142wek.105.1267451913172; Mon, 01 Mar 2010 05:58:33 -0800 (PST) Received: from viper.internal.network (dsl78-143-196-85.in-addr.fast.co.uk [78.143.196.85]) by mx.google.com with ESMTPS id j8sm10962251gvb.16.2010.03.01.05.58.31 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Mar 2010 05:58:31 -0800 (PST) Received: from viper.internal.network (localhost [127.0.0.1]) by viper.internal.network (Postfix) with ESMTP id 2F4714AC06; Mon, 1 Mar 2010 13:58:30 +0000 (UTC) Received: (from m0@localhost) by viper.internal.network (8.14.3/8.14.3/Submit) id o21DwTAm053322; Mon, 1 Mar 2010 13:58:29 GMT (envelope-from xorquewasp@googlemail.com) X-Authentication-Warning: viper.internal.network: m0 set sender to xorquewasp@googlemail.com using -f Date: Mon, 1 Mar 2010 13:58:29 +0000 From: xorquewasp@googlemail.com To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20100301135829.GB2219@logik.internal.network> References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <864ol0w4g5.fsf@ds4.des.no> Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 13:58:39 -0000 On 2010-03-01 14:34:50, Dag-Erling Smørgrav wrote: > % fgrep 'Directory not empty' inkscape.txt > rmdir: /work/ports/devel/boost-libs/work: Directory not empty > rmdir: /work/ports/x11-toolkits/gtkmm24/work: Directory not empty > rmdir: /work/ports/devel/boehm-gc/work: Directory not empty > rmdir: /work/ports/math/gsl/work: Directory not empty > rmdir: /work/ports/textproc/gtkspell/work: Directory not empty > rmdir: /work/ports/graphics/libwpg/work: Directory not empty > rmdir: /work/ports/graphics/ImageMagick/work: Directory not empty > rmdir: /work/ports/textproc/p5-XML-XQL/work: Directory not empty > rmdir: /work/ports/devel/boost-jam/work: Directory not empty > rmdir: /work/ports/devel/icu/work: Directory not empty > rmdir: /work/ports/devel/glibmm/work: Directory not empty > rmdir: /work/ports/graphics/cairomm/work: Directory not empty > rmdir: /work/ports/x11-toolkits/pangomm/work: Directory not empty > > This tells me that either there is another build running in parallel, or > /work is mounted from a dodgy NFS server. 'Lo, There's certainly no parallel building going on, but /work is nullfs mounted (from ZFS). Could this cause the above? xw From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 14:10:18 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 918EE1065673; Mon, 1 Mar 2010 14:10:18 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4EFDA8FC0C; Mon, 1 Mar 2010 14:10:18 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 433161FFC22; Mon, 1 Mar 2010 14:10:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E62F484500; Mon, 1 Mar 2010 15:10:16 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: xorquewasp@googlemail.com References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100301135829.GB2219@logik.internal.network> Date: Mon, 01 Mar 2010 15:10:16 +0100 In-Reply-To: <20100301135829.GB2219@logik.internal.network> (xorquewasp@googlemail.com's message of "Mon, 1 Mar 2010 13:58:29 +0000") Message-ID: <86zl2suo8n.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 14:10:18 -0000 xorquewasp@googlemail.com writes: > There's certainly no parallel building going on, but /work is nullfs > mounted (from ZFS). Could this cause the above? Not sure. Why are you using nullfs? Can you show us the contents of those directories? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 14:19:43 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D9731065677; Mon, 1 Mar 2010 14:19:43 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id F08A98FC1C; Mon, 1 Mar 2010 14:19:42 +0000 (UTC) Received: by fxm23 with SMTP id 23so144214fxm.3 for ; Mon, 01 Mar 2010 06:19:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=g3BKpuj9X4yKlfjQ02U1nuT9HUEimnB2xSjf69vkiIE=; b=pa3klplkBoWZYZyztXwEnXDIOBJJfovM8XvFbq60o3z+6EPnZ4vaaGWdH0KpH5rLHi fRDiIdUHP7v+PKnqgp18JL7LjaaCY2GFHU9gi1HldNDzk/efIYzYB5cgovEa7AO7U076 bl4EGSBHGpzrmkOQQ01IXh6v0OtocfAdgxiIc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=aWEifrNdkqH8THvGnwklxwQpe4Co76Awzp8zWelNIZiaBr1ciK5SasAtJuPXNFhM8o 8R4vG6eMkeJVKZoFfF8fm0ROc6Aog6AX4ra6B3iZIdmHVIneSr1QIEZ6bC+U9/D/aTBL +rCaI48YBkNkNteG7MTr7mQ8roShP9yCAq/54= MIME-Version: 1.0 Received: by 10.223.100.216 with SMTP id z24mr5138597fan.5.1267453176050; Mon, 01 Mar 2010 06:19:36 -0800 (PST) In-Reply-To: <317657.30145.qm@web27603.mail.ukl.yahoo.com> References: <317657.30145.qm@web27603.mail.ukl.yahoo.com> Date: Mon, 1 Mar 2010 15:19:35 +0100 Message-ID: <4e6cba831003010619j560f5b92n4c63ab2520cff7db@mail.gmail.com> From: Giovanni Trematerra To: Alexander Eichner , alc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Allocating physical memory without a kernel mapping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 14:19:43 -0000 On Mon, Mar 1, 2010 at 10:59 AM, Alexander Eichner wro= te: > Hi, > > I'm currently trying to finish the R0 memory implementation[1] of FreeBSD= for VirtualBox. One of the missing methods allocates physical non contiguo= us pages which don't need to have a kernel mapping (rtR0MemObjNativeAllocPh= ysNC). I'm using vm_phys_alloc_contig to achieve this. The pages are than m= apped into the user space VM process using pmap_enter (rtR0MemObjNativeMapU= ser) and if they are not needed anymore vm_page_free_toq is used to free th= e pages (rtR0MemObjNativeFree). > Everything works as long as the VM runs but if the VM process terminates = and I do something else the host will panic at some point (usually when I t= ry to start a gnome session) with "pmap_enter: missing reference to page ta= ble page "[2]. > There seems to some problem with the wire count of that page but I can't = see what I'm doing wrong at the moment. > Thanks in advance for any help. Please, try this patch against revision 26898. --- memobj-r0drv-freebsd.c.orig 2010-02-26 10:28:44.000000000 +0100 +++ memobj-r0drv-freebsd.c 2010-02-26 13:55:35.000000000 +0100 @@ -209,8 +209,7 @@ int rtR0MemObjNativeAllocPage(PPRTR0MEMO vm_page_t pPage; pPage =3D vm_page_alloc(pMemFreeBSD->pObject, PageIndex, - VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | - VM_ALLOC_WIRED); + VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM); #if __FreeBSD_version >=3D 800000 /** @todo Find exact version number */ /* Fixes crashes during VM termination on FreeBSD8-CURRENT amd64 @@ -220,9 +219,6 @@ int rtR0MemObjNativeAllocPage(PPRTR0MEMO if (pPage) { - vm_page_lock_queues(); - vm_page_wire(pPage); - vm_page_unlock_queues(); /* Put the page into the page table now. */ #if __FreeBSD_version >=3D 701105 pmap_enter(kernel_map->pmap, AddressDst, VM_PROT_NONE, pPage, @@ -253,6 +249,8 @@ int rtR0MemObjNativeAllocPage(PPRTR0MEMO if (rc =3D=3D VINF_SUCCESS) { + vm_map_wire(kernel_map, MapAddress, MapAddress + cb, + VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES); pMemFreeBSD->Core.pv =3D (void *)MapAddress; *ppMem =3D &pMemFreeBSD->Core; return VINF_SUCCESS; > > Regards, > Alexander Eichner > > [1] http://www.virtualbox.org/browser/trunk/src/VBox/Runtime/r0drv/freebs= d/memobj-r0drv-freebsd.c?rev=3D26899 > [2]http://fxr.watson.org/fxr/source/amd64/amd64/pmap.c?im=3Dbigexcerpts#L= 3076 > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf=FCgt =FCber einen herausragenden Sch= utz gegen Massenmails. > http://mail.yahoo.com > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 14:31:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6A8D106564A for ; Mon, 1 Mar 2010 14:31:31 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 807248FC23 for ; Mon, 1 Mar 2010 14:31:31 +0000 (UTC) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id o21EVIMP042594; Mon, 1 Mar 2010 06:31:18 -0800 (PST) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.3/Submit) id o21EVIh2042593; Mon, 1 Mar 2010 06:31:18 -0800 (PST) (envelope-from david) Date: Mon, 1 Mar 2010 06:31:18 -0800 From: David Wolfskill To: xorquewasp@googlemail.com Message-ID: <20100301143118.GL22824@bunrab.catwhisker.org> Mail-Followup-To: David Wolfskill , xorquewasp@googlemail.com, freebsd-hackers@freebsd.org References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100301135829.GB2219@logik.internal.network> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HTLCc13+3hfAZ6SL" Content-Disposition: inline In-Reply-To: <20100301135829.GB2219@logik.internal.network> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 14:31:31 -0000 --HTLCc13+3hfAZ6SL Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 01, 2010 at 01:58:29PM +0000, xorquewasp@googlemail.com wrote: > On 2010-03-01 14:34:50, Dag-Erling Sm=F8rgrav wrote: > > % fgrep 'Directory not empty' inkscape.txt=20 > > rmdir: /work/ports/devel/boost-libs/work: Directory not empty > > ... > > rmdir: /work/ports/x11-toolkits/pangomm/work: Directory not empty > >=20 > > This tells me that either there is another build running in parallel, or > > /work is mounted from a dodgy NFS server. >=20 > 'Lo, >=20 > There's certainly no parallel building going on, but /work is nullfs > mounted (from ZFS). Could this cause the above? Caveat: this may be a "red herring." But please note that for stable/7 prior to r190970 (2009-04-12 10:43:41 -0700) or head prior to r189287 (2009-03-02 12:51:39 -0800; prior to stable/8 branch, so it's part of stable/8 already), there was a rather nasty (IMO, as I spent a fair amount of time trying to figure out what was going on) such that a FreeBSD NFS client would see precisely the above symptoms if: * A process on the FreEBSD NFS client performed a chdir() to a directory that was NFS-mounted, then started a "recursive descent" (e.g., "tar c ..." or "rm -fr") from that directory and * Some other process on the same FreeBSD NFS client attempted to perform an unmount() of the NFS-mounted file system referenced above. Note that the unmount() is doomed, as the file system is active -- a directory in it is the $cwd for the first process, after all. This may seem an unlikely -- possibly even perverse -- combination of events. However, it is actually SOP for amd(8): the master amd process periodically forks a child to perform an attempted unmount of auto-mounted NFS file systems periodically, and the way amd realizes that the file system is not eligible for unmounting is if the attempted unmount() gets EBUSY. It is *possible* that something akin to this mechanism *might* be affecting the OP. Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --HTLCc13+3hfAZ6SL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkuLz7UACgkQmprOCmdXAD3jywCdFY72Z4zTwLYcF0pb07700V0B WlcAn3Aaq4sK5vN7zq36ONOoIvooUGxG =9orG -----END PGP SIGNATURE----- --HTLCc13+3hfAZ6SL-- From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 16:17:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8B36106564A for ; Mon, 1 Mar 2010 16:17:59 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 6DED68FC19 for ; Mon, 1 Mar 2010 16:17:58 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,561,1262559600"; d="scan'208";a="297891461" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 01 Mar 2010 17:17:57 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 896C41B07C1; Mon, 1 Mar 2010 17:17:57 +0100 (CET) Date: Mon, 01 Mar 2010 17:17:57 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Garrett Cooper , jhell Message-ID: In-Reply-To: <7d6fde3d1002281828hb5278d9sbb7a07f790b0da@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] extending {amd64|i386} cpu info X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 16:17:59 -0000 Garrett Cooper schrieb am 2010-03-01: > On Sun, Feb 28, 2010 at 5:43 PM, jhell wrote: > > On Fri, 26 Feb 2010 22:19, alexbestms@ wrote: > >> hi there, > >> i always forget how to decipher model and family from the cpu id. > >> of > >> course > >> there're 3rd party tools to do that for you, but instead i decided > >> to hack > >> the > >> kernel. ;) > >> maybe somebody finds these changes useful. > >> cheers. > >> alex > > What about the other arch's ? I only see i386 and amd64. I would > > think if > > this functionality is going to "make it in" that it should be done > > consistantly across the board, the way it is now. i'll have a look at the other archs to see if implementing this can be done just as easy as with i386 and amd64. alex > This is trivial enough of a change that I think it should be done > for amd64/i386. I say that because it may be a bit more difficult for > arm, mips, powerpc, sparc64, etc (probably not as much...). > Thanks, > -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 16:19:09 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1C71065674; Mon, 1 Mar 2010 16:19:09 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 1AEF68FC20; Mon, 1 Mar 2010 16:19:08 +0000 (UTC) Received: by ewy26 with SMTP id 26so1383365ewy.3 for ; Mon, 01 Mar 2010 08:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to; bh=uToaBBr5V2WjQ+EzCdRcgHR0UX4a6fDI3j+0i+XOVWs=; b=GixNxz3ZtyffF/uxDGhWhBfSfUD95n4vP2lrWKmxRbrGTpcqU6wf6PGPCTuiaT0kxt dzloHD5HPp1N54/Qn4xdWOiH3t3CvAxkDUXlNjtZFpBFWVEl0pZmE6+OH325erALNDKU 1ly74dpgHsHrb897QHCf9vCdiAhTo84iXU7yk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to; b=PI6RkiZ5kXM5xeB4HfEMWbyfWEFaau/5D4uzSzRm9tQiItjMiTxKkWxg7Sk7nJoniE 4cY0QKi2+l0/Yq4SOqW3cAEug3OjUsyXcW7lA7WH7FUN+tU9/1eMC6RRS7DdETRdux2N B3X7CTFwKd23WMHa6shQrI4P07UyYuM+t+Z4M= Received: by 10.216.89.209 with SMTP id c59mr2814512wef.181.1267460344176; Mon, 01 Mar 2010 08:19:04 -0800 (PST) Received: from viper.internal.network (dsl78-143-196-85.in-addr.fast.co.uk [78.143.196.85]) by mx.google.com with ESMTPS id x6sm11643074gvf.28.2010.03.01.08.19.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Mar 2010 08:19:03 -0800 (PST) Received: from viper.internal.network (localhost [127.0.0.1]) by viper.internal.network (Postfix) with ESMTP id 4B70B4AC06; Mon, 1 Mar 2010 16:19:02 +0000 (UTC) Received: (from m0@localhost) by viper.internal.network (8.14.3/8.14.3/Submit) id o21GJ1Js002603; Mon, 1 Mar 2010 16:19:01 GMT (envelope-from xorquewasp@googlemail.com) X-Authentication-Warning: viper.internal.network: m0 set sender to xorquewasp@googlemail.com using -f Date: Mon, 1 Mar 2010 16:19:01 +0000 From: xorquewasp@googlemail.com To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20100301161901.GC2219@logik.internal.network> References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100301135829.GB2219@logik.internal.network> <86zl2suo8n.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86zl2suo8n.fsf@ds4.des.no> Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 16:19:09 -0000 On 2010-03-01 15:10:16, Dag-Erling Smørgrav wrote: > xorquewasp@googlemail.com writes: > > There's certainly no parallel building going on, but /work is nullfs > > mounted (from ZFS). Could this cause the above? > > Not sure. Why are you using nullfs? Basically because "I don't know any better". > Can you show us the contents of those directories? I'm off out, but I'll post the contents of /work when I get back tonight. xw From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 17:23:35 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A569106566C for ; Mon, 1 Mar 2010 17:23:35 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout5.freenet.de (mout5.freenet.de [IPv6:2001:748:100:40::2:7]) by mx1.freebsd.org (Postfix) with ESMTP id D25FF8FC2B for ; Mon, 1 Mar 2010 17:23:34 +0000 (UTC) Received: from [195.4.92.26] (helo=16.mx.freenet.de) by mout5.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.72 #1) id 1Nm9LB-0003IS-Hw; Mon, 01 Mar 2010 18:23:33 +0100 Received: from p57ae2655.dip0.t-ipconnect.de ([87.174.38.85]:36544 helo=ernst.jennejohn.org) by 16.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.72 #2) id 1Nm9LB-0006A9-8Z; Mon, 01 Mar 2010 18:23:33 +0100 Date: Mon, 1 Mar 2010 18:23:32 +0100 From: Gary Jennejohn To: Garrett Cooper Message-ID: <20100301182332.5b7f0855@ernst.jennejohn.org> In-Reply-To: <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com> References: <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.16.2; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 17:23:35 -0000 On Sun, 28 Feb 2010 18:26:05 -0800 Garrett Cooper wrote: > On Sun, Feb 28, 2010 at 5:11 PM, Alexander Best wrote: > > i have a small test app to check {rm|mk}dir()'s errnos with certain args like > > /, ., /proc and non-empty dirs. i'll submit it to this thread as soon as i > > also add testcases for syscalls like rename(), unlink(), etc. > > > > most of the errno codes returned after applying your patch look correct. i > > wonder however why rmdir("/proc") returns EACCESS as unprivileged user. > > wouldn't it make more sense to also return EBUSY? why complain about > > permission related matters when even root won't be able to perform the > > operation. > > Hmm.. good question. POSIX doesn't fully expound on this case > (http://www.opengroup.org/onlinepubs/009695399/functions/rmdir.html), > and either seem possible... > This maybe from rmdir(2)? [EACCES] Write permission is denied on the directory containing the link to be removed. ls -ldo / drwxr-xr-x 44 root wheel - 1536 Feb 28 18:36 / ls -ldo /proc dr-xr-xr-x 2 root wheel - 512 Sep 7 2008 /proc --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 18:47:06 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C9FA1065674 for ; Mon, 1 Mar 2010 18:47:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0EAA08FC32 for ; Mon, 1 Mar 2010 18:47:06 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B534646B0C; Mon, 1 Mar 2010 13:47:05 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id EE7708A025; Mon, 1 Mar 2010 13:47:04 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 1 Mar 2010 10:35:58 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003011035.58778.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 01 Mar 2010 13:47:05 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06 autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Alexander Best Subject: Re: [patch] extending {amd64|i386} cpu info X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 18:47:06 -0000 On Friday 26 February 2010 10:19:46 pm Alexander Best wrote: > hi there, > > i always forget how to decipher model and family from the cpu id. of course > there're 3rd party tools to do that for you, but instead i decided to hack the > kernel. ;) > > maybe somebody finds these changes useful. This should go in if only because the model and family are no longer trivial things to figure out. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 18:47:15 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7635A1065769; Mon, 1 Mar 2010 18:47:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 342698FC33; Mon, 1 Mar 2010 18:47:15 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id BFFC046B49; Mon, 1 Mar 2010 13:47:14 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id C30998A024; Mon, 1 Mar 2010 13:47:13 -0500 (EST) From: John Baldwin To: Juergen Lock Date: Mon, 1 Mar 2010 13:25:53 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <20100223215010.GA67619@triton8.kn-bremen.de> <201002261121.05068.jhb@freebsd.org> <20100226210952.GA2253@triton8.kn-bremen.de> In-Reply-To: <20100226210952.GA2253@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003011325.53617.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 01 Mar 2010 13:47:13 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, Tim Kientzle Subject: Re: 32 bit Linux lseek missing overflow check (was: Re: Linuxolator patches: stat and lseek SEEK_END for disk devices) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 18:47:15 -0000 On Friday 26 February 2010 4:09:52 pm Juergen Lock wrote: > On Fri, Feb 26, 2010 at 11:21:05AM -0500, John Baldwin wrote: > > On Thursday 25 February 2010 3:28:50 pm Juergen Lock wrote: > > > On Tue, Feb 23, 2010 at 10:50:10PM +0100, Juergen Lock wrote: > > > > Hi! > > > > > > > > Before this gets buried on -hackers in another thead... :) > > > > > > > > I now have disks appear as block devices for Linux processes (there > > > > already was commented out code for that in linux_stats.c, I hope my > > > > version is now `correct enough' to be usable [1]), and I made a simple > > > > patch to make lseek SEEK_END (L_XTND in the source) dtrt on disk > > > > devices too by simply invoking the DIOCGMEDIASIZE ioctl there; [2] > > > > both of these things are what (some) Linux processes expect. > > > > > > > > Patches are here: (made on stable/8, if they don't apply on head > > > > I'll have to make extra versions for that...) > > > > http://people.freebsd.org/~nox/linuxdisk-blk.patch [1] > > > > http://people.freebsd.org/~nox/lseek-seek_end.patch [2] > > > > > > > > And yes, with these patches the Linux bsdtar mentioned on -hackers > > > > in the `"tar tfv /dev/cd0" speedup patch' thread now also runs fast > > > > on FreeBSD. :) > > > > > > I now added an vn_isdisk() check to the second patch after comments from > > > julian, and I made a new patch that adds an overflow check to the 32 bit > > > linux lseek: (also at > > > http://people.freebsd.org/~nox/linux-lseek-overflow.patch > > > ) > > > > Hmm, when I asked Bruce, he actually said it was a feature that you didn't use > > vn_isdisk(). He also suggested that the proper way to fix lseek on devices is > > to fix stat in devfs to return a non-zero size. I have a possible fix to do > > that but haven't tested it yet: > > > > Index: devfs_vnops.c > > =================================================================== > > --- devfs_vnops.c (revision 204207) > > +++ devfs_vnops.c (working copy) > > @@ -44,6 +44,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -564,7 +565,11 @@ > > struct vattr *vap = ap->a_vap; > > int error = 0; > > struct devfs_dirent *de; > > + struct cdevsw *dsw; > > + struct thread *td; > > + struct file *fpop; > > struct cdev *dev; > > + off_t size; > > > > de = vp->v_data; > > KASSERT(de != NULL, ("Null dirent in devfs_getattr vp=%p", vp)); > > @@ -612,6 +617,18 @@ > > vap->va_ctime = dev->si_ctime; > > > > vap->va_rdev = cdev2priv(dev)->cdp_inode; > > + > > + dsw = dev_refthread(dev); > > + if (dsw != NULL) { > > + td = curthread; > > + fpop = td->td_fpop; > > + td->td_fpop = NULL; > > + if (dsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&size, > > + FREAD, td) == 0) > > + vap->va_size = size; > > + td->td_fpop = fpop; > > + dev_relthread(dev); > > + } > > } > > vap->va_gen = 0; > > vap->va_flags = 0; > > > > I had to add an D_DISK check, else it would panic at boot in a revoke > syscall in ttydev_ioctl in ttydev_enter, apparently in the tty_lock call: > (I didn't get a dump as it panic'd way too early in boot) > http://fxr.watson.org/fxr/source/kern/tty.c#L159 > > Maybe dev->si_drv1 is null here? > http://fxr.watson.org/fxr/source/kern/tty.c#L486 > > Anyway, with the D_DISK check added the patch seems to work: Unfortunately it panics in g_dev_ioctl() with INVARIANTS enabled. I will bug phk about that. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 19:08:47 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90A2B106566C; Mon, 1 Mar 2010 19:08:47 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 502788FC22; Mon, 1 Mar 2010 19:08:47 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 5F8491FFC22; Mon, 1 Mar 2010 19:08:46 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id F3F1484500; Mon, 1 Mar 2010 20:08:45 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: xorquewasp@googlemail.com References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100301135829.GB2219@logik.internal.network> <86zl2suo8n.fsf@ds4.des.no> <20100301161901.GC2219@logik.internal.network> Date: Mon, 01 Mar 2010 20:08:45 +0100 In-Reply-To: <20100301161901.GC2219@logik.internal.network> (xorquewasp@googlemail.com's message of "Mon, 1 Mar 2010 16:19:01 +0000") Message-ID: <86635frhaa.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 19:08:47 -0000 xorquewasp@googlemail.com writes: > Dag-Erling Sm=C3=B8rgrav writes: > > xorquewasp@googlemail.com writes: > > > There's certainly no parallel building going on, but /work is nullfs > > > mounted (from ZFS). Could this cause the above? > > Not sure. Why are you using nullfs? > Basically because "I don't know any better". That's begging the question... Clearly you're using nullfs because you need something done that you think nullfs can do for you. I'd like to know what that is, because I suspect that you don't actually need it, and it might be the source of your problems. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 19:52:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4982106566C for ; Mon, 1 Mar 2010 19:52:49 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id 2EA998FC1A for ; Mon, 1 Mar 2010 19:52:47 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,561,1262559600"; d="scan'208";a="237984660" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 01 Mar 2010 20:52:46 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 92DA01B0768; Mon, 1 Mar 2010 20:52:46 +0100 (CET) Date: Mon, 01 Mar 2010 20:52:45 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: jhell Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 19:52:49 -0000 jhell schrieb am 2010-03-01: > On Sun, 28 Feb 2010 11:54, alexbestms@ wrote: > >Gary Jennejohn schrieb am 2010-02-28: > >>On Sat, 27 Feb 2010 14:49:58 +0100 (CET) > >>Alexander Best wrote: > >>>how about something like this? > >>Based on a quick look it seems OK to me. > >>Have you tested it? > >i did. it works when `make cleanworld` is being run from /usr/src. > >i'm not > >sure however what the > >.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR} > >.if exists(${BW_CANONICALOBJDIR}/) > >statement is for so i didn't include the lib32 cleanup in that > >clause. my > >guess is that it's used to catch the case where `make cleanworld` > >is being run > >in /usr/obj/usr/src > You can't run make from a obj directory there is no Makefile, > Targets or spoons. ;) > This line here: > BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > Allows the end-user to set MAKEOBJDIRPREFIX in their environment and > have the obj directory somewhere other than CANONICALOBJDIR. oh. and btw: wouldn't it be reasonable to prevent a user shooting himself in the foot if he has the brilliant idea of setting "MAKEOBJDIRPREFIX = /" ? alex > BW is an abbreviation for "buildworld". > >cheers. > >alex > >>--- > >>Gary Jennejohn > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to > >"freebsd-hackers-unsubscribe@freebsd.org" > -- > jhell From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 22:03:40 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17FC8106566B; Mon, 1 Mar 2010 22:03:40 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6E4DE8FC13; Mon, 1 Mar 2010 22:03:38 +0000 (UTC) Received: by wyb32 with SMTP id 32so299780wyb.13 for ; Mon, 01 Mar 2010 14:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to; bh=C5ZFodMLIOwE7Lp0ZkwT1dTgcTeIttVWPvpHGYTusVE=; b=EvFKTKN7t3y3H/KcNyxEIfjvblYWQbb65oKNbh8zsiJp3rtAERhe9tiQ6sshNDVj5X AKEEcCKLvl09+OkaPRn4Q4HGBC9tSjlpQOZnHqIdOl0ELusUAAZ/76OouW3/sQcDEHIQ uZ+TpqwbrRzz6R0wYTyeELeiX8F3M6jMtSpLM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to; b=nnfngLmGaYf4kyyzs4ItS6ljnF6bPnkYOmUejWsrflbzjwImhizM30Ozd5D7eqpPf8 maITedPAFRhBPAfV/1mi7IAe1qe2Fvn3nhx/P6BB2PcK8jBgHCnD+/wUgLlBpForsXOW 1z0LhnEe1Wk4lmNTszE/HMIdkfQYZURq/Z05c= Received: by 10.216.88.203 with SMTP id a53mr3459405wef.177.1267481015397; Mon, 01 Mar 2010 14:03:35 -0800 (PST) Received: from viper.internal.network (dsl78-143-196-85.in-addr.fast.co.uk [78.143.196.85]) by mx.google.com with ESMTPS id n12sm12448656gve.15.2010.03.01.14.03.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Mar 2010 14:03:34 -0800 (PST) Received: from viper.internal.network (localhost [127.0.0.1]) by viper.internal.network (Postfix) with ESMTP id AB29F4AC06; Mon, 1 Mar 2010 22:03:32 +0000 (UTC) Received: (from m0@localhost) by viper.internal.network (8.14.3/8.14.3/Submit) id o21M3W4e004933; Mon, 1 Mar 2010 22:03:32 GMT (envelope-from xorquewasp@googlemail.com) X-Authentication-Warning: viper.internal.network: m0 set sender to xorquewasp@googlemail.com using -f Date: Mon, 1 Mar 2010 22:03:32 +0000 From: xorquewasp@googlemail.com To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20100301220332.GB74816@logik.internal.network> References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100301135829.GB2219@logik.internal.network> <86zl2suo8n.fsf@ds4.des.no> <20100301161901.GC2219@logik.internal.network> <86635frhaa.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86635frhaa.fsf@ds4.des.no> Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 22:03:40 -0000 'Lo, Here's the current state of '/work': http://coreland.ath.cx/tmp/work.txt On 2010-03-01 20:08:45, Dag-Erling Smørgrav wrote: > That's begging the question... Clearly you're using nullfs because you > need something done that you think nullfs can do for you. I'd like to > know what that is, because I suspect that you don't actually need it, > and it might be the source of your problems. I agree, ZFS likely has something to replace my use of nullfs. I used it previously to do the following using only UFS filesystems: Basically, I have a ton of jails and each jail mounts a shared 'tmp', and possibly unshared 'pkg' 'work' 'distfiles' and 'ports' directories: /storage/jails/8.0/x86_64/mk4/pkg /jail/8.0-amd64-mk4/pkg nullfs rw /storage/jails/8.0/x86_64/mk4/work /jail/8.0-amd64-mk4/work nullfs rw /storage/distfiles /jail/8.0-amd64-mk4/distfiles nullfs rw /storage/ports /jail/8.0-amd64-mk4/ports nullfs ro /storage/shared_tmp /jail/8.0-amd64-mk4/shared_tmp nullfs rw xw From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 22:33:44 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 896ED106564A for ; Mon, 1 Mar 2010 22:33:44 +0000 (UTC) (envelope-from mike.steinmann@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 60BCA8FC1B for ; Mon, 1 Mar 2010 22:33:44 +0000 (UTC) Received: by pwj1 with SMTP id 1so473295pwj.13 for ; Mon, 01 Mar 2010 14:33:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=NRxWrAGxStdxtfINPeTRSHIjtqZfJuZ0Gol0Lc+2AcA=; b=Jo1LmDxaqiOJ5AryZQBFqrSrd0XdKZ2JygTdfJ9UNiLN0SG7Rh3xDehSpEhIIBsCxL dXQ5kTS5HXlOo2qSU/d2O0okp2MQirWyogLHBdeCJ/mAp3jH0mVHjMenX4lsK4ZSBFUi GO6uJgL/AYe2orbymQb8jiOkOWYTYzGHg9m+8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=q1frZ1gJcb9SfQBO8+39CFLkRnqgr2LmFvibiQax8WCIiXkhG72Y6zdu7kTxOh+Y4b XGI5njIVb+ATd1KOSC4IiLtzMVCh27P0BmgluuhYnIABiTOKADFck6TzcoboM0ZNW4KB vhLuSOqlsTxgwX5QDlSm0S0VzMnkAs39zY16Y= MIME-Version: 1.0 Received: by 10.140.248.13 with SMTP id v13mr2791888rvh.267.1267480958203; Mon, 01 Mar 2010 14:02:38 -0800 (PST) From: Mike Steinmann Date: Mon, 1 Mar 2010 23:02:18 +0100 Message-ID: <82fd8bd61003011402m62737980v8d00a12b7eafa174@mail.gmail.com> To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: snd_amd5536 for freebsd8.0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 22:33:44 -0000 Hi, I have an ALIX3d3 board and I'm looking for the audio driver for freebsd 8.0. How do I get it running? Is there a new version of snd_amd5536.ko yet? where can I get it? All I need (at the moment) is playback. thanks for letting me know. -Mike From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 23:17:28 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E011065672 for ; Mon, 1 Mar 2010 23:17:28 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 3D52F8FC0C for ; Mon, 1 Mar 2010 23:17:27 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,563,1262559600"; d="txt'?scan'208";a="297931115" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 02 Mar 2010 00:17:25 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 628311B07C1; Tue, 2 Mar 2010 00:17:25 +0100 (CET) Date: Tue, 02 Mar 2010 00:17:18 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: jhell Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-2010030123171880e26a0b00001f06-a_best01+ Cc: freebsd-hackers@freebsd.org Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 23:17:28 -0000 This is a MIME encoded multipart message. --+permail-2010030123171880e26a0b00001f06-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit jhell schrieb am 2010-03-01: > On Sun, 28 Feb 2010 11:54, alexbestms@ wrote: > >Gary Jennejohn schrieb am 2010-02-28: > >>On Sat, 27 Feb 2010 14:49:58 +0100 (CET) > >>Alexander Best wrote: > >>>how about something like this? > >>Based on a quick look it seems OK to me. > >>Have you tested it? > >i did. it works when `make cleanworld` is being run from /usr/src. > >i'm not > >sure however what the > >.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR} > >.if exists(${BW_CANONICALOBJDIR}/) > >statement is for so i didn't include the lib32 cleanup in that > >clause. my > >guess is that it's used to catch the case where `make cleanworld` > >is being run > >in /usr/obj/usr/src > You can't run make from a obj directory there is no Makefile, > Targets or spoons. ;) > This line here: > BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > Allows the end-user to set MAKEOBJDIRPREFIX in their environment and > have the obj directory somewhere other than CANONICALOBJDIR. this patch should take care of the lib32 dir with MAKEOBJDIRPREFIX being defined or undefined. cheers. alex > BW is an abbreviation for "buildworld". > >cheers. > >alex > >>--- > >>Gary Jennejohn > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to > >"freebsd-hackers-unsubscribe@freebsd.org" > -- > jhell --+permail-2010030123171880e26a0b00001f06-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="makefile.patch.txt" SW5kZXg6IE1ha2VmaWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIE1ha2VmaWxlCShyZXZpc2lvbiAyMDQ1NDAp CisrKyBNYWtlZmlsZQkod29ya2luZyBjb3B5KQpAQCAtMTU5LDYgKzE1OSwxMSBAQAogCS1jaGZs YWdzIC1SIDAgJHsuT0JKRElSfQogCXJtIC1yZiAkey5PQkpESVJ9LyoKIC5lbmRpZgorLmlmIGV4 aXN0cygke01BS0VPQkpESVJQUkVGSVh9L2xpYjMyJHsuQ1VSRElSfS8pCisgICAgICAgIC1ybSAt cmYgJHtNQUtFT0JKRElSUFJFRklYfS9saWIzMiR7LkNVUkRJUn0vKgorICAgICAgICAtY2hmbGFn cyAtUiAwICR7TUFLRU9CSkRJUlBSRUZJWH0vbGliMzIkey5DVVJESVJ9ICAKKyAgICAgICAgcm0g LXJmICR7TUFLRU9CSkRJUlBSRUZJWH0vbGliMzIkey5DVVJESVJ9LyoKKy5lbmRpZgogCiAjCiAj IEhhbmRsZSB0aGUgdXNlci1kcml2ZW4gdGFyZ2V0cywgdXNpbmcgdGhlIHNvdXJjZSByZWxhdGl2 ZSBtayBmaWxlcy4K --+permail-2010030123171880e26a0b00001f06-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 23:26:46 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 865421065670 for ; Mon, 1 Mar 2010 23:26:46 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id 195E88FC16 for ; Mon, 1 Mar 2010 23:26:45 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,563,1262559600"; d="txt'?scan'208";a="238004503" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 02 Mar 2010 00:26:44 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 6F5451B07C1; Tue, 2 Mar 2010 00:26:44 +0100 (CET) Date: Tue, 02 Mar 2010 00:26:37 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: jhell Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-2010030123263780e26a0b00002540-a_best01+ Cc: freebsd-hackers@freebsd.org Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 23:26:46 -0000 This is a MIME encoded multipart message. --+permail-2010030123263780e26a0b00002540-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit jhell schrieb am 2010-03-01: > On Sun, 28 Feb 2010 11:54, alexbestms@ wrote: > >Gary Jennejohn schrieb am 2010-02-28: > >>On Sat, 27 Feb 2010 14:49:58 +0100 (CET) > >>Alexander Best wrote: > >>>how about something like this? > >>Based on a quick look it seems OK to me. > >>Have you tested it? > >i did. it works when `make cleanworld` is being run from /usr/src. > >i'm not > >sure however what the > >.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR} > >.if exists(${BW_CANONICALOBJDIR}/) > >statement is for so i didn't include the lib32 cleanup in that > >clause. my > >guess is that it's used to catch the case where `make cleanworld` > >is being run > >in /usr/obj/usr/src > You can't run make from a obj directory there is no Makefile, > Targets or spoons. ;) > This line here: > BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > Allows the end-user to set MAKEOBJDIRPREFIX in their environment and > have the obj directory somewhere other than CANONICALOBJDIR. sorry. the patch contained spaces instead of tabs making it fail when deleting lib32. here's the right patch. sorry for the noise. i'll submit this patch along with a few style cleanups of Makefile as a pr so the changes don't get lost. alex > BW is an abbreviation for "buildworld". > >cheers. > >alex > >>--- > >>Gary Jennejohn > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to > >"freebsd-hackers-unsubscribe@freebsd.org" > -- > jhell --+permail-2010030123263780e26a0b00002540-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="makefile.patch.txt" SW5kZXg6IE1ha2VmaWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIE1ha2VmaWxlCShyZXZpc2lvbiAyMDQ1NDAp CisrKyBNYWtlZmlsZQkod29ya2luZyBjb3B5KQpAQCAtMTU5LDYgKzE1OSwxMSBAQAogCS1jaGZs YWdzIC1SIDAgJHsuT0JKRElSfQogCXJtIC1yZiAkey5PQkpESVJ9LyoKIC5lbmRpZgorLmlmIGV4 aXN0cygke01BS0VPQkpESVJQUkVGSVh9L2xpYjMyJHsuQ1VSRElSfS8pCisJLXJtIC1yZiAke01B S0VPQkpESVJQUkVGSVh9L2xpYjMyJHsuQ1VSRElSfS8qCisJLWNoZmxhZ3MgLVIgMCAke01BS0VP QkpESVJQUkVGSVh9L2xpYjMyJHsuQ1VSRElSfSAgCisJcm0gLXJmICR7TUFLRU9CSkRJUlBSRUZJ WH0vbGliMzIkey5DVVJESVJ9LyoKKy5lbmRpZgogCiAjCiAjIEhhbmRsZSB0aGUgdXNlci1kcml2 ZW4gdGFyZ2V0cywgdXNpbmcgdGhlIHNvdXJjZSByZWxhdGl2ZSBtayBmaWxlcy4K --+permail-2010030123263780e26a0b00002540-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 23:40:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FE16106566B for ; Mon, 1 Mar 2010 23:40:31 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 934B38FC25 for ; Mon, 1 Mar 2010 23:40:30 +0000 (UTC) Received: by ewy26 with SMTP id 26so1687515ewy.3 for ; Mon, 01 Mar 2010 15:40:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=XsDmI0nI+bHS8yq9MfXbo4+fNgkF+QnM0RcMLrSls0g=; b=HxgC8O+jTO72bY43HTMTTyFdxKBq8D1PgrkKCIFGKzM563ANHm2Nnb10G3KwaklUev sUzpRnCqOfEAHD7i/S2nN6YooQEduvBS638ioimmFrdhfj0Ioke1zelS1bJJuzMtbUhu SR4SrqGY5BVTF5CX8WZTsVk7303aa6KqlvjYs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=cWU5NBVfa3Xk5MX+7yWgcYAARoQHCtNx+2uOePRhIalYT4lNHL2h4HshYMHeai/aka tYAH6upJL27ISwbsu0cwLyxIK/p4Z42vPzBxhJJjbW1nnkl+VGp6pm3NMKouzH0sDrUt uD57wEbnCj3XiBh0OxoGIwzxeaS90w70nc4NI= Received: by 10.213.96.214 with SMTP id i22mr3757810ebn.58.1267486819684; Mon, 01 Mar 2010 15:40:19 -0800 (PST) Received: from centel.dataix.local (ppp-23.120.dialinfree.com [209.172.23.120]) by mx.google.com with ESMTPS id 14sm2658639ewy.10.2010.03.01.15.40.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Mar 2010 15:40:18 -0800 (PST) Sender: "J. Hellenthal" Date: Mon, 1 Mar 2010 18:39:52 -0500 From: jhell To: Alexander Best In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 23:40:31 -0000 On Mon, 1 Mar 2010 14:52, alexbestms@ wrote: > > oh. and btw: wouldn't it be reasonable to prevent a user shooting himself in > the foot if he has the brilliant idea of setting "MAKEOBJDIRPREFIX = /" ? > > alex > Trying to match something like this is going to get out of control. Though this is a nice idea but why should a user be prevented from doing such things ?. Boiling down these are not variables that usually have to be changed and if they are changed the user has done a little bit of research and is more advanced than most and recognizes that / is not a option. -- jhell From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 1 23:47:26 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BC66106564A for ; Mon, 1 Mar 2010 23:47:26 +0000 (UTC) (envelope-from shrivatsan_v@yahoo.com) Received: from web112006.mail.gq1.yahoo.com (web112006.mail.gq1.yahoo.com [67.195.23.84]) by mx1.freebsd.org (Postfix) with SMTP id 55C988FC13 for ; Mon, 1 Mar 2010 23:47:26 +0000 (UTC) Received: (qmail 53764 invoked by uid 60001); 1 Mar 2010 23:47:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1267487243; bh=Ds6rTIr4Onphax3SIkqcILW1T8w7JTYYQ2PsTu1Yke0=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=bTKth+O0BZIkBEio6p9carsLGj7/ak7iIckec9/or0GgqwtGP2ni/XCunJv/ckPdekk7+EyjtvP+kU0iQe1BMD7AUuROzM4j+CYNgaFHuhKMSyRQe+AigBbHUDI2edNzP0V5xMIJHr7pTkqWrHcsr2h22MKYV9ek2WZxDB1SYGI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=HvY/75ZHE7QHft3Xo7pd/GRYQUgaB+y58VOD2KrtbY212dREx+qqCcC+gX5b/hPDm7Nd0PsUtQ6WQWLWXiWavbE14mpc76lut3w3oQo5Fq0riRG6BESK0uuT7N2ZYvNxqN3YiRc9dQ+Q7ggWIXxu6uNZtbB9U89OwxHy5AkCt04=; Message-ID: <178848.53651.qm@web112006.mail.gq1.yahoo.com> X-YMail-OSG: _gpwkLsVM1lhji6ss3iUG2xEP4AN0tAFc5LCb1MBPnBhYmCb.NbCcxYNx5WfBQIdDjxfFyD2QJ.Pkl2IzOOHdzXUdfyhkokfvFOK37b4g8BnrzwPcJGwBvJ3SaFelobl9kZ.xQ2VWEtHbtv9W39mANZnoWBV2X6SQlPt8DpAEyGU6iqGf.0eAH41LYeTqme0ctGesuUW4vpUj2.Je0b2DHW43rfpUACpKRPGp7BYGH1FKBJRVjWtU4lOzaAtYjXDvGqZ5QILQQ9n6ImewV3JsQ-- Received: from [66.129.224.36] by web112006.mail.gq1.yahoo.com via HTTP; Mon, 01 Mar 2010 15:47:23 PST X-Mailer: YahooMailClassic/9.2.12 YahooMailWebService/0.8.100.260964 Date: Mon, 1 Mar 2010 15:47:23 -0800 (PST) From: Shrivatsan To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: shrivatsan@gmail.com Subject: kernel malloc() and free() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 23:47:26 -0000 Hi, I am looking at the code that allocates and frees kernel memory. I understand that allocating kernel memory is quite different from the user level mallocs. In case of user level mallocs, we allocate requested size + 4 bytes and store the requested size in the additional 4 bytes. However, in the case of kernel, allocating an additional 4 bytes is a overhead since the request might fall in the next bucket. I looked into the code and the documentation in the file uma_int.h, but I don't quite understand the relation between slabs, zones and keg. How do we determine the size of the memory that we are trying to free from given the virtual address? Thanks in advance for the help. -shrivatsan From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 00:15:50 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93BBD1065673 for ; Tue, 2 Mar 2010 00:15:50 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 31C278FC1A for ; Tue, 2 Mar 2010 00:15:49 +0000 (UTC) Received: by wwb17 with SMTP id 17so393891wwb.13 for ; Mon, 01 Mar 2010 16:15:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=RGmqe5KHUyMsNejMqTMNXe/V0Xg5QY6d+IC0ikAtMlc=; b=N+ecYFgL0v+py5em/okSu3LHndjQthmFtwXoP5gFYaeScRBP4lGEJzaCLkR59jqxY8 b6qQ1R0VEwJvPFMa1DNL/VyS5JIH743/UdwzIT5jGiJbxsWwWRtMHRhw76NPFKBtqavj hVP3Ua0raI+SJYCibBQqjgUk9JpZ5ErippxMo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=WtPd2sjse1VmePFfrMeIllO/CvMLRolVwCusSLucmfmVphje8BAPulmwH+JgJRLmqT UoxX3P8zr7lLq5UQFcsdL6q4v9xm3k/TLKQ22JLRUapnQLHnprtneW68TnBjzYrv1suv 4MYb5LvWpwHTsxC3MEX1fCNziNmTkvhk1MMrM= MIME-Version: 1.0 Received: by 10.216.91.4 with SMTP id g4mr3325925wef.218.1267488944364; Mon, 01 Mar 2010 16:15:44 -0800 (PST) Date: Mon, 1 Mar 2010 19:15:44 -0500 Message-ID: From: Aryeh Friedman To: freebsd-hackers@freebsd.org, Garrett McNeill Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: unable to offline a failing drive in a zfs RAIDZ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 00:15:50 -0000 I have a raidz setup as per the handbook but when I attempt to "offline" a failing drive it will not let me: kate# zpool status -c invalid option 'c' usage: status [-vx] [pool] ... kate# zpool status -v pool: storage state: ONLINE scrub: resilver completed with 0 errors on Mon Mar 1 17:36:48 2010 config: NAME STATE READ WRITE CKSUM storage ONLINE 0 0 0 raidz1 ONLINE 0 0 0 ad7 ONLINE 0 0 0 ad8 ONLINE 0 0 0 ad9 ONLINE 0 0 0 ad10 ONLINE 0 0 0 ad12 ONLINE 0 0 0 errors: No known data errors kate# zpool offline storage ad12 cannot offline ad12: no valid replicas From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 00:29:51 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F3EB106566C for ; Tue, 2 Mar 2010 00:29:51 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 058DA8FC12 for ; Tue, 2 Mar 2010 00:29:50 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,563,1262559600"; d="scan'208";a="27324160" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 02 Mar 2010 01:29:49 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 57E8D1B0768; Tue, 2 Mar 2010 01:29:49 +0100 (CET) Date: Tue, 02 Mar 2010 01:29:48 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: jhell Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] extending {amd64|i386} cpu info X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 00:29:51 -0000 jhell schrieb am 2010-03-01: > On Fri, 26 Feb 2010 22:19, alexbestms@ wrote: > >hi there, > >i always forget how to decipher model and family from the cpu id. > >of course > >there're 3rd party tools to do that for you, but instead i decided > >to hack the > >kernel. ;) > >maybe somebody finds these changes useful. > >cheers. > >alex > What about the other arch's ? I only see i386 and amd64. I would > think if this functionality is going to "make it in" that it should > be done consistantly across the board, the way it is now. just had a look at the other archs and in fact implementing these changes is not that easy as on i386 and amd64. talking about consistency: i found the cpu info outputs on arm, i64, etc. to differ from the ones on i386 and amd64. so in fact there is inconsistency present atm. i also think that on some archs it's not possible to output cpu id, stepping, family and model simply because there's no cpu instruction (CPUID or something similar) returning those info for freebsd to use. cheers. alex > -- > jhell From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 00:31:56 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF690106564A for ; Tue, 2 Mar 2010 00:31:56 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 7DA808FC14 for ; Tue, 2 Mar 2010 00:31:56 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,563,1262559600"; d="scan'208";a="297940799" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 02 Mar 2010 01:31:55 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 5F5091B0768; Tue, 2 Mar 2010 01:31:55 +0100 (CET) Date: Tue, 02 Mar 2010 01:31:55 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: jhell Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 00:31:57 -0000 jhell schrieb am 2010-03-01: > On Sun, 28 Feb 2010 11:54, alexbestms@ wrote: > >Gary Jennejohn schrieb am 2010-02-28: > >>On Sat, 27 Feb 2010 14:49:58 +0100 (CET) > >>Alexander Best wrote: > >>>how about something like this? > >>Based on a quick look it seems OK to me. > >>Have you tested it? > >i did. it works when `make cleanworld` is being run from /usr/src. > >i'm not > >sure however what the > >.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR} > >.if exists(${BW_CANONICALOBJDIR}/) > >statement is for so i didn't include the lib32 cleanup in that > >clause. my > >guess is that it's used to catch the case where `make cleanworld` > >is being run > >in /usr/obj/usr/src > You can't run make from a obj directory there is no Makefile, > Targets or spoons. ;) > This line here: > BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > Allows the end-user to set MAKEOBJDIRPREFIX in their environment and > have the obj directory somewhere other than CANONICALOBJDIR. > BW is an abbreviation for "buildworld". pr submitted. it's amd64/144405. alex > >cheers. > >alex > >>--- > >>Gary Jennejohn > >_______________________________________________ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to > >"freebsd-hackers-unsubscribe@freebsd.org" > -- > jhell From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 00:46:07 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A96C4106566C for ; Tue, 2 Mar 2010 00:46:07 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 369368FC0A for ; Tue, 2 Mar 2010 00:46:06 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,563,1262559600"; d="txt'?scan'208";a="27325320" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 02 Mar 2010 01:46:06 +0100 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 1936E1B07C1; Tue, 2 Mar 2010 01:46:06 +0100 (CET) Date: Tue, 02 Mar 2010 01:45:59 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: jhell Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-2010030200455980e26a0b00003b40-a_best01+ Cc: FreeBSD Hackers Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 00:46:07 -0000 This is a MIME encoded multipart message. --+permail-2010030200455980e26a0b00003b40-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit jhell schrieb am 2010-03-02: > On Mon, 1 Mar 2010 14:52, alexbestms@ wrote: > >oh. and btw: wouldn't it be reasonable to prevent a user shooting > >himself in > >the foot if he has the brilliant idea of setting "MAKEOBJDIRPREFIX > >= /" ? > >alex > Trying to match something like this is going to get out of control. > Though this is a nice idea but why should a user be prevented from > doing such things ?. > Boiling down these are not variables that usually have to be changed > and if they are changed the user has done a little bit of research > and is more advanced than most and recognizes that / is not a option. hmmm...so you think something like this won't be useful? alex > -- > jhell --+permail-2010030200455980e26a0b00003b40-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="makefile.patch.txt" SW5kZXg6IE1ha2VmaWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIE1ha2VmaWxlCShyZXZpc2lvbiAyMDQ1NDAp CisrKyBNYWtlZmlsZQkod29ya2luZyBjb3B5KQpAQCAtMTEyLDYgKzExMiw5IEBACiAuZXJyb3Ig TUFLRU9CSkRJUlBSRUZJWCBjYW4gb25seSBiZSBzZXQgaW4gZW52aXJvbm1lbnQsIG5vdCBhcyBh IGdsb2JhbFwKIAkoaW4gbWFrZS5jb25mKDUpKSBvciBjb21tYW5kLWxpbmUgdmFyaWFibGUuCiAu ZW5kaWYKKy5pZiAke01BS0VPQkpESVJQUkVGSVh9ID09ICIvIgorLmVycm9yIE1BS0VPQkpESVJQ UkVGSVggbXVzbid0IHBvaW50IHRvIHRoZSByb290IGRpcmVjdG9yeS4gICAKKy5lbmRpZgogTUFL RVBBVEg9CSR7TUFLRU9CSkRJUlBSRUZJWH0key5DVVJESVJ9L21ha2UuJHtNQUNISU5FfQogQklO TUFLRT0gXAogCWBpZiBbIC14ICR7TUFLRVBBVEh9L21ha2UgXTsgdGhlbiBlY2hvICR7TUFLRVBB VEh9L21ha2U7IGVsc2UgZWNobyAke01BS0V9OyBmaWAgXAo= --+permail-2010030200455980e26a0b00003b40-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 00:56:12 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B65D1065670 for ; Tue, 2 Mar 2010 00:56:12 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 2A8418FC23 for ; Tue, 2 Mar 2010 00:56:11 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 8so722159qwh.7 for ; Mon, 01 Mar 2010 16:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=UGgOG4tRKbJ7j3QVme1ik/6LzKfpwK/4jffhxu6OJg8=; b=pTU4dI9Pdw/+IU3gOGd78IkOHWqPBpNczkKbyfyaIngkf/jc6LlFYR0v/w+qK+eRuH fnHSGXyoKD4xBc13GGu0cjmjml4xSGendS0l84UGIFQkjwSuWemNelt+OJ195AuOWPKe vd5M8Cwg7xnKMyk7k5NOvtIUh0R9Q5dIhDvNQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=uOOWCA7pOgbTh2TKvfQZEP+FqvMD1aNAW7evzqPR8oe2qlOcLxWqVsxbFSTim/Tjsz 8qghLwGNSWn6U+/KaoOz3eoXipOp1YMhJ1Twt7idLpd7Gi0PtGbrO77+6BE3zNd1N+OO pEYsz6m1hYNQYOdN/+AxZMfQ9+ozNCeDmGndY= Received: by 10.224.28.19 with SMTP id k19mr2868544qac.322.1267491366328; Mon, 01 Mar 2010 16:56:06 -0800 (PST) Received: from centel.dataix.local (ppp-23.218.dialinfree.com [209.172.23.218]) by mx.google.com with ESMTPS id 23sm2825430qyk.15.2010.03.01.16.56.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Mar 2010 16:56:05 -0800 (PST) Sender: "J. Hellenthal" Date: Mon, 1 Mar 2010 19:55:37 -0500 From: jhell To: Alexander Best In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 00:56:12 -0000 On Mon, 1 Mar 2010 19:45, alexbestms@ wrote: > jhell schrieb am 2010-03-02: > >> On Mon, 1 Mar 2010 14:52, alexbestms@ wrote: > >>> oh. and btw: wouldn't it be reasonable to prevent a user shooting >>> himself in >>> the foot if he has the brilliant idea of setting "MAKEOBJDIRPREFIX >>> = /" ? > >>> alex > > >> Trying to match something like this is going to get out of control. >> Though this is a nice idea but why should a user be prevented from >> doing such things ?. > >> Boiling down these are not variables that usually have to be changed >> and if they are changed the user has done a little bit of research >> and is more advanced than most and recognizes that / is not a option. > > hmmm...so you think something like this won't be useful? > > alex > >> -- > >> jhell > What about the case where MAKEOBJDIRPREFIX="/ usr/obj/dir". I suppose make will fail in this case but I don't have anything to test this situation in ATM. But aside from that "typical user" never adjusts such things and it adds just a slight bit more overhead to the build that can be avoided altoghter by the user reading what they type. -- jhell From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 01:19:18 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8238B1065672 for ; Tue, 2 Mar 2010 01:19:18 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id 118588FC14 for ; Tue, 2 Mar 2010 01:19:16 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,563,1262559600"; d="scan'208";a="238016478" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 02 Mar 2010 02:19:15 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id E6DC31B0768; Tue, 2 Mar 2010 02:19:15 +0100 (CET) Date: Tue, 02 Mar 2010 02:19:15 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: jhell Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 01:19:18 -0000 jhell schrieb am 2010-03-02: > On Mon, 1 Mar 2010 19:45, alexbestms@ wrote: > >jhell schrieb am 2010-03-02: > >>On Mon, 1 Mar 2010 14:52, alexbestms@ wrote: > >>>oh. and btw: wouldn't it be reasonable to prevent a user shooting > >>>himself in > >>>the foot if he has the brilliant idea of setting "MAKEOBJDIRPREFIX > >>>= /" ? > >>>alex > >>Trying to match something like this is going to get out of control. > >>Though this is a nice idea but why should a user be prevented from > >>doing such things ?. > >>Boiling down these are not variables that usually have to be > >>changed > >>and if they are changed the user has done a little bit of research > >>and is more advanced than most and recognizes that / is not a > >>option. > >hmmm...so you think something like this won't be useful? > >alex > >>-- > >>jhell > What about the case where MAKEOBJDIRPREFIX="/ usr/obj/dir". I > suppose make will fail in this case but I don't have anything to > test this situation in ATM. nope. just tested it. only a real MAKEOBJDIRPREFIX="/" triggers the error. > But aside from that "typical user" never adjusts such things and it > adds just a slight bit more overhead to the build that can be > avoided altoghter by the user reading what they type. you're probably right. regular users will most definitely never come across MAKEOBJDIRPREFIX and if some advanced user decides to set it to "/" that's up to him. alex > -- > jhell From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 01:45:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFB7106566B for ; Tue, 2 Mar 2010 01:45:38 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id E41898FC15 for ; Tue, 2 Mar 2010 01:45:37 +0000 (UTC) Received: by pwj1 with SMTP id 1so573956pwj.13 for ; Mon, 01 Mar 2010 17:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=qE4cZsYXQz4ecQLZ+gO5eJ9XcVqJXg00gK7k+MGLAAY=; b=LqQqGgHg+dLcVs2QpizMV4Wkj6ftgXYJhs627VeUszpVJfv3PJDG3YL1bolBHA1QoI dWSpPIptkdp2ifTT26r6yukFZpMIWO5p/TvcC8uyIw/2iiIvYL+jUIn8TQ6aBnjL+VVa bU5J2LnKiZM0hknhYfAt0uoJfR9rXe0GMRAfQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Jp3sJpjLx8shxh9z8Eu++D+NJjsm3oXyPyS14CzYIQJSysQNVqq8zGZAJ8UOge3UW1 d+phDtAiw97Hx17ftNLIOlhmlLZYNyKFrgeObsANgDExrFwoVAZnIXCB7LEhfxjyBuEN qj1JzTmPAZIOPaoOPWDfM+rlblxBjzP5eHHv8= MIME-Version: 1.0 Received: by 10.143.26.12 with SMTP id d12mr2334449wfj.136.1267494333313; Mon, 01 Mar 2010 17:45:33 -0800 (PST) In-Reply-To: References: Date: Mon, 1 Mar 2010 17:45:33 -0800 Message-ID: <7d6fde3d1003011745w6156c6c2o444eae09d775e556@mail.gmail.com> From: Garrett Cooper To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: jhell , FreeBSD Hackers Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 01:45:38 -0000 On Mon, Mar 1, 2010 at 5:19 PM, Alexander Best wrote: > jhell schrieb am 2010-03-02: > >> On Mon, 1 Mar 2010 19:45, alexbestms@ wrote: >> >jhell schrieb am 2010-03-02: > >> >>On Mon, 1 Mar 2010 14:52, alexbestms@ wrote: > >> >>>oh. and btw: wouldn't it be reasonable to prevent a user shooting >> >>>himself in >> >>>the foot if he has the brilliant idea of setting "MAKEOBJDIRPREFIX >> >>>= /" ? > >> >>>alex > > >> >>Trying to match something like this is going to get out of control. >> >>Though this is a nice idea but why should a user be prevented from >> >>doing such things ?. > >> >>Boiling down these are not variables that usually have to be >> >>changed >> >>and if they are changed the user has done a little bit of research >> >>and is more advanced than most and recognizes that / is not a >> >>option. > >> >hmmm...so you think something like this won't be useful? > >> >alex > >> >>-- > >> >>jhell > > >> What about the case where MAKEOBJDIRPREFIX="/ usr/obj/dir". I >> suppose make will fail in this case but I don't have anything to >> test this situation in ATM. > > nope. just tested it. only a real MAKEOBJDIRPREFIX="/" triggers the error. > >> But aside from that "typical user" never adjusts such things and it >> adds just a slight bit more overhead to the build that can be >> avoided altoghter by the user reading what they type. > > you're probably right. regular users will most definitely never come across > MAKEOBJDIRPREFIX and if some advanced user decides to set it to "/" that's up > to him. What about these? /./ /. //// // I avoided these errors by writing `abspath' for LTP (it was required for GNU make backwards compatibility). jhell is right though ... if you're going to go down this road it's going to be a maintenance mess unless you have something that will abspath the file (and I used 24 or so confusing lines in awk to do it): http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=blob;f=scripts/lib/file_functions.sh;h=fd56492569e9bcfe19dd5d35db922cd94df77fb6;hb=HEAD Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 02:00:21 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D33CA1065678 for ; Tue, 2 Mar 2010 02:00:21 +0000 (UTC) (envelope-from estella@mystagic.com) Received: from p3plsmtpa01-06.prod.phx3.secureserver.net (p3plsmtpa01-06.prod.phx3.secureserver.net [72.167.82.86]) by mx1.freebsd.org (Postfix) with SMTP id A74C08FC1D for ; Tue, 2 Mar 2010 02:00:21 +0000 (UTC) Received: (qmail 17180 invoked from network); 2 Mar 2010 01:33:41 -0000 Received: from unknown (69.181.16.61) by p3plsmtpa01-06.prod.phx3.secureserver.net (72.167.82.86) with ESMTP; 02 Mar 2010 01:33:41 -0000 From: "Estella Mystagic" To: Date: Mon, 1 Mar 2010 17:33:40 -0800 Message-ID: <2BD4195B78BE4E4E9F4953B3196590E3@2WIRE304> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001D_01CAB965.55F649C0" X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acq5qGNYWunOBxxoTwWe11oloJJaQA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Mailman-Approved-At: Tue, 02 Mar 2010 03:23:33 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: mac_mls mac_biba mac_lomac patches to fix ptys_equal mib support for new /dev/pts in FreeBSD 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 02:00:21 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_001D_01CAB965.55F649C0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi, Found issues with sysctl mibs security.mac.biba.ptys_equal, security.mac.lomac.ptys_equal, security.mac.mls.ptys_equal, not supporting new /dev/pts terminal system in FreeBSD 8, proposed fix for issue. When using a higher security grade/clearance with mac_mls it prevents writing to the /dev/pts/5 as its set as mls/low and subjects may not write to objects with a lower classification level than its own clearance level. Feb 25 21:42:16 labyrinth sshd[30965]: error: /dev/pts/5: Permission denied Feb 25 21:42:16 labyrinth sshd[30965]: error: open /dev/tty failed - could not set controlling tty: Permission denied -Selphie Patches: diff -urNp /usr/src/sys/security-orig/mac_biba/mac_biba.c /usr/src/sys/security/mac_biba/mac_biba.c --- /usr/src/sys/security-orig/mac_biba/mac_biba.c 2010-03-01 17:11:30.000000000 -0800 +++ /usr/src/sys/security/mac_biba/mac_biba.c 2010-03-01 17:16:44.000000000 -0800 @@ -955,6 +955,7 @@ biba_devfs_create_device(struct ucred *c biba_type = MAC_BIBA_TYPE_EQUAL; else if (ptys_equal && (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 || + strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 || strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0)) biba_type = MAC_BIBA_TYPE_EQUAL; else diff -urNp /usr/src/sys/security-orig/mac_lomac/mac_lomac.c /usr/src/sys/security/mac_lomac/mac_lomac.c --- /usr/src/sys/security-orig/mac_lomac/mac_lomac.c 2010-03-01 17:11:30.000000000 -0800 +++ /usr/src/sys/security/mac_lomac/mac_lomac.c 2010-03-01 17:16:23.000000000 -0800 @@ -1043,6 +1043,7 @@ lomac_devfs_create_device(struct ucred * lomac_type = MAC_LOMAC_TYPE_EQUAL; else if (ptys_equal && (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 || + strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 || strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0)) lomac_type = MAC_LOMAC_TYPE_EQUAL; else diff -urNp /usr/src/sys/security-orig/mac_mls/mac_mls.c /usr/src/sys/security/mac_mls/mac_mls.c --- /usr/src/sys/security-orig/mac_mls/mac_mls.c 2010-03-01 17:11:30.000000000 -0800 +++ /usr/src/sys/security/mac_mls/mac_mls.c 2010-03-01 17:15:42.000000000 -0800 @@ -918,6 +918,7 @@ mls_devfs_create_device(struct ucred *cr mls_type = MAC_MLS_TYPE_HIGH; else if (ptys_equal && (strncmp(dev->si_name, "ttyp", strlen("ttyp")) == 0 || + strncmp(dev->si_name, "pts/", strlen("pts/")) == 0 || strncmp(dev->si_name, "ptyp", strlen("ptyp")) == 0)) mls_type = MAC_MLS_TYPE_EQUAL; else ------=_NextPart_000_001D_01CAB965.55F649C0 Content-Type: application/octet-stream; name="fbsd80-mac-devpts-fix.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fbsd80-mac-devpts-fix.patch" diff -urNp /usr/src/sys/security-orig/mac_biba/mac_biba.c = /usr/src/sys/security/mac_biba/mac_biba.c=0A= --- /usr/src/sys/security-orig/mac_biba/mac_biba.c 2010-03-01 = 17:11:30.000000000 -0800=0A= +++ /usr/src/sys/security/mac_biba/mac_biba.c 2010-03-01 = 17:16:44.000000000 -0800=0A= @@ -955,6 +955,7 @@ biba_devfs_create_device(struct ucred *c=0A= biba_type =3D MAC_BIBA_TYPE_EQUAL;=0A= else if (ptys_equal &&=0A= (strncmp(dev->si_name, "ttyp", strlen("ttyp")) =3D=3D 0 ||=0A= + strncmp(dev->si_name, "pts/", strlen("pts/")) =3D=3D 0 ||=0A= strncmp(dev->si_name, "ptyp", strlen("ptyp")) =3D=3D 0))=0A= biba_type =3D MAC_BIBA_TYPE_EQUAL;=0A= else=0A= diff -urNp /usr/src/sys/security-orig/mac_lomac/mac_lomac.c = /usr/src/sys/security/mac_lomac/mac_lomac.c=0A= --- /usr/src/sys/security-orig/mac_lomac/mac_lomac.c 2010-03-01 = 17:11:30.000000000 -0800=0A= +++ /usr/src/sys/security/mac_lomac/mac_lomac.c 2010-03-01 = 17:16:23.000000000 -0800=0A= @@ -1043,6 +1043,7 @@ lomac_devfs_create_device(struct ucred *=0A= lomac_type =3D MAC_LOMAC_TYPE_EQUAL;=0A= else if (ptys_equal &&=0A= (strncmp(dev->si_name, "ttyp", strlen("ttyp")) =3D=3D 0 ||=0A= + strncmp(dev->si_name, "pts/", strlen("pts/")) =3D=3D 0 ||=0A= strncmp(dev->si_name, "ptyp", strlen("ptyp")) =3D=3D 0))=0A= lomac_type =3D MAC_LOMAC_TYPE_EQUAL;=0A= else=0A= diff -urNp /usr/src/sys/security-orig/mac_mls/mac_mls.c = /usr/src/sys/security/mac_mls/mac_mls.c=0A= --- /usr/src/sys/security-orig/mac_mls/mac_mls.c 2010-03-01 = 17:11:30.000000000 -0800=0A= +++ /usr/src/sys/security/mac_mls/mac_mls.c 2010-03-01 = 17:15:42.000000000 -0800=0A= @@ -918,6 +918,7 @@ mls_devfs_create_device(struct ucred *cr=0A= mls_type =3D MAC_MLS_TYPE_HIGH;=0A= else if (ptys_equal &&=0A= (strncmp(dev->si_name, "ttyp", strlen("ttyp")) =3D=3D 0 ||=0A= + strncmp(dev->si_name, "pts/", strlen("pts/")) =3D=3D 0 ||=0A= strncmp(dev->si_name, "ptyp", strlen("ptyp")) =3D=3D 0))=0A= mls_type =3D MAC_MLS_TYPE_EQUAL;=0A= else=0A= ------=_NextPart_000_001D_01CAB965.55F649C0-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 03:52:37 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D6C6106566B for ; Tue, 2 Mar 2010 03:52:37 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id D7D048FC1E for ; Tue, 2 Mar 2010 03:52:36 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o223qXrN068939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Mar 2010 21:52:33 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.3) with ESMTP id o223qWoG007316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Mar 2010 21:52:33 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.3/Submit) id o223OfqW036895; Mon, 1 Mar 2010 21:24:41 -0600 (CST) (envelope-from dan) Date: Mon, 1 Mar 2010 21:24:40 -0600 From: Dan Nelson To: Shrivatsan Message-ID: <20100302032440.GV70798@dan.emsphone.com> References: <178848.53651.qm@web112006.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <178848.53651.qm@web112006.mail.gq1.yahoo.com> X-OS: FreeBSD 7.2-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.95.3 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Mon, 01 Mar 2010 21:52:33 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-hackers@freebsd.org, shrivatsan@gmail.com Subject: Re: kernel malloc() and free() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 03:52:37 -0000 In the last episode (Mar 01), Shrivatsan said: > I am looking at the code that allocates and frees kernel memory. I > understand that allocating kernel memory is quite different from the user > level mallocs. In case of user level mallocs, we allocate requested size > + 4 bytes and store the requested size in the additional 4 bytes. Actually FreeBSD's userland malloc hasn't ever had a 4-byte-per-element overhead like this. All BSD mallocs have been block-based, where all objects in a page are the same size. The original bsd malloc had power-of-2 size groupings (blocks holding the same size objects were linked in a list). phkmalloc was imported in 1995 which moves the block metadata into a "page directory", which is separated from the memory returned by malloc(). The current malloc (jemalloc) has a similar setup but scales much better on SMP systems. http://phk.freebsd.dk/pubs/malloc.pdf http://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemalloc.pdf > However, in the case of kernel, allocating an additional 4 bytes is a > overhead since the request might fall in the next bucket. I looked into > the code and the documentation in the file uma_int.h, but I don't quite > understand the relation between slabs, zones and keg. How do we determine > the size of the memory that we are trying to free from given the virtual > address? I'm not too familiar with the kernel malloc, but it looks like each keg holds objects of the same size (and a keg may hold multiple slabs), so once you get a pointer to the slab header with the vtoslab() macro, slab->us_keg->uk_size points to the size of the allocation. Hm. Even after some reading, I'm not sure how the slabs keep track of which elements are allocated or free. I expected to find a bitmap somewhere that malloc() sets and free() clears, but I don't see it. Maybe some kernel hacker can explain it better :) Regardless, the size of the allocation at this point isn't important, since you know all the items in the page are the same size. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 03:52:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69BAF1065670 for ; Tue, 2 Mar 2010 03:52:38 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id DA2338FC1F for ; Tue, 2 Mar 2010 03:52:36 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o223qXrP068939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Mar 2010 21:52:33 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.3) with ESMTP id o223qWoI007316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Mar 2010 21:52:33 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.3/Submit) id o223jJF8084792; Mon, 1 Mar 2010 21:45:19 -0600 (CST) (envelope-from dan) Date: Mon, 1 Mar 2010 21:45:19 -0600 From: Dan Nelson To: Aryeh Friedman Message-ID: <20100302034519.GW70798@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 7.2-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.95.3 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Mon, 01 Mar 2010 21:52:33 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-hackers@freebsd.org, Garrett McNeill Subject: Re: unable to offline a failing drive in a zfs RAIDZ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 03:52:38 -0000 In the last episode (Mar 01), Aryeh Friedman said: > I have a raidz setup as per the handbook but when I attempt to "offline" a > failing drive it will not let me: > > kate# zpool status -c > invalid option 'c' > usage: > status [-vx] [pool] ... > kate# zpool status -v > pool: storage > state: ONLINE > scrub: resilver completed with 0 errors on Mon Mar 1 17:36:48 2010 > config: > > NAME STATE READ WRITE CKSUM > storage ONLINE 0 0 0 > raidz1 ONLINE 0 0 0 > ad7 ONLINE 0 0 0 > ad8 ONLINE 0 0 0 > ad9 ONLINE 0 0 0 > ad10 ONLINE 0 0 0 > ad12 ONLINE 0 0 0 > > errors: No known data errors > kate# zpool offline storage ad12 > cannot offline ad12: no valid replicas What version of FreeBSD are you running? This looks like a known bug. It originally worked for mirrors but not RAIDZ vdevs - "zpool offline is a bit too conservative": http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=2171359 , and works for me on a 7-stable kernel: (root@studio) /root># uname -a FreeBSD studio.evoy.net 7.3-PRERELEASE FreeBSD 7.3-PRERELEASE #53: Tue Feb 2 17:19:46 CST 2010 zsh@studio.evoy.net:/usr/src-7/sys/amd64/compile/STUDIO amd64 (root@studio) /root># mdconfig -a -t swap -s 1g ; mdconfig -a -t swap -s 1g ; mdconfig -a -t swap -s 1g md1 md2 md3 (root@studio) /root># zpool create dummy raidz md1 md2 md3 (root@studio) /root># zpool offline dummy md2 (root@studio) /root># zpool status dummy pool: dummy state: DEGRADED status: One or more devices has been taken offline by the administrator. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Online the device using 'zpool online' or replace the device with 'zpool replace'. scrub: none requested config: NAME STATE READ WRITE CKSUM dummy DEGRADED 0 0 0 raidz1 DEGRADED 0 0 0 md1 ONLINE 0 0 0 md2 OFFLINE 0 0 0 md3 ONLINE 0 0 0 -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 04:03:24 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 627E3106566C for ; Tue, 2 Mar 2010 04:03:24 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1185A8FC0A for ; Tue, 2 Mar 2010 04:03:23 +0000 (UTC) Received: by vws14 with SMTP id 14so1433966vws.13 for ; Mon, 01 Mar 2010 20:03:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=Sd0U3caDpQHvHIIA4d5Cq976kyqg+kGciSB6TCPmTCw=; b=AqQRd8iwTU1xuVoXpY2E+MUuIl33OQrB0YESTJcvKzbCSAI/aojXGSEkNBjlMbamaR QFU7C4CHgAthuf8qlHoEdZ/BMeCQjWKwitrizRWLeyIMUUdTRCOi208nDjaDsF5912Au aJGXPiZzH8b+kRwSG5gKQmhwU2NZTP/qeZXBc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Eg0bsD7OsRCgodp9OPzLPdcBYhaODuReZTiveuhIfDeokGc+2BtaKsJ6x/kivbf/Us 1BtS4oHD3y+C865yHyJXW+kkoXcXlzK4fnXNZ1OBLZqGVEcUAw1FmJVMhQnrvhNgw8Um GtW6f2iKHx9l1nyOLrwUBrQLrzEaHWYzbKVpI= Received: by 10.220.107.104 with SMTP id a40mr3743560vcp.187.1267502591339; Mon, 01 Mar 2010 20:03:11 -0800 (PST) Received: from aryeh-desktop.istudentunion.com (ool-44c0cd7a.dyn.optonline.net [68.192.205.122]) by mx.google.com with ESMTPS id 42sm34195020vws.8.2010.03.01.20.03.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Mar 2010 20:03:09 -0800 (PST) Message-ID: <4B8C8DFE.3010100@gmail.com> Date: Mon, 01 Mar 2010 23:03:10 -0500 From: "Aryeh M. Friedman" User-Agent: Thunderbird 2.0.0.23 (X11/20100120) MIME-Version: 1.0 To: Dan Nelson References: <20100302034519.GW70798@dan.emsphone.com> In-Reply-To: <20100302034519.GW70798@dan.emsphone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Garrett McNeill Subject: Re: unable to offline a failing drive in a zfs RAIDZ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 04:03:24 -0000 Dan Nelson wrote: > In the last episode (Mar 01), Aryeh Friedman said: > >> I have a raidz setup as per the handbook but when I attempt to "offline" a >> failing drive it will not let me: >> >> kate# zpool status -c >> invalid option 'c' >> usage: >> status [-vx] [pool] ... >> kate# zpool status -v >> pool: storage >> state: ONLINE >> scrub: resilver completed with 0 errors on Mon Mar 1 17:36:48 2010 >> config: >> >> NAME STATE READ WRITE CKSUM >> storage ONLINE 0 0 0 >> raidz1 ONLINE 0 0 0 >> ad7 ONLINE 0 0 0 >> ad8 ONLINE 0 0 0 >> ad9 ONLINE 0 0 0 >> ad10 ONLINE 0 0 0 >> ad12 ONLINE 0 0 0 >> >> errors: No known data errors >> kate# zpool offline storage ad12 >> cannot offline ad12: no valid replicas >> > > What version of FreeBSD are you running? This looks like a known bug. It > originally worked for mirrors but not RAIDZ vdevs - "zpool offline is a bit > too conservative": > FreeBSD kate.istudentunion.com 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Tue Jun 9 21:30:43 UTC 2009 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 > http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=2171359 , and > works for me on a 7-stable kernel: > > (root@studio) /root># uname -a > FreeBSD studio.evoy.net 7.3-PRERELEASE FreeBSD 7.3-PRERELEASE #53: Tue Feb 2 17:19:46 CST 2010 zsh@studio.evoy.net:/usr/src-7/sys/amd64/compile/STUDIO amd64 > (root@studio) /root># mdconfig -a -t swap -s 1g ; mdconfig -a -t swap -s 1g ; mdconfig -a -t swap -s 1g > md1 > md2 > md3 > (root@studio) /root># zpool create dummy raidz md1 md2 md3 > (root@studio) /root># zpool offline dummy md2 > (root@studio) /root># zpool status dummy > pool: dummy > state: DEGRADED > status: One or more devices has been taken offline by the administrator. > Sufficient replicas exist for the pool to continue functioning in a > degraded state. > action: Online the device using 'zpool online' or replace the device with > 'zpool replace'. > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > dummy DEGRADED 0 0 0 > raidz1 DEGRADED 0 0 0 > md1 ONLINE 0 0 0 > md2 OFFLINE 0 0 0 > md3 ONLINE 0 0 0 > > > From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 04:31:05 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F91B106566B for ; Tue, 2 Mar 2010 04:31:05 +0000 (UTC) (envelope-from nate@thatsmathematics.com) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id D88408FC13 for ; Tue, 2 Mar 2010 04:31:04 +0000 (UTC) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id o224V4Y21530; Mon, 1 Mar 2010 20:31:04 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id o224V3P02961; Mon, 1 Mar 2010 20:31:03 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Mon, 1 Mar 2010 20:31:03 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Garrett Cooper In-Reply-To: <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com> Message-ID: References: <7d6fde3d1002281826n60c2061fiedfc4e548cc9f068@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 04:31:05 -0000 On Sun, 28 Feb 2010, Garrett Cooper wrote: > On Sun, Feb 28, 2010 at 5:11 PM, Alexander Best wrote: >> i have a small test app to check {rm|mk}dir()'s errnos with certain args like >> /, ., /proc and non-empty dirs. i'll submit it to this thread as soon as i >> also add testcases for syscalls like rename(), unlink(), etc. >> >> most of the errno codes returned after applying your patch look correct. i >> wonder however why rmdir("/proc") returns EACCESS as unprivileged user. >> wouldn't it make more sense to also return EBUSY? why complain about >> permission related matters when even root won't be able to perform the >> operation. > > Hmm.. good question. POSIX doesn't fully expound on this case > (http://www.opengroup.org/onlinepubs/009695399/functions/rmdir.html), > and either seem possible... At: http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_03.html#tag_02_03 we have If more than one error occurs in processing a function call, any one of the possible errors may be returned, as the order of detection is undefined. So we're okay standard-wise. In general, though, I'd think it makes sense to do permissions checks before anything else, because in some cases the error code can leak information. For instance, if you try to open() a nonexistent file in a directory for which you don't have search permission ('x' bit), it's very important that open() fail with EACCES instead of ENOENT, since you aren't suppposed to be able to find out whether or not the file exists. Obviously that doesn't apply in this case, because anyone is entitled to know that /proc is the root of a mounted filesystem, but it seems to me that it's a good habit to check permission first. -- Nate Eldredge nate@thatsmathematics.com From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 07:48:41 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25EB71065785; Tue, 2 Mar 2010 07:48:41 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 6CB5A8FC13; Tue, 2 Mar 2010 07:48:40 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 080A845EC0; Tue, 2 Mar 2010 08:17:44 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id DFD084569A; Tue, 2 Mar 2010 08:17:38 +0100 (CET) Date: Tue, 2 Mar 2010 08:17:36 +0100 From: Pawel Jakub Dawidek To: Alexandr Rybalko Message-ID: <20100302071736.GF1946@garage.freebsd.pl> References: <20100219163644.da89e882.ray@dlink.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VuQYccsttdhdIfIP" Content-Disposition: inline In-Reply-To: <20100219163644.da89e882.ray@dlink.ua> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: geom@freebsd.org, embedded@freebsd.org, hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 07:48:41 -0000 --VuQYccsttdhdIfIP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 19, 2010 at 04:36:44PM +0200, Alexandr Rybalko wrote: > Hi, > I wrote a module GEOM_ULZMA (such as GEOM_UZIP, but compression with lzma= ), [...] Wouldn't it be better to modify geom_uzip to be universal decompression class with various algorithms implemented as plugins? This is bascially what I did for the LABEL class - before we had VOL_FFS class only for UFS labels. > [...] in connection with this is an issue best left lzma > code in the file "geom_ulzma.c" or store lzma library separately. If sepa= rately, then where better? Definiatelly separately, not sure where. There is ongoing discussion somwhere on importing this algorithm to the base for tar(1) to use, it would be best to have only one copy of code in the tree. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --VuQYccsttdhdIfIP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuMu48ACgkQForvXbEpPzT9oACgxw5SguVaFp1a8cEysw98rXfM o6MAniVWtClI9kJ63gkJSoRPX0Hc/LGE =uCwV -----END PGP SIGNATURE----- --VuQYccsttdhdIfIP-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 08:27:13 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A788106564A for ; Tue, 2 Mar 2010 08:27:13 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2DDBC8FC19 for ; Tue, 2 Mar 2010 08:27:12 +0000 (UTC) Received: from pm513-1.comsys.ntu-kpi.kiev.ua ([10.18.52.101]) by comsys.ntu-kpi.kiev.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1NmNRf-0001xy-BB; Tue, 02 Mar 2010 10:27:11 +0200 Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id 56C601CC0B; Tue, 2 Mar 2010 10:27:11 +0200 (EET) Date: Tue, 2 Mar 2010 10:27:11 +0200 From: Andrey Simonenko To: Dan Nelson Message-ID: <20100302082711.GA1663@pm513-1.comsys.ntu-kpi.kiev.ua> References: <178848.53651.qm@web112006.mail.gq1.yahoo.com> <20100302032440.GV70798@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100302032440.GV70798@dan.emsphone.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Authenticated-User: simon@comsys.ntu-kpi.kiev.ua X-Authenticator: plain X-Invalid-HELO: Host impersonating [comsys.ntu-kpi.kiev.ua] X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Exim-Version: 4.63 (build at 06-Jan-2007 23:14:37) X-Date: 2010-03-02 10:27:11 X-Connected-IP: 10.18.52.101:58293 X-Message-Linecount: 34 X-Body-Linecount: 17 X-Message-Size: 1729 X-Body-Size: 988 Cc: freebsd-hackers@freebsd.org, shrivatsan@gmail.com, Shrivatsan Subject: Re: kernel malloc() and free() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 08:27:13 -0000 On Mon, Mar 01, 2010 at 09:24:40PM -0600, Dan Nelson wrote: > Hm. Even after some reading, I'm not sure how the slabs keep track of which > elements are allocated or free. I expected to find a bitmap somewhere that > malloc() sets and free() clears, but I don't see it. Maybe some kernel > hacker can explain it better :) Regardless, the size of the allocation at > this point isn't important, since you know all the items in the page are the > same size. When uma_zalloc() is called it uses per CPU cache for items. Pointers to items are taken from uc_allocbucket, that contains array of pointers to items. When an item is freed its pointer goes to uc_freebucket if it has space to save this pointer. From time to time uc_allocbucket and uc_freebucket are switched (see conditions for switching in uma_zalloc() and uma_zfree()). Initially when uma_bucket structure is allocated it is filled with pointers to items from slab (note that uma_bucket is a variable sized structure). From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 08:44:32 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B0F510656C2 for ; Tue, 2 Mar 2010 08:44:32 +0000 (UTC) (envelope-from alexeichi@yahoo.de) Received: from smtp125.mail.ukl.yahoo.com (smtp125.mail.ukl.yahoo.com [77.238.184.56]) by mx1.freebsd.org (Postfix) with SMTP id 013868FC20 for ; Tue, 2 Mar 2010 08:44:31 +0000 (UTC) Received: (qmail 40345 invoked from network); 2 Mar 2010 08:44:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=aYsZrKrwWygE/BCVkpOM/j2GfMe2z9H2uYQmvHJdgc1T+o4qlO8UG+F3EzGZCtU2M9f+AltivRL+ns+/uiproGSTE2ptzv69Ml7h1bamTv0u+v1bPs/CSvZpPQ5ut0n3CWRFL2VlqojzXI6qXYpPIKiv6MJ8HgciGJ4LGGOi1ws= ; Received: from p57BBC91B.dip.t-dialin.net (alexeichi@87.187.201.27 with login) by smtp125.mail.ukl.yahoo.com with SMTP; 02 Mar 2010 08:44:29 +0000 GMT X-Yahoo-SMTP: yMol3buswBBNNUOSiWLj.UV.YXoMOg-- X-YMail-OSG: ERSmh_oVM1lLvEMKcJYvxAQwmV4_LWYSLgj5yvJMJbZi8cgI7SvfM0.GgF2zM8bNFbVLShwsX40A6O6wW5rsDUVwu82Hrk9Rfz1YbKtL.OTLIJL1_MEGGvehvTmym9jmTTDHKKD93zgqmHpcZldk4gh9JCdve3zRZT1XdHGp1gIcKKQKPu5lwqD_kBrEJngEke4zovsJbOlRoEE4_rqX0PPz42QxT.ZEUhZjHY5v9SKosnvKCxcfGQh.jyCSYt9Y5JBLb3XEVowJI8LT3YeHyQ8EX8l13jWffnLbUw-- X-Yahoo-Newman-Property: ymail-3 From: Alexander Eichner To: Giovanni Trematerra In-Reply-To: <4e6cba831003010619j560f5b92n4c63ab2520cff7db@mail.gmail.com> References: <317657.30145.qm@web27603.mail.ukl.yahoo.com> <4e6cba831003010619j560f5b92n4c63ab2520cff7db@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 02 Mar 2010 09:34:39 +0100 Message-ID: <1267518879.2794.14.camel@Prometheus> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 8bit Cc: alc@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Allocating physical memory without a kernel mapping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 08:44:32 -0000 Giovanni Trematerra wrote: > On Mon, Mar 1, 2010 at 10:59 AM, Alexander Eichner wrote: > > Hi, > > > > I'm currently trying to finish the R0 memory implementation[1] of FreeBSD for VirtualBox. One of the missing methods allocates physical non contiguous pages which don't need to have a kernel mapping (rtR0MemObjNativeAllocPhysNC). I'm using vm_phys_alloc_contig to achieve this. The pages are than mapped into the user space VM process using pmap_enter (rtR0MemObjNativeMapUser) and if they are not needed anymore vm_page_free_toq is used to free the pages (rtR0MemObjNativeFree). > > Everything works as long as the VM runs but if the VM process terminates and I do something else the host will panic at some point (usually when I try to start a gnome session) with "pmap_enter: missing reference to page table page "[2]. > > There seems to some problem with the wire count of that page but I can't see what I'm doing wrong at the moment. > > Thanks in advance for any help. > > Please, try this patch against revision 26898. > > --- memobj-r0drv-freebsd.c.orig 2010-02-26 10:28:44.000000000 +0100 > +++ memobj-r0drv-freebsd.c 2010-02-26 13:55:35.000000000 +0100 > @@ -209,8 +209,7 @@ int rtR0MemObjNativeAllocPage(PPRTR0MEMO > vm_page_t pPage; > > pPage = vm_page_alloc(pMemFreeBSD->pObject, PageIndex, > - VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | > - VM_ALLOC_WIRED); > + VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM); > > #if __FreeBSD_version >= 800000 /** @todo Find exact version number */ > /* Fixes crashes during VM termination on > FreeBSD8-CURRENT amd64 > @@ -220,9 +219,6 @@ int rtR0MemObjNativeAllocPage(PPRTR0MEMO > > if (pPage) > { > - vm_page_lock_queues(); > - vm_page_wire(pPage); > - vm_page_unlock_queues(); > /* Put the page into the page table now. */ > #if __FreeBSD_version >= 701105 > pmap_enter(kernel_map->pmap, AddressDst, > VM_PROT_NONE, pPage, > @@ -253,6 +249,8 @@ int rtR0MemObjNativeAllocPage(PPRTR0MEMO > > if (rc == VINF_SUCCESS) > { > + vm_map_wire(kernel_map, MapAddress, > MapAddress + cb, > + VM_MAP_WIRE_SYSTEM | > VM_MAP_WIRE_NOHOLES); > pMemFreeBSD->Core.pv = (void *)MapAddress; > *ppMem = &pMemFreeBSD->Core; > return VINF_SUCCESS; > > > > > Regards, > > Alexander Eichner > > > > [1] http://www.virtualbox.org/browser/trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c?rev=26899 > > [2]http://fxr.watson.org/fxr/source/amd64/amd64/pmap.c?im=bigexcerpts#L3076 > > > > __________________________________________________ > > Do You Yahoo!? > > Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. > > http://mail.yahoo.com > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" Thanks for your help but I don't see how that patch could help with my problem. rtR0MemObjNativeAllocPage allocates pages with a kernel mapping but the problem appears when using rtR0MemObjNativeAllocPhysNC + rtR0MemObjNativeMapUser and freeing the pages later. rtR0MemObjNativeAllocPage is used if I use the old allocation mode which does not use rtR0MemObjNativeAllocPhysNC and this works fine here. The double wiring problem should also be solved with the latest source. Regards, Alexander From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 08:47:33 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B2041065675; Tue, 2 Mar 2010 08:47:33 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id A52328FC0A; Tue, 2 Mar 2010 08:47:32 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1NmNiy-0005iQ-Mn; Tue, 02 Mar 2010 10:45:04 +0200 Date: Tue, 2 Mar 2010 10:47:48 +0200 From: Alexandr Rybalko To: Pawel Jakub Dawidek Message-Id: <20100302104748.0f27136c.ray@dlink.ua> In-Reply-To: <20100302071736.GF1946@garage.freebsd.pl> References: <20100219163644.da89e882.ray@dlink.ua> <20100302071736.GF1946@garage.freebsd.pl> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: geom@freebsd.org, embedded@freebsd.org, hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 08:47:33 -0000 Hi, On Tue, 2 Mar 2010 08:17:36 +0100 Pawel Jakub Dawidek wrote: >> On Fri, Feb 19, 2010 at 04:36:44PM +0200, Alexandr Rybalko wrote: >> > Hi, >> > I wrote a module GEOM_ULZMA (such as GEOM_UZIP, but compression with lzma), [...] >> >> Wouldn't it be better to modify geom_uzip to be universal decompression >> class with various algorithms implemented as plugins? >> This is bascially what I did for the LABEL class - before we had VOL_FFS >> class only for UFS labels. Yes, you are right, but problem where in kernel code store LZMA code, and what to do with different versions of it? >> >> > [...] in connection with this is an issue best left lzma >> > code in the file "geom_ulzma.c" or store lzma library separately. If separately, then where better? >> >> Definiatelly separately, not sure where. There is ongoing discussion >> somwhere on importing this algorithm to the base for tar(1) to use, it >> would be best to have only one copy of code in the tree. I have already said, that it would be good for embedded platforms have only one copy of the code for the kernel and userland. It is not thought of how done it. >> >> -- >> Pawel Jakub Dawidek http://www.wheelsystems.com >> pjd@FreeBSD.org http://www.FreeBSD.org >> FreeBSD committer Am I Evil? Yes, I Am! -- Рыбалко ÐлекÑандр КонÑультант D-Link Украина From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 10:00:51 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F1AA106566C; Tue, 2 Mar 2010 10:00:51 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 2A6B58FC0C; Tue, 2 Mar 2010 10:00:50 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 970031FFC22; Tue, 2 Mar 2010 10:00:45 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 7649284549; Tue, 2 Mar 2010 11:00:45 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: xorquewasp@googlemail.com References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100301135829.GB2219@logik.internal.network> <86zl2suo8n.fsf@ds4.des.no> <20100301161901.GC2219@logik.internal.network> <86635frhaa.fsf@ds4.des.no> <20100301220332.GB74816@logik.internal.network> Date: Tue, 02 Mar 2010 11:00:45 +0100 In-Reply-To: <20100301220332.GB74816@logik.internal.network> (xorquewasp@googlemail.com's message of "Mon, 1 Mar 2010 22:03:32 +0000") Message-ID: <86aaurniuq.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 10:00:51 -0000 xorquewasp@googlemail.com writes: > Basically, I have a ton of jails and each jail mounts a shared 'tmp', That's not a good idea, there are too many opportunities for conflicts (software that creates sockets and state directories with non-randomized names in /tmp) and might even allow a compromised jail to compromise the others. > and possibly unshared 'pkg' 'work' 'distfiles' and 'ports' > directories: > > /storage/jails/8.0/x86_64/mk4/pkg /jail/8.0-amd64-mk4/pkg null= fs rw > /storage/jails/8.0/x86_64/mk4/work /jail/8.0-amd64-mk4/work null= fs rw > /storage/distfiles /jail/8.0-amd64-mk4/distfiles null= fs rw > /storage/ports /jail/8.0-amd64-mk4/ports null= fs ro > /storage/shared_tmp /jail/8.0-amd64-mk4/shared_tmp null= fs rw zfs set mountpoint=3D/jail/8.0-amd64-mk4 storage/jails/8.0/x86_64/mk4 Children of storage/jails/8.0/x86_64/mk4 will inherit this property, so they will automatically appear where you expect; alternatively, you can set the mountpoint property for each individual fileset. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 10:51:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 059811065674 for ; Tue, 2 Mar 2010 10:51:38 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id BBDA78FC1D for ; Tue, 2 Mar 2010 10:51:37 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id CA89D1FFC22; Tue, 2 Mar 2010 10:51:36 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9565C84549; Tue, 2 Mar 2010 11:51:36 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: Date: Tue, 02 Mar 2010 11:51:36 +0100 In-Reply-To: (Alexander Best's message of "Tue, 02 Mar 2010 01:29:48 +0100 (CET)") Message-ID: <86ocj7m1xj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: jhell , freebsd-hackers@freebsd.org Subject: Re: [patch] extending {amd64|i386} cpu info X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 10:51:38 -0000 Alexander Best writes: > i also think that on some archs it's not possible to output cpu id, > stepping, family and model simply because there's no cpu instruction > (CPUID or something similar) returning those info for freebsd to use. In many cases it doesn't even make sense, e.g. ARM which is an architecture used by dozens of different chips from dozens of different manufacturers. I believe the same applies to MIPS. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 11:04:33 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 629FC106566C for ; Tue, 2 Mar 2010 11:04:33 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id E78BB8FC0C for ; Tue, 2 Mar 2010 11:04:32 +0000 (UTC) Received: by fxm23 with SMTP id 23so97891fxm.3 for ; Tue, 02 Mar 2010 03:04:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=1Zjwi4f5M7qnTB2Ku40jdWMBo6eJDLyklHMhAT3ISzQ=; b=ivuWw6+qfqb2clo4hWiZOLILS1dF5p05iiCKh5+cJ/1xwUhlJnKJ99LpWBl1honn/Y aTZsT4I4Udc5bo58vop2hEsHiE8m0wrOuUSAVymTRUcODCNhqcSYTWjmeByWeTou+DNU 5Y4GDSWA9gUIvMRyK3D3vWGguGB3lkbN+QnHs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=by5wmOJ4jzHMAVVE4eByK7OXcIk7QQJ7mwM2FGAHK6VAH0ZRbvAyiSvsKRfn3Aihr6 smN1bKLQEFbHP+OLoyItHanZ+1JrLnzQf9QFkvvZzku0SKE7xWjh6B685VG9nj3iWwHU 6o2+uwVzs5STd4fzADmamLSXwvQ3RYA4MdLJA= MIME-Version: 1.0 Received: by 10.223.14.71 with SMTP id f7mr5170184faa.48.1267527866040; Tue, 02 Mar 2010 03:04:26 -0800 (PST) In-Reply-To: <1267518879.2794.14.camel@Prometheus> References: <317657.30145.qm@web27603.mail.ukl.yahoo.com> <4e6cba831003010619j560f5b92n4c63ab2520cff7db@mail.gmail.com> <1267518879.2794.14.camel@Prometheus> Date: Tue, 2 Mar 2010 12:04:26 +0100 Message-ID: <4e6cba831003020304u2a2dc8ceobb594ebe58744ef5@mail.gmail.com> From: Giovanni Trematerra To: Alexander Eichner Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Allocating physical memory without a kernel mapping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 11:04:33 -0000 On Tue, Mar 2, 2010 at 9:34 AM, Alexander Eichner wrote: > Giovanni Trematerra wrote: >> On Mon, Mar 1, 2010 at 10:59 AM, Alexander Eichner wrote: >> > Hi, >> > > > Thanks for your help but I don't see how that patch could help with my > problem. rtR0MemObjNativeAllocPage allocates pages with a kernel > mapping but the problem appears when using rtR0MemObjNativeAllocPhysNC > + rtR0MemObjNativeMapUser and freeing the pages later. > rtR0MemObjNativeAllocPage is used if I use the old allocation mode which > does not use rtR0MemObjNativeAllocPhysNC and this works fine here. > The double wiring problem should also be solved with the latest source. Sorry, the patch was intended *only* as alternative way to resolve double wired paging issue. I don't know if the patch is correct though. Maybe you can attach a textdump of your panic(or at least a bt), that might be useful to understand the problem. Thank you. -- Gianni From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 11:32:20 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EC861065674 for ; Tue, 2 Mar 2010 11:32:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 69CC08FC17 for ; Tue, 2 Mar 2010 11:32:20 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id E680E46B35; Tue, 2 Mar 2010 06:32:19 -0500 (EST) Date: Tue, 2 Mar 2010 11:32:19 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Estella Mystagic In-Reply-To: <2BD4195B78BE4E4E9F4953B3196590E3@2WIRE304> Message-ID: References: <2BD4195B78BE4E4E9F4953B3196590E3@2WIRE304> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: mac_mls mac_biba mac_lomac patches to fix ptys_equal mib support for new /dev/pts in FreeBSD 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 11:32:20 -0000 On Mon, 1 Mar 2010, Estella Mystagic wrote: > Found issues with sysctl mibs security.mac.biba.ptys_equal, > security.mac.lomac.ptys_equal, security.mac.mls.ptys_equal, not supporting > new /dev/pts terminal system in FreeBSD 8, proposed fix for issue. > > When using a higher security grade/clearance with mac_mls it prevents > writing to the /dev/pts/5 as its set as mls/low and subjects may not write > to objects with a lower classification level than its own clearance level. > > Feb 25 21:42:16 labyrinth sshd[30965]: error: /dev/pts/5: Permission denied > > Feb 25 21:42:16 labyrinth sshd[30965]: error: open /dev/tty failed - could > not set controlling tty: Permission denied Hi Selphie: Thanks for this patch. I'll go ahead and merge it, but had two questions: (1) It looks like you didn't need to set any special label on /dev/ptmx itself? (2) Could you let me know how your login.conf + user labels are configured, and show me the output of "ps -axZ | grep sshd"? We need to rethink how we deal with ttys anyway, and I'd like to understand how the specific case you're running into comes about. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 12:54:14 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E4141065670 for ; Tue, 2 Mar 2010 12:54:14 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE748FC12 for ; Tue, 2 Mar 2010 12:54:13 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 9so32586qwb.7 for ; Tue, 02 Mar 2010 04:54:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=gtc7D11PM72b9gUWXVKKbWj7jJPtKi1cnhJf5owfDf4=; b=GF9QS1sOywumrWDJuTrHv7NtiHGYHxdDMESH+Tqcf1jKvPXYzOVuFY6GIw7UaS37f4 EAQj+fNKa/QEkhYIzbF3y8hr+K0yJfMmZgm5b64v9XAv+kHsPy/d+SBUeOutrVdQ3FNn 7WhLHTD4O+ubkyanck/w8tBbHOiTILyqpoYl8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=XJlZ9Oa5CtMKeIlvE9d8JZw9jOwDJHAG/KFpDPV63igS+atuSXxi6KOAGlt2oqYXOO gU0o7rrQNemG+63B32EQ0+7q7FakHf0fT28uqInvwxV0ySSDrj/p5Gu3dxICkbXBbIoO IoBOPKQ+ziLrVo4iGBw2m2MES2EVbzEazosf8= Received: by 10.224.27.202 with SMTP id j10mr297187qac.250.1267534442518; Tue, 02 Mar 2010 04:54:02 -0800 (PST) Received: from centel.dataix.local (ppp-22.138.dialinfree.com [209.172.22.138]) by mx.google.com with ESMTPS id 6sm13052144qwd.4.2010.03.02.04.53.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Mar 2010 04:54:00 -0800 (PST) Sender: "J. Hellenthal" Date: Tue, 2 Mar 2010 07:53:04 -0500 From: jhell To: Alexander Best In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers Subject: Re: [patch] extending {amd64|i386} cpu info X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 12:54:14 -0000 On Mon, 1 Mar 2010 19:29, alexbestms@ wrote: > jhell schrieb am 2010-03-01: > >> On Fri, 26 Feb 2010 22:19, alexbestms@ wrote: >>> hi there, > >>> i always forget how to decipher model and family from the cpu id. >>> of course >>> there're 3rd party tools to do that for you, but instead i decided >>> to hack the >>> kernel. ;) > >>> maybe somebody finds these changes useful. > >>> cheers. >>> alex > > > >> What about the other arch's ? I only see i386 and amd64. I would >> think if this functionality is going to "make it in" that it should >> be done consistantly across the board, the way it is now. > > just had a look at the other archs and in fact implementing these changes is > not that easy as on i386 and amd64. > > talking about consistency: i found the cpu info outputs on arm, i64, etc. to > differ from the ones on i386 and amd64. so in fact there is inconsistency > present atm. > In that case. EEEK. Alright if they are already differing then I certainly see no reason why not to do this. > i also think that on some archs it's not possible to output cpu id, stepping, > family and model simply because there's no cpu instruction (CPUID or something > similar) returning those info for freebsd to use. > Man what_was_I_smokin(1) "joking"; when I wrote that last email while thinking about three things at once. Of course they are going to be different lol. You are quite correct. Sorry. > cheers. > alex > >> -- > >> jhell > -- jhell From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 13:30:03 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEC0C106566B; Tue, 2 Mar 2010 13:30:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AA9C28FC1A; Tue, 2 Mar 2010 13:30:02 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3FD7A46B5C; Tue, 2 Mar 2010 08:30:02 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 9B10E8A021; Tue, 2 Mar 2010 08:30:01 -0500 (EST) From: John Baldwin To: Juergen Lock Date: Tue, 2 Mar 2010 07:50:20 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <20100223215010.GA67619@triton8.kn-bremen.de> <20100226210952.GA2253@triton8.kn-bremen.de> <201003011325.53617.jhb@freebsd.org> In-Reply-To: <201003011325.53617.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003020750.20845.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 02 Mar 2010 08:30:01 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, Tim Kientzle , Poul-Henning Kamp , bde@freebsd.org Subject: Re: 32 bit Linux lseek missing overflow check (was: Re: Linuxolator patches: stat and lseek SEEK_END for disk devices) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 13:30:03 -0000 On Monday 01 March 2010 1:25:53 pm John Baldwin wrote: > On Friday 26 February 2010 4:09:52 pm Juergen Lock wrote: > > On Fri, Feb 26, 2010 at 11:21:05AM -0500, John Baldwin wrote: > > > On Thursday 25 February 2010 3:28:50 pm Juergen Lock wrote: > > > > On Tue, Feb 23, 2010 at 10:50:10PM +0100, Juergen Lock wrote: > > > > > Hi! > > > > > > > > > > Before this gets buried on -hackers in another thead... :) > > > > > > > > > > I now have disks appear as block devices for Linux processes (there > > > > > already was commented out code for that in linux_stats.c, I hope my > > > > > version is now `correct enough' to be usable [1]), and I made a simple > > > > > patch to make lseek SEEK_END (L_XTND in the source) dtrt on disk > > > > > devices too by simply invoking the DIOCGMEDIASIZE ioctl there; [2] > > > > > both of these things are what (some) Linux processes expect. > > > > > > > > > > Patches are here: (made on stable/8, if they don't apply on head > > > > > I'll have to make extra versions for that...) > > > > > http://people.freebsd.org/~nox/linuxdisk-blk.patch [1] > > > > > http://people.freebsd.org/~nox/lseek-seek_end.patch [2] > > > > > > > > > > And yes, with these patches the Linux bsdtar mentioned on -hackers > > > > > in the `"tar tfv /dev/cd0" speedup patch' thread now also runs fast > > > > > on FreeBSD. :) > > > > > > > > I now added an vn_isdisk() check to the second patch after comments from > > > > julian, and I made a new patch that adds an overflow check to the 32 bit > > > > linux lseek: (also at > > > > http://people.freebsd.org/~nox/linux-lseek-overflow.patch > > > > ) > > Unfortunately it panics in g_dev_ioctl() with INVARIANTS enabled. I will bug > phk about that. After talking to phk, it isn't safe to invoke the ioctl from stat(), only if the device is known to be opened (e.g. lseek() or fstat()). This patch is a simpler version of your original patch (with some simple error checking added). I wasn't able to test it due to weird issues with igb(4) on my test machine, but it does compile: Index: vfs_syscalls.c =================================================================== --- vfs_syscalls.c (revision 204518) +++ vfs_syscalls.c (working copy) @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -1920,7 +1921,7 @@ struct file *fp; struct vnode *vp; struct vattr vattr; - off_t offset; + off_t offset, size; int error, noneg; int vfslocked; @@ -1951,6 +1952,15 @@ VOP_UNLOCK(vp, 0); if (error) break; + + /* + * If the file references a disk device, then fetch + * the media size and use that to determine the ending + * offset. + */ + if (vattr.va_size == 0 && vp->v_type == VCHR && + fo_ioctl(fp, DIOCGMEDIASIZE, &size, cred, td) == 0) + vattr.va_size = size; if (noneg && (vattr.va_size > OFF_MAX || (offset > 0 && vattr.va_size > OFF_MAX - offset))) { -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 15:06:21 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E38D1065674; Tue, 2 Mar 2010 15:06:21 +0000 (UTC) (envelope-from selphie.keller@gmail.com) Received: from mail-px0-f195.google.com (mail-px0-f195.google.com [209.85.216.195]) by mx1.freebsd.org (Postfix) with ESMTP id 2456A8FC0C; Tue, 2 Mar 2010 15:06:20 +0000 (UTC) Received: by pxi33 with SMTP id 33so103762pxi.14 for ; Tue, 02 Mar 2010 07:06:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:references:subject :date:message-id:mime-version:content-type:content-transfer-encoding :x-mailer:in-reply-to:thread-index:x-mimeole; bh=WXbYhxrmk/kXlU7fJTFcMZ3ip/BN+5II5e7tmhWPcP0=; b=vH0o4dbRLeS/laONZq1JV3v+haBOdf+A4Oj8L102C4OcQoJ9jRvpBT5lAIv4M2qWM6 FPkzYJABsAa0bUSJxVj8QuNsLBcSmMa3LIPpmp5/S01HeXv33MiIDHIG6KIifRkI+Gh8 5ATxDz8C8P5OuL7k6taJyle2hL7tx9CwE5Y2k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:references:subject:date:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:in-reply-to :thread-index:x-mimeole; b=Hyb0m2geucr+/FrHQnUYaiBJBXqoDfkG90gZbn0ZMpK5wuVoti2M3DSacDBV0McCrl kn8Og1f3hFKh+aZU8jom+nfO84GidMnw0hM8vyuu8d+V7S9t7ucqZF9Zt53PMp0V4kY4 pbC6FwSOPqWBuOMYVwNZyqrJ0xJ0oofS77QGY= Received: by 10.142.152.15 with SMTP id z15mr3414401wfd.341.1267540978528; Tue, 02 Mar 2010 06:42:58 -0800 (PST) Received: from 2WIRE304 (c-69-181-16-61.hsd1.ca.comcast.net [69.181.16.61]) by mx.google.com with ESMTPS id 20sm4692149pzk.7.2010.03.02.06.42.57 (version=SSLv3 cipher=RC4-MD5); Tue, 02 Mar 2010 06:42:57 -0800 (PST) From: Selphie Keller To: "'Robert Watson'" References: <2BD4195B78BE4E4E9F4953B3196590E3@2WIRE304> Date: Tue, 2 Mar 2010 06:43:03 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Acq5/DvSRd2DGRrkSUSpyr7qSrKrqAAFmIAA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Cc: freebsd-hackers@freebsd.org Subject: RE: mac_mls mac_biba mac_lomac patches to fix ptys_equal mib support for new /dev/pts in FreeBSD 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 15:06:21 -0000 Hi Robert, - (1) It looks like you didn't need to set any special label on /dev/ptmx - itself? I didn't have any issues with /dev/ptmx being defaulted to mls/low, also didn't have any problem with /dev/pts device path itself, just the /dev/pts/* 0 - 99 if they where defaulted to mls/low where my staff accounts would be logging in as mls/2(low-high), so I took a look at the code and noticed the sysctl's for ttys being equal weren't being applied to /dev/pts/* so modified the code, and also went ahead and applied the same concept to mac_biba and mac_lomac, even though the server only uses mac_mls policy. - (2) Could you let me know how your login.conf + user labels are configured, and show me the output of "ps -axZ | grep sshd"? /etc/login.conf label configurations I use Staff users: label=mls/2(low-high) Deamons: label=mls/equal(equal-equal) Insecure users: label=mls/low(low-low) If you need the exact data from login.conf I can provide it, but is a bit tricky as I use tc= to call from one class to another class and override, in which default class is mls/low. mls/equal(equal-equal) 7341 ?? Is 0:00.10 sshd: Enya [priv] (sshd) mls/2(low-high) 7770 ?? IN 0:00.05 sshd: Enya@notty (sshd) mls/equal(equal-equal) 26415 ?? Ss 0:00.05 sshd: lyra [priv] (sshd) mls/low(low-low) 27006 ?? SN 0:00.01 sshd: lyra@pts/4 (sshd) mls/equal(equal-equal) 31537 ?? Is 0:00.11 sshd: Enya [priv] (sshd) mls/equal(equal-equal) 31886 ?? Is 0:00.11 sshd: Enya [priv] (sshd) mls/2(low-high) 31908 ?? IN 0:00.04 sshd: Enya@pts/0 (sshd) mls/2(low-high) 32506 ?? SN 0:00.17 sshd: Enya@pts/3 (sshd) mls/equal(equal-equal) 50202 ?? Ss 0:00.02 /usr/sbin/sshd mls/equal(equal-equal) 70343 ?? Is 0:00.11 sshd: Enya [priv] (sshd) mls/2(low-high) 70706 ?? SN 0:00.21 sshd: Enya@pts/1 (sshd) -We need to rethink how we deal with ttys anyway, and I'd like to understand -how the specific case you're running into comes about. The problem I had was only when using mac_mls to where a staff user would login and be set to mls/2(low-high) then their /dev/pts/* would be set to mls/low which would prevent writing to the device which would introduce sshd errors as: > Feb 25 21:42:16 labyrinth sshd[30965]: error: /dev/pts/5: Permission denied > Feb 25 21:42:16 labyrinth sshd[30965]: error: open /dev/tty failed - could > not set controlling tty: Permission denied However, if my insecure users logged in they would be set to mls/low(low-low) and their device would be set to mls/low and no errors would present themselves. And users who's class was mls/equal(equal-equal) had no errors as they are exempted from the policy. +-[root@labyrinth.mystagic.net]-[06:27:11]--[0]--- +[/usr/src/sys]-> lo /dev/pts total 1 dr-xr-xr-x 2 root wheel - mls/low 512 Feb 25 22:42 ./ dr-xr-xr-x 5 root wheel - mls/low 512 Feb 25 14:39 ../ crw--w---- 1 Enya tty - mls/equal 0, 86 Mar 2 06:10 0 crw--w---- 1 Enya tty - mls/equal 0, 87 Mar 2 06:35 1 crw-rw-rw- 1 root wheel - mls/equal 0, 76 Feb 26 00:15 2 crw--w---- 1 Enya tty - mls/equal 0, 88 Mar 2 05:11 3 crw--w---- 1 lyra tty - mls/equal 0, 85 Mar 2 06:21 4 crw-rw-rw- 1 root wheel - mls/equal 0, 81 Mar 1 06:01 7 The device path with the mac_mls patched and security.mac.mls.ptys_equal=1, if it's not set to 1, then the devices are set to mls/low. If you need any further information just let me know, be more then happy to help. -Selphie (Estella Mystagic) -----Original Message----- From: owner-freebsd-hackers@freebsd.org [mailto:owner-freebsd-hackers@freebsd.org] On Behalf Of Robert Watson Sent: Tuesday, March 02, 2010 3:32 AM To: Estella Mystagic Cc: freebsd-hackers@freebsd.org Subject: Re: mac_mls mac_biba mac_lomac patches to fix ptys_equal mib support for new /dev/pts in FreeBSD 8 On Mon, 1 Mar 2010, Estella Mystagic wrote: > Found issues with sysctl mibs security.mac.biba.ptys_equal, > security.mac.lomac.ptys_equal, security.mac.mls.ptys_equal, not supporting > new /dev/pts terminal system in FreeBSD 8, proposed fix for issue. > > When using a higher security grade/clearance with mac_mls it prevents > writing to the /dev/pts/5 as its set as mls/low and subjects may not write > to objects with a lower classification level than its own clearance level. > > Feb 25 21:42:16 labyrinth sshd[30965]: error: /dev/pts/5: Permission denied > > Feb 25 21:42:16 labyrinth sshd[30965]: error: open /dev/tty failed - could > not set controlling tty: Permission denied Hi Selphie: Thanks for this patch. I'll go ahead and merge it, but had two questions: (1) It looks like you didn't need to set any special label on /dev/ptmx itself? (2) Could you let me know how your login.conf + user labels are configured, and show me the output of "ps -axZ | grep sshd"? We need to rethink how we deal with ttys anyway, and I'd like to understand how the specific case you're running into comes about. Robert N M Watson Computer Laboratory University of Cambridge _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 15:06:32 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1217F1065673 for ; Tue, 2 Mar 2010 15:06:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DFC978FC23 for ; Tue, 2 Mar 2010 15:06:31 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 647AF46B17; Tue, 2 Mar 2010 10:06:31 -0500 (EST) Date: Tue, 2 Mar 2010 15:06:31 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Estella Mystagic In-Reply-To: Message-ID: References: <2BD4195B78BE4E4E9F4953B3196590E3@2WIRE304> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: mac_mls mac_biba mac_lomac patches to fix ptys_equal mib support for new /dev/pts in FreeBSD 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 15:06:32 -0000 On Tue, 2 Mar 2010, Robert Watson wrote: > Thanks for this patch. I'll go ahead and merge it, but had two questions: Committed as r204581, thanks! Robert From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 15:18:56 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3AC4106564A; Tue, 2 Mar 2010 15:18:56 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD338FC3E; Tue, 2 Mar 2010 15:18:55 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 0ED581FFC22; Tue, 2 Mar 2010 15:18:54 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 97A7984549; Tue, 2 Mar 2010 16:18:53 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: mark@coreland.ath.cx References: <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100301135829.GB2219@logik.internal.network> <86zl2suo8n.fsf@ds4.des.no> <20100301161901.GC2219@logik.internal.network> <86635frhaa.fsf@ds4.des.no> <20100301220332.GB74816@logik.internal.network> <86aaurniuq.fsf@ds4.des.no> <20100302145216.GA60987@logik.internal.network> Date: Tue, 02 Mar 2010 16:18:53 +0100 In-Reply-To: <20100302145216.GA60987@logik.internal.network> (mark@coreland.ath.cx's message of "Tue, 2 Mar 2010 14:52:16 +0000") Message-ID: <86d3zmn44i.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 15:18:57 -0000 mark@coreland.ath.cx writes: > Is it possible to define multiple mountpoints (to emulate what nullfs > provides)? Sorry, no. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 14:52:22 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99BDE106564A; Tue, 2 Mar 2010 14:52:22 +0000 (UTC) (envelope-from mark@coreland.ath.cx) Received: from birch.site5.com (birch.site5.com [174.132.116.226]) by mx1.freebsd.org (Postfix) with ESMTP id 69ED48FC15; Tue, 2 Mar 2010 14:52:22 +0000 (UTC) Received: from dsl78-143-196-85.in-addr.fast.co.uk ([78.143.196.85] helo=viper.internal.network) by birch.site5.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NmTSO-0001cT-JI; Tue, 02 Mar 2010 08:52:20 -0600 Received: from viper.internal.network (localhost [127.0.0.1]) by viper.internal.network (Postfix) with ESMTP id 1F9314AC06; Tue, 2 Mar 2010 14:52:17 +0000 (UTC) Received: (from m0@localhost) by viper.internal.network (8.14.3/8.14.3/Submit) id o22EqGp8011164; Tue, 2 Mar 2010 14:52:16 GMT (envelope-from mark@coreland.ath.cx) X-Authentication-Warning: viper.internal.network: m0 set sender to mark@coreland.ath.cx using -f Date: Tue, 2 Mar 2010 14:52:16 +0000 From: mark@coreland.ath.cx To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20100302145216.GA60987@logik.internal.network> References: <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100301135829.GB2219@logik.internal.network> <86zl2suo8n.fsf@ds4.des.no> <20100301161901.GC2219@logik.internal.network> <86635frhaa.fsf@ds4.des.no> <20100301220332.GB74816@logik.internal.network> <86aaurniuq.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <86aaurniuq.fsf@ds4.des.no> Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - birch.site5.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coreland.ath.cx X-Source: X-Source-Args: X-Source-Dir: X-Mailman-Approved-At: Tue, 02 Mar 2010 18:47:23 +0000 Cc: Greg Larkin , freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 14:52:22 -0000 On 2010-03-02 11:00:45, Dag-Erling Sm=F8rgrav wrote: > xorquewasp@googlemail.com writes: > > Basically, I have a ton of jails and each jail mounts a shared 'tmp', >=20 > That's not a good idea, there are too many opportunities for conflicts > (software that creates sockets and state directories with non-randomize= d > names in /tmp) and might even allow a compromised jail to compromise th= e > others. Don't panic. It's actually mounted at /shared_tmp as an explicit means for jails to communicate via the filesystem. In other words, it's known to be unsafe. I use it to sandbox programs to some extent (download a pdf on the host into /shared_tmp and open it in a pdf reader in a jail that has no network or other filesystem access). The jails also aren't externally accessible. > zfs set mountpoint=3D/jail/8.0-amd64-mk4 storage/jails/8.0/x86_64/mk4 >=20 > Children of storage/jails/8.0/x86_64/mk4 will inherit this property, so > they will automatically appear where you expect; alternatively, you can > set the mountpoint property for each individual fileset. I see. Is it possible to define multiple mountpoints (to emulate what nullfs provides)? xw From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 19:32:18 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3191A106566B; Tue, 2 Mar 2010 19:32:18 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id EB2C88FC13; Tue, 2 Mar 2010 19:32:17 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:3561:7d61:b408:b6c] (unknown [IPv6:2001:7b8:3a7:0:3561:7d61:b408:b6c]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 146CE5C43; Tue, 2 Mar 2010 20:32:16 +0100 (CET) Message-ID: <4B8D67C4.9050709@andric.com> Date: Tue, 02 Mar 2010 20:32:20 +0100 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.2pre) Gecko/20100227 Lanikai/3.1b1pre MIME-Version: 1.0 To: Alexandr Rybalko References: <20100219163644.da89e882.ray@dlink.ua> <20100302071736.GF1946@garage.freebsd.pl> <20100302104748.0f27136c.ray@dlink.ua> In-Reply-To: <20100302104748.0f27136c.ray@dlink.ua> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, geom@freebsd.org, embedded@freebsd.org, Pawel Jakub Dawidek Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 19:32:18 -0000 On 2010-03-02 09:47, Alexandr Rybalko wrote: >>> Definiatelly separately, not sure where. There is ongoing discussion >>> somwhere on importing this algorithm to the base for tar(1) to use, it >>> would be best to have only one copy of code in the tree. > I have already said, that it would be good for embedded platforms have only one copy of the code for the kernel and userland. > It is not thought of how done it. I think Pawel means the *source* code in this case, not the executable code. E.g. lzma source should most likely go under /usr/src/contrib, and be built separately for kernel and userland. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 21:28:08 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC88A106566B; Tue, 2 Mar 2010 21:28:08 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8C18FC1A; Tue, 2 Mar 2010 21:28:07 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 8EF021E00122; Tue, 2 Mar 2010 22:28:06 +0100 (CET) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.3/8.14.3) with ESMTP id o22LRAgj004527; Tue, 2 Mar 2010 22:27:10 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.3/8.14.3/Submit) id o22LRAfJ004526; Tue, 2 Mar 2010 22:27:10 +0100 (CET) (envelope-from nox) Date: Tue, 2 Mar 2010 22:27:10 +0100 (CET) From: Juergen Lock Message-Id: <201003022127.o22LRAfJ004526@triton8.kn-bremen.de> To: jhb@freebsd.org X-Newsgroups: local.list.freebsd.hackers In-Reply-To: <201003020750.20845.jhb@freebsd.org> References: <20100223215010.GA67619@triton8.kn-bremen.de> <20100226210952.GA2253@triton8.kn-bremen.de> <201003011325.53617.jhb@freebsd.org> Organization: home X-Mailman-Approved-At: Tue, 02 Mar 2010 21:46:11 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, Tim Kientzle , Poul-Henning Kamp , bde@freebsd.org Subject: Re: 32 bit Linux lseek missing overflow check (was: Re: Linuxolator patches: stat and lseek SEEK_END for disk devices) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 21:28:09 -0000 In article <201003020750.20845.jhb@freebsd.org> you write: >On Monday 01 March 2010 1:25:53 pm John Baldwin wrote: >> On Friday 26 February 2010 4:09:52 pm Juergen Lock wrote: >> > On Fri, Feb 26, 2010 at 11:21:05AM -0500, John Baldwin wrote: >> > > On Thursday 25 February 2010 3:28:50 pm Juergen Lock wrote: >> > > > On Tue, Feb 23, 2010 at 10:50:10PM +0100, Juergen Lock wrote: >> > > > > Hi! >> > > > > >> > > > > Before this gets buried on -hackers in another thead... :) >> > > > > >> > > > > I now have disks appear as block devices for Linux processes (there >> > > > > already was commented out code for that in linux_stats.c, I hope my >> > > > > version is now `correct enough' to be usable [1]), and I made a simple >> > > > > patch to make lseek SEEK_END (L_XTND in the source) dtrt on disk >> > > > > devices too by simply invoking the DIOCGMEDIASIZE ioctl there; [2] >> > > > > both of these things are what (some) Linux processes expect. >> > > > > >> > > > > Patches are here: (made on stable/8, if they don't apply on head >> > > > > I'll have to make extra versions for that...) >> > > > > http://people.freebsd.org/~nox/linuxdisk-blk.patch [1] >> > > > > http://people.freebsd.org/~nox/lseek-seek_end.patch [2] >> > > > > >> > > > > And yes, with these patches the Linux bsdtar mentioned on -hackers >> > > > > in the `"tar tfv /dev/cd0" speedup patch' thread now also runs fast >> > > > > on FreeBSD. :) >> > > > >> > > > I now added an vn_isdisk() check to the second patch after comments from >> > > > julian, and I made a new patch that adds an overflow check to the 32 bit >> > > > linux lseek: (also at >> > > > http://people.freebsd.org/~nox/linux-lseek-overflow.patch >> > > > ) >> >> Unfortunately it panics in g_dev_ioctl() with INVARIANTS enabled. I will bug >> phk about that. > >After talking to phk, it isn't safe to invoke the ioctl from stat(), only if >the device is known to be opened (e.g. lseek() or fstat()). This patch is a >simpler version of your original patch (with some simple error checking >added). I wasn't able to test it due to weird issues with igb(4) on my test >machine, but it does compile: > Does work for me too! :) Btw, has anyone looked at my other two patches since? >Index: vfs_syscalls.c >=================================================================== >--- vfs_syscalls.c (revision 204518) >+++ vfs_syscalls.c (working copy) >@@ -45,6 +45,7 @@ > #include > #include > #include >+#include > #include > #include > #include >@@ -1920,7 +1921,7 @@ > struct file *fp; > struct vnode *vp; > struct vattr vattr; >- off_t offset; >+ off_t offset, size; > int error, noneg; > int vfslocked; > >@@ -1951,6 +1952,15 @@ > VOP_UNLOCK(vp, 0); > if (error) > break; >+ >+ /* >+ * If the file references a disk device, then fetch >+ * the media size and use that to determine the ending >+ * offset. >+ */ >+ if (vattr.va_size == 0 && vp->v_type == VCHR && >+ fo_ioctl(fp, DIOCGMEDIASIZE, &size, cred, td) == 0) >+ vattr.va_size = size; > if (noneg && > (vattr.va_size > OFF_MAX || > (offset > 0 && vattr.va_size > OFF_MAX - offset))) { > >-- >John Baldwin >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > Cheers, Juergen From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 21:58:26 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65BE3106566C; Tue, 2 Mar 2010 21:58:26 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id A8B368FC08; Tue, 2 Mar 2010 21:58:25 +0000 (UTC) Received: by fxm23 with SMTP id 23so200279fxm.3 for ; Tue, 02 Mar 2010 13:58:22 -0800 (PST) Received: by 10.223.7.69 with SMTP id c5mr7380197fac.14.1267565769987; Tue, 02 Mar 2010 13:36:09 -0800 (PST) Received: from localhost (131-84-133-95.pool.ukrtel.net [95.133.84.131]) by mx.google.com with ESMTPS id 21sm7942573fks.53.2010.03.02.13.36.07 (version=SSLv3 cipher=RC4-MD5); Tue, 02 Mar 2010 13:36:08 -0800 (PST) Date: Tue, 2 Mar 2010 23:35:29 +0200 From: Alex RAY To: Dimitry Andric Message-Id: <20100302233529.77625a5a.ray@ddteam.net> In-Reply-To: <4B8D67C4.9050709@andric.com> References: <20100219163644.da89e882.ray@dlink.ua> <20100302071736.GF1946@garage.freebsd.pl> <20100302104748.0f27136c.ray@dlink.ua> <4B8D67C4.9050709@andric.com> Organization: DDTeam.net X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Alexandr Rybalko , geom@freebsd.org, embedded@freebsd.org, Pawel Jakub Dawidek , hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 21:58:26 -0000 On Tue, 02 Mar 2010 20:32:20 +0100 Dimitry Andric wrote: > On 2010-03-02 09:47, Alexandr Rybalko wrote: > >>> Definiatelly separately, not sure where. There is ongoing discussion > >>> somwhere on importing this algorithm to the base for tar(1) to use, it > >>> would be best to have only one copy of code in the tree. > > I have already said, that it would be good for embedded platforms have only one copy of the code for the kernel and userland. > > It is not thought of how done it. > > I think Pawel means the *source* code in this case, not the executable > code. E.g. lzma source should most likely go under /usr/src/contrib, > and be built separately for kernel and userland. I understand. I'm trying to think about the future of FreeBSD in embedded. :) -- Alexandr Rybalko aka Alex RAY From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 23:11:08 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D41BC106566C for ; Tue, 2 Mar 2010 23:11:08 +0000 (UTC) (envelope-from alexeichi@yahoo.de) Received: from smtp124.mail.ukl.yahoo.com (smtp124.mail.ukl.yahoo.com [77.238.184.55]) by mx1.freebsd.org (Postfix) with SMTP id 43D258FC0C for ; Tue, 2 Mar 2010 23:11:07 +0000 (UTC) Received: (qmail 58640 invoked from network); 2 Mar 2010 23:11:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=w13GLvy95d1n2d/oyvP/Ktjye62rukLTMj8o6u2sFUxVvBpne8aS2mBZwgCYNfmxKBhYbmHUTXwFKaR9NlC+nJyhDjWUthQEliw9cXvrqFeol2PL/dRnTBqYAEIixSpik60G/orNVdyweB6iQy0nWWiPG3CsxcWUxuKRSiIxYhs= ; Received: from p57BBC91B.dip.t-dialin.net (alexeichi@87.187.201.27 with login) by smtp124.mail.ukl.yahoo.com with SMTP; 02 Mar 2010 23:11:04 +0000 GMT X-Yahoo-SMTP: yMol3buswBBNNUOSiWLj.UV.YXoMOg-- X-YMail-OSG: fGTUCMQVM1lb1IQ7rLrdX61ElzH1uv79r7Ux40roEpz8yS7KzMQUNpmzLxQd_46YLHkfKroixyKV3bRTBfoqqQh5mlzPGP4rgQIleZda5ol0X2pz4h7y0XPUonJQJJDWYBOSxOyzWwEvPSVXDW69IMIFEGYtKNbnEvh5qev1H8K6PnGoSJZD.l6MOSqR_uDhjYelT7yKCdYk92bMPGCXWrDXoZE2BXxikU1v8jl.0X01WNFskB5q2GFYGs0YrgPqadmBIFRVGmlot8km1ujQUXfpkHA_5TUsvWg- X-Yahoo-Newman-Property: ymail-3 From: Alexander Eichner To: Giovanni Trematerra In-Reply-To: <4e6cba831003020304u2a2dc8ceobb594ebe58744ef5@mail.gmail.com> References: <317657.30145.qm@web27603.mail.ukl.yahoo.com> <4e6cba831003010619j560f5b92n4c63ab2520cff7db@mail.gmail.com> <1267518879.2794.14.camel@Prometheus> <4e6cba831003020304u2a2dc8ceobb594ebe58744ef5@mail.gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 03 Mar 2010 00:11:01 +0100 Message-ID: <1267571461.2960.7.camel@Prometheus> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Allocating physical memory without a kernel mapping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 23:11:08 -0000 Giovanni Trematerra wrote: > On Tue, Mar 2, 2010 at 9:34 AM, Alexander Eichner wrote: > > Giovanni Trematerra wrote: > >> On Mon, Mar 1, 2010 at 10:59 AM, Alexander Eichner wrote: > >> > Hi, > >> > > > > > Thanks for your help but I don't see how that patch could help with my > > problem. rtR0MemObjNativeAllocPage allocates pages with a kernel > > mapping but the problem appears when using rtR0MemObjNativeAllocPhysNC > > + rtR0MemObjNativeMapUser and freeing the pages later. > > rtR0MemObjNativeAllocPage is used if I use the old allocation mode which > > does not use rtR0MemObjNativeAllocPhysNC and this works fine here. > > The double wiring problem should also be solved with the latest source. > > Sorry, the patch was intended *only* as alternative way to resolve > double wired paging issue. > I don't know if the patch is correct though. > > Maybe you can attach a textdump of your panic(or at least a bt), that > might be useful to understand the problem. > > Thank you. > > -- > Gianni > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" [1] contains a screenshot of the panic. The VBoxHeadless process has already terminated and I started a gnome-session while the panic happened. Unfortunately I'm not able to dump the core to disk. If I try to execute panic it just hangs or prints the stack trace again. The host is 64bit FreeBSD 9-Current with 8GB of RAM and a AMD Phenom Quad-Core CPU. uname -a: FreeBSD HatakFreeBSD.vbox 9.0-CURRENT FreeBSD 9.0-CURRENT #1: Wed Feb 24 19:44:20 CET 2010 alexander@HatakFreeBSD.vbox:/usr/obj/usr/src/sys/GENERIC amd64 Thanks and regards, Alexander [1] http://imagebin.ca/view/IlWwmPg.html From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 3 04:59:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DCEA106566B; Wed, 3 Mar 2010 04:59:58 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4C6848FC08; Wed, 3 Mar 2010 04:59:58 +0000 (UTC) Received: by pwj1 with SMTP id 1so702785pwj.13 for ; Tue, 02 Mar 2010 20:59:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PxaAV4P/Lu5aGhzTOIqu8wYqdF08ojsxFeASsKf0V20=; b=uVwkHqLyqxIVqEUQTA9vKTQGNwDDLo2j3jAZuYPFOcQoWr+2SRd68BxPDIS4XxbLHO l6KDLOdlqTF1pcrYIDI+hjl8/hG61B8n7Yc0DN7aHpYLG2RTLtAfz8r1UJtrvM0yPtln 9P7r5c8DdPMwpNPEIiO+BBj7Q6+hsiHrBMAks= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Qq6thplKGYCJHVoQTcURz9LLAib6XDPb+FiDRNLNuk/ktoHMRFqmhcX8pxyJY0ufM6 fgu9qhHn3H19qQZ186smvjJ0fmBbV/XaX1ysY13u+NtVQsDi4Dts2rY9PU/Wg4qtlPTJ PNo3k39QsL9jiRRiZyK0hKam9tT65bYZ2m3II= MIME-Version: 1.0 Received: by 10.115.133.25 with SMTP id k25mr4019028wan.134.1267592395415; Tue, 02 Mar 2010 20:59:55 -0800 (PST) In-Reply-To: <4B8DD54F.6060302@FreeBSD.org> References: <201003030205.o2325AMY010089@svn.freebsd.org> <4B8DD54F.6060302@FreeBSD.org> Date: Tue, 2 Mar 2010 20:59:55 -0800 Message-ID: From: Xin LI To: Maxim Sobolev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd Subject: Re: svn commit: r204615 - head/sbin/newfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 04:59:58 -0000 On Tue, Mar 2, 2010 at 7:19 PM, Maxim Sobolev wrote: > Xin LI wrote: >> >> On Tue, Mar 2, 2010 at 6:05 PM, Maxim Sobolev wrot= e: >>> >>> Author: sobomax >>> Date: Wed Mar =C2=A03 02:05:09 2010 >>> New Revision: 204615 >>> URL: http://svn.freebsd.org/changeset/base/204615 >>> >>> Log: >>> =C2=A0Teach newfs(8) to understand size modifiers for all options takin= g >>> =C2=A0size or size-like argument. I.e. "-s 32k" instead of "-s 32768". >>> =C2=A0Size parsing function has been shamelessly stolen from the trunca= te(1). >>> =C2=A0I'm sure many sysadmins out there will appreciate this small >>> =C2=A0improvement. >> >> Bikeshed: why not expand_number()? > > I did not know that function existed, but even if I did, I am really not > sure if adding dependency on external library just to save 200 bytes of c= ode > worth it. Considering that newfs(8) is often embedded into various > space-tight/custom things, adding dependency could cause more harm than > good. In any case, I do not feel strongly about that, so I can change it = to > use libutil if people feel like it. [Moved from svn-all@ to -hackers@] I'd prefer depending on libutil since it's installed as a /lib library which is usually available, as libutil is not something easily avoidable. By the way I'm curious why these (humanize and friends) are not available as libc function? Because they are not part of POSIX perhaps? Cheers, --=20 Xin LI http://www.delphij.net From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 3 06:36:07 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 764B6106566C; Wed, 3 Mar 2010 06:36:07 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id B30558FC0A; Wed, 3 Mar 2010 06:36:05 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id BA1F445EC0; Wed, 3 Mar 2010 07:36:03 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 5E70445E90; Wed, 3 Mar 2010 07:35:58 +0100 (CET) Date: Wed, 3 Mar 2010 07:35:55 +0100 From: Pawel Jakub Dawidek To: Dimitry Andric Message-ID: <20100303063555.GA6992@garage.freebsd.pl> References: <20100219163644.da89e882.ray@dlink.ua> <20100302071736.GF1946@garage.freebsd.pl> <20100302104748.0f27136c.ray@dlink.ua> <4B8D67C4.9050709@andric.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline In-Reply-To: <4B8D67C4.9050709@andric.com> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Alexandr Rybalko , geom@freebsd.org, embedded@freebsd.org, hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 06:36:07 -0000 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 02, 2010 at 08:32:20PM +0100, Dimitry Andric wrote: > On 2010-03-02 09:47, Alexandr Rybalko wrote: > >>>Definiatelly separately, not sure where. There is ongoing discussion > >>>somwhere on importing this algorithm to the base for tar(1) to use, it > >>>would be best to have only one copy of code in the tree. > >I have already said, that it would be good for embedded platforms have= =20 > >only one copy of the code for the kernel and userland. > >It is not thought of how done it. >=20 > I think Pawel means the *source* code in this case, not the executable > code. E.g. lzma source should most likely go under /usr/src/contrib, > and be built separately for kernel and userland. If it is going to be used be the kernel it has to be under sys/. And yes, I was talking about one copy of the source, not executable. I think it would be bad idea to do compression in the kernel for userland applications for many reasons - the most important one is security. Look at projects like Capsicum where Robert closed for example gzip in a tight sandbox and gzip is not even set-uid and giving it chance to gain kernel access when bug is found is very, very bad. Another reason is performance. You can see how much faster, eg. openssl crypto is when doing it in userland and when forcing it to use software crypto from the opencrypto kernel framework. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkuOA0sACgkQForvXbEpPzQAfgCgulguY4hsHTHm+bBtx6qje1dT 9hMAnj7bebI/ppgNMBHOhcs68Afp0poH =znag -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM-- From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 3 08:02:12 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC88F106566B; Wed, 3 Mar 2010 08:02:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-iw0-f183.google.com (mail-iw0-f183.google.com [209.85.223.183]) by mx1.freebsd.org (Postfix) with ESMTP id A17028FC0C; Wed, 3 Mar 2010 08:02:12 +0000 (UTC) Received: by iwn13 with SMTP id 13so1130901iwn.14 for ; Wed, 03 Mar 2010 00:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=KLlFKD04yi+BEzI48Bsv8qhpy77AqmXj+W+T9WI+2Bo=; b=SXpJqfjINbepVmnQeeBeuqNCcT0quvaGaGRRR/3yYlzK0tQ9G5HHCh+4uvUViJc9Wx mzzIVBnSeUl3ZxBKyOFSV9iBr3una/nYApU3Q7FH5NJm13cmty7/dJkktkv4GNx47n99 HomHJ0dANU/8JyRUMWdVIOP07AHf8fqizejXA= 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; b=wBSwuHll/hvElkCzomoyCI4AqAcOWenrvGBUvbMve2Bs/zomrCjkeo+GzfDiVZdCa5 aD+iWYXsVtg/T8ztaypdf46oNl6P+LSJOo8fGXa5HGAdUUhXwgqvR6xskdYjeAXNX9D1 VGH/PsTnDmQP4rSQ8MdE/Ya8pkhtLKHfLNz/o= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.231.150.74 with SMTP id x10mr703960ibv.97.1267603319065; Wed, 03 Mar 2010 00:01:59 -0800 (PST) In-Reply-To: References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> Date: Wed, 3 Mar 2010 16:01:59 +0800 X-Google-Sender-Auth: e8c364b0f1a4a56d Message-ID: From: Adrian Chadd To: Alex RAY Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 08:02:13 -0000 On 21 February 2010 02:20, Adrian Chadd wrote: > Oh I know that! I'm just saying that I may try lzma'ing the kernel and > rootfs's to see what kind of savings I get over gzip. :) The answer is "whoa". 24 megabyte compressed kernel + MDROOT drops to 6.5 megabytes with gzip -9 and a few bytes shy of 5 megabytes with a default lzma compress. .. wow. :) This is +1 for GEOM_ULZMA too if it's as effective for the mfs itself. I'll toy with that later. Adrian From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 3 08:48:15 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5512E1065689 for ; Wed, 3 Mar 2010 08:48:15 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id B4F8C8FC79 for ; Wed, 3 Mar 2010 08:44:14 +0000 (UTC) Received: by pwj1 with SMTP id 1so811962pwj.13 for ; Wed, 03 Mar 2010 00:44:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=l9T6QuXx0Y2JndaSU7zf4/XLQVC2f0uUSXbbnV3jft4=; b=xLdmjr5hRT1U9k8kIITyaGWlxLaTc0+dsF3SVmuZEo9/EYzLGD17oiuSBYNa95zR4t NRd660CDJ0o4L2ETPIpu9o29dhFoCPe2Us87uuBD1yPwHDLwYj8yl0LM5ifXsLva6ED6 iXani6/hIC05pMJ0EAkDBicD0DXgTMGjkYqwk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=BvKWQ3bTdVXUJYVn0C62LL2PzWOVzGlm/xf7FF+1oOb3xKkzkzXF7B8EnMIwTgWRem YeShaHBOKoJc+FdFWwLOtfOeKCL3XYSF5v7DHO/AgzHf7DtsFWgTZkAm8BxB/5gc3CBB e887ajEjZpvV98RBHr1wpdax1IhfQtGGwJW+M= MIME-Version: 1.0 Received: by 10.142.249.24 with SMTP id w24mr980709wfh.175.1267605846544; Wed, 03 Mar 2010 00:44:06 -0800 (PST) In-Reply-To: References: <201003030205.o2325AMY010089@svn.freebsd.org> <4B8DD54F.6060302@FreeBSD.org> Date: Wed, 3 Mar 2010 00:44:06 -0800 Message-ID: <7d6fde3d1003030044h4da7ed2ch1839ea769190bd2b@mail.gmail.com> From: Garrett Cooper To: Xin LI Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Maxim Sobolev , freebsd Subject: Re: svn commit: r204615 - head/sbin/newfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 08:48:16 -0000 On Tue, Mar 2, 2010 at 8:59 PM, Xin LI wrote: > On Tue, Mar 2, 2010 at 7:19 PM, Maxim Sobolev wrote= : >> Xin LI wrote: >>> >>> On Tue, Mar 2, 2010 at 6:05 PM, Maxim Sobolev wro= te: >>>> >>>> Author: sobomax >>>> Date: Wed Mar =A03 02:05:09 2010 >>>> New Revision: 204615 >>>> URL: http://svn.freebsd.org/changeset/base/204615 >>>> >>>> Log: >>>> =A0Teach newfs(8) to understand size modifiers for all options taking >>>> =A0size or size-like argument. I.e. "-s 32k" instead of "-s 32768". >>>> =A0Size parsing function has been shamelessly stolen from the truncate= (1). >>>> =A0I'm sure many sysadmins out there will appreciate this small >>>> =A0improvement. >>> >>> Bikeshed: why not expand_number()? >> >> I did not know that function existed, but even if I did, I am really not >> sure if adding dependency on external library just to save 200 bytes of = code >> worth it. Considering that newfs(8) is often embedded into various >> space-tight/custom things, adding dependency could cause more harm than >> good. In any case, I do not feel strongly about that, so I can change it= to >> use libutil if people feel like it. > > [Moved from svn-all@ to -hackers@] > > I'd prefer depending on libutil since it's installed as a /lib library > which is usually available, as libutil is not something easily > avoidable. > > By the way I'm curious why these (humanize and friends) are not > available as libc function? =A0Because they are not part of POSIX > perhaps? Maxim, Xin Li has a point. I ran some tests and the ad hoc parsing function eats up more memory than expand_number(3) [*]: $ uname -a FreeBSD garrcoop-fbsd.cisco.com 8.0-STABLE FreeBSD 8.0-STABLE #2: Wed Feb 3 16:57:07 PST 2010 garrcoop@garrcoop-fbsd.cisco.com:/usr/obj/usr/src/sys/LAPPY_X86 i386 $ gcc -o test_expand_number test_expand_number.c -lutil; strip test_expand_number; stat -f '%z %b' test_expand_number 3240 8 $ gcc -o test_non-expand_number test_non-expand_number.c; strip test_non-expand_number; stat -f '%z %b' test_non-expand_number 3756 8 This of course is dynamically linked, not statically linked; the statically linked size is of course ridiculous: $ gcc -static -o test_expand_number test_expand_number.c -lutil; strip test_expand_number; stat -f '%z %b' test_expand_number 184744 364 But just to be fair the non-expand number version is bloody near the same (only 540 bytes smaller on disk)... $ gcc -static -o test_non-expand_number test_non-expand_number.c; strip test_non-expand_number; stat -f '%z %b' test_non-expand_number 184204 360 Given that expand_number(3) is more established and tested, and supports more prefixes / 64-bit numbers, doesn't it make more sense to use expand_number(3) given the above evidence? Thanks, -Garrett [*] Notes: 1. All of these numbers were obtained with non-optimized CFLAGS (-O0, no -march values, etc). 2. All of these numbers were obtained after stripping the binaries as shown above. /* Using expand_number(3) */ #include #include #include #include int main(void) { int64_t anum; /* * SYNOPSIS #include int expand_number(const char *buf, int64_t *num); */ (void) expand_number("10G", &anum); return 0; } /* Using parselength. */ #include /* * Return the numeric value of a string given in the form [+-][0-9]+[GMKT] * or -1 on format error or overflow. */ static int parselength(const char *ls, int *sz) { off_t length, oflow; int lsign; length =3D 0; lsign =3D 1; switch (*ls) { case '-': lsign =3D -1; case '+': ls++; } #define ASSIGN_CHK_OFLOW(x, y) if (x < y) return -1; y =3D x /* * Calculate the value of the decimal digit string, failing * on overflow. */ while (isdigit(*ls)) { oflow =3D length * 10 + *ls++ - '0'; ASSIGN_CHK_OFLOW(oflow, length); } switch (*ls) { case 'T': case 't': oflow =3D length * 1024; ASSIGN_CHK_OFLOW(oflow, length); case 'G': case 'g': oflow =3D length * 1024; ASSIGN_CHK_OFLOW(oflow, length); case 'M': case 'm': oflow =3D length * 1024; ASSIGN_CHK_OFLOW(oflow, length); case 'K': case 'k': if (ls[1] !=3D '\0') return -1; oflow =3D length * 1024; ASSIGN_CHK_OFLOW(oflow, length); case '\0': break; default: return -1; } *sz =3D length * lsign; return 0; } int main(void) { int anum; (void) parselength("10G", &anum); return 0; } From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 3 09:11:55 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E445C1065672; Wed, 3 Mar 2010 09:11:55 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id A3D0D8FC22; Wed, 3 Mar 2010 09:11:55 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 0C47C730A1; Wed, 3 Mar 2010 10:04:56 +0100 (CET) Date: Wed, 3 Mar 2010 10:04:56 +0100 From: Luigi Rizzo To: Garrett Cooper Message-ID: <20100303090456.GA14140@onelab2.iet.unipi.it> References: <201003030205.o2325AMY010089@svn.freebsd.org> <4B8DD54F.6060302@FreeBSD.org> <7d6fde3d1003030044h4da7ed2ch1839ea769190bd2b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7d6fde3d1003030044h4da7ed2ch1839ea769190bd2b@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: Maxim Sobolev , freebsd Subject: Re: svn commit: r204615 - head/sbin/newfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 09:11:56 -0000 On Wed, Mar 03, 2010 at 12:44:06AM -0800, Garrett Cooper wrote: ... > Maxim, > > Xin Li has a point. I ran some tests and the ad hoc parsing function > eats up more memory than expand_number(3) [*]: as someone reminded me, a static library only brings in the archive members you actually use, whereas with a dinamic library you are forced, at runtime, to bring in the entire library (which requires duplicating the static data at least). So i suspect that even if other programs on the same system already use libutil, just the library overhead is more than the cost of a single function. If one is really concerned with memory usage and at the same time wants (for the good reasons mentioned in the thread) to reuse the expand_number code, the it seems that the best approach is force static link with libutil (to bring in just the function you need) and use the default approach for the rest. cheers luigi From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 3 16:28:19 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8EBA106564A for ; Wed, 3 Mar 2010 16:28:19 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id B7C2A8FC13 for ; Wed, 3 Mar 2010 16:28:19 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.3/8.14.3) id o23GSIA3047728; Wed, 3 Mar 2010 16:28:18 GMT (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id d6zg25bxk2h76rxm433dcbpr8w; Wed, 03 Mar 2010 16:28:18 +0000 (UTC) (envelope-from kientzle@freebsd.org) Message-ID: <4B8E8E5A.5050203@freebsd.org> Date: Wed, 03 Mar 2010 08:29:14 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090601 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Adrian Chadd References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Alex RAY , Ivan Voras Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 16:28:20 -0000 Adrian Chadd wrote: > On 21 February 2010 02:20, Adrian Chadd wrote: >> Oh I know that! I'm just saying that I may try lzma'ing the kernel and >> rootfs's to see what kind of savings I get over gzip. :) > > The answer is "whoa". 24 megabyte compressed kernel + MDROOT drops to > 6.5 megabytes with gzip -9 and a few bytes shy of 5 megabytes with a > default lzma compress. Interesting question: What is the impact on boot speed? It could be a lot faster to load 5MB from disk and decompress to a 24MB image than to wait for 24MB from disk. > This is +1 for GEOM_ULZMA too if it's as effective for the mfs itself. > I'll toy with that later. Let us know what you find. Tim From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 3 16:43:46 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BBDE106564A for ; Wed, 3 Mar 2010 16:43:46 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id 0866D8FC26 for ; Wed, 3 Mar 2010 16:43:45 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id E597D6678A for ; Wed, 3 Mar 2010 17:43:28 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 36EFF15C70; Wed, 3 Mar 2010 17:43:11 +0100 (CET) Date: Wed, 3 Mar 2010 17:43:11 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20100303164311.GA20695@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> <4B8E8E5A.5050203@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B8E8E5A.5050203@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2010 16:43:46 -0000 On Wed, Mar 03, 2010 at 08:29:14AM -0800, Tim Kientzle wrote: > Adrian Chadd wrote: > >On 21 February 2010 02:20, Adrian Chadd wrote: > >>Oh I know that! I'm just saying that I may try lzma'ing the kernel and > >>rootfs's to see what kind of savings I get over gzip. :) > > > >The answer is "whoa". 24 megabyte compressed kernel + MDROOT drops to > >6.5 megabytes with gzip -9 and a few bytes shy of 5 megabytes with a > >default lzma compress. > > Interesting question: What is the impact on boot speed? > It could be a lot faster to load 5MB from disk and > decompress to a 24MB image than to wait for 24MB from > disk. I don't think it helps in terms of boot speed, at least as long as the kernel image can be read without constant seeking. Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 09:08:49 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C04F106567D; Thu, 4 Mar 2010 09:08:49 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 7808E8FC17; Thu, 4 Mar 2010 09:08:48 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Nn70Z-0001mX-BK; Thu, 04 Mar 2010 11:06:15 +0200 Date: Thu, 4 Mar 2010 11:08:44 +0200 From: Alexandr Rybalko To: Pawel Jakub Dawidek Message-Id: <20100304110844.2e5c904b.ray@dlink.ua> In-Reply-To: <20100303063555.GA6992@garage.freebsd.pl> References: <20100219163644.da89e882.ray@dlink.ua> <20100302071736.GF1946@garage.freebsd.pl> <20100302104748.0f27136c.ray@dlink.ua> <4B8D67C4.9050709@andric.com> <20100303063555.GA6992@garage.freebsd.pl> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: embedded@freebsd.org, geom@freebsd.org, Dimitry Andric , hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 09:08:49 -0000 On Wed, 3 Mar 2010 07:35:55 +0100 Pawel Jakub Dawidek wrote: >> On Tue, Mar 02, 2010 at 08:32:20PM +0100, Dimitry Andric wrote: >> > On 2010-03-02 09:47, Alexandr Rybalko wrote: >> > >>>Definiatelly separately, not sure where. There is ongoing discussion >> > >>>somwhere on importing this algorithm to the base for tar(1) to use, it >> > >>>would be best to have only one copy of code in the tree. >> > >I have already said, that it would be good for embedded platforms have >> > >only one copy of the code for the kernel and userland. >> > >It is not thought of how done it. >> > >> > I think Pawel means the *source* code in this case, not the executable >> > code. E.g. lzma source should most likely go under /usr/src/contrib, >> > and be built separately for kernel and userland. >> >> If it is going to be used be the kernel it has to be under sys/. >> >> And yes, I was talking about one copy of the source, not executable. >> I think it would be bad idea to do compression in the kernel for >> userland applications for many reasons - the most important one is >> security. Look at projects like Capsicum where Robert closed for example >> gzip in a tight sandbox and gzip is not even set-uid and giving it >> chance to gain kernel access when bug is found is very, very bad. >> Another reason is performance. You can see how much faster, eg. openssl >> crypto is when doing it in userland and when forcing it to use software >> crypto from the opencrypto kernel framework. Ok, already forgotten. Well, LZMA code is not so big, so will use two copies for kernel and for userland. It is possible to have number of different version of LZMA in kernel source tree? >> >> -- >> Pawel Jakub Dawidek http://www.wheelsystems.com >> pjd@FreeBSD.org http://www.FreeBSD.org >> FreeBSD committer Am I Evil? Yes, I Am! -- Alexandr Rybalko aka Alex RAY From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 09:13:06 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AF071065680 for ; Thu, 4 Mar 2010 09:13:06 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id D53158FC21 for ; Thu, 4 Mar 2010 09:13:05 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Nn74h-00021W-3U; Thu, 04 Mar 2010 11:10:31 +0200 Date: Thu, 4 Mar 2010 11:13:00 +0200 From: Alexandr Rybalko To: Adrian Chadd Message-Id: <20100304111300.57087a73.ray@dlink.ua> In-Reply-To: References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Alex RAY , Ivan Voras Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 09:13:06 -0000 On Wed, 3 Mar 2010 16:01:59 +0800 Adrian Chadd wrote: >> On 21 February 2010 02:20, Adrian Chadd wrote: >> > Oh I know that! I'm just saying that I may try lzma'ing the kernel and >> > rootfs's to see what kind of savings I get over gzip. :) >> >> The answer is "whoa". 24 megabyte compressed kernel + MDROOT drops to >> 6.5 megabytes with gzip -9 and a few bytes shy of 5 megabytes with a >> default lzma compress. >> >> .. wow. :) >> >> This is +1 for GEOM_ULZMA too if it's as effective for the mfs itself. >> I'll toy with that later. >> >> >> Adrian kernel from 3M to 850K rootfs.iso from 11M to 2.7 near to 25% of uncompressed -- Alexandr Rybalko aka Alex RAY From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 09:31:19 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7864C106564A; Thu, 4 Mar 2010 09:31:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gx0-f211.google.com (mail-gx0-f211.google.com [209.85.217.211]) by mx1.freebsd.org (Postfix) with ESMTP id 0306B8FC1F; Thu, 4 Mar 2010 09:31:18 +0000 (UTC) Received: by gxk3 with SMTP id 3so1012494gxk.13 for ; Thu, 04 Mar 2010 01:31:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=WULbIRkQvGanqJf8kU0pmTo1B3bMdfKX26ZIhWOguR0=; b=Ev1Pc7or4ftYGq2hmwzNepz1pjgcsMV9UVUImbQ6qX8CnlSd3QiLYUfsPFivVFMco6 8z2xjkqMH3Cg0Iw3SSKDj3H62t4+9bNFemuYLK7NRDJkkV6KMUN1yOH17yWagUk3ShZn kn3WpsFFtSBU4CbAmv1/ueiyZM2Fpq90PllrY= 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=A4Erf7LZUdfHVSM/LQQviyNBS/jAvUYLBA7uebQ9aX7Aa6444BJdM1FcBv5fuajAdV +scPhP8Mh/8hP/+ZnOrnz+q7xejZ2Pe6z/Vts15Rzkz9Ea7Yx36Lea7ramITEo1Lo9U/ yzvDd21OT9Enh6REAIB3myBGOUHHLm2B48Wzk= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.101.128.31 with SMTP id f31mr4883519ann.33.1267695078400; Thu, 04 Mar 2010 01:31:18 -0800 (PST) In-Reply-To: <4B8E8E5A.5050203@freebsd.org> References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> <4B8E8E5A.5050203@freebsd.org> Date: Thu, 4 Mar 2010 17:31:18 +0800 X-Google-Sender-Auth: 013a144f2e22e589 Message-ID: From: Adrian Chadd To: Tim Kientzle Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Alex RAY , Ivan Voras Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 09:31:19 -0000 On 4 March 2010 00:29, Tim Kientzle wrote: > Interesting question: =A0What is the impact on boot speed? > It could be a lot faster to load 5MB from disk and > decompress to a 24MB image than to wait for 24MB from > disk. Linear reads from disk are fast. :) Linear reads from the SPI flash are slower; and I think the decompression phase is quite a bit slower. I'll investigate all of this further once I've played with GEOM_ULZMA. Adrian From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 10:17:09 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8CFE106566C; Thu, 4 Mar 2010 10:17:09 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 799008FC0C; Thu, 4 Mar 2010 10:17:08 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Nn84h-0005Hl-Kv; Thu, 04 Mar 2010 12:14:35 +0200 Date: Thu, 4 Mar 2010 12:17:05 +0200 From: Alexandr Rybalko To: Adrian Chadd Message-Id: <20100304121705.b39ad5b5.ray@dlink.ua> In-Reply-To: References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> <4B8E8E5A.5050203@freebsd.org> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org, RAY , Tim Kientzle , Alex, Ivan Voras Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 10:17:09 -0000 On Thu, 4 Mar 2010 17:31:18 +0800 Adrian Chadd wrote: >> On 4 March 2010 00:29, Tim Kientzle wrote: >> >> > Interesting question:  What is the impact on boot speed? >> > It could be a lot faster to load 5MB from disk and >> > decompress to a 24MB image than to wait for 24MB from >> > disk. >> >> Linear reads from disk are fast. :) Linear reads from the SPI flash >> are slower; and I think the decompression phase is quite a bit slower. >> >> I'll investigate all of this further once I've played with GEOM_ULZMA. LZMA compression optimized for fast decompression. When I compress 3M kernel on DualCore @ 1.80GHz, I wait 3-5 sec. When kernel decompressed by CFE loader on 240MHz MIPS CPU, it less than 2 sec. >> >> >> >> Adrian -- Alexandr Rybalko aka Alex RAY From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 10:23:46 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76731106564A; Thu, 4 Mar 2010 10:23:46 +0000 (UTC) (envelope-from lulf@pvv.ntnu.no) Received: from hylle01.itea.ntnu.no (hylle01.itea.ntnu.no [IPv6:2001:700:300:3::100]) by mx1.freebsd.org (Postfix) with ESMTP id C550E8FC13; Thu, 4 Mar 2010 10:23:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hylle01.itea.ntnu.no (Postfix) with ESMTP id 7213031E01C; Thu, 4 Mar 2010 11:23:44 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hylle01.itea.ntnu.no Received: from nobby.geeknest.org (caracal.stud.ntnu.no [IPv6:2001:700:300:3::185]) by hylle01.itea.ntnu.no (Postfix) with ESMTP id C42B931E031; Thu, 4 Mar 2010 11:23:43 +0100 (CET) Date: Thu, 4 Mar 2010 11:21:59 +0100 From: Ulf Lilleengen To: Alexandr Rybalko Message-ID: <20100304102158.GA8092@nobby.geeknest.org> References: <20100219163644.da89e882.ray@dlink.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100219163644.da89e882.ray@dlink.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: geom@freebsd.org, embedded@freebsd.org, hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 10:23:46 -0000 On Fri, Feb 19, 2010 at 04:36:44PM +0200, Alexandr Rybalko wrote: > Hi, > I wrote a module GEOM_ULZMA (such as GEOM_UZIP, but compression with lzma), in connection with this is an issue best left lzma > code in the file "geom_ulzma.c" or store lzma library separately. If separately, then where better? > > Maybe in future make lzma and gzip library kernel interface for embedded? > Then in one instance of code, userland can use compression via kernel. > What are the cons against combining uzip/ulzma into a geom_z/geom_compress module that can support different compression schemes? I think this makes more sense than having different geom modules for each compression scheme. -- Ulf Lilleengen From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 11:39:51 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3D76106564A; Thu, 4 Mar 2010 11:39:51 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id C566B8FC0A; Thu, 4 Mar 2010 11:39:50 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Nn9Mj-000144-63; Thu, 04 Mar 2010 13:37:17 +0200 Date: Thu, 4 Mar 2010 13:39:47 +0200 From: Alexandr Rybalko To: Ulf Lilleengen Message-Id: <20100304133947.2fa4e66f.ray@dlink.ua> In-Reply-To: <20100304102158.GA8092@nobby.geeknest.org> References: <20100219163644.da89e882.ray@dlink.ua> <20100304102158.GA8092@nobby.geeknest.org> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: geom@freebsd.org, embedded@freebsd.org, hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 11:39:51 -0000 On Thu, 4 Mar 2010 11:21:59 +0100 Ulf Lilleengen wrote: >> On Fri, Feb 19, 2010 at 04:36:44PM +0200, Alexandr Rybalko wrote: >> > Hi, >> > I wrote a module GEOM_ULZMA (such as GEOM_UZIP, but compression with lzma), in connection with this is an issue best left >> > lzma code in the file "geom_ulzma.c" or store lzma library separately. If separately, then where better? >> > >> > Maybe in future make lzma and gzip library kernel interface for embedded? >> > Then in one instance of code, userland can use compression via kernel. >> > >> >> What are the cons against combining uzip/ulzma into a geom_z/geom_compress >> module that can support different compression schemes? I think this makes >> more sense than having different geom modules for each compression scheme. I agree with you, since this modules need for reducing sizes, so user need configure what type they need. >> >> -- >> Ulf Lilleengen -- Рыбалко ÐлекÑандр КонÑультант D-Link Украина From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 12:09:57 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83E4106564A; Thu, 4 Mar 2010 12:09:57 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 956748FC14; Thu, 4 Mar 2010 12:09:57 +0000 (UTC) Received: by gya1 with SMTP id 1so1361630gya.13 for ; Thu, 04 Mar 2010 04:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=3fVegXeUavo4S6I+6BwKaMaawePGJxAyKXnuqHt/uKM=; b=ab0axhU64ITt8p6RtdhkoOCv4uve1drPJmlb1NcAcE+2Y4j5wo9CK9elz8+TH1igh5 K0y2ArIsF4ObKtjz1VQD0m8ByWlsUT0mBnIAh3O54xa0PBTwDxVvHnnK//EdOmU7S+V6 fUneBsSikmSBFjRc/K/qHgk7QQ+TlvmCP3U+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ImBy6KtBj4kebQno/ZQFxyEEnNhypZONEe3g7w1YkY3Uk+63B+njd0uMJnRYjocz2H vbfmk4EQBD0C10Kk0Vtnl/I0o7Um6Cm92pwAX5e/MIlEVLyqyYjhFDmj4+9LTkYl9jEl lE8C43UnB0Kv+qYYB5EqT6TLDPgn9koXcTf90= MIME-Version: 1.0 Received: by 10.101.7.12 with SMTP id k12mr5305350ani.203.1267704590920; Thu, 04 Mar 2010 04:09:50 -0800 (PST) Date: Thu, 4 Mar 2010 14:09:50 +0200 Message-ID: From: Dan Naumov To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Thu, 04 Mar 2010 12:35:56 +0000 Cc: Subject: Automated kernel crash reporting system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 12:09:58 -0000 Hello I noticed the following on the FreeBSD website: http://www.freebsd.org/projects/ideas/ideas.html#p-autoreport Has there been any progress/work done on the automated kernel crash reporting system? The current ways of enabling and gathering the information required by developers for investigating panics and similar issues are unintuitive and user-hostile to say the least and anything to automate the process would be a very welcome addition. - Sincerely, Dan Naumov From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 13:09:27 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01A8C106564A; Thu, 4 Mar 2010 13:09:27 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-bw0-f228.google.com (mail-bw0-f228.google.com [209.85.218.228]) by mx1.freebsd.org (Postfix) with ESMTP id 55F698FC28; Thu, 4 Mar 2010 13:09:25 +0000 (UTC) Received: by bwz28 with SMTP id 28so92323bwz.14 for ; Thu, 04 Mar 2010 05:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=7XW2wBnMGpT8Aja4pJi8ShT0eXTaj7ztbfWduQUy/9o=; b=mlBp6vGNLDHP+ZZ4M3TE9jC0b+VGAOjbsdSMt5ZDXz5Hbn012wrMdpu0OdqSgczLWI jgQnRFKdmUeivj3+uUkDfiB8jTUyYI/9XFnEoVRt0kB7VS0Nvgojx7TW+Yyn9ZpTFOO1 ex+eHDyvOXIjE2i4bazBsfgfKEuTY1w6MdAPw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=yGj4jXG8hAuExHXYJaWjSWvrQAUHRnSz5CAr/1L14Fid77bbJrC4PK9TdFBOwB6VkP 9eKKlmQ3FnlsQd4cwT7+cED2he1LJp6XySEK+xJBUug2lIjGLB60QNS2DMfZi2sCV9q3 K2MwfvSwYaplZXHWhA4D8mDUNIpWFKSy75haQ= Received: by 10.102.216.24 with SMTP id o24mr251129mug.13.1267708156118; Thu, 04 Mar 2010 05:09:16 -0800 (PST) Received: from centel.dataix.local (ppp-21.216.dialinfree.com [209.172.21.216]) by mx.google.com with ESMTPS id y6sm2529854mug.20.2010.03.04.05.09.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Mar 2010 05:09:14 -0800 (PST) Sender: "J. Hellenthal" Date: Thu, 4 Mar 2010 08:06:50 -0500 From: jhell To: Dan Naumov In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Automated kernel crash reporting system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 13:09:27 -0000 On Thu, 4 Mar 2010 07:09, dan.naumov@ wrote: > Hello > > I noticed the following on the FreeBSD website: > http://www.freebsd.org/projects/ideas/ideas.html#p-autoreport Has > there been any progress/work done on the automated kernel crash > reporting system? The current ways of enabling and gathering the > information required by developers for investigating panics and > similar issues are unintuitive and user-hostile to say the least and > anything to automate the process would be a very welcome addition. > > > - Sincerely, > Dan Naumov > Hi Dan, I am assuming that the output of crashinfo_enable="YES" is not what you are talking about is it ? are you aware of it ? The info contained in the crashinfo.txt.N is pretty informative for developers, maybe your talking about another way of submitting it ? Regards, -- jhell From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 13:43:28 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF36B1065672; Thu, 4 Mar 2010 13:43:28 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout3.freenet.de (mout3.freenet.de [IPv6:2001:748:100:40::2:5]) by mx1.freebsd.org (Postfix) with ESMTP id 755918FC1C; Thu, 4 Mar 2010 13:43:28 +0000 (UTC) Received: from [195.4.92.20] (helo=10.mx.freenet.de) by mout3.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.72 #1) id 1NnBKl-0006rl-Vf; Thu, 04 Mar 2010 14:43:23 +0100 Received: from p57ae1de2.dip0.t-ipconnect.de ([87.174.29.226]:61705 helo=ernst.jennejohn.org) by 10.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.72 #2) id 1NnBKl-0003of-P4; Thu, 04 Mar 2010 14:43:23 +0100 Date: Thu, 4 Mar 2010 14:43:21 +0100 From: Gary Jennejohn To: jhell Message-ID: <20100304144321.39ad948d@ernst.jennejohn.org> In-Reply-To: References: X-Mailer: Claws Mail 3.7.4 (GTK+ 2.16.2; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers , Dan Naumov , freebsd-questions@freebsd.org Subject: Re: Automated kernel crash reporting system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 13:43:29 -0000 On Thu, 4 Mar 2010 08:06:50 -0500 jhell wrote: > > On Thu, 4 Mar 2010 07:09, dan.naumov@ wrote: > > Hello > > > > I noticed the following on the FreeBSD website: > > http://www.freebsd.org/projects/ideas/ideas.html#p-autoreport Has > > there been any progress/work done on the automated kernel crash > > reporting system? The current ways of enabling and gathering the > > information required by developers for investigating panics and > > similar issues are unintuitive and user-hostile to say the least and > > anything to automate the process would be a very welcome addition. > > > > > > - Sincerely, > > Dan Naumov > > > > Hi Dan, > > I am assuming that the output of crashinfo_enable="YES" is not what you > are talking about is it ? are you aware of it ? > > The info contained in the crashinfo.txt.N is pretty informative for > developers, maybe your talking about another way of submitting it ? > This feature is mentioned as a mechanism which could be used as part of the automatic reporting functionality. So it's not quite the same thing. --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 14:17:40 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE0F41065672 for ; Thu, 4 Mar 2010 14:17:40 +0000 (UTC) (envelope-from connollys1@yahoo.com) Received: from web35807.mail.mud.yahoo.com (web35807.mail.mud.yahoo.com [66.163.179.176]) by mx1.freebsd.org (Postfix) with SMTP id 8D6388FC1C for ; Thu, 4 Mar 2010 14:17:40 +0000 (UTC) Received: (qmail 61802 invoked by uid 60001); 4 Mar 2010 13:50:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1267710656; bh=2AgINQwYgH3cFz4WYl1LdERpQTkFbrEQZ/DTvVUsX/g=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=FXd0jcln+1Xuk8Pk8rNhVibM2krE8B+LaIt3ljVxlTIaGGb0E3i/Entp2A97WjT1UhT+gYjK6Xxc4YA7M2e3zHZ3wF3FDRIrYiPoyhDSe4J8whuFxTHrlCNxqn7wHFeZijFD6TwOsINnYRFdnIbLZpsJ+NdNAoJxd70B+gyZJQU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=kBzAVXQYXtiA/gFfYPfl+2LMtM71ilSEJyD3iNIbhbQwRHbhRyCDlGchqymn+LufJkJAY3RsR0vNKm1GxmKFZqL+Rx1ywxaKyZc7Hk1gtuwBmHiP/k3kHrMMYm1fHtN4WiTPIU9DNUbHSNzkZohoRWwTOXynOjHr2qIQrWa2CUQ=; Message-ID: <775910.52553.qm@web35807.mail.mud.yahoo.com> X-YMail-OSG: cDLlguYVM1lhv5c8jE.1VAZL9dOhvqyNSLePVkkvRgM45sm7Jt8NSiBdu0MXJd4ZHge6xhvh00UOv4NVwlsHVGWDUVkRgj2gsqovUqUXdJZPu4yn1Vh2nKBbtJt.blav64sjCThVp5H5yDdv2TSHHWUltnSs6TMQhmTsdq57AMzZKdWvE66k2v2Dsx4Ackp00Czb8Np_J33PyE7yzZdzDFeHIE7KJOsKuzKdFIlUugI7VAjW4fcP7wdNynK7MwIgw_2jrc.mSU_Rbaz7zxOHJnhjMOSO3Uw_gHuguzNERZbD78EiqpfGIiPQro5l5A-- Received: from [128.36.117.70] by web35807.mail.mud.yahoo.com via HTTP; Thu, 04 Mar 2010 05:50:56 PST X-Mailer: YahooMailRC/300.3 YahooMailWebService/0.8.100.260964 References: Date: Thu, 4 Mar 2010 05:50:56 -0800 (PST) From: sean connolly To: Dan Naumov In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Automated kernel crash reporting system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 14:17:40 -0000 Hi Dan, Automatic reporting would end up being a mess given that panics can be caused by hardware problems. Having an autoreport check if memtest was run before it reports, or having it only run with -CURRENTmight be useful. Sean ________________________________ From: jhell To: Dan Naumov Cc: FreeBSD Hackers ; freebsd-questions@freebsd.org Sent: Thu, March 4, 2010 8:06:50 AM Subject: Re: Automated kernel crash reporting system On Thu, 4 Mar 2010 07:09, dan.naumov@ wrote: > Hello > > I noticed the following on the FreeBSD website: > http://www.freebsd.org/projects/ideas/ideas.html#p-autoreport Has > there been any progress/work done on the automated kernel crash > reporting system? The current ways of enabling and gathering the > information required by developers for investigating panics and > similar issues are unintuitive and user-hostile to say the least and > anything to automate the process would be a very welcome addition. > > > - Sincerely, > Dan Naumov > Hi Dan, I am assuming that the output of crashinfo_enable="YES" is not what you are talking about is it ? are you aware of it ? The info contained in the crashinfo.txt.N is pretty informative for developers, maybe your talking about another way of submitting it ? Regards, -- jhell _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 14:29:11 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1020F106564A for ; Thu, 4 Mar 2010 14:29:11 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id C0D508FC19 for ; Thu, 4 Mar 2010 14:29:10 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 02F59667F0 for ; Thu, 4 Mar 2010 15:28:35 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 1B0C415C70; Thu, 4 Mar 2010 15:28:19 +0100 (CET) Date: Thu, 4 Mar 2010 15:28:19 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20100304142819.GC29681@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> <4B8E8E5A.5050203@freebsd.org> <20100304121705.b39ad5b5.ray@dlink.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100304121705.b39ad5b5.ray@dlink.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 14:29:11 -0000 On Thu, Mar 04, 2010 at 12:17:05PM +0200, Alexandr Rybalko wrote: > LZMA compression optimized for fast decompression. It is still measurable slower than gzip and it is certainly not free. Most hard disks have linear read times >> 10 MB/s but the decompression can easily need half a second even on a modern CPU. Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 14:38:40 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45036106566B for ; Thu, 4 Mar 2010 14:38:40 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 0B9218FC1F for ; Thu, 4 Mar 2010 14:38:38 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1NnC9g-0001wM-JO; Thu, 04 Mar 2010 16:36:00 +0200 Date: Thu, 4 Mar 2010 16:38:31 +0200 From: Alexandr Rybalko To: Joerg Sonnenberger Message-Id: <20100304163831.e4e08fcc.ray@dlink.ua> In-Reply-To: <20100304142819.GC29681@britannica.bec.de> References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> <4B8E8E5A.5050203@freebsd.org> <20100304121705.b39ad5b5.ray@dlink.ua> <20100304142819.GC29681@britannica.bec.de> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 14:38:40 -0000 On Thu, 4 Mar 2010 15:28:19 +0100 Joerg Sonnenberger wrote: >> On Thu, Mar 04, 2010 at 12:17:05PM +0200, Alexandr Rybalko wrote: >> > LZMA compression optimized for fast decompression. >> >> It is still measurable slower than gzip and it is certainly not free. >> Most hard disks have linear read times >> 10 MB/s but the decompression >> can easily need half a second even on a modern CPU. No one says that it fast, but if you have only 4M of flash for CFE+kernel+rootfs+nvram, you must use something what make space usage smaller. >> >> Joerg >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Alexandr Rybalko aka Alex RAY From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 14:53:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67A43106566C for ; Thu, 4 Mar 2010 14:53:58 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0A58FC0C for ; Thu, 4 Mar 2010 14:53:58 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:8444:281f:5bb4:1db8] (unknown [IPv6:2001:7b8:3a7:0:8444:281f:5bb4:1db8]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8EE835C43 for ; Thu, 4 Mar 2010 15:53:57 +0100 (CET) Message-ID: <4B8FC98D.8050907@andric.com> Date: Thu, 04 Mar 2010 15:54:05 +0100 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.2pre) Gecko/20100302 Lanikai/3.1b1pre MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> <4B8E8E5A.5050203@freebsd.org> <20100304121705.b39ad5b5.ray@dlink.ua> <20100304142819.GC29681@britannica.bec.de> In-Reply-To: <20100304142819.GC29681@britannica.bec.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 14:53:58 -0000 On 2010-03-04 15:28, Joerg Sonnenberger wrote: > It is still measurable slower than gzip and it is certainly not free. Ehm, the LZMA SDK is in the public domain, how much more "free" would you want it? From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 15:03:26 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D89A2106564A for ; Thu, 4 Mar 2010 15:03:26 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id 958E28FC1D for ; Thu, 4 Mar 2010 15:03:26 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 9931F667F0 for ; Thu, 4 Mar 2010 16:03:15 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 1359B15C70; Thu, 4 Mar 2010 16:02:59 +0100 (CET) Date: Thu, 4 Mar 2010 16:02:59 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20100304150259.GA29542@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> <4B8E8E5A.5050203@freebsd.org> <20100304121705.b39ad5b5.ray@dlink.ua> <20100304142819.GC29681@britannica.bec.de> <4B8FC98D.8050907@andric.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B8FC98D.8050907@andric.com> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 15:03:26 -0000 On Thu, Mar 04, 2010 at 03:54:05PM +0100, Dimitry Andric wrote: > On 2010-03-04 15:28, Joerg Sonnenberger wrote: > >It is still measurable slower than gzip and it is certainly not free. > > Ehm, the LZMA SDK is in the public domain, how much more "free" would > you want it? Free as in "time it takes", not free as in beer. Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 15:03:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA04D106568D for ; Thu, 4 Mar 2010 15:03:59 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id 8707B8FC19 for ; Thu, 4 Mar 2010 15:03:59 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id B3F2E667F0 for ; Thu, 4 Mar 2010 16:03:48 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id BAE9C15C70; Thu, 4 Mar 2010 16:03:30 +0100 (CET) Date: Thu, 4 Mar 2010 16:03:30 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20100304150330.GB29542@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20100219222604.44e50248.ray@ddteam.net> <20100220201510.720c62fd.ray@ddteam.net> <4B8E8E5A.5050203@freebsd.org> <20100304121705.b39ad5b5.ray@dlink.ua> <20100304142819.GC29681@britannica.bec.de> <20100304163831.e4e08fcc.ray@dlink.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100304163831.e4e08fcc.ray@dlink.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 15:03:59 -0000 On Thu, Mar 04, 2010 at 04:38:31PM +0200, Alexandr Rybalko wrote: > On Thu, 4 Mar 2010 15:28:19 +0100 > Joerg Sonnenberger wrote: > > >> On Thu, Mar 04, 2010 at 12:17:05PM +0200, Alexandr Rybalko wrote: > >> > LZMA compression optimized for fast decompression. > >> > >> It is still measurable slower than gzip and it is certainly not free. > >> Most hard disks have linear read times >> 10 MB/s but the decompression > >> can easily need half a second even on a modern CPU. > > No one says that it fast, but if you have only 4M of flash for > CFE+kernel+rootfs+nvram, you must use something what make space > usage smaller. Different domain :) Joerg From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 15:27:06 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AD13106564A; Thu, 4 Mar 2010 15:27:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7F58FC0A; Thu, 4 Mar 2010 15:27:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o24FIVup001243; Thu, 4 Mar 2010 08:18:32 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Mar 2010 08:18:48 -0700 (MST) Message-Id: <20100304.081848.200754750200144876.imp@bsdimp.com> To: lulf@pvv.ntnu.no From: "M. Warner Losh" In-Reply-To: <20100304102158.GA8092@nobby.geeknest.org> References: <20100219163644.da89e882.ray@dlink.ua> <20100304102158.GA8092@nobby.geeknest.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: ray@dlink.ua, geom@freebsd.org, embedded@freebsd.org, hackers@freebsd.org Subject: Re: GEOM_ULZMA X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 15:27:06 -0000 In message: <20100304102158.GA8092@nobby.geeknest.org> Ulf Lilleengen writes: : On Fri, Feb 19, 2010 at 04:36:44PM +0200, Alexandr Rybalko wrote: : > Hi, : > I wrote a module GEOM_ULZMA (such as GEOM_UZIP, but compression with lzma), in connection with this is an issue best left lzma : > code in the file "geom_ulzma.c" or store lzma library separately. If separately, then where better? : > : > Maybe in future make lzma and gzip library kernel interface for embedded? : > Then in one instance of code, userland can use compression via kernel. : > : : What are the cons against combining uzip/ulzma into a geom_z/geom_compress : module that can support different compression schemes? I think this makes : more sense than having different geom modules for each compression scheme. Pros are it is easier to configure. Cons are it uses more memory and the code fights against the normal layering and abstraction by implementing things in two forks. Which one wins should likely be decided on size since this is for an embedded environment. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 17:58:29 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C011A106564A for ; Thu, 4 Mar 2010 17:58:29 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3CCE08FC32 for ; Thu, 4 Mar 2010 17:58:28 +0000 (UTC) Received: by wyb32 with SMTP id 32so1627334wyb.13 for ; Thu, 04 Mar 2010 09:58:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to; bh=kLCk4D5RtJJaVIIlKQyNKE8WYldmNbZ7r/YKXE+6Ug4=; b=CQHdBRVC2AGbVAL1RElDO/GCYVUlYKRIDENdIuGO0afIawFWcdAQJXfn1F7sp+GfKp YbF4uOQbhzHHN3SNeUmKwMcAgukqyI1sv91am+gk3+go3z7XtR7LsvniTvViMe4Y5Njr utpy2Df78QnAcjl8PKVNZ2wEfowXWAMonI0HE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=x-authentication-warning:date:from:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to; b=LQTtM04NLzlGhpOBsidZCOrFwszMjb/4LvG5LfZ63jDQMG0ij+6+qusU2OVMvdRA0E 9paOKFBqgMU2JJ9K73PM5E7FnOA+0JY6NUyW3n/b0NTZIic3jabO2aeB8lUXhOamDqa4 gzbrx5U/2LQ5AC2b7/+7lLOIvuZISkFd5yIDk= Received: by 10.216.85.79 with SMTP id t57mr49803wee.132.1267725502618; Thu, 04 Mar 2010 09:58:22 -0800 (PST) Received: from viper.internal.network (dsl78-143-196-85.in-addr.fast.co.uk [78.143.196.85]) by mx.google.com with ESMTPS id p10sm2833626gvf.6.2010.03.04.09.58.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Mar 2010 09:58:21 -0800 (PST) Received: from viper.internal.network (localhost [127.0.0.1]) by viper.internal.network (Postfix) with ESMTP id 00A364AC03 for ; Thu, 4 Mar 2010 17:58:19 +0000 (UTC) Received: (from m0@localhost) by viper.internal.network (8.14.3/8.14.3/Submit) id o24HwJ1l084900 for freebsd-hackers@FreeBSD.org; Thu, 4 Mar 2010 17:58:19 GMT (envelope-from xorquewasp@googlemail.com) X-Authentication-Warning: viper.internal.network: m0 set sender to xorquewasp@googlemail.com using -f Date: Thu, 4 Mar 2010 17:58:19 +0000 From: xorquewasp@googlemail.com Message-ID: <20100304175819.GC31036@logik.internal.network> References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <864ol0w4g5.fsf@ds4.des.no> Cc: freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 17:58:29 -0000 So, anyway... Is there any resolution for this problem? I have quite a few packages I'd like to get built (just "custom" enough that pre-built packages from FreeBSD mirrors won't suffice). I have to admit to not being convinced that nullfs is at the root of the problem... I have vague, confused memories of this happening about a year ago before I had ZFS or knew nullfs was actually usable. I switched to using tinderbox so didn't actually resolve the problem at the time. xw From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 21:33:44 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 557251065673; Thu, 4 Mar 2010 21:33:44 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 0578F8FC23; Thu, 4 Mar 2010 21:33:43 +0000 (UTC) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id o24LXTWe064611; Thu, 4 Mar 2010 13:33:29 -0800 (PST) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.3/Submit) id o24LXTlw064610; Thu, 4 Mar 2010 13:33:29 -0800 (PST) (envelope-from david) Date: Thu, 4 Mar 2010 13:33:29 -0800 From: David Wolfskill To: hackers@freebsd.org Message-ID: <20100304213329.GJ57205@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="72k7VsmfIboquFwl" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: randi@freebsd.org Subject: Scripting sysinstall(8) to create & use multiple slices on a disk? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2010 21:33:44 -0000 --72k7VsmfIboquFwl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable For reasons that may well be idiosyncratic, I like to set up FreeBSD machines to have at least 2 bootable slices -- e.g., one can act as a fallback if an attempted software upgrade proves to have been ill-timed. In the past, I've done this manually; while a bit tedious & fairly "target-rich" with opportunities for human error, it's something that is typically done infrequently (i.e., once) in the life of a machine (or at least its boot drive). At work, the IT folks use a scripted sysinstall(8) to set machines up; to increase the probability that I'll be able to get 3 "special" machines set up the way I want, I'm trying to set up a sysinstall config file to make this as painless as possible. I managed to get a copy of the config script IT uses, so I had a starting-point ... but they were setting the machines up with partition=3Dexclusive which doesn't seem like a good choice for what I'm doing. :-} After my first attempt failed, I poked around on the Net & found , (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something similar to what I was about to try next, and writes: | My intent here is to create three slices-one 6GB in size, another 1GB in | size, and the third sized to consume the remaining free space. When I | run this through sysinstall, it complains that it can't find the space | for the partitions. It even complains that it can't find any free space. | Because the slices don't get created, the subsequent label assignments | fail as well. What is the proper commands for creating multiple slices | in install.cfg? In a foillowup, he writes: | After a lot of experimenting, my impression is that sysinstall simply | doesn't support multiple slice installations. It works to a point, but I | get some unexpected errors, e.g. | | Unable to make device node for /dev/ad0s1a in /dev which doesn't seem very encouraging. Would someone please either confirm the limitation or provide a suitable excerpt from a sysinstall config script to demonstrate that it is actually possible? (Or show me where it's spelled out in the man page....) (I'm using 7.x sysinstall, if that matters.) Thanks! Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --72k7VsmfIboquFwl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkuQJygACgkQmprOCmdXAD3lSgCfQBTc7/1gHroX1GywHwixnMaj GeIAoIHMZv2ne0VqrTIMEWhBOGZ/Ejzx =P/oG -----END PGP SIGNATURE----- --72k7VsmfIboquFwl-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 05:28:45 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFEAE106566B for ; Fri, 5 Mar 2010 05:28:45 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id 444FC8FC19 for ; Fri, 5 Mar 2010 05:28:44 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,585,1262559600"; d="scan'208";a="298279738" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 05 Mar 2010 06:28:40 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 5FA151B0768; Fri, 5 Mar 2010 06:28:40 +0100 (CET) Date: Fri, 05 Mar 2010 06:28:39 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: building world with debugging symbols X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 05:28:45 -0000 hi there, because i'm doing a lot of debugging lately i thought it might be a good idea to build world (in addition to the kernel) with debugging symbols. what i've done is add CFLAGS+= -O2 -fno-strict-aliasing -pipe -g to /etc/src.conf, because having -g in CFLAGS in /etc/make.conf would also build everything else (ports e.g.) with debugging symbols which i don't really need/want. make buildworld however fails due to the fact that building the bootloader with -g exceeds the allowed maximum bootloader size by 545 bytes. any suggestions on how to successfully build world with debugging symbols are welcome. cheers. alex From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 05:58:06 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92B34106564A for ; Fri, 5 Mar 2010 05:58:06 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by mx1.freebsd.org (Postfix) with ESMTP id 1BE838FC14 for ; Fri, 5 Mar 2010 05:58:05 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw03.mail.saunalahti.fi (Postfix) with SMTP id 6653721648D; Fri, 5 Mar 2010 07:57:59 +0200 (EET) Date: Fri, 5 Mar 2010 07:57:59 +0200 From: Jaakko Heinonen To: freebsd-hackers@FreeBSD.org Message-ID: <20100305055758.GA1062@a91-153-117-195.elisa-laajakaista.fi> References: <6413.1266433105@critter.freebsd.dk> <20100218064545.J2074@besplex.bde.org> <20100218095538.GA2318@a91-153-117-195.elisa-laajakaista.fi> <20100225195138.GA3323@a91-153-117-195.elisa-laajakaista.fi> <20100226091923.X2605@delplex.bde.org> <20100228174936.GA1252@a91-153-117-195.elisa-laajakaista.fi> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline In-Reply-To: <20100228174936.GA1252@a91-153-117-195.elisa-laajakaista.fi> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@FreeBSD.org, Poul-Henning Kamp , Bruce Evans , Alexander Best Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 05:58:06 -0000 --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2010-02-28, Jaakko Heinonen wrote: > > > http://people.freebsd.org/~jh/patches/lookup-root.diff I have updated the patch taking some of bde's comments into account. The new version also includes updates for namei(9) manual page. The patch is attached to this mail and also found at: http://people.freebsd.org/~jh/patches/lookup-root.2.diff -- Jaakko --J2SCkAp4GZ/dPZZf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="lookup-root.2.diff" Index: sys/kern/vfs_lookup.c =================================================================== --- sys/kern/vfs_lookup.c (revision 204620) +++ sys/kern/vfs_lookup.c (working copy) @@ -565,18 +565,26 @@ dirloop: } /* - * Check for degenerate name (e.g. / or "") - * which is a way of talking about a directory, - * e.g. like "/." or ".". + * Check for "" which represents the root directory after slash + * removal. */ if (cnp->cn_nameptr[0] == '\0') { - if (dp->v_type != VDIR) { - error = ENOTDIR; - goto bad; - } - if (cnp->cn_nameiop != LOOKUP) { - error = EISDIR; - goto bad; + KASSERT(dp->v_type == VDIR, ("dp is not a directory")); + /* + * We can't provide a parent node for CREATE, + * DELETE and RENAME operations. + */ + switch (cnp->cn_nameiop) { + case CREATE: + error = EEXIST; + goto bad; + case DELETE: + case RENAME: + error = EBUSY; + goto bad; + default: + KASSERT(cnp->cn_nameiop == LOOKUP, + ("nameiop must be LOOKUP")); } if (wantparent) { ndp->ni_dvp = dp; @@ -948,19 +956,17 @@ relookup(struct vnode *dvp, struct vnode #endif /* - * Check for degenerate name (e.g. / or "") - * which is a way of talking about a directory, - * e.g. like "/." or ".". + * Check for "" which represents the root directory after slash + * removal. */ if (cnp->cn_nameptr[0] == '\0') { - if (cnp->cn_nameiop != LOOKUP || wantparent) { - error = EISDIR; - goto bad; - } - if (dp->v_type != VDIR) { - error = ENOTDIR; - goto bad; - } + KASSERT(dp->v_type == VDIR, ("dp is not a directory")); + /* + * Support only LOOKUP for "/" because lookup() + * can't succeed for CREATE, DELETE and RENAME. + */ + KASSERT(cnp->cn_nameiop == LOOKUP, ("nameiop must be LOOKUP")); + if (!(cnp->cn_flags & LOCKLEAF)) VOP_UNLOCK(dp, 0); *vpp = dp; Index: sys/kern/vfs_syscalls.c =================================================================== --- sys/kern/vfs_syscalls.c (revision 204620) +++ sys/kern/vfs_syscalls.c (working copy) @@ -1841,7 +1841,7 @@ restart: NDINIT_AT(&nd, DELETE, LOCKPARENT | LOCKLEAF | MPSAFE | AUDITVNODE1, pathseg, path, fd, td); if ((error = namei(&nd)) != 0) - return (error == EINVAL ? EPERM : error); + return ((error == EINVAL || error == EBUSY) ? EPERM : error); vfslocked = NDHASGIANT(&nd); vp = nd.ni_vp; if (vp->v_type == VDIR && oldinum == 0) { @@ -3617,9 +3617,6 @@ kern_renameat(struct thread *td, int old if (fromnd.ni_vp->v_type == VDIR) tond.ni_cnd.cn_flags |= WILLBEDIR; if ((error = namei(&tond)) != 0) { - /* Translate error code for rename("dir1", "dir2/."). */ - if (error == EISDIR && fvp->v_type == VDIR) - error = EINVAL; NDFREE(&fromnd, NDF_ONLY_PNBUF); vrele(fromnd.ni_dvp); vrele(fvp); Index: share/man/man9/namei.9 =================================================================== --- share/man/man9/namei.9 (revision 204620) +++ share/man/man9/namei.9 (working copy) @@ -338,8 +338,17 @@ An attempt is made to access a file in a permissions. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. -.It Bq Er EISDIR -An attempt is made to open a directory with write mode specified. +.It Bq Er EINVAL +The last component of the pathname specified for the RENAME operation is +.Ql \&. . +.It Bq Er EEXIST +The root directory +.Pq Ql / +was specified for the CREATE operation. +.It Bq Er EBUSY +The root directory +.Pq Ql / +was specified for the DELETE operation. .It Bq Er EROFS An attempt is made to modify a file or directory on a read-only file system. .El Index: lib/libc/sys/rename.2 =================================================================== --- lib/libc/sys/rename.2 (revision 204620) +++ lib/libc/sys/rename.2 (working copy) @@ -252,6 +252,12 @@ The .Fa to argument is a directory and is not empty. +.It Bq Er EBUSY +Either +.Fa from +or +.Fa to +is the root directory. .El .Pp In addition to the errors returned by the Index: lib/libc/sys/unlink.2 =================================================================== --- lib/libc/sys/unlink.2 (revision 204620) +++ lib/libc/sys/unlink.2 (working copy) @@ -114,8 +114,6 @@ succeeds unless: .Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix is not a directory. -.It Bq Er EISDIR -The named file is a directory. .It Bq Er ENAMETOOLONG A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. --J2SCkAp4GZ/dPZZf-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 08:40:00 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D6AC106566B for ; Fri, 5 Mar 2010 08:40:00 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (unknown [IPv6:2001:470:1f09:679::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3379C8FC0A for ; Fri, 5 Mar 2010 08:40:00 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 10B3A91BA; Fri, 5 Mar 2010 08:40:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon.cran.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.8 required=8.0 tests=AWL,BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.5 Received: from core.draftnet (87-194-158-129.bethere.co.uk [87.194.158.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Fri, 5 Mar 2010 08:40:08 +0000 (UTC) From: Bruce Cran To: freebsd-hackers@freebsd.org Date: Fri, 5 Mar 2010 08:39:44 +0000 User-Agent: KMail/1.12.4 (FreeBSD/9.0-CURRENT; KDE/4.3.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003050839.44320.bruce@cran.org.uk> Cc: Alexander Best Subject: Re: building world with debugging symbols X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 08:40:00 -0000 On Friday 05 March 2010 05:28:39 Alexander Best wrote: > any suggestions on how to successfully build world with debugging symbols > are welcome. Use DEBUG_FLAGS instead: DEBUG_FLAGS=-g The build system knows not to strip the binaries when that's defined, too. -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 11:19:05 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2488C106567F; Fri, 5 Mar 2010 11:19:05 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id F161C8FC29; Fri, 5 Mar 2010 11:19:04 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5C21646B2C; Fri, 5 Mar 2010 06:19:04 -0500 (EST) Date: Fri, 5 Mar 2010 11:19:04 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: sean connolly In-Reply-To: <775910.52553.qm@web35807.mail.mud.yahoo.com> Message-ID: References: <775910.52553.qm@web35807.mail.mud.yahoo.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers , Dan Naumov , freebsd-questions@freebsd.org Subject: Re: Automated kernel crash reporting system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 11:19:05 -0000 On Thu, 4 Mar 2010, sean connolly wrote: > Automatic reporting would end up being a mess given that panics can be > caused by hardware problems. Having an autoreport check if memtest was run > before it reports, or having it only run with -CURRENTmight be useful. Hi Sean, Dan, et al: I'm not sure I agree with this view. For releases, it's true that many reported panics are a result of bad hardware. However, on active development branches, especially -CURRENT, that's not the case. An automated scheme to track bug reports and find common themes could be incredibly valuable in the development environment. And, to be honest, even if a fair number of reports are due to hardware failures, these often have common themes themselves, so it would be quite educational to be able to reason about panics on a large scale. Not to mention using it to identify potentially flakey hardware that users could then be warned about :-). Collecting crash reports is widespread in industry for both operating systems and applications for these reasons. Certainly, the crashinfo summary gathered on recent FreeBSD versions is an excellent starting point for building such a system. If we were to move ahead with it, we'd need to pay very close attention to scrubbing potentially sensitive information from panic reports, however. Robert > > Sean > > > > > ________________________________ > From: jhell > To: Dan Naumov > Cc: FreeBSD Hackers ; freebsd-questions@freebsd.org > Sent: Thu, March 4, 2010 8:06:50 AM > Subject: Re: Automated kernel crash reporting system > > > On Thu, 4 Mar 2010 07:09, dan.naumov@ wrote: >> Hello >> >> I noticed the following on the FreeBSD website: >> http://www.freebsd.org/projects/ideas/ideas.html#p-autoreport Has >> there been any progress/work done on the automated kernel crash >> reporting system? The current ways of enabling and gathering the >> information required by developers for investigating panics and >> similar issues are unintuitive and user-hostile to say the least and >> anything to automate the process would be a very welcome addition. >> >> >> - Sincerely, >> Dan Naumov >> > > Hi Dan, > > I am assuming that the output of crashinfo_enable="YES" is not what you > are talking about is it ? are you aware of it ? > > The info contained in the crashinfo.txt.N is pretty informative for > developers, maybe your talking about another way of submitting it ? > > Regards, > > -- > > jhell > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 11:56:04 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8572106566C for ; Fri, 5 Mar 2010 11:56:04 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6B3208FC1A for ; Fri, 5 Mar 2010 11:56:04 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 57A201FFC22; Fri, 5 Mar 2010 11:56:03 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 24F898448E; Fri, 5 Mar 2010 12:56:03 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: xorquewasp@googlemail.com References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100304175819.GC31036@logik.internal.network> Date: Fri, 05 Mar 2010 12:56:03 +0100 In-Reply-To: <20100304175819.GC31036@logik.internal.network> (xorquewasp@googlemail.com's message of "Thu, 4 Mar 2010 17:58:19 +0000") Message-ID: <867hpr56ek.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 11:56:04 -0000 xorquewasp@googlemail.com writes: > Is there any resolution for this problem? I told you, zfs set mountpoint and ditch nullfs. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 13:43:44 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6222A1065678; Fri, 5 Mar 2010 13:43:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 307EB8FC24; Fri, 5 Mar 2010 13:43:44 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CDE8D46B45; Fri, 5 Mar 2010 08:43:43 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 4A0C48A021; Fri, 5 Mar 2010 08:43:31 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 5 Mar 2010 07:57:26 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <775910.52553.qm@web35807.mail.mud.yahoo.com> In-Reply-To: <775910.52553.qm@web35807.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003050757.26890.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 05 Mar 2010 08:43:31 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Dan Naumov , freebsd-questions@freebsd.org, sean connolly Subject: Re: Automated kernel crash reporting system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 13:43:44 -0000 On Thursday 04 March 2010 8:50:56 am sean connolly wrote: > Hi Dan, > > Automatic reporting would end up being a mess given that panics can be caused by hardware problems. Having an autoreport check if memtest was run before it reports, or having it only run with -CURRENTmight be useful. That's not quite true. Many hardware failure-type panics look the same (a machine check exception panic, an NMI due to a hardware error (this has a unique panic message), or panics in pmap_remove*() on x86 cover the vast majority of them). My previous employer actually did track panics using a script like crashinfo, and I was able to categorize known panics by looking for signatures in stack backtraces or other panic messages. > ________________________________ > From: jhell > To: Dan Naumov > Cc: FreeBSD Hackers ; freebsd- questions@freebsd.org > Sent: Thu, March 4, 2010 8:06:50 AM > Subject: Re: Automated kernel crash reporting system > > > On Thu, 4 Mar 2010 07:09, dan.naumov@ wrote: > > Hello > > > > I noticed the following on the FreeBSD website: > > http://www.freebsd.org/projects/ideas/ideas.html#p-autoreport Has > > there been any progress/work done on the automated kernel crash > > reporting system? The current ways of enabling and gathering the > > information required by developers for investigating panics and > > similar issues are unintuitive and user-hostile to say the least and > > anything to automate the process would be a very welcome addition. > > > > > > - Sincerely, > > Dan Naumov > > > > Hi Dan, > > I am assuming that the output of crashinfo_enable="YES" is not what you > are talking about is it ? are you aware of it ? > > The info contained in the crashinfo.txt.N is pretty informative for > developers, maybe your talking about another way of submitting it ? > > Regards, > > -- > > jhell > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 13:43:48 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F253106564A; Fri, 5 Mar 2010 13:43:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0BD288FC17; Fri, 5 Mar 2010 13:43:48 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 965D146B38; Fri, 5 Mar 2010 08:43:47 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 9D2268A01F; Fri, 5 Mar 2010 08:43:44 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org, randi@freebsd.org Date: Fri, 5 Mar 2010 08:01:00 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <20100304213329.GJ57205@bunrab.catwhisker.org> In-Reply-To: <20100304213329.GJ57205@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003050801.00440.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 05 Mar 2010 08:43:44 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: Re: Scripting sysinstall(8) to create & use multiple slices on a disk? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 13:43:48 -0000 On Thursday 04 March 2010 4:33:29 pm David Wolfskill wrote: > For reasons that may well be idiosyncratic, I like to set up FreeBSD > machines to have at least 2 bootable slices -- e.g., one can act as a > fallback if an attempted software upgrade proves to have been ill-timed. > > In the past, I've done this manually; while a bit tedious & fairly > "target-rich" with opportunities for human error, it's something that is > typically done infrequently (i.e., once) in the life of a machine (or at > least its boot drive). > > At work, the IT folks use a scripted sysinstall(8) to set machines up; > to increase the probability that I'll be able to get 3 "special" > machines set up the way I want, I'm trying to set up a sysinstall config > file to make this as painless as possible. > > I managed to get a copy of the config script IT uses, so I had a > starting-point ... but they were setting the machines up with > > partition=exclusive > > which doesn't seem like a good choice for what I'm doing. :-} > > > After my first attempt failed, I poked around on the Net & found > , > (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something > similar to what I was about to try next, and writes: > > | My intent here is to create three slices-one 6GB in size, another 1GB in > | size, and the third sized to consume the remaining free space. When I > | run this through sysinstall, it complains that it can't find the space > | for the partitions. It even complains that it can't find any free space. > | Because the slices don't get created, the subsequent label assignments > | fail as well. What is the proper commands for creating multiple slices > | in install.cfg? > > In a foillowup, he writes: > > | After a lot of experimenting, my impression is that sysinstall simply > | doesn't support multiple slice installations. It works to a point, but I > | get some unexpected errors, e.g. > | > | Unable to make device node for /dev/ad0s1a in /dev > > which doesn't seem very encouraging. > > > Would someone please either confirm the limitation or provide a > suitable excerpt from a sysinstall config script to demonstrate > that it is actually possible? (Or show me where it's spelled out in the > man page....) > > (I'm using 7.x sysinstall, if that matters.) If you are doing a fully scripted install you may be better off just using a dedicated shell script to format your disks and mount them and then use the various *-install.sh scripts from the release distributions to install the code. You could still do this via sysinstall by sticking your shell script in /stand in the MFS root and having your sysinstall script just run that script. You might want to build a custom mfsroot to add some more useful tools though. I really think sysinstall needs to support a disk "backdoor" whereby the user can either manually partition disks and then mount them at /mnt (or have a script do it), and tell sysinstall to just skip the disk stuff and assume /mnt is mounted. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 14:50:39 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEEA7106566C for ; Fri, 5 Mar 2010 14:50:38 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id 781018FC3B for ; Fri, 5 Mar 2010 14:50:37 +0000 (UTC) Received: by fxm23 with SMTP id 23so2683445fxm.3 for ; Fri, 05 Mar 2010 06:50:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=lHt3YmIUbW/PiHgl09VQqZwiKXjG/XR1EOUA3fGFnsA=; b=Sb9medHRj+/ejuTIWv75eHabKiLcIRUf4E3jje9p+cCyqzTS4a34S8SzGR1AgvbvjC f5LcSBEszMLSwHCaWw7fbNUxiPlIOKWCjW1eKrRnpP2DvTXUSBcPVUstzFGQGzfXJbpz gV7iWhSM9vP1xwbpqluiUv17vIT25W9j5P7Fc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=K1TS/fydxy3UqRFnpCO2cRDqR9ZErRDOVsFA+V7eiW7JfhntIc84OSiyI/eG5aBBYG /o6RwJZrUfujcGx+rIXeQPEtcZdinEOgFTpNdEV3SMYJ7zL0DuhSf64oZc4hKMpkywhP 9RYHWhsXYivRq7yA6PbOnxYoe3nFy5VqYxuGo= Received: by 10.102.211.9 with SMTP id j9mr259062mug.130.1267800629371; Fri, 05 Mar 2010 06:50:29 -0800 (PST) Received: from ppp-22.41.dialinfree.com (ppp-22.41.dialinfree.com [209.172.22.41]) by mx.google.com with ESMTPS id u9sm8583091muf.9.2010.03.05.06.50.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Mar 2010 06:50:27 -0800 (PST) Sender: "J. Hellenthal" Date: Fri, 5 Mar 2010 09:47:11 -0500 From: jhell To: =?ISO-8859-15?Q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <867hpr56ek.fsf@ds4.des.no> Message-ID: References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100304175819.GC31036@logik.internal.network> <867hpr56ek.fsf@ds4.des.no> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: freebsd-hackers@freebsd.org, xorquewasp@googlemail.com Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 14:50:39 -0000 On Fri, 5 Mar 2010 06:56, des@ wrote: > xorquewasp@googlemail.com writes: >> Is there any resolution for this problem? > > I told you, zfs set mountpoint and ditch nullfs. > > DES > Adding on to this. There were reports in various cases dating back to ~1 year with bad results, possible data loss, hard and soft dead locks when nullfs was used with ZFS. nullfs at one point that I do remember was not recommended to be used at all with ZFS and there exist quite a bit of other functionality in ZFS "cloning, snapshots, mountpoint=" etc... that serve well enough to not use nullfs at all. Surely in the case above you are talking about packages and in which you really should not need to mount this multiple times as a writable FS, correct me if you feel that it does and lets see why (please provide your process if you do). This should suffice mounting a packages type collection in multiple places: # Mount one dataset wherever you need it. zfs set mountpoint=/path/to/wherever pool/packages # Create a snapshot and clone it for further mountpoints. zfs snapshot pool/packages@20100305 zfs clone pool/packages@20100305 pool/packages2 zfs set mountpoint=/path/to/other/dir pool/packages2 If none of this would suffice then your package management needs to be re-thought out. Central FTP, NFS, SMB, RSYNC?. You have plenty of options available but the only one that will be suitable to you & your process will be the one that is planned for accordingly and thoroughly. Best of luck, -- jhell From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 17:15:35 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75C7F106564A for ; Fri, 5 Mar 2010 17:15:35 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id 0837D8FC25 for ; Fri, 5 Mar 2010 17:15:34 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,588,1262559600"; d="scan'208";a="27707469" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 05 Mar 2010 18:15:33 +0100 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id DDB8B1B07E7; Fri, 5 Mar 2010 18:15:33 +0100 (CET) Date: Fri, 05 Mar 2010 18:15:33 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Bruce Cran , Message-ID: In-Reply-To: <201003050839.44320.bruce@cran.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: building world with debugging symbols X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 17:15:35 -0000 Bruce Cran schrieb am 2010-03-05: > On Friday 05 March 2010 05:28:39 Alexander Best wrote: > > any suggestions on how to successfully build world with debugging > > symbols > > are welcome. > Use DEBUG_FLAGS instead: > DEBUG_FLAGS=-g ahh. thanks for the hint. with DEBUG_FLAGS i was able to build world with debugging symbols but also managed to keep the bootloader small enough. i don't think this option is documented anywhere or is it? > The build system knows not to strip the binaries when that's defined, > too. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 15:46:05 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12131065692; Fri, 5 Mar 2010 15:46:05 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: from mail-yx0-f184.google.com (mail-yx0-f184.google.com [209.85.210.184]) by mx1.freebsd.org (Postfix) with ESMTP id 530FC8FC22; Fri, 5 Mar 2010 15:46:04 +0000 (UTC) Received: by yxe14 with SMTP id 14so710357yxe.16 for ; Fri, 05 Mar 2010 07:45:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=mvmtalmtT0nCKn1rMnp/rROLsmO5R8/khAH2/NkUPnQ=; b=hZLc1i915VG2ZL+LuxzCEC34VYzvrSMobZ5zN4eY0KuuFhAxq7L+IuHiC4llm8xi4b IUEo6NK87raNoGGPzvKGVVzBW8vzQx3BGU2Qa2SIdnYXC0VhU/Z5yn8cRqlYZwed2nJ4 fS9Bk8zTxCg94zUxKJeLbPTMNgNiOG/Mfxk5s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Y85KuT9T+oNF6J7ifd3C25fpwrvE8w7tuKIW8U9rN3AzPraT6E9m2JC3tjYkyBE8ty rsCpboRxXcJb5/6pvhHI6ci/E8Iqkmj2KhDzzRdAOBOybpO6RZurQJsePVT4iMLazle3 QqAEyn15VGqJhWS6M2JZi+TABT3473/e484kQ= MIME-Version: 1.0 Received: by 10.101.134.13 with SMTP id l13mr2737965ann.160.1267803951302; Fri, 05 Mar 2010 07:45:51 -0800 (PST) In-Reply-To: References: <775910.52553.qm@web35807.mail.mud.yahoo.com> Date: Fri, 5 Mar 2010 17:45:51 +0200 Message-ID: From: Dan Naumov To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Fri, 05 Mar 2010 17:53:25 +0000 Cc: FreeBSD Hackers , freebsd-questions@freebsd.org, sean connolly Subject: Re: Automated kernel crash reporting system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 15:46:05 -0000 On Fri, Mar 5, 2010 at 1:19 PM, Robert Watson wrote: > > On Thu, 4 Mar 2010, sean connolly wrote: > >> Automatic reporting would end up being a mess given that panics can be >> caused by hardware problems. Having an autoreport check if memtest was run >> before it reports, or having it only run with -CURRENTmight be useful. I too, disagree with this. Surely most attention would be given to the most often recurring problems across varied hardware. If a new -RELEASE is tagged and suddenly there is an influx of very similar automated crash reports across a wide selection of hardware, some conclusions can be reached. - Sincerely, Dan Naumov From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 18:52:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 876951065692; Fri, 5 Mar 2010 18:52:59 +0000 (UTC) (envelope-from jpaetzel@freebsd.org) Received: from mail.iXsystems.com (newknight.ixsystems.com [206.40.55.70]) by mx1.freebsd.org (Postfix) with ESMTP id 623EA8FC1B; Fri, 5 Mar 2010 18:52:59 +0000 (UTC) Received: from mail.ixsystems.com (localhost [127.0.0.1]) by mail.iXsystems.com (Postfix) with ESMTP id 13B0AA664EA; Fri, 5 Mar 2010 10:35:39 -0800 (PST) Received: from mail.iXsystems.com ([127.0.0.1]) by mail.ixsystems.com (mail.ixsystems.com [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 87960-07; Fri, 5 Mar 2010 10:35:38 -0800 (PST) Received: from ix.tcbug.org (unknown [10.10.1.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id 7F828A664B5; Fri, 5 Mar 2010 10:35:38 -0800 (PST) From: Josh Paetzel Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Fri, 5 Mar 2010 12:33:37 -0600 User-Agent: KMail/1.13.1 (FreeBSD/9.0-CURRENT; KDE/4.4.1; amd64; ; ) References: <20100304213329.GJ57205@bunrab.catwhisker.org> <201003050801.00440.jhb@freebsd.org> In-Reply-To: <201003050801.00440.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1481085.XorV0iKE7L"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201003051233.42861.jpaetzel@freebsd.org> X-Virus-Scanned: Maia Mailguard 1.0.2a Cc: randi@freebsd.org, David Wolfskill Subject: Re: Scripting sysinstall(8) to create & use multiple slices on a disk? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 18:52:59 -0000 --nextPart1481085.XorV0iKE7L Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable On Friday 05 March 2010 07:01:00 John Baldwin wrote: > On Thursday 04 March 2010 4:33:29 pm David Wolfskill wrote: > > For reasons that may well be idiosyncratic, I like to set up FreeBSD > > machines to have at least 2 bootable slices -- e.g., one can act as a > > fallback if an attempted software upgrade proves to have been ill-timed. > >=20 > > In the past, I've done this manually; while a bit tedious & fairly > > "target-rich" with opportunities for human error, it's something that is > > typically done infrequently (i.e., once) in the life of a machine (or at > > least its boot drive). > >=20 > > At work, the IT folks use a scripted sysinstall(8) to set machines up; > > to increase the probability that I'll be able to get 3 "special" > > machines set up the way I want, I'm trying to set up a sysinstall config > > file to make this as painless as possible. > >=20 > > I managed to get a copy of the config script IT uses, so I had a > > starting-point ... but they were setting the machines up with > >=20 > > partition=3Dexclusive > >=20 > > which doesn't seem like a good choice for what I'm doing. :-} > >=20 > >=20 > > After my first attempt failed, I poked around on the Net & found > > > le- >=20 > slices-4387807/>, >=20 > > (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something > >=20 > > similar to what I was about to try next, and writes: > > | My intent here is to create three slices-one 6GB in size, another 1GB > > | in size, and the third sized to consume the remaining free space. When > > | I run this through sysinstall, it complains that it can't find the > > | space for the partitions. It even complains that it can't find any > > | free space. Because the slices don't get created, the subsequent label > > | assignments fail as well. What is the proper commands for creating > > | multiple slices in install.cfg? > >=20 > > In a foillowup, he writes: > > | After a lot of experimenting, my impression is that sysinstall simply > > | doesn't support multiple slice installations. It works to a point, but > > | I get some unexpected errors, e.g. > > |=20 > > | Unable to make device node for /dev/ad0s1a in /dev > >=20 > > which doesn't seem very encouraging. > >=20 > >=20 > > Would someone please either confirm the limitation or provide a > > suitable excerpt from a sysinstall config script to demonstrate > > that it is actually possible? (Or show me where it's spelled out in the > > man page....) > >=20 > > (I'm using 7.x sysinstall, if that matters.) >=20 > If you are doing a fully scripted install you may be better off just using > a dedicated shell script to format your disks and mount them and then use > the various *-install.sh scripts from the release distributions to install > the code. You could still do this via sysinstall by sticking your shell > script in /stand in the MFS root and having your sysinstall script just > run that script. You might want to build a custom mfsroot to add some more > useful tools though. >=20 > I really think sysinstall needs to support a disk "backdoor" whereby the > user can either manually partition disks and then mount them at /mnt (or > have a script do it), and tell sysinstall to just skip the disk stuff and > assume /mnt is mounted. David, I second the ditching sysinstall for a shell script idea. A shell script t= hat=20 replaces sysinstall is nearly as short as the install.cfg and a lot easier = to=20 figure out. I've written a half dozen auto installers for FreeBSD, from=20 trivial to complex and would be more than willing to help you get something= =20 set up. I can send you code if you want as well. =2D-=20 Thanks, Josh Paetzel =46reeBSD -- The power to serve --nextPart1481085.XorV0iKE7L Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAABAgAGBQJLkU6GAAoJEKFq1/n1feG2Qo0H+wauZ9YQ5uGKBQuqSMAyGhvl dG1DzY4QUWLcYhA1Z/YQx8XhdzJ59LgqSeB9YEaszYhP+Eua4nzmbVeGdeNyqGZw Hndu49VuXVnYid/dzxn1K5Q3H5RVJqrrpztEtOgFKG/5ONRUKjJVRVkuaxwm2trD nyHTgIeAJjF9X5wTku9HqpVQcNv05jFGXb8Gf4HAfd/4Pd/v1OEE/VuOL6veUYrd D6/YW4i5ksl1+u1iXrI1CGGLh80cQeNVekuJio9mLCWpG/3fBiT9ez51ezgnzXKw htO9bna9Dx8xUg8R1XPu/5/WHggrzXZLY4bRrzrevI97/Txu4nXJxoJS0ESnkHU= =hY+3 -----END PGP SIGNATURE----- --nextPart1481085.XorV0iKE7L-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 19:00:16 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3548B106566C for ; Fri, 5 Mar 2010 19:00:16 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B0BBD8FC6D for ; Fri, 5 Mar 2010 19:00:15 +0000 (UTC) Received: by wyb32 with SMTP id 32so2319857wyb.13 for ; Fri, 05 Mar 2010 11:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to; bh=FCQcTTE+fKKiHbUdkNG4XtKSitK0qaPL9UUACm2dXC4=; b=F8gANVlQ/AVg1cdhNG1cWt4N9yF+tWaZdl2DAJ5sACb1IwzJH8YRtEDYJPFv/TSuG6 wRCB798EfNioMPEH/kwm3DBmtjq5Ek+c3lnUKtVs60yJQZbtnru2npak7aqreDTpXCzF yCBHbklXAvIiqP52f3WSC6r5pbF8jG1u/Sxto= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to; b=uqRTL1RCwkhn41IcPK/H8x+plLrux7CsbiInJ+He1Ysx4/SqOV0KB1zHuSdzdiBkxO 4lC7EG+YlqfoCPlwK14ir1Llfd7dPAllAsDo2GaKjJpTx0mJ7JPfHn78/M2mqjt6laBK x+xmmoGoF6fXKnL8NNPiy1I9FfZNGloXUVx8o= Received: by 10.216.88.136 with SMTP id a8mr419544wef.77.1267815609060; Fri, 05 Mar 2010 11:00:09 -0800 (PST) Received: from viper.internal.network (dsl78-143-196-85.in-addr.fast.co.uk [78.143.196.85]) by mx.google.com with ESMTPS id t12sm6322664gvd.7.2010.03.05.11.00.06 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Mar 2010 11:00:07 -0800 (PST) Received: from viper.internal.network (localhost [127.0.0.1]) by viper.internal.network (Postfix) with ESMTP id 827A24AC08; Fri, 5 Mar 2010 19:00:03 +0000 (UTC) Received: (from m0@localhost) by viper.internal.network (8.14.3/8.14.3/Submit) id o25IxwH8010552; Fri, 5 Mar 2010 18:59:58 GMT (envelope-from xorquewasp@googlemail.com) X-Authentication-Warning: viper.internal.network: m0 set sender to xorquewasp@googlemail.com using -f Date: Fri, 5 Mar 2010 18:59:58 +0000 From: xorquewasp@googlemail.com To: jhell Message-ID: <20100305185958.GB82765@logik.internal.network> References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100304175819.GC31036@logik.internal.network> <867hpr56ek.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-hackers@freebsd.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 19:00:16 -0000 'Lo, On 2010-03-05 09:47:11, jhell wrote: > Adding on to this. There were reports in various cases dating back to ~1 > year with bad results, possible data loss, hard and soft dead locks when > nullfs was used with ZFS. nullfs at one point that I do remember was not > recommended to be used at all with ZFS and there exist quite a bit of > other functionality in ZFS "cloning, snapshots, mountpoint=" etc... that > serve well enough to not use nullfs at all. Except, as far as I can see (not far), there's no way to emulate one directory/fs being mounted in multiple places. I'll come to "why" in a second... > Surely in the case above you are talking about packages and in which you > really should not need to mount this multiple times as a writable FS, > correct me if you feel that it does and lets see why (please provide your > process if you do). Basically, what I'm doing is trying to share a writable distfile directory across multiple package-building jails as a sort of cache. I don't have unlimited bandwidth usage per-month and would like to avoid multiple jails downloading 150mb distfiles (I've already exceeded monthly bandwidth limits due to this exact problem). I'd also like to avoid having multiple copies of distfiles laying around (as the number of jails increases, the space required becomes not insignificant). A possible solution to the above might be to use "make fetch-recursive" on the "host" and then just mount the distfile directory read-only inside the actual build jail to eliminate one of the read/write mounts. Of course, what distfiles are actually required might change based on the settings in make.conf in each jail... I'm also sharing the ports tree read-only across jails to ensure that each jail has the exact same tree. This isn't a problem as far as I know (due to the "read-only" part). It might be the case that the only real problem (the one that causes the package building errors) is the read/write nullfs mount of the /work directory so I'm about to build a test jail now and see if this is so (and I'll use DES' method of setting the ZFS mountpoint for this directory if it is as there's specifically no need for shared state here). > This should suffice mounting a packages type collection in multiple > places: > > # Mount one dataset wherever you need it. > zfs set mountpoint=/path/to/wherever pool/packages > > # Create a snapshot and clone it for further mountpoints. > zfs snapshot pool/packages@20100305 > zfs clone pool/packages@20100305 pool/packages2 > zfs set mountpoint=/path/to/other/dir pool/packages2 > > If none of this would suffice then your package management needs to be > re-thought out. Central FTP, NFS, SMB, RSYNC?. In this setup, jails build packages for other jails that specifically don't have network access (see the example given before about sandboxing a pdf reader): 8.0-amd64-mistrust_pkg mounts /storage/jails/8.0/x86_64/mistrust/pkg at /pkg and writes built packages to it whilst 8.0-amd64-mistrust mounts the same directory read-only at /pkg and, of course, installs packages from it. In this case, the only sane way to do things seems to be to mount a read-only view of a directory of packages built by another jail with nullfs. I don't particularly want to be cloning and managing snapshots - I'd be exchanging the simplicity of a direct solution (a direct, read-only view of the current state of a given package directory) with a solution where I have to endlessly shuffle and clone snapshots. > You have plenty of options available but the only one that will be > suitable to you & your process will be the one that is planned for > accordingly and thoroughly. I'm surprised that something as simple as the above requires this much thought to be honest. xw From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 19:26:33 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2673E106566B for ; Fri, 5 Mar 2010 19:26:33 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id AC0118FC17 for ; Fri, 5 Mar 2010 19:26:32 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,588,1262559600"; d="txt'?scan'208";a="298362134" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 05 Mar 2010 20:26:31 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 6C4FA1B0768; Fri, 5 Mar 2010 20:26:31 +0100 (CET) Date: Fri, 05 Mar 2010 20:26:23 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=+permail-20100305192623f0889e8400007966-a_best01+ Cc: Subject: tiny lib/libkvm/kvm_proc.c correction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 19:26:33 -0000 This is a MIME encoded multipart message. --+permail-20100305192623f0889e8400007966-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi there. does this look right? cheers. alex --+permail-20100305192623f0889e8400007966-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="kvmproc.patch.txt" SW5kZXg6IGxpYi9saWJrdm0va3ZtX3Byb2MuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaWIvbGlia3ZtL2t2 bV9wcm9jLmMJKHJldmlzaW9uIDIwNDc2MykKKysrIGxpYi9saWJrdm0va3ZtX3Byb2MuYwkod29y a2luZyBjb3B5KQpAQCAtMzcxLDcgKzM3MSw3IEBACiAJCSAqIHRvIGNvbnZlcnQgY3B1dGlja3Mg dG8gdXNlY3MuICBUaGUga2VybmVsIGRvZXMgaXQgaW4KIAkJICoga2Vybi9rZXJuX3RjLmMsIGJ1 dCB0aGUgZnVuY3Rpb24gY2FuJ3QgYmUganVzdCBjb3BpZWQuCiAJCSAqLwotCQliaW50aW1lMnRp bWV2YWwoJnByb2MucF9ydXgucnV4X3J1bnRpbWUsICZ0dik7CisJCWJpbnRpbWUydGltZXZhbCgo c3RydWN0IGJpbnRpbWUgKilwcm9jLnBfcnV4LnJ1eF9ydW50aW1lLCAmdHYpOwogCQlrcC0+a2lf cnVudGltZSA9ICh1X2ludDY0X3QpdHYudHZfc2VjICogMTAwMDAwMCArIHR2LnR2X3VzZWM7CiAJ CWtwLT5raV9waWQgPSBwcm9jLnBfcGlkOwogCQlrcC0+a2lfc2lnbGlzdCA9IHByb2MucF9zaWds aXN0Owo= --+permail-20100305192623f0889e8400007966-a_best01+-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 19:36:53 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13281106566C for ; Fri, 5 Mar 2010 19:36:53 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id AE37D8FC1C for ; Fri, 5 Mar 2010 19:36:52 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 9B898A66561; Sat, 6 Mar 2010 03:36:51 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id 8Ih7aJRDE1Dj; Sat, 6 Mar 2010 03:36:43 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 4B1F9A66585; Sat, 6 Mar 2010 03:36:42 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=Htvqa0ZDP+y4y/17sXXzRDS/CRtCTDNpMW81ZTDZjVAwjWXCjMRvzaaycPP3AqE5D c22lVtJO+IN9pWbXGAZSg== Message-ID: <4B915D44.5000402@delphij.net> Date: Fri, 05 Mar 2010 11:36:36 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.8) Gecko/20100304 Thunderbird/3.0.3 ThunderBrowse/3.2.8.1 MIME-Version: 1.0 To: Alexander Best References: In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: tiny lib/libkvm/kvm_proc.c correction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 19:36:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010/03/05 11:26, Alexander Best wrote: > hi there. does this look right? Not to me, the value is not to be used this way and the comments above the code explained the same thing. I think we should use cputick2usec but it's not available to userland (one have to copy cpu_tick_frequency and friends). Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLkV1EAAoJEATO+BI/yjfBvhcH/3LD5SOscV7wmzVazQtvhOpd C4xhRlnlZEniI8qrKP1L55Q9eTntxzcWZPhmImb5UspSX6a5aRsWHrySlD82Vjgy u/n/tz/YbhGV4QasmRxrXOF8wrPh3ie0W6912hFHmMZ6shgfm9GvoAlltnCcnnNp O330syWOVqf/q+9y5FOXIschYPs8HmAP7Fy5pMragpzdmpg5uCBdKXbekvfqiscN qPOOrzzyvkmXS3rKBY5vnRHqJTaOveSuE6KEjN1x/D0ZJ71kY6tLwZCCMc9wNlJB Dv/U3ZPo4lUki2tZTOi9bo4KEkLR/3zrFQ5VeaDhYI/FHCQTFB1jhNoahU2WlB0= =JOn5 -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 19:59:13 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3BE4106566B for ; Fri, 5 Mar 2010 19:59:13 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id 341ED8FC1C for ; Fri, 5 Mar 2010 19:59:12 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,588,1262559600"; d="scan'208";a="238412255" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 05 Mar 2010 20:59:11 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 719E81B0768; Fri, 5 Mar 2010 20:59:11 +0100 (CET) Date: Fri, 05 Mar 2010 20:59:10 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: In-Reply-To: <4B915D44.5000402@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: tiny lib/libkvm/kvm_proc.c correction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 19:59:13 -0000 Xin LI schrieb am 2010-03-05: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > On 2010/03/05 11:26, Alexander Best wrote: > > hi there. does this look right? > Not to me, the value is not to be used this way and the comments > above > the code explained the same thing. > I think we should use cputick2usec but it's not available to userland > (one have to copy cpu_tick_frequency and friends). damn you're right. i completely overlooked that comment. would it be worth making cputick2usec available to userland? is kvm_proc.c the only candidate in need of converting cpu ticks to usecs? alex > Cheers, > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.14 (FreeBSD) > iQEcBAEBAgAGBQJLkV1EAAoJEATO+BI/yjfBvhcH/3LD5SOscV7wmzVazQtvhOpd > C4xhRlnlZEniI8qrKP1L55Q9eTntxzcWZPhmImb5UspSX6a5aRsWHrySlD82Vjgy > u/n/tz/YbhGV4QasmRxrXOF8wrPh3ie0W6912hFHmMZ6shgfm9GvoAlltnCcnnNp > O330syWOVqf/q+9y5FOXIschYPs8HmAP7Fy5pMragpzdmpg5uCBdKXbekvfqiscN > qPOOrzzyvkmXS3rKBY5vnRHqJTaOveSuE6KEjN1x/D0ZJ71kY6tLwZCCMc9wNlJB > Dv/U3ZPo4lUki2tZTOi9bo4KEkLR/3zrFQ5VeaDhYI/FHCQTFB1jhNoahU2WlB0= > =JOn5 > -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 20:38:55 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAEF31065670 for ; Fri, 5 Mar 2010 20:38:55 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8193E8FC16 for ; Fri, 5 Mar 2010 20:38:55 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 41E7EA665B8; Sat, 6 Mar 2010 04:38:54 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id N0Xivd7eJA6w; Sat, 6 Mar 2010 04:38:47 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id C6CE5A66585; Sat, 6 Mar 2010 04:38:46 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=QjK9uL4lqQNfywtqc4KRnRV2e+qUa0GlmfDUxUw9/LmJh4EXe646tCqQAi0pOu+hD aChGfU4QKsxl3F/A9lvLQ== Message-ID: <4B916BD0.7030501@delphij.net> Date: Fri, 05 Mar 2010 12:38:40 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.8) Gecko/20100304 Thunderbird/3.0.3 ThunderBrowse/3.2.8.1 MIME-Version: 1.0 To: Alexander Best References: In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, d@delphij.net Subject: Re: tiny lib/libkvm/kvm_proc.c correction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 20:38:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2010/03/05 11:59, Alexander Best wrote: > Xin LI schrieb am 2010-03-05: > On 2010/03/05 11:26, Alexander Best wrote: >>>> hi there. does this look right? > > Not to me, the value is not to be used this way and the comments > above > the code explained the same thing. > > I think we should use cputick2usec but it's not available to userland > (one have to copy cpu_tick_frequency and friends). > >> damn you're right. i completely overlooked that comment. would it be worth >> making cputick2usec available to userland? is kvm_proc.c the only candidate in >> need of converting cpu ticks to usecs? I'm not sure how to do that unfortunately, is there a way to expose a kernel variable to userland which also works on a crash dump? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLkWvQAAoJEATO+BI/yjfB1zYH/jNcRww4bePZqVl7zM9zUsyA a6LZ9JivHSgxmMfcLSrqJMBdLdTFgSPFkP7bADKMDoSE/qY6zDMFbid+GVqn1XGk 8jTJiiTXmMkb24+43oQPvVgw3XPoSJJdrJIOlHPr3rzIkHFE0M0ivMETA95WBEQJ uPHQcCSLSRAgdLju+PzfOTq4UiCZ4SXdLfbw+xrLB4IVKzjgtKQL1XYXL5Lgpc94 +OVV30471gZyjJM79aiVYzNs6ZMKTrxxHbUJujgFM3irfJrxVf52XNTa0vmBI6aW yL58dQo+q1/KnzLOpK+T7+c33ZUKakSzkMCxN/IJdUteOHqquZSS0EEEcAkDGKI= =IN3b -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 23:09:22 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A0F2106564A for ; Fri, 5 Mar 2010 23:09:22 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 124D58FC13 for ; Fri, 5 Mar 2010 23:09:21 +0000 (UTC) Received: by wyb32 with SMTP id 32so2444619wyb.13 for ; Fri, 05 Mar 2010 15:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to; bh=Af3OF6PWfpbY8lvonFXUnCIGSEFRbTikagbah1FE0fc=; b=WDelft3geJ4hhtdqOAB8JrqAGHXKP0wyJx+9ifmfxMrukhK1x9T+SO8rPDKpsRbA+j Zt62+ifYzBJMmoZ+DGstLx5KALKkZrSOhN4A0ZVL85aXVc4e8fSeqbIVIs1QKE3qdYQj p6Rr42f3Qdb7fuvtCDpwlCvn8ugCAdWFwibQY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to; b=Q8JyStmeFM9kXcnRjgc2yr4klscOmhC9H3Hr37Hye4OylivCHz4TLAi0AEY6j3bN0T QlzJHbnrA54LfLOSUCkzAp8pANYKI5LSgwhY8JmEC3aOllcl5KrljPr26LecMsn+GVkv fKcL+Jz24I/3s6d6M0fPzimn5OyhBYvUpuXZs= Received: by 10.216.87.140 with SMTP id y12mr548337wee.36.1267830554526; Fri, 05 Mar 2010 15:09:14 -0800 (PST) Received: from viper.internal.network (dsl78-143-196-85.in-addr.fast.co.uk [78.143.196.85]) by mx.google.com with ESMTPS id p10sm6797126gvf.6.2010.03.05.15.09.11 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Mar 2010 15:09:12 -0800 (PST) Received: from viper.internal.network (localhost [127.0.0.1]) by viper.internal.network (Postfix) with ESMTP id AECE54AC08; Fri, 5 Mar 2010 23:09:10 +0000 (UTC) Received: (from m0@localhost) by viper.internal.network (8.14.3/8.14.3/Submit) id o25N98wd007414; Fri, 5 Mar 2010 23:09:08 GMT (envelope-from xorquewasp@googlemail.com) X-Authentication-Warning: viper.internal.network: m0 set sender to xorquewasp@googlemail.com using -f Date: Fri, 5 Mar 2010 23:09:08 +0000 From: xorquewasp@googlemail.com To: jhell Message-ID: <20100305230908.GA18213@logik.internal.network> References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226222113.GA14592@logik.internal.network> <4B884D48.90509@FreeBSD.org> <20100227093409.GA40858@logik.internal.network> <864ol0w4g5.fsf@ds4.des.no> <20100304175819.GC31036@logik.internal.network> <867hpr56ek.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , freebsd-hackers@freebsd.org Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 23:09:22 -0000 'Lo. As a test, I've now stripped nullfs out of the picture entirely. The exact same problem still occurs: Creating package /pkg/All/libgpg-error-1.7.tbz Registering depends: gettext-0.17_1 libiconv-1.13.1_1. Creating bzip'd tar ball in '/pkg/All/libgpg-error-1.7.tbz' rmdir: /work/ports/security/libgpg-error/work: Directory not empty *** Error code 1 (ignored) ===> Generating temporary packing list tar: share/sgml/docbook/4.2/ChangeLog: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/calstblx.dtd: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/catalog: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/catalog.xml: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/dbcentx.mod: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/dbgenent.mod: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/dbhierx.mod: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/dbnotnx.mod: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/dbpoolx.mod: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/docbook.cat: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/docbook.dcl: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/docbook.dtd: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/docbookx.dtd: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/soextblx.dtd: Cannot stat: No such file or directory tar: share/sgml/docbook/4.2/README: Cannot stat: No such file or directory tar: Error exit delayed from previous errors. pkg_create: make_dist: tar command failed with code 256 Creating package /pkg/All/docbook-4.2.tbz Registering depends: iso8879-1986_2 xmlcatmgr-2.2. Creating bzip'd tar ball in '/pkg/All/docbook-4.2.tbz' xw From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 00:28:54 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BBC0106567C; Sat, 6 Mar 2010 00:28:54 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 063D38FC13; Sat, 6 Mar 2010 00:28:53 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id o260Sqpl002715; Fri, 5 Mar 2010 17:28:52 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id o260So3Q002712; Fri, 5 Mar 2010 17:28:52 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 5 Mar 2010 17:28:50 -0700 (MST) From: Warren Block To: Oliver Fromme In-Reply-To: <201002041246.o14CkK39012628@lurza.secnetix.de> Message-ID: References: <201002041246.o14CkK39012628@lurza.secnetix.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (wonkity.com [127.0.0.1]); Fri, 05 Mar 2010 17:28:53 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG, jkim@FreeBSD.ORG, alexbestms@wwu.de Subject: Summary: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 00:28:54 -0000 Just wanted to followup with a summary before all vestiges of what I learned evaporate from my memory. My apologies for the lateness. 1. Existing FreeBSD ata-disk code does not explicitly park the hard drive heads on shutdown. So the power loss causes an emergency park, which sounds bad and is bad for the heads. 2. There are a limited number of powerup/powerdown or maybe spinup/spindown cycles for a drive. Not sure what causes the wear. 3. FreeBSD doesn't park heads at reboot, either, but that's good because of #2. 4. FreeBSD's suspend code does call STANDBY_IMMEDIATE to park heads. 5. I couldn't tell if the STANDBY_IMMEDIATE in a reboot actually spun the drive down. It may be that the hardware reset happens so quickly after the standby that it doesn't matter. Or maybe it brakes very quietly. Possibly different brands do different things. I can think of ways to check, like measuring motor current, but don't have the equipment to try that. 6. Ond?ej Majerech suggested checking NetBSD's method of spinning the drive down. I did, and they have a direct way of telling the difference between reboot and shutdown, somewhat differently from FreeBSD. 7. I actually waded hip-deep through magic C code and made a powerdown event handler for ata-disk.c. It compiled and even seemed to work, although I don't trust it. 8. Alexander Motin has an updated CAM version of the ATA system which will eventually replace the existing one. In -CURRENT, anyway. He was kind enough to look at my event handler. My understanding is that he is looking at implementing the head parking/standby mechanism in that new code. Conclusions: If you rarely power down a system with FreeBSD, it may not matter, and reboots with the existing code should not be a problem. If you power down a system from FreeBSD often, the patch in http://docs.freebsd.org/cgi/getmsg.cgi?fetch=233916+0+archive/2010/freebsd-hackers/20100131.freebsd-hackers is still the lowest-impact version, although it calls STANDBY_IMMEDIATE for both reboot and shutdown. I don't have evidence either way as to whether the standby followed by a reboot causes as much wear as a cold spinup/spindown cycle, or whether that is more of a problem than emergency head parks. -Warren Block * Rapid City, South Dakota USA From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 04:42:08 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF9A4106566B for ; Sat, 6 Mar 2010 04:42:08 +0000 (UTC) (envelope-from toasty@dragondata.com) Received: from mail-yw0-f191.google.com (mail-yw0-f191.google.com [209.85.211.191]) by mx1.freebsd.org (Postfix) with ESMTP id A5AF78FC23 for ; Sat, 6 Mar 2010 04:42:08 +0000 (UTC) Received: by ywh29 with SMTP id 29so1774017ywh.14 for ; Fri, 05 Mar 2010 20:42:03 -0800 (PST) Received: by 10.151.86.14 with SMTP id o14mr772030ybl.43.1267848892542; Fri, 05 Mar 2010 20:14:52 -0800 (PST) Received: from vpn214.ord02.your.org (vpn214.ord02.your.org [204.9.55.214]) by mx.google.com with ESMTPS id 21sm1986954iwn.11.2010.03.05.20.14.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Mar 2010 20:14:51 -0800 (PST) From: Kevin Day Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 5 Mar 2010 22:14:50 -0600 Message-Id: <0ECDEB94-E60E-45C7-98AC-5E948DE4649C@dragondata.com> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1077) X-Mailer: Apple Mail (2.1077) Subject: ACPI/power implementation causing performance loss with i7/Nehalem turbo boost X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 04:42:09 -0000 Recently I bumped into something very weird. In some CPU heavy = workloads, FreeBSD ran faster inside VMware's ESX hypervisor than it did = running natively on bare metal. Simple pure CPU applications (such as = "openssl speed") would run 10-30% faster on VMware. This seemed very = counterintuitive, until I discovered what I believe to be the cause.=20 Intel Nehalem and i5/i7 processors have a feature called "Turbo Boost", = where the more cores that are inactive (ACPI states C2 or C3) the higher = the clock rate of the active cores. In some processors increasing the = clock speed by more than 1ghz. On a hunch, I disabled turbo boost = (through the BIOS) on our ESX system, and this brought the speeds back = on par with the bare metal FreeBSD box. So, it seems that the VMware hypervisor is deactivating cores on the CPU = when idle, but FreeBSD itself isn't. Is anyone working on giving = FreeBSD's idle loop/scheduler the ability to go into deeper sleep = states? It seems this would have more than just a power savings benefit = now. Intel documentation on Turbo Boost: = http://download.intel.com/design/processor/applnots/320354.pdf?iid=3Dtech_= tb+paper -- Kevin From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 06:06:02 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6619106566B for ; Sat, 6 Mar 2010 06:06:02 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3B5BF8FC0A for ; Sat, 6 Mar 2010 06:06:01 +0000 (UTC) Received: from inchoate.gsoft.com.au (ppp121-45-157-125.lns6.adl6.internode.on.net [121.45.157.125]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id o2665nHj090731 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 6 Mar 2010 16:35:49 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Sat, 6 Mar 2010 16:35:36 +1030 User-Agent: KMail/1.9.10 References: <0ECDEB94-E60E-45C7-98AC-5E948DE4649C@dragondata.com> In-Reply-To: <0ECDEB94-E60E-45C7-98AC-5E948DE4649C@dragondata.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart19212338.WHq44byRUD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201003061635.44684.doconnor@gsoft.com.au> X-Spam-Score: -1.759 () AWL,BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: Kevin Day Subject: Re: ACPI/power implementation causing performance loss with i7/Nehalem turbo boost X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 06:06:02 -0000 --nextPart19212338.WHq44byRUD Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 6 Mar 2010, Kevin Day wrote: > So, it seems that the VMware hypervisor is deactivating cores on the > CPU when idle, but FreeBSD itself isn't. Is anyone working on giving > FreeBSD's idle loop/scheduler the ability to go into deeper sleep > states? It seems this would have more than just a power savings > benefit now. What does "sysctl dev.cpu.0.cx_lowest" say? And "sysctl dev.cpu.$N.cx_supported" ? ISTR FreeBSD defaults to a very conservative setting here so you may=20 have to set it manually. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart19212338.WHq44byRUD Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBLkfC45ZPcIHs/zowRAht4AJ95NQzWrtVeTAWpT8mFEBGiNAso5gCgqo30 SkOQZS5P4gPjKhansG61weM= =zGyk -----END PGP SIGNATURE----- --nextPart19212338.WHq44byRUD-- From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 07:03:30 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62F19106566B for ; Sat, 6 Mar 2010 07:03:30 +0000 (UTC) (envelope-from toasty@dragondata.com) Received: from mail-yw0-f191.google.com (mail-yw0-f191.google.com [209.85.211.191]) by mx1.freebsd.org (Postfix) with ESMTP id 253238FC17 for ; Sat, 6 Mar 2010 07:03:30 +0000 (UTC) Received: by ywh29 with SMTP id 29so1810067ywh.14 for ; Fri, 05 Mar 2010 23:03:24 -0800 (PST) Received: by 10.101.193.30 with SMTP id v30mr4203854anp.199.1267859004783; Fri, 05 Mar 2010 23:03:24 -0800 (PST) Received: from vpn214.ord02.your.org (vpn214.ord02.your.org [204.9.55.214]) by mx.google.com with ESMTPS id 23sm2129139iwn.14.2010.03.05.23.03.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Mar 2010 23:03:23 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Kevin Day In-Reply-To: <201003061635.44684.doconnor@gsoft.com.au> Date: Sat, 6 Mar 2010 01:03:22 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <003E5B1C-2471-47B2-9999-27719A5E26FE@dragondata.com> References: <0ECDEB94-E60E-45C7-98AC-5E948DE4649C@dragondata.com> <201003061635.44684.doconnor@gsoft.com.au> To: "Daniel O'Connor" X-Mailer: Apple Mail (2.1077) Cc: freebsd-hackers@freebsd.org Subject: Re: ACPI/power implementation causing performance loss with i7/Nehalem turbo boost X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 07:03:30 -0000 On Mar 6, 2010, at 12:05 AM, Daniel O'Connor wrote: > On Sat, 6 Mar 2010, Kevin Day wrote: >> So, it seems that the VMware hypervisor is deactivating cores on the >> CPU when idle, but FreeBSD itself isn't. Is anyone working on giving >> FreeBSD's idle loop/scheduler the ability to go into deeper sleep >> states? It seems this would have more than just a power savings >> benefit now. >=20 > What does "sysctl dev.cpu.0.cx_lowest" say? > And "sysctl dev.cpu.$N.cx_supported" ? >=20 dev.cpu.0.cx_supported: C1/3 C2/205 C3/245 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 500us > ISTR FreeBSD defaults to a very conservative setting here so you may=20= > have to set it manually. >=20 Yeah, sorry for not mentioning that I had tried this and didn't see any = change, so I thought I was on the wrong track. # sysctl hw.acpi.cpu.cx_lowest=3DC3 hw.acpi.cpu.cx_lowest: C1 -> C3 but it doesn't look like it's ever leaving C1: hw.acpi.cpu.cx_lowest: C3 dev.cpu.0.cx_supported: C1/3 C2/205 C3/245 dev.cpu.0.cx_lowest: C3 dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 500us dev.cpu.1.cx_supported: C1/3 C2/205 C3/245 dev.cpu.1.cx_lowest: C3 dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 500us dev.cpu.2.cx_supported: C1/3 C2/205 C3/245 dev.cpu.2.cx_lowest: C3 dev.cpu.2.cx_usage: 100.00% 0.00% 0.00% last 500us dev.cpu.3.cx_supported: C1/3 C2/205 C3/245 dev.cpu.3.cx_lowest: C3 dev.cpu.3.cx_usage: 100.00% 0.00% 0.00% last 500us dev.cpu.4.cx_supported: C1/3 C2/205 C3/245 dev.cpu.4.cx_lowest: C3 dev.cpu.4.cx_usage: 100.00% 0.00% 0.00% last 500us dev.cpu.5.cx_supported: C1/3 C2/205 C3/245 dev.cpu.5.cx_lowest: C3 dev.cpu.5.cx_usage: 100.00% 0.00% 0.00% last 500us dev.cpu.6.cx_supported: C1/3 C2/205 C3/245 dev.cpu.6.cx_lowest: C3 dev.cpu.6.cx_usage: 100.00% 0.00% 0.00% last 500us dev.cpu.7.cx_supported: C1/3 C2/205 C3/245 dev.cpu.7.cx_lowest: C3 dev.cpu.7.cx_usage: 100.00% 0.00% 0.00% last 500us Is the note about adding hint.apic.0.clock=3D0 mentioned on = http://wiki.freebsd.org/TuningPowerConsumption needed to leave C1 at all = on SMP systems? -- Kevin Just in case it helps anyone else: CPU: Intel(R) Xeon(R) CPU E5520 @ 2.27GHz (2270.06-MHz = K8-class CPU) Origin =3D "GenuineIntel" Id =3D 0x106a5 Stepping =3D 5 = Features=3D0xbfebfbff = Features2=3D0x9ce3bd AMD Features=3D0x28100800 AMD Features2=3D0x1 TSC: P-state invariant FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 SMT threads cpu0 (BSP): APIC ID: 16 cpu1 (AP): APIC ID: 17 cpu2 (AP): APIC ID: 18 cpu3 (AP): APIC ID: 19 cpu4 (AP): APIC ID: 20 cpu5 (AP): APIC ID: 21 cpu6 (AP): APIC ID: 22 cpu7 (AP): APIC ID: 23 From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 07:29:13 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015F61065670 for ; Sat, 6 Mar 2010 07:29:13 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 697178FC0A for ; Sat, 6 Mar 2010 07:29:12 +0000 (UTC) Received: from inchoate.gsoft.com.au (ppp121-45-157-125.lns6.adl6.internode.on.net [121.45.157.125]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id o267Sd2X092440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 6 Mar 2010 17:58:40 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Kevin Day Date: Sat, 6 Mar 2010 17:58:18 +1030 User-Agent: KMail/1.9.10 References: <0ECDEB94-E60E-45C7-98AC-5E948DE4649C@dragondata.com> <201003061635.44684.doconnor@gsoft.com.au> <003E5B1C-2471-47B2-9999-27719A5E26FE@dragondata.com> In-Reply-To: <003E5B1C-2471-47B2-9999-27719A5E26FE@dragondata.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1720374.P68McgVArQ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201003061758.34384.doconnor@gsoft.com.au> X-Spam-Score: -1.76 () AWL,BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: ACPI/power implementation causing performance loss with i7/Nehalem turbo boost X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 07:29:13 -0000 --nextPart1720374.P68McgVArQ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 6 Mar 2010, Kevin Day wrote: > > ISTR FreeBSD defaults to a very conservative setting here so you > > may have to set it manually. > > Yeah, sorry for not mentioning that I had tried this and didn't see > any change, so I thought I was on the wrong track. OK. > Is the note about adding hint.apic.0.clock=3D0 mentioned on > http://wiki.freebsd.org/TuningPowerConsumption needed to leave C1 at > all on SMP systems? Dunno sorry.. The only SMP system I have running a recent FreeBSD only=20 supports C1 :) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1720374.P68McgVArQ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBLkgQi5ZPcIHs/zowRAnHfAJ96c3p1r/59jGPsq9Rnw1YJRvkulgCfccQm aXmtX/LAHHMBCHU9UNjicHQ= =zLGn -----END PGP SIGNATURE----- --nextPart1720374.P68McgVArQ-- From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 08:39:43 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 172611065670 for ; Sat, 6 Mar 2010 08:39:43 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 732A68FC0A for ; Sat, 6 Mar 2010 08:39:42 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o268dH07012235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Mar 2010 09:39:17 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1267864760; bh=QJI9NxcAy3OxGVFxyAfDCYCzO6ceLLh33zea8JLMTwI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=ulZOiToF1eS4NDXSPm8nSQZsfHFDzHFiLVzIB+XeTkaIaR8VR20lgCG40j4K2h1I6 VF251kjovgp460u0lllzVC4K1P4y9eTRLI1dcEd1ySr9BoSnXuNM8Ahi04DdspVv/x vp9X2azd9b0pinvdD4zoqrTs8591rBKfObpzrfr8= Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o268dHND012232; Sat, 6 Mar 2010 09:39:17 +0100 (CET) (envelope-from uqs@spoerlein.net) Date: Sat, 6 Mar 2010 09:39:17 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Xin LI Message-ID: <20100306083916.GI21344@acme.spoerlein.net> Mail-Followup-To: Xin LI , Alexander Best , freebsd-hackers@freebsd.org References: <4B916BD0.7030501@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B916BD0.7030501@delphij.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on acme.spoerlein.net Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: tiny lib/libkvm/kvm_proc.c correction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 08:39:43 -0000 On Fri, 05.03.2010 at 12:38:40 -0800, Xin LI wrote: > On 2010/03/05 11:59, Alexander Best wrote: > > Xin LI schrieb am 2010-03-05: > > On 2010/03/05 11:26, Alexander Best wrote: > >>>> hi there. does this look right? > > > > Not to me, the value is not to be used this way and the comments > > above the code explained the same thing. > > > > I think we should use cputick2usec but it's not available to userland > > (one have to copy cpu_tick_frequency and friends). > > > >> damn you're right. i completely overlooked that comment. would it be worth > >> making cputick2usec available to userland? is kvm_proc.c the only candidate in > >> need of converting cpu ticks to usecs? > > I'm not sure how to do that unfortunately, is there a way to expose a > kernel variable to userland which also works on a crash dump? ticks *is* available to libkvm, not sure what happens on crashdumps, though. The following patchset has not been tested: https://www.spoerlein.net/gitweb/?p=freebsd.work/.git;a=commitdiff;h=d500a051eb75dd234166bb11485c0a953aefce1d Regards, Uli From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 08:41:41 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC7641065678; Sat, 6 Mar 2010 08:41:41 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pz0-f196.google.com (mail-pz0-f196.google.com [209.85.222.196]) by mx1.freebsd.org (Postfix) with ESMTP id 936B48FC17; Sat, 6 Mar 2010 08:41:41 +0000 (UTC) Received: by pzk34 with SMTP id 34so256145pzk.3 for ; Sat, 06 Mar 2010 00:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ckH49QNnUX/cV3JhqZT9h2mt9OrT9EZGQ21MsTM+y50=; b=UoGXeAHsQ+2iwLZpbB8v4S9lo2JKyQa317Tic6pgigWrurg/AZ0NlHdPmxBWrstdyo P+EtW2zr3LdLMwgwNRIoCNPkC/pEgnff+OXYAwdB/uZv2SUM4w5phojBUuWNDC9jrs7h 5VjY/CILj4T5CuPPApiHdZH55bPmZHIh0qDAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JIJGEC9tn+E6bcJi1li+U5dRhovLX2zoJlg3PO5c4glnmlGkdvKMCUvXTE5MrsLIL1 R8ODa3Sq/8tZ99pJ4oqigukk9lnglgOxYLxfs2HXDqbs1IH+eJ2W3Pq/7r3ZHYgVXboi cIoit5LJuv+t5ePUsUCD+s7EC29aq01hhH5pg= MIME-Version: 1.0 Received: by 10.142.5.25 with SMTP id 25mr1376457wfe.268.1267864890460; Sat, 06 Mar 2010 00:41:30 -0800 (PST) In-Reply-To: <201003051233.42861.jpaetzel@freebsd.org> References: <20100304213329.GJ57205@bunrab.catwhisker.org> <201003050801.00440.jhb@freebsd.org> <201003051233.42861.jpaetzel@freebsd.org> Date: Sat, 6 Mar 2010 00:41:30 -0800 Message-ID: <7d6fde3d1003060041p225e8718n29a8e75a718237a@mail.gmail.com> From: Garrett Cooper To: Josh Paetzel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, randi@freebsd.org, David Wolfskill Subject: Re: Scripting sysinstall(8) to create & use multiple slices on a disk? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 08:41:41 -0000 On Fri, Mar 5, 2010 at 10:33 AM, Josh Paetzel wrote: > On Friday 05 March 2010 07:01:00 John Baldwin wrote: >> On Thursday 04 March 2010 4:33:29 pm David Wolfskill wrote: >> > For reasons that may well be idiosyncratic, I like to set up FreeBSD >> > machines to have at least 2 bootable slices -- e.g., one can act as a >> > fallback if an attempted software upgrade proves to have been ill-time= d. >> > >> > In the past, I've done this manually; while a bit tedious & fairly >> > "target-rich" with opportunities for human error, it's something that = is >> > typically done infrequently (i.e., once) in the life of a machine (or = at >> > least its boot drive). >> > >> > At work, the IT folks use a scripted sysinstall(8) to set machines up; >> > to increase the probability that I'll be able to get 3 "special" >> > machines set up the way I want, I'm trying to set up a sysinstall conf= ig >> > file to make this as painless as possible. >> > >> > I managed to get a copy of the config script IT uses, so I had a >> > starting-point ... but they were setting the machines up with >> > >> > partition=3Dexclusive >> > >> > which doesn't seem like a good choice for what I'm doing. =A0:-} >> > >> > >> > After my first attempt failed, I poked around on the Net & found >> > > > le- >> >> slices-4387807/>, >> >> > (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something >> > >> > similar to what I was about to try next, and writes: >> > | My intent here is to create three slices-one 6GB in size, another 1G= B >> > | in size, and the third sized to consume the remaining free space. Wh= en >> > | I run this through sysinstall, it complains that it can't find the >> > | space for the partitions. It even complains that it can't find any >> > | free space. Because the slices don't get created, the subsequent lab= el >> > | assignments fail as well. What is the proper commands for creating >> > | multiple slices in install.cfg? >> > >> > In a foillowup, he writes: >> > | After a lot of experimenting, my impression is that sysinstall simpl= y >> > | doesn't support multiple slice installations. It works to a point, b= ut >> > | I get some unexpected errors, e.g. >> > | >> > | Unable to make device node for /dev/ad0s1a in /dev >> > >> > which doesn't seem very encouraging. >> > >> > >> > Would someone please either confirm the limitation or provide a >> > suitable excerpt from a sysinstall config script to demonstrate >> > that it is actually possible? =A0(Or show me where it's spelled out in= the >> > man page....) >> > >> > (I'm using 7.x sysinstall, if that matters.) >> >> If you are doing a fully scripted install you may be better off just usi= ng >> a dedicated shell script to format your disks and mount them and then us= e >> the various *-install.sh scripts from the release distributions to insta= ll >> the code. =A0You could still do this via sysinstall by sticking your she= ll >> script in /stand in the MFS root and having your sysinstall script just >> run that script. You might want to build a custom mfsroot to add some mo= re >> useful tools though. >> >> I really think sysinstall needs to support a disk "backdoor" whereby the >> user can either manually partition disks and then mount them at /mnt (or >> have a script do it), and tell sysinstall to just skip the disk stuff an= d >> assume /mnt is mounted. > > David, > > I second the ditching sysinstall for a shell script idea. =A0A shell scri= pt that > replaces sysinstall is nearly as short as the install.cfg and a lot easie= r to > figure out. =A0I've written a half dozen auto installers for FreeBSD, fro= m > trivial to complex and would be more than willing to help you get somethi= ng > set up. =A0I can send you code if you want as well. (Attempts to avoid shoe flying in his direction from randi@ :/), FWIW, sysinstall(8) is a good starter tool and it has a lot of the information that you need in order to complete an install (especially if you're doing it from scratch), but the amount of effort for using sysinstall(8)'s install.cfg, etc has the greater potential to change in the future when compared with a shell scripted method which is less likely to change; granted gpart vs fdisk is in transition, but the number of steps and the simplicity required to get everything up and going is trivial, and I did so in < 100 lines of bourne shell. I'd be happy to share my custom script if desired as well to provide you a general idea of what could be done to solve your problem. Cheers, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 09:13:54 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33CFB106564A; Sat, 6 Mar 2010 09:13:54 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id BA61C8FC08; Sat, 6 Mar 2010 09:13:53 +0000 (UTC) Received: by pwj1 with SMTP id 1so3195379pwj.13 for ; Sat, 06 Mar 2010 01:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ixIL4zcQtur56F4Gekv+sTwXJHqUgmOnxP+V7LatcNo=; b=Rk5RAvpUB344lyqHnofTrisNyOy/91bS5KYQi5nzZ0JFk/FyS+g7sKrxtQcBxg83T7 WqB+LyQy/tMVeaGoQsa3VyqXt0qj/K0vETDQheHmhLWgDZFhPRJXo7ylKC8MmAiXuI3z 8a7ifNgOF8lLM3p3GDjy25QBzQBQBVmhigadE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=raSc5OhN6zFOGBnTBxW+VUtrAZmj3kFCkCUHgXi2ErTaaTBSXGRS5p21Pu9assikpj 8v+s0wT8BoXoDwbFys4aE6puUIcK4P8Vgh33CfWn+2yBihlVC3UU3ZII1U7bIpxzE/0h 4sNduqUETsK9V+RIczMC6LV+02ScADsUnFSVo= MIME-Version: 1.0 Received: by 10.142.67.36 with SMTP id p36mr1405252wfa.167.1267866833281; Sat, 06 Mar 2010 01:13:53 -0800 (PST) In-Reply-To: <20100305055758.GA1062@a91-153-117-195.elisa-laajakaista.fi> References: <6413.1266433105@critter.freebsd.dk> <20100218064545.J2074@besplex.bde.org> <20100218095538.GA2318@a91-153-117-195.elisa-laajakaista.fi> <20100225195138.GA3323@a91-153-117-195.elisa-laajakaista.fi> <20100226091923.X2605@delplex.bde.org> <20100228174936.GA1252@a91-153-117-195.elisa-laajakaista.fi> <20100305055758.GA1062@a91-153-117-195.elisa-laajakaista.fi> Date: Sat, 6 Mar 2010 01:13:53 -0800 Message-ID: <7d6fde3d1003060113t72164fdbn3d0367d2fec540c1@mail.gmail.com> From: Garrett Cooper To: Jaakko Heinonen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Poul-Henning Kamp , Bruce Evans , Alexander Best Subject: Re: namei() returns EISDIR for "/" (Re: svn commit: r203990 - head/lib/libc/sys) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 09:13:54 -0000 On Thu, Mar 4, 2010 at 9:57 PM, Jaakko Heinonen wrote: > On 2010-02-28, Jaakko Heinonen wrote: >> > > =A0 http://people.freebsd.org/~jh/patches/lookup-root.diff > > I have updated the patch taking some of bde's comments into account. The > new version also includes updates for namei(9) manual page. > > The patch is attached to this mail and also found at: > > =A0 =A0 =A0 =A0http://people.freebsd.org/~jh/patches/lookup-root.2.diff 1. EBUSY's new definition doesn't look correct for rename(2) given POSIX's definition ( http://www.opengroup.org/onlinepubs/009695399/functions/rename.html ): [EBUSY] [CX] [Option Start] The directory named by old or new is currently in use by the system or another process, and the implementation considers this an error. [Option End] 2. I also did some quick snooping around and all filesystems that support symlinks that FreeBSD has, sans ZFS [*], seem to support EMLINK. Should we add this to the documentation? [EMLINK] [CX] [Option Start] The file named by old is a directory, and the link count of the parent directory of new would exceed {LINK_MAX}. [Option End] Thanks! -Garrett [*] I took a really superficial look at ZFS and this is what I found (from zfs_pathconf): switch (cmd) { case _PC_LINK_MAX: *valp =3D INT_MAX; return (0); From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 10:51:17 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A163D1065672 for ; Sat, 6 Mar 2010 10:51:17 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay1.uni-muenster.de (ZIVM-EXRELAY1.UNI-MUENSTER.DE [128.176.192.14]) by mx1.freebsd.org (Postfix) with ESMTP id EBBC68FC14 for ; Sat, 6 Mar 2010 10:51:16 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,593,1262559600"; d="scan'208";a="298401572" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay1.uni-muenster.de with ESMTP; 06 Mar 2010 11:51:14 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 403011B0768; Sat, 6 Mar 2010 11:51:14 +0100 (CET) Date: Sat, 06 Mar 2010 11:51:13 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Ulrich =?iso-8859-1?Q?Sp=F6rlein?= , Xin LI Message-ID: In-Reply-To: <20100306083916.GI21344@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: tiny lib/libkvm/kvm_proc.c correction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 10:51:17 -0000 Ulrich Sp=F6rlein schrieb am 2010-03-06: > On Fri, 05.03.2010 at 12:38:40 -0800, Xin LI wrote: > > On 2010/03/05 11:59, Alexander Best wrote: > > > Xin LI schrieb am 2010-03-05: > > > On 2010/03/05 11:26, Alexander Best wrote: > > >>>> hi there. does this look right? > > > Not to me, the value is not to be used this way and the comments > > > above the code explained the same thing. > > > I think we should use cputick2usec but it's not available to > > > userland > > > (one have to copy cpu_tick_frequency and friends). > > >> damn you're right. i completely overlooked that comment. would > > >> it be worth > > >> making cputick2usec available to userland? is kvm_proc.c the > > >> only candidate in > > >> need of converting cpu ticks to usecs? > > I'm not sure how to do that unfortunately, is there a way to expose > > a > > kernel variable to userland which also works on a crash dump? > ticks *is* available to libkvm, not sure what happens on crashdumps, > though. The following patchset has not been tested: very nice, but wouldn't it be better to define cputick2usec() somewhere els= e so other userland code can make use of it? even if right now libkvm is the only source in need of such a conversion function, in the future other code might benefit from userland cputick2usec(). now where would be a good place= to put this in? alex ps: did anybody look @ {net|open|dragonfly}bsd, linux, solaris, etc. so see= if they have a userland cputick2usec() and where it's defined? > https://www.spoerlein.net/gitweb/?p=3Dfreebsd.work/.git;a=3Dcommitdiff;h= =3Dd500a051eb75dd234166bb11485c0a953aefce1d > Regards, > Uli From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 13:45:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C39E106564A; Sat, 6 Mar 2010 13:45:58 +0000 (UTC) (envelope-from jpaetzel@freebsd.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 405B88FC0A; Sat, 6 Mar 2010 13:45:58 +0000 (UTC) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 4E336E270A; Sat, 6 Mar 2010 08:30:50 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Sat, 06 Mar 2010 08:30:50 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:subject:date:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:message-id; s=smtpout; bh=jkEQfcwheAfuA7gBdcYog6iQsV4=; b=iWIXwkUqc0gJXIvQVihDvtVy/Le85Bsq+h/9tXzMQyaw/hH4dlxj4YWhkJgtl+V+C/PPCoWCUE3/vBQ64/jj8Pcm1U6j9seuFzyMN7VAAdEPbx0geKO1WPG/HBiD93cGFSSxy8MHhpoc/7ouQn0JDWJmMxBWsWto7C7bVsmzB4o= X-Sasl-enc: h+4KDmW90gvEe4TdTTeHnM1jI0F1z4S9CDyIzLqhcJhF 1267882249 Received: from ix.tcbug.org (71-82-134-106.dhcp.roch.mn.charter.com [71.82.134.106]) by mail.messagingengine.com (Postfix) with ESMTPSA id EF54132BD7; Sat, 6 Mar 2010 08:30:49 -0500 (EST) From: Josh Paetzel Organization: FreeBSD To: Garrett Cooper Date: Sat, 6 Mar 2010 07:28:54 -0600 User-Agent: KMail/1.13.1 (FreeBSD/9.0-CURRENT; KDE/4.4.1; amd64; ; ) References: <20100304213329.GJ57205@bunrab.catwhisker.org> <201003051233.42861.jpaetzel@freebsd.org> <7d6fde3d1003060041p225e8718n29a8e75a718237a@mail.gmail.com> In-Reply-To: <7d6fde3d1003060041p225e8718n29a8e75a718237a@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2193251.VScSK8vn8x"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201003060729.01225.jpaetzel@freebsd.org> Cc: freebsd-hackers@freebsd.org, randi@freebsd.org, David Wolfskill Subject: Re: Scripting sysinstall(8) to create & use multiple slices on a disk? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 13:45:59 -0000 --nextPart2193251.VScSK8vn8x Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Saturday 06 March 2010 02:41:30 Garrett Cooper wrote: > (Attempts to avoid shoe flying in his direction from randi@ :/), >=20 > FWIW, sysinstall(8) is a good starter tool and it has a lot of the > information that you need in order to complete an install (especially > if you're doing it from scratch), but the amount of effort for using > sysinstall(8)'s install.cfg, etc has the greater potential to change > in the future when compared with a shell scripted method which is less > likely to change; granted gpart vs fdisk is in transition, but the > number of steps and the simplicity required to get everything up and > going is trivial, and I did so in < 100 lines of bourne shell. >=20 > I'd be happy to share my custom script if desired as well to provide > you a general idea of what could be done to solve your problem. >=20 > Cheers, > -Garrett One of my main issues with using sysinstall comes from an intersection of i= t's=20 lack of documentation, and the way it can arbitrarily change over time. Fo= r=20 instance, this week I was working on an install for a number of machines th= at=20 had to be imaged with an early 7.x version of FreeBSD, and were specified t= o=20 be installed with "distSet${OBFUSICATED}" In order to determine what=20 distSet${OBFUSICATED} installs on 7.${EARLY} involves either installing a=20 system via sysinstall and noting what it installs, or reading the source co= de. =20 Where this becomes an issue is sysinstall changes over time,=20 distSet${OBFUSICATED} is not necessarily the same between 7.${EARLY} and sa= y=20 8.0. Since there is no documentation you either end up tracking the change= s=20 to sysinstall, or sorting it out at upgrade time. I'd also like to mention John saying you can build a custom mfsroot to use= =20 additional tools during install...I go a different tack on this. I'm a hug= e=20 fan of python, and like to use it for installers. Rather than build a cust= om=20 mfsroot with python what I prefer to do is build a chroot that the target=20 machine boots diskless off. Then I chroot into that directory and install= =20 whatever tools I want using ports/packages. I find that getting FreeBSD to= =20 boot diskless is so easy that I've had it accidentally happen more than onc= e=20 when I wanted something else to happen. Installing ports in a chroot is al= so=20 pretty trivial. Building a custom mfsroot has a bit of a learning curve wi= th=20 a fairly expensive trial and error penalty. At any rate. There are a lot of compelling reasons to not use sysinstall f= or=20 automated installs. And while there are compelling reasons to use sysinsta= ll=20 for this task, most of them involve things like "I'm a masochist." or "It w= as=20 there so I thought I'd use it." =2D-=20 Thanks, Josh Paetzel =46reeBSD -- The power to serve --nextPart2193251.VScSK8vn8x Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAABAgAGBQJLklidAAoJEKFq1/n1feG2G/gIAJ0DOoOu7xxwLYOYGQfXq3y/ NL01+e25hHayFOUZGyNmE7SJjvIurU7z7fQQ5KliEWzZf0p0h7rW70bpIjLz/T+O OXpYR1kVzq0V7Wn5fTP+btKJzZWM0KKV9mFLBlWWWfxrJuatCQKCby4IGEA9jQ24 fcZdBN3etoVA3zb2YGsPTzjW+VnUqvpMO/MKysybLTMu0tTiXb4L/23OJVRs9zbf 3zUNhgxhCN9U+Y9S8M0cEuXkUVFw/SpcZHbXQkgXlWxxqRrE2xlSvi4n4pYCH6ls 9FWF+pZ++d3irosE0+vvNl/1V2WHMzJlIRhMU/mt4nu1BxwVafDP5XqxApMQyew= =U7ys -----END PGP SIGNATURE----- --nextPart2193251.VScSK8vn8x-- From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 16:52:52 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F22E106564A for ; Sat, 6 Mar 2010 16:52:52 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4922B8FC12 for ; Sat, 6 Mar 2010 16:52:52 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id DD13F46B1A; Sat, 6 Mar 2010 11:52:51 -0500 (EST) Date: Sat, 6 Mar 2010 16:52:51 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Selphie Keller In-Reply-To: Message-ID: References: <2BD4195B78BE4E4E9F4953B3196590E3@2WIRE304> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: RE: mac_mls mac_biba mac_lomac patches to fix ptys_equal mib support for new /dev/pts in FreeBSD 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 16:52:52 -0000 On Tue, 2 Mar 2010, Selphie Keller wrote: > - (2) Could you let me know how your login.conf + user labels are > configured, and show me the output of "ps -axZ | grep sshd"? > > /etc/login.conf label configurations I use > > Staff users: label=mls/2(low-high) > Deamons: label=mls/equal(equal-equal) > Insecure users: label=mls/low(low-low) > > If you need the exact data from login.conf I can provide it, but is a bit > tricky as I use tc= to call from one class to another class and override, in > which default class is mls/low. Am I right in thinking that you have security.mac.biba.revocation_enabled and/or security.mac.mls.revocation_enabled set? Revocation being enabled might explain why you're seeing this issue, but other users aren't reporting problems. Robert N M Watson Computer Laboratory University of Cambridge