From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 03:01:56 2008 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 C5E2E1065673 for ; Sun, 30 Nov 2008 03:01:56 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 77ED98FC22 for ; Sun, 30 Nov 2008 03:01:56 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so770177yxb.13 for ; Sat, 29 Nov 2008 19:01:55 -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:user-agent :mime-version:to:subject:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; bh=sZ3pawAtQuS5Lug7LCBTg8mi4jMLM2lTv7EPy1KsniU=; b=mg8IL59VmyqAra+MqVQEbS6Fn4k8cGV1EpnbARIs9KjLw0KiWRKynZDL66an9PSCzN 97CeEImo4TXK1YZy3zj0UrHzYhZTW13bREDKxowfzLvpUl5yFPyYUyXnoCUtv1RRRwW6 iFKuBoyZTr7XB4uPHbkKWLHM3Xlz+jG202SQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:subject :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; b=Bso+QUCvkv7gjILUOXH6x/spmgD1xZkXj1TILzh1Y4eQS/gXZpIzyX74Wg7uo+4iJL diPE9oqTn+pKPRViQsF620haaWExSHILjySJQue8IEAbuBDvOORzqIHkGYC43HRXYeve /7e8VFSVDJP7AOIPvsIuu23eebnF4Txo1P5rA= Received: by 10.90.30.2 with SMTP id d2mr5220819agd.58.1228014115817; Sat, 29 Nov 2008 19:01:55 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 7sm3250200aga.13.2008.11.29.19.01.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Nov 2008 19:01:54 -0800 (PST) Message-ID: <49320219.4070804@gmail.com> Date: Sat, 29 Nov 2008 22:01:45 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Subject: change to make - error when Makefile doesn't exist 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, 30 Nov 2008 03:01:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I stupidly forgot to make a backup so I can't provide a diff but in src/usr.bin I changed TryReadMakefile("Makefile"); to if (!TryReadMakefile("Makefile")) Fatal("Makefile could not be opened"); That way you could differentiate between the Makefile not existing and the target not existing. gmake provided the following error message: gmake: *** No targets specified and no makefile found. Stop. - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkyAhkACgkQtl8kq+nCzNEhygCeLZAXcYWje2/95sBkTHKhiwbQ +RAAn0jzYxVngGC8NnpSXXpHgIlQnQN+ =6as2 -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 03:08:44 2008 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 913861065733 for ; Sun, 30 Nov 2008 03:08:44 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id 3FD118FC0A for ; Sun, 30 Nov 2008 03:08:43 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so770606yxb.13 for ; Sat, 29 Nov 2008 19:08:43 -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:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; bh=ZTvC8F9hjMIayGS0WhYnB9xbx4/9wkfURguarMhjfaA=; b=Q+Mk0Tc6xKFFnZhhFHC+zJnBD7g0Yu+P2FRoWEMgC+nfFdR/JizEQpi3+2ImJN0NAp NaqDC2aIQWV13qpXK+xBjfBC+M6qLDhWDhmuzk8uA972dK2N+9emuQYvlaatoAMSk/sb raaUWPrbT+zF6mO+ntdpFsu/9/coTAbla02zc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; b=ijpc03kfW8jMPBd2I1Z5Fwwe/skmlwPFCpfGjJ8gaD2yOObexfQvIeDfMxnpnz7DJt hIInUX3lsM2XCBp7RD5KlRLjAhxNYtv7xDbj3bA9yFi/StH1VR1pCrKNeZq43c4L9ppa sJv9oyhZlSMDNM+aJZoeNqo2U6wOhCtZHCsQ0= Received: by 10.90.30.13 with SMTP id d13mr5257014agd.3.1228014523404; Sat, 29 Nov 2008 19:08:43 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 20sm3249439agb.16.2008.11.29.19.08.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Nov 2008 19:08:42 -0800 (PST) Message-ID: <493203B2.4070109@gmail.com> Date: Sat, 29 Nov 2008 22:08:34 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Max Laier References: <4931CB02.9070904@gmail.com> <200811300013.54902.max@love2party.net> In-Reply-To: <200811300013.54902.max@love2party.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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, 30 Nov 2008 03:08:44 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Max Laier wrote: > > Use svk. There is information about how to set that up on the wiki: > http://wiki.freebsd.org/SubversionPrimer This is what I am doing *waits for sync to complete* > >> As an aside can anyone point me to a relatively easy bug/feature that I >> can work on as a beginner C coder? > > Check http://www.freebsd.org/projects/ideas/ > Most of these involve C coding beyond my skill level. - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkyA7EACgkQtl8kq+nCzNEO1QCggIzcx40f8IpC2IesFoGGKHcw yY0An3ZrxcCK83c1iJEBnFkBRN3Rz1SW =FKce -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 03:47:36 2008 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 1A2B9106564A for ; Sun, 30 Nov 2008 03:47:36 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from mail-gx0-f19.google.com (mail-gx0-f19.google.com [209.85.217.19]) by mx1.freebsd.org (Postfix) with ESMTP id C0A718FC14 for ; Sun, 30 Nov 2008 03:47:35 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by gxk12 with SMTP id 12so773969gxk.19 for ; Sat, 29 Nov 2008 19:47:35 -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:user-agent :mime-version:to:subject:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; bh=LOITHyKiPljnjPk7i5D75sNj6d8NU4wVbewukuL/Ut4=; b=JG3UrA027bMLf7bEfChB3SQJs71dyOzprepP1Xcy7LbPcyysmiQws/G3ac4jFmt/wV YuDR92cGcvCT759sNtJz7IaWDvxc3s/NEozcT/4bMDKYCCSsTkp4BY2Z1NaTwxL0jXFu MVI7xfwDe/znR9DJ/P/9t3C944F/OfL1hZrec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:subject :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; b=s1KRHdUop6Cm4jbymtG9xds61YRvEITkFU43ccH9P8aZRyGNormVn+pwZI1dvDlpIw dETd3/DtRDgbnwgyTy/2spi2y/hztIhvrQvCs47VfQnpXCkQCVmhLkMThVjsXfIRDU4W pF7DYrRgXipV4slR9LDBNVnU8XOFiAWFtA2Ys= Received: by 10.90.100.17 with SMTP id x17mr5168596agb.57.1228016854941; Sat, 29 Nov 2008 19:47:34 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 38sm3281421agd.18.2008.11.29.19.47.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Nov 2008 19:47:34 -0800 (PST) Message-ID: <49320CCD.3020900@gmail.com> Date: Sat, 29 Nov 2008 22:47:25 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Subject: minor change to src/usr.bin/window/wwend.c 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, 30 Nov 2008 03:47:36 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Fixes two errors when building with -ansi -Wall - --- wwend.c.backup 2008-11-29 22:41:42.000000000 -0500 +++ wwend.c 2008-11-29 22:46:08.000000000 -0500 @@ -40,12 +40,14 @@ "$FreeBSD: src/usr.bin/window/wwend.c,v 1.4 2001/05/17 09:38:49 obrien Exp $"; #endif /* not lint */ +#include #include #include "ww.h" #include "tt.h" /*ARGSUSED*/ - -wwend(exit) +int +wwend(int exit) { if (tt.tt_checkpoint) { (void) alarm(0); -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkyDM0ACgkQtl8kq+nCzNF7HgCdG5jqCJA8gX8nCIsraqw2zCqV bEEAoJPg7I3iy/Zv8yDjcSe5bniEvoKs =pcgY -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 04:01:06 2008 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 7DB7C1065673 for ; Sun, 30 Nov 2008 04:01:06 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from mail-gx0-f19.google.com (mail-gx0-f19.google.com [209.85.217.19]) by mx1.freebsd.org (Postfix) with ESMTP id 1D34D8FC16 for ; Sun, 30 Nov 2008 04:01:05 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by gxk12 with SMTP id 12so776020gxk.19 for ; Sat, 29 Nov 2008 20:01:05 -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:user-agent :mime-version:to:subject:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; bh=zjG7PgOYE6WSELvPflZRK1zOF1vVqA7lrQbSLIm/IQc=; b=sqYqLzpENLdgV0f2cQflv51Az45/gTc5ik1t43O4cvpOngfhq2Qs/yFRjystXiUGMI LbpsspfakPAfPC5FirFJzKhngD+I8fdLpKZke+9neEE1twZV4xbOuz8HPCLTJco558PP FCPb7m35XUYbk8IIaaC0tZ338koBkKtuv182s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:subject :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; b=qOKbWr4lAjow4wmHY0h/InIINY60cVyBtAY5mjIRY65CCvf/rUSluUjH5oyUyxCThR NFnMO3UeVeX+75/TqcAioN/K75oREF54hCYWUwxjcYYVQvz/QbsqsP8+m3+mKhmUYSaj Y4uiGLVQ6NTXj2uHvrM2ENsMp39u1T0b7HBow= Received: by 10.90.35.9 with SMTP id i9mr3795180agi.10.1228017665493; Sat, 29 Nov 2008 20:01:05 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 7sm3274721agb.34.2008.11.29.20.01.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Nov 2008 20:01:04 -0800 (PST) Message-ID: <49320FF7.4040901@gmail.com> Date: Sat, 29 Nov 2008 23:00:55 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Subject: change to ee.c 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, 30 Nov 2008 04:01:06 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I changed this pursuant to a warning I got from gcc. according to the man page "This avoids the race between testing for a file's existence and opening it for use." Could someone on this list please tell me a) If mkstemp is supposed to be used instead b) if not, why not? I tested this change and was able to spell check files (the function which this changes). As an aside I got an unreproducible segfault 11 when I tried to spellcheck an empty file. When I tried again I did not get the same error. I have the ee.core file. - --- ee.c.back 2008-11-29 22:52:28.000000000 -0500 +++ ee.c 2008-11-29 22:52:35.000000000 -0500 @@ -4386,7 +4386,7 @@ return; } (void)sprintf(template, "/tmp/ee.XXXXXXXX"); - - name = mktemp(&template[0]); + name = mkstemp(&template[0]); fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0600); if (fd < 0) { wmove(com_win, 0, 0); - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkyD/cACgkQtl8kq+nCzNHS/QCghMyQDjyG0dxDgoAj39vBKTBj 6WMAn3H1+6qpCOWR3DloKJlkFeGTdZzp =lE8S -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 04:10:30 2008 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 2B77E1065673 for ; Sun, 30 Nov 2008 04:10:30 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id C72498FC0A for ; Sun, 30 Nov 2008 04:10:29 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 115C328448 for ; Sun, 30 Nov 2008 12:10:28 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 7F053ED981A; Sun, 30 Nov 2008 12:10:27 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id Ug4bLpbM38SJ; Sun, 30 Nov 2008 12:10:22 +0800 (CST) Received: from delta.delphij.net (c-76-103-40-85.hsd1.ca.comcast.net [76.103.40.85]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 39939EC75EA; Sun, 30 Nov 2008 12:10:20 +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=C4Djr9Ju8NHAhP4TCINFxVwMnCTT3XxegZ8YO/AY+ALt3OkSj97OmqQEusFgMKeNk DXlePo+HpvVV/IJ4Dc+sw== Message-ID: <4932122A.8070209@delphij.net> Date: Sat, 29 Nov 2008 20:10:18 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Thunderbird 2.0.0.18 (X11/20081123) MIME-Version: 1.0 To: Eitan Adler References: <49320FF7.4040901@gmail.com> In-Reply-To: <49320FF7.4040901@gmail.com> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; 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: change to ee.c 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: Sun, 30 Nov 2008 04:10:30 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Eitan, Eitan Adler wrote: > I changed this pursuant to a warning I got from gcc. > according to the man page "This avoids the race between testing for a > file's existence and opening it for use." > > Could someone on this list please tell me > a) If mkstemp is supposed to be used instead > b) if not, why not? > I tested this change and was able to spell check files (the function > which this changes). > > As an aside I got an unreproducible segfault 11 when I tried to > spellcheck an empty file. When I tried again I did not get the same > error. I have the ee.core file. > > --- ee.c.back 2008-11-29 22:52:28.000000000 -0500 > +++ ee.c 2008-11-29 22:52:35.000000000 -0500 > @@ -4386,7 +4386,7 @@ > return; > } > (void)sprintf(template, "/tmp/ee.XXXXXXXX"); > - name = mktemp(&template[0]); > + name = mkstemp(&template[0]); > fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0600); > if (fd < 0) { > wmove(com_win, 0, 0); Tanks for interested in this but I'm afraid that your patch is incorrect. mkstemp returns a file descriptor rather than a string pointer, therefore, the subsequent open() would have undefined behavior. It looks like that we actually want fd = mkstemp() here. Note that we may want to bring vendor fixes before making any changes to reduce duplicated work... Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkyEioACgkQi+vbBBjt66Dg8QCgw5nCU0G1WnHYtVziiNMpawqh iPwAni7zA4yFnX9waNC0Hmj36rX6yrIG =iJ2c -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 04:22:00 2008 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 94F981065686 for ; Sun, 30 Nov 2008 04:22:00 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.184]) by mx1.freebsd.org (Postfix) with ESMTP id 4B8818FC14 for ; Sun, 30 Nov 2008 04:21:59 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by rn-out-0910.google.com with SMTP id j71so1509381rne.12 for ; Sat, 29 Nov 2008 20:21:59 -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:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; bh=6Eu656SLvavDxVRgm2Wq4QiXsv7rvE8ZClOCXqawhzY=; b=nlNOD/6UIBMnvh4D20ItN9efOvVBIGjtQDo4aW7ZGwWKAvn4HpX8f7IV/LGfBo63g2 zav5YzVt+QUngqFHd4bl3uYQYIiPLiyrGPkOac0XlEaXv9YSpAxSvYCefq3KmkjJQ6DT FJ4t+BHJBO72bSpmUlufq1fQcIgbfGlDdeGP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; b=O5oJs8PEZ6+eSu4BRhWL4vEpq/t5PBkI7cA+TJH7iBIphkiEiN+OnbSr9p4+4phBDR ogmv7AxfGusIsl5tEE1f3EK372WVk8TcR5F/dpn8hyPsUu7m6lbWxUvIdHycdiUrYJsE fie3N355JRzXi/6kMA91zbBOMutXcwHIQnRl4= Received: by 10.90.71.15 with SMTP id t15mr5227765aga.90.1228018919161; Sat, 29 Nov 2008 20:21:59 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 1sm3292777agb.20.2008.11.29.20.21.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 Nov 2008 20:21:58 -0800 (PST) Message-ID: <493214DC.2080904@gmail.com> Date: Sat, 29 Nov 2008 23:21:48 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: d@delphij.net References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> In-Reply-To: <4932122A.8070209@delphij.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Cc: freebsd-hackers@freebsd.org Subject: Re: change to ee.c 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, 30 Nov 2008 04:22:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Xin LI wrote: > Hi, Eitan, > Tanks for interested in this but I'm afraid that your patch is > incorrect. mkstemp returns a file descriptor rather than a string > pointer, therefore, the subsequent open() would have undefined behavior. > It looks like that we actually want fd = mkstemp() here. Thanks. If this is the case how come gcc did not return any warnings? > > Note that we may want to bring vendor fixes before making any changes to > reduce duplicated work... I was not aware that this was a third party program. I'll look around and see if this was fixed. I'm sort of learning C by fixing these minor bugs so any help is appreciated. > > Cheers, - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkyFNwACgkQtl8kq+nCzNGlRgCeJDMfvnR0ZVtz/k/OjDlrKUUP 3xwAniOJpgueqFh3KVKhk7hS9GFE9fqD =gTGT -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 08:43:39 2008 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 EDF191065670 for ; Sun, 30 Nov 2008 08:43:39 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [66.246.138.153]) by mx1.freebsd.org (Postfix) with ESMTP id C96C48FC18 for ; Sun, 30 Nov 2008 08:43:39 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 6DF2719561; Sun, 30 Nov 2008 03:43:38 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=-2.2 required=8.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 Received: from tau (unknown [66.45.161.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Sun, 30 Nov 2008 03:43:38 -0500 (EST) Date: Sun, 30 Nov 2008 00:43:31 -0800 From: Bruce Cran To: Eitan Adler Message-ID: <20081130004331.086941f3@tau> In-Reply-To: <493214DC.2080904@gmail.com> References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: change to ee.c 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, 30 Nov 2008 08:43:40 -0000 On Sat, 29 Nov 2008 23:21:48 -0500 Eitan Adler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Xin LI wrote: > > Hi, Eitan, > > > Tanks for interested in this but I'm afraid that your patch is > > incorrect. mkstemp returns a file descriptor rather than a string > > pointer, therefore, the subsequent open() would have undefined > > behavior. It looks like that we actually want fd = mkstemp() here. > Thanks. If this is the case how come gcc did not return any warnings? > > > > Note that we may want to bring vendor fixes before making any > > changes to reduce duplicated work... > I was not aware that this was a third party program. I'll look around > and see if this was fixed. > The version of ee in FreeBSD is fairly old: the latest from http://mahon.cwx.net/ is 1.4.6. Even so, the latest version still generates lots of warnings from gcc because the developer used NULL instead of '\0' (i.e the NULL constant instead of the NUL string). The patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/127986 fixes them; I emailed the developer but got no reply. -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 09:39:41 2008 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 B7179106564A for ; Sun, 30 Nov 2008 09:39:41 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 0D75D8FC28 for ; Sun, 30 Nov 2008 09:39:38 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id C95E19CB12D; Sun, 30 Nov 2008 10:35:09 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cgA84ie-fp8h; Sun, 30 Nov 2008 10:34:57 +0100 (CET) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1CD719CB534; Sun, 30 Nov 2008 10:34:57 +0100 (CET) Received: (from rdivacky@localhost) by lev.vlakno.cz (8.14.2/8.14.2/Submit) id mAU9YudZ090056; Sun, 30 Nov 2008 10:34:56 +0100 (CET) (envelope-from rdivacky) Date: Sun, 30 Nov 2008 10:34:56 +0100 From: Roman Divacky To: Eitan Adler Message-ID: <20081130093456.GA89886@freebsd.org> References: <49320CCD.3020900@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49320CCD.3020900@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: minor change to src/usr.bin/window/wwend.c 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, 30 Nov 2008 09:39:41 -0000 On Sat, Nov 29, 2008 at 10:47:25PM -0500, Eitan Adler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Fixes two errors when building with -ansi -Wall > > > - --- wwend.c.backup 2008-11-29 22:41:42.000000000 -0500 > +++ wwend.c 2008-11-29 22:46:08.000000000 -0500 > @@ -40,12 +40,14 @@ > "$FreeBSD: src/usr.bin/window/wwend.c,v 1.4 2001/05/17 09:38:49 > obrien Exp $"; > #endif /* not lint */ > > +#include > #include > #include "ww.h" > #include "tt.h" > > /*ARGSUSED*/ > - -wwend(exit) > +int > +wwend(int exit) > { > if (tt.tt_checkpoint) { > (void) alarm(0); please use -current, I already fixed this in -current a week or so ago... From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 14:11:25 2008 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 009EA1065676 for ; Sun, 30 Nov 2008 14:11:25 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.185]) by mx1.freebsd.org (Postfix) with ESMTP id 985E18FC25 for ; Sun, 30 Nov 2008 14:11:24 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by rn-out-0910.google.com with SMTP id j71so1612027rne.12 for ; Sun, 30 Nov 2008 06:11:23 -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:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; bh=ad6hhGPVwOnKRxNEcaybqlT/l43/8hsNpu3Q46eO8b0=; b=wcfdT1yBlVaJXNrxahKm+/zm3p7W150XKzX6ygnA1ANDr9f77nUrkqx0SXUU5cE1SK L6ZFCw8hw/lyYFxjBU333Unr53shQfQNpGuDryYYaigLQf9rO2+bE2OPREaDmJnKc4HY YL99QimF5Lf/xKliFB63hDGgNd89swUYHZT8E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; b=PdF3G2I2/Kb7ge3+u1WqscR8qOaBllAPZwzrwxCsg8Xj439cnhvmXEj7HM3bmX8345 RgFL9i9xeA5oI6YfzC1qWTzlrEWR8/uSoX53TtLuNKAS8p4nAGYMuJ6zt3+wgSwBapT0 gqM3pPCNdFigVXUbmru7PM3el5E7xzfqN284s= Received: by 10.90.92.16 with SMTP id p16mr1486511agb.87.1228054283741; Sun, 30 Nov 2008 06:11:23 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 9sm3615050agc.31.2008.11.30.06.11.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 06:11:22 -0800 (PST) Message-ID: <49329F00.2020702@gmail.com> Date: Sun, 30 Nov 2008 09:11:12 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Roman Divacky References: <49320CCD.3020900@gmail.com> <20081130093456.GA89886@freebsd.org> In-Reply-To: <20081130093456.GA89886@freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Cc: freebsd-hackers@freebsd.org Subject: Re: minor change to src/usr.bin/window/wwend.c 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, 30 Nov 2008 14:11:25 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roman Divacky wrote: please use -current - src or list? I already fixed this in -current a week or so ago... Sorry - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkynwAACgkQtl8kq+nCzNGgKgCcCR0Bj9LUffhWF9Ah6ccc5OS8 FusAnRDOOdpkz4XKuT6A1QuqtDNhxaWt =D19D -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 14:12:39 2008 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 0484D1065677 for ; Sun, 30 Nov 2008 14:12:39 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9DF8FC08 for ; Sun, 30 Nov 2008 14:12:38 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so808095ywe.13 for ; Sun, 30 Nov 2008 06:12:37 -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:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; bh=DX/3c6nkmUfXs5PqHFd40+bybHpgVGKUAAVFuN+N0dA=; b=CBBRktgVTCM/lXuomdn4uQ4YY9fm7o7N1kQGfp5KjL3PpA6xqthY62XcpO3Uq9nmEt cc+dYRBU7qy7T1YMHpCbR6ooed/1h0ugMVDdDtl1YALihvhkpxidwdYy5FRUAZA5V4LT 52MHo/YJvrr5VASAIuVqfaeN41RJHgfVUCG+0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; b=LhKY0fjepA+rWmWRXDNBv6/xn/BKWP2O/9SepiNF8og80dAc0wtqgIhXkkcHXiHqe5 QYE926k8dkTDdXmY+lfWLV//DZatFlw5xTokWQmkMTemgUABjRXsp5rZw2ThD0TF9k/J SN1oXncUlboedbqGH9nscagDS3I0VCJiVv0tc= Received: by 10.90.73.16 with SMTP id v16mr5350639aga.65.1228054357013; Sun, 30 Nov 2008 06:12:37 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 39sm3615055agb.23.2008.11.30.06.12.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 06:12:36 -0800 (PST) Message-ID: <49329F4A.3070004@gmail.com> Date: Sun, 30 Nov 2008 09:12:26 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Bruce Cran References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> <20081130004331.086941f3@tau> In-Reply-To: <20081130004331.086941f3@tau> X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: change to ee.c 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, 30 Nov 2008 14:12:39 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bruce Cran wrote: > The version of ee in FreeBSD is fairly old: the latest from > http://mahon.cwx.net/ is 1.4.6. How difficult would it be to bring it up to date? How come it has not been updated so far? - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkyn0oACgkQtl8kq+nCzNFxbwCfRdNcyTOBWCsPHVCXTi57EN/N ve0An2+XR4l/KWgC2XZC4Lf65K6d2+RW =jUlC -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 15:24:43 2008 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 6E5E81065677; Sun, 30 Nov 2008 15:24:43 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout2.freenet.de (mout2.freenet.de [IPv6:2001:748:100:40::2:4]) by mx1.freebsd.org (Postfix) with ESMTP id 001F58FC16; Sun, 30 Nov 2008 15:24:42 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.12] (helo=2.mx.freenet.de) by mout2.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #65) id 1L6oA4-0000Ob-50; Sun, 30 Nov 2008 16:24:40 +0100 Received: from mafd5.m.pppool.de ([89.49.175.213]:10239 helo=ernst.jennejohn.org) by 2.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #68) id 1L6oA3-0000yI-Rf; Sun, 30 Nov 2008 16:24:40 +0100 Date: Sun, 30 Nov 2008 16:24:37 +0100 From: Gary Jennejohn To: Andriy Gapon Message-ID: <20081130162437.1bae4371@ernst.jennejohn.org> In-Reply-To: <492FF203.5060405@icyb.net.ua> References: <492FF203.5060405@icyb.net.ua> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: dd if=/dev/mem can hang a machine? 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, 30 Nov 2008 15:24:43 -0000 On Fri, 28 Nov 2008 15:28:35 +0200 Andriy Gapon wrote: > > I have a new machine with DG33TL mainboard (ICH9/G33). > In a course of some hacking I ran dd if=/dev/mem ... to scan all memory, > this caused the machine to hang. > I tried to reproduce and this is 100% reproducible. > > I am not used to such behavior. In older days I could scan all the > memory without any issues. > > Could this be related to some modern form of memory-mapped IO? Or to > Intel Management Engine (that seems t bite into DRAM)? > Or something else? > > Just wondering. > That's what I would assume. With some hardware just reading a register can be harmful. --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 15:44:03 2008 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 C2112106573B for ; Sun, 30 Nov 2008 15:44:03 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id 528658FC0A for ; Sun, 30 Nov 2008 15:44:02 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from [192.168.2.100] ([172.21.151.2]) by smtp-3.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Sun, 30 Nov 2008 16:30:45 +0100 Message-ID: <4932B193.7030106@dlr.de> Date: Sun, 30 Nov 2008 16:30:27 +0100 From: Hartmut Brandt User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Eitan Adler References: <49320219.4070804@gmail.com> In-Reply-To: <49320219.4070804@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 30 Nov 2008 15:30:45.0261 (UTC) FILETIME=[9CCDD3D0:01C95300] Cc: freebsd-hackers@freebsd.org Subject: Re: change to make - error when Makefile doesn't exist 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, 30 Nov 2008 15:44:03 -0000 Eitan Adler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I stupidly forgot to make a backup so I can't provide a diff but in > src/usr.bin > I changed > TryReadMakefile("Makefile"); > to > if (!TryReadMakefile("Makefile")) > Fatal("Makefile could not be opened"); > That way you could differentiate between the Makefile not existing and > the target not existing. > > gmake provided the following error message: > gmake: *** No targets specified and no makefile found. Stop. > > It is perfectly valid to have no makefile yet to run make. Make has a number of builtin rules. If, for example, you have a file x.c then 'make x' or 'make x.o' make will cause make to compile x.c even without a makefile. But if you have no Makefile, you must specify a target. Otherwise how would make know what to make? So the error message is quite exact: it is an error to have no makefile AND to specify no target. harti From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 15:53:38 2008 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 F24131065672 for ; Sun, 30 Nov 2008 15:53:38 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.186]) by mx1.freebsd.org (Postfix) with ESMTP id A0FFA8FC08 for ; Sun, 30 Nov 2008 15:53:38 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by rn-out-0910.google.com with SMTP id j71so1629581rne.12 for ; Sun, 30 Nov 2008 07:53:37 -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:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; bh=nPz98Nxpi67nUjdD2pcdPpoK7vJiirLs+57XpvgHxSc=; b=jJFcSRdJ3/9rkis4TGfVKYBaK0qhcMCtv4c/j9axR+hVWI145kc9Ru6kUmMM6HCga2 NHwsoSO/TrBROdE2qKmm5SaC/OFJzm2ZkRerzYw9/CcZ+6kVzITmNO9oUdVe/09XVo98 PTTXP/+mKvk7Eg1pDivSmrBiM6j2mZJZoBBHE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; b=Qfzs4CAupJysx59LOt8rq34FaPzzLYihHy3SLJQgQBHl/pN2MCSg6Iexz9PCkGXDdc ZwTBRNCfFCQvOTkNrD/0NFamMKUe1MESmMXwlImwRn5OgEpRbvBZ2WUzE6YOSu0rmMQT Q7SWuKsypBxdNxC37/YGeeFtQup3X/QrDnQi0= Received: by 10.90.71.15 with SMTP id t15mr5372628aga.90.1228060417907; Sun, 30 Nov 2008 07:53:37 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 20sm3692151agd.35.2008.11.30.07.53.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 07:53:37 -0800 (PST) Message-ID: <4932B6F7.4020206@gmail.com> Date: Sun, 30 Nov 2008 10:53:27 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Hartmut Brandt References: <49320219.4070804@gmail.com> <4932B193.7030106@dlr.de> In-Reply-To: <4932B193.7030106@dlr.de> X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Cc: freebsd-hackers@freebsd.org Subject: Re: change to make - error when Makefile doesn't exist 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, 30 Nov 2008 15:53:39 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hartmut Brandt wrote: > It is perfectly valid to have no makefile yet to run make. Make has a > number of builtin rules. If, for example, you have a file x.c then 'make > x' or 'make x.o' make will cause make to compile x.c even without a > makefile. But if you have no Makefile, you must specify a target. > Otherwise how would make know what to make? So the error message is > quite exact: it is an error to have no makefile AND to specify no target. > Ah - I was not aware of this - thanks. - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkytvcACgkQtl8kq+nCzNFRTwCfcI3cfiDSC3sprwqOBtf3Xu/r Cy8AnRpNDqoZW1RVD+++12dmp8EqT8X2 =UUnY -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 16:44:19 2008 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 A57811065670 for ; Sun, 30 Nov 2008 16:44:19 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.freebsd.org (Postfix) with ESMTP id 1DB658FC08 for ; Sun, 30 Nov 2008 16:44:19 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-018-042.pools.arcor-ip.net [88.66.18.42]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1L6pP7347a-0003Oz; Sun, 30 Nov 2008 17:44:17 +0100 Received: (qmail 65291 invoked from network); 30 Nov 2008 16:44:17 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by laiers.local with SMTP; 30 Nov 2008 16:44:17 -0000 From: Max Laier Organization: FreeBSD To: Eitan Adler Date: Sun, 30 Nov 2008 17:44:16 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <4931CB02.9070904@gmail.com> <200811300013.54902.max@love2party.net> <493203B2.4070109@gmail.com> In-Reply-To: <493203B2.4070109@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811301744.16947.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+LLMATITNV4lPFFhr4ZosF9BlAXW3A42FvAnz LDe1al3PYP6eshy66nK7qJPIHj50siwzypwA5Uv/M7vO+0sKF6 5kGpAFLY6MpMme2xb/7gg== Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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, 30 Nov 2008 16:44:19 -0000 On Sunday 30 November 2008 04:08:34 Eitan Adler wrote: ... > >> As an aside can anyone point me to a relatively easy bug/feature that I > >> can work on as a beginner C coder? > > > > Check http://www.freebsd.org/projects/ideas/ > > Most of these involve C coding beyond my skill level. Find a project you care about - no matter how difficult it might seem - and start reading code & hacking. If you are truly passionate about your project you can learn quite a bit in short time. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 18:02:13 2008 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 73E27106564A for ; Sun, 30 Nov 2008 18:02:13 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 431238FC13 for ; Sun, 30 Nov 2008 18:02:12 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 8786EAFC1C6; Sun, 30 Nov 2008 08:43:31 -0900 (AKST) From: Mel To: freebsd-hackers@freebsd.org Date: Sun, 30 Nov 2008 18:43:27 +0100 User-Agent: KMail/1.9.7 References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <2A1A4C21-8A2D-4151-BCA0-5FAE1D3BBE86@gmail.com> In-Reply-To: <2A1A4C21-8A2D-4151-BCA0-5FAE1D3BBE86@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200811301843.28564.fbsd.hackers@rachie.is-a-geek.net> Cc: Nikola =?utf-8?q?Kne=C5=BEevi=C4=87?= Subject: Re: How to build kernel module spread on subdirectories? 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, 30 Nov 2008 18:02:13 -0000 On Saturday 29 November 2008 12:40:47 Nikola Kne=C5=BEevi=C4=87 wrote: > On 25 Nov 2008, at 15:20 , Nikola Kne=C5=BEevi=C4=87 wrote: > > I tried to move from OBJS into SRCS (main BSDmakefile now has: SRCS+=3D > > $(ELEMENT_SRCS)), by using something like: > > # subdir0 > > ELEMENT_SRCS__x =3D\ > > subdir1/file0.cc \ > > subdir1/file1.cc > > > > ... > > > > But this fails during the linking phase, because the linker is > > called with subdir1/file0.o, instead of just file0.o. > > > > To make something clear, I didn't just rewrite the GNUmakefile to > > BSDmakefile, I also followed some of the logic used to build kernel > > modules. I'm including bsd.kmod.ko, list sources in SRCS, don't have > > any explicit rule to build .o out of .cc/.c. There is no all: > > target, as well. > > Hi, > > since there were no replies, I went into the various .mk's, and I > found some inconsistencies when building modules. If you have a file > in a different directory, below the directory where you BSDmakefile > is, objects won't be linked nor cleaned properly. The base of the FreeBSD build system, is that SRCS contains file names. Not= =20 pathnames. Use .PATH directive if sources are elsewhere. This is the only=20 thing you cannot easily change and should not globally change. A simple=20 example of this is sbin/fsdb/Makefile which uses sources from sbin/fsck_ffs. If you really need it, you should override compilation rules in your own=20 BSDmakefile, like so: =2Ec.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} =2Ecpp.o: ${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} As a general rule, a directory should contain "one project", use bsd.subdir= =2Emk=20 to descend. Absolute paths in a Makefile only work on YOUR machine, so don't do it. =2D-=20 Mel From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 18:32:07 2008 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 F1B781065675 for ; Sun, 30 Nov 2008 18:32:07 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [66.246.138.153]) by mx1.freebsd.org (Postfix) with ESMTP id C73888FC1B for ; Sun, 30 Nov 2008 18:32:07 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 9591C19067; Sun, 30 Nov 2008 13:32:06 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=-2.2 required=8.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 Received: from tau (unknown [66.45.161.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Sun, 30 Nov 2008 13:32:06 -0500 (EST) Date: Sun, 30 Nov 2008 10:31:56 -0800 From: Bruce Cran To: Eitan Adler Message-ID: <20081130103156.6e4da70c@tau> In-Reply-To: <49329F4A.3070004@gmail.com> References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> <20081130004331.086941f3@tau> <49329F4A.3070004@gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: change to ee.c 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, 30 Nov 2008 18:32:08 -0000 On Sun, 30 Nov 2008 09:12:26 -0500 Eitan Adler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Bruce Cran wrote: > > > The version of ee in FreeBSD is fairly old: the latest from > > http://mahon.cwx.net/ is 1.4.6. > How difficult would it be to bring it up to date? How come it has not > been updated so far? I'd guess it hasn't been updated because it works as it is and nobody has taken an interest in bringing it up to date. I don't know how many patches have been applied locally to it but that would be the main challenge in importing a newer version: you'd have to go through the FreeBSD CVS history and check that any changes/fixes that were made to FreeBSD's version are either already included in the new release or ensure that those changes get re-applied to the new version. -- Bruce Cran From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 19:26:13 2008 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 95FC41065673 for ; Sun, 30 Nov 2008 19:26:13 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 5002D8FC1F for ; Sun, 30 Nov 2008 19:26:13 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.178] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mAUJQCtv095285; Sun, 30 Nov 2008 11:26:12 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4932E8CF.9040501@freebsd.org> Date: Sun, 30 Nov 2008 11:26:07 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eitan Adler References: <4931CB02.9070904@gmail.com> In-Reply-To: <4931CB02.9070904@gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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, 30 Nov 2008 19:26:13 -0000 Eitan Adler wrote: > As an aside can anyone point me to a relatively easy bug/feature that I > can work on as a beginner C coder? There are thousands of such; could you narrow it down a little bit? Are you interested in kernel hacking? Device support? Core libraries? Networking? Utilities? Porting? There are a couple of idea pages floating around and many discussions in public mailing lists, blogs, and other places: * Search the source code for "TODO" or "XXX" to find comments about things that could use cleaning or improvement. As a bonus, these usually comment things that someone thinks should be done, so you might have a little easier job selling your solution. * Search the web for "FreeBSD GSoC" or "FreeBSD Summer of Code" to find ideas that are intended to be 3-month projects targeted at student-level developers. You'll find links both to past projects (a fair number of which are still not yet entirely completed; maybe you could help?) and web pages and mailing list discussions about possible future projects. * Search the web for "Junior Kernel Hacker" for other ideas that people have come up with over the years. * Go to FreeBSD.org and skim the mailing list archives to find ideas and see what problems people are having. hackers@ and current@ are good starting points, some of the more specialized lists can also be interesting reading. You might find problems that you can solve yourself or you might find an ongoing project that could use a little help. Projects like FreeBSD work best when there are several people working on any given area. Of course, how a lot of people get involved is simply to install and use FreeBSD for a little while, and find something that doesn't seem quite right: * a hardware device on your system that's not fully supported? * a utility that doesn't work the way you think it should? * an application that doesn't run on FreeBSD as well as it does on some other platform? In my case, I'd used FreeBSD for many years, decided I didn't like the installer (still don't, by the way) but found that writing a new installer was too big a project for the limited time I had available. So I cast around and found my niche working on archiving tools. (Maybe Ivan Voras is interested in having help with his finstall project?) As you figure it out, it's usually a good idea to ask on mailing lists (hackers@ is good) or IRC to see if other people are encountering the same problem or if someone is already working on something. That kind of discussion can help you get more complete background on a particular problem, including approaches that other people have tried or even partial code for fixes that were never completed. (There's a lot of interesting bits sitting around people's hard drives that are worth the effort to study, test, and fix.) Perhaps most importantly, by talking about your work-in-progress, you have a better chance of connecting with a committer who will help get your work into the tree. A lot of excellent ideas never make it into FreeBSD because the author never talked to anyone until they were "done" and the result couldn't really fit into FreeBSD correctly without a lot more work. On this latter point, it can help to read carefully through old commit logs, study past work in that area, and ask questions specifically of developers who have done work in that area. (Though it's usually better to ask first in a public forum like hackers@ or current@; individual developers are sometimes very busy or on vacation or just slow to respond for various reasons.) Most importantly, have fun and remember that most of us are volunteers who enjoy using and working on FreeBSD in our (often quite limited) spare time. On the one hand, that sometimes makes us slow to answer: If I only have a couple of hours a week, I'd usually rather spend it coding than typing long answers to questions that people could answer themselves. On the other hand, it also means I enjoy talking about FreeBSD and sometimes get carried away writing overly-long email epics with lots of detail about stuff that noone really cares about. Welcome to the zoo! Tim P.S. libarchive has a number of mid-sized projects that I'd like to see done, including improvements to the ISO reader (tar's ability to read ISOs is a popular feature that merits some additional work), RMT support for tar and cpio, a pax front-end, an ISO writer, and a bunch of work to identify common functions in tar and cpio and find clean ways to move them into libarchive so they can be effectively shared. This last in particular doesn't require complex coding since the core functionality is already written, but does require a lot of care with library API design (a subject about which I have strong opinions) and refactoring existing code. From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 19:41:54 2008 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 D76A6106564A for ; Sun, 30 Nov 2008 19:41:54 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id B20528FC14 for ; Sun, 30 Nov 2008 19:41:54 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.178] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mAUJfZtv095340; Sun, 30 Nov 2008 11:41:35 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4932EC6A.1070205@freebsd.org> Date: Sun, 30 Nov 2008 11:41:30 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eitan Adler References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> In-Reply-To: <493214DC.2080904@gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: change to ee.c 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, 30 Nov 2008 19:41:54 -0000 Eitan Adler wrote: > Xin LI wrote: >>Tanks for interested in this but I'm afraid that your patch is >>incorrect. mkstemp returns a file descriptor rather than a string >>pointer, therefore, the subsequent open() would have undefined behavior. >> It looks like that we actually want fd = mkstemp() here. > > Thanks. If this is the case how come gcc did not return any warnings? Try to think of compiler warnings as a luxury. For a variety of reasons (some having to do with the somewhat permissive nature of the C language), it's extremely hard for the compiler to detect anything other than the most blatant screw-ups. Whenever using a new function, pay very careful attention to the man pages: man mkstemp clearly says that mkstemp returns a file descriptor: "The mkstemp() function ... creates the template file, mode 0600, returning a file descriptor opened for reading and writing." Tim From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 20:31:45 2008 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 A7F321065673 for ; Sun, 30 Nov 2008 20:31:45 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from flat.berklix.org (flat.berklix.org [83.236.223.115]) by mx1.freebsd.org (Postfix) with ESMTP id 263C08FC13 for ; Sun, 30 Nov 2008 20:31:44 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.net (p549A55D6.dip.t-dialin.net [84.154.85.214]) (authenticated bits=0) by flat.berklix.org (8.13.8/8.13.8) with ESMTP id mAUKEVii031710; Sun, 30 Nov 2008 21:14:36 +0100 (CET) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.net (8.13.8/8.13.8) with ESMTP id mAUKEKaV042230; Sun, 30 Nov 2008 21:14:21 +0100 (CET) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.3/8.14.3) with ESMTP id mAUKE5YF046736; Sun, 30 Nov 2008 21:14:15 +0100 (CET) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200811302014.mAUKE5YF046736@fire.js.berklix.net> To: Andriy Gapon , freebsd-hackers@freebsd.org From: "Julian Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://berklix.com In-reply-to: Your message "Sun, 30 Nov 2008 16:24:37 +0100." <20081130162437.1bae4371@ernst.jennejohn.org> Date: Sun, 30 Nov 2008 21:14:05 +0100 Sender: jhs@berklix.org Cc: Subject: Re: dd if=/dev/mem can hang a machine? 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, 30 Nov 2008 20:31:45 -0000 Gary Jennejohn wrote: > On Fri, 28 Nov 2008 15:28:35 +0200 > Andriy Gapon wrote: > > > > > I have a new machine with DG33TL mainboard (ICH9/G33). > > In a course of some hacking I ran dd if=/dev/mem ... to scan all memory, > > this caused the machine to hang. > > I tried to reproduce and this is 100% reproducible. > > > > I am not used to such behavior. In older days I could scan all the > > memory without any issues. > > > > Could this be related to some modern form of memory-mapped IO? Or to > > Intel Management Engine (that seems t bite into DRAM)? > > Or something else? > > > > Just wondering. > > > > That's what I would assume. With some hardware just reading a register > can be harmful. I just crashed 3 normally stable machines trying that. I only tried for casual interest. I acknowledge Gary's comment above :-) dd if=/dev/mem of=/dev/null FreeBSD lapa.js.berklix.net 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Fri Jul 7 17:56:30 CEST 2006 jhs@lapa.jhs.private:/usr/src/sys/compile/LAPA.small i386 FreeBSD laps.js.berklix.net 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Mon Sep 8 15:39:53 CEST 2008 jhs@laps.js.berklix.net:/usr1/ftp/pri/FreeBSD/releases/7.0-RELEASE/src/sys/i386/compile/LAPS.small i386 FreeBSD john.js.berklix.net 7.1-BETA2 FreeBSD 7.1-BETA2 #0: Sun Oct 12 20:59:28 UTC 2008 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Cheers, Julian -- Julian Stacey: BSDUnixLinux C Prog Admin SysEng Consult Munich www.berklix.com Mail plain ASCII text. HTML & Base64 text are spam. www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 22:57:11 2008 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 676DE106564A for ; Sun, 30 Nov 2008 22:57:11 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id E20728FC13 for ; Sun, 30 Nov 2008 22:57:10 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1558863fgb.35 for ; Sun, 30 Nov 2008 14:57:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:cc:x-mailer; bh=oPbMcGsMg0nj6xB23pM/SFTGNr9501ghevvC0jA0/m8=; b=gYYVkfjAFjVhCNDRA87bhp9YwP0AW+TzDsccjfgt99nNgyuQes+LbxOW8dBDhSYs0a mFsF8qSD62ZyvlloQFqH5HEFLv/u4zolkqvgivhPi2M6+N449Ruh811HgS1OW8mJujxg toidw5LQjdIVDlHtIA5+APNDDI48R+25H1grM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:cc:x-mailer; b=d/ADRX+YnkqKwL9uaP5zn1iQachc4c9NKKs7AxARWvN9yfTN1xWepHZDsYLUSDh1Gq PY/KL89waBnqDckOc93y7EL8UTJ6ucRn1nGHhiZcwJCI7ljMMvLYlvmcpDdEDRuZNtlK r6vOg5Oy5IeOVIIWo/6cnwKDMtoKthZHhaupo= Received: by 10.181.234.5 with SMTP id l5mr3693364bkr.124.1228085829601; Sun, 30 Nov 2008 14:57:09 -0800 (PST) Received: from ?192.168.1.11? (dyn.144-85-148-114.dsl.vtx.ch [144.85.148.114]) by mx.google.com with ESMTPS id b17sm7906903fka.27.2008.11.30.14.57.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 14:57:08 -0800 (PST) References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <2A1A4C21-8A2D-4151-BCA0-5FAE1D3BBE86@gmail.com> <200811301843.28564.fbsd.hackers@rachie.is-a-geek.net> Message-Id: <94D09AB0-86B6-4D91-BD61-AB02A12CC260@gmail.com> From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: Mel In-Reply-To: <200811301843.28564.fbsd.hackers@rachie.is-a-geek.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Sun, 30 Nov 2008 23:57:07 +0100 X-Mailer: Apple Mail (2.929.2) Cc: freebsd-hackers@freebsd.org Subject: Re: How to build kernel module spread on subdirectories? 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, 30 Nov 2008 22:57:11 -0000 On 30 Nov 2008, at 18:43 , Mel wrote: >> since there were no replies, I went into the various .mk's, and I >> found some inconsistencies when building modules. If you have a file >> in a different directory, below the directory where you BSDmakefile >> is, objects won't be linked nor cleaned properly. > > The base of the FreeBSD build system, is that SRCS contains file > names. Not > pathnames. Use .PATH directive if sources are elsewhere. This is the > only Hi Mel, thanks for the clarification. I didn't know that SRCS has to contain only filenames. > thing you cannot easily change and should not globally change. A > simple > example of this is sbin/fsdb/Makefile which uses sources from sbin/ > fsck_ffs. > > If you really need it, you should override compilation rules in your > own > BSDmakefile, like so: > .c.o: > ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} > > .cpp.o: > ${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} > So, I'm now using only filenames in SRCS and the .PATH target. As I described in my initial mail, I have to use two makefiles. One is the main Makefile, while the other has to be generated. In the generated .mk, I add to the SRCS, and I create the .PATH target with other (necessary) directories. Unfortunately, make depend doesn't work as it should be. This is the important snippet of my BSDmakefile: ---8<--- elements.mk: elements.conf $(CLICKDIR)/click-buildtool elem2make --bsd elements.conf > elements.mk .MAKEFILEDEPS: elements.mk .sinclude "elements.mk" .include --->8--- When I run make depend, it only includes SRCSs from BSDmakefile, not those from elements.mk. Is there a way to overcome this? I can manually run make elements.mk, but it is a bit tedious. Cheers, Nikola From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 22:57:39 2008 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 F2F441065673 for ; Sun, 30 Nov 2008 22:57:39 +0000 (UTC) (envelope-from simias.n@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9578FC16 for ; Sun, 30 Nov 2008 22:57:39 +0000 (UTC) (envelope-from simias.n@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so894923eyi.7 for ; Sun, 30 Nov 2008 14:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=9wuttL+Z8Lln/0UkDfY9ebIg5kwTjxCProZmylo+JgE=; b=HzoTmXGDzU/J8n3o7jHAn79Str4yer6zDtgYEZaoxlCsLlsM33yC5DH+a3J5Gb43df T5uR/oRN8Y1Q++iWUW6r30hawzm3yrpQ/uqv2XGLdhIJGqn77tFI9IH4b/svcVWA1juj OhxEvf5juLvv5GEEobbxnG6IMTEdNmfZ4NdIE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=YpDAE0+OF2bYxVbjdCLO1H0imTCPOEveEuvs5+V5HsKEZjZnjogtwWawumj4sWfoHd s1flBm9pX6xqFw/ezF+eUoAHH7Z7DTMiYIZvKing4WWhMQKVcd8VtANzPEwwh/DS+YaN LeVGd714lpYRqeozoKlk1s3o2ZSz+3MATCpAo= Received: by 10.210.104.20 with SMTP id b20mr11846966ebc.29.1228084136002; Sun, 30 Nov 2008 14:28:56 -0800 (PST) Received: from localhost (home.svkt.org [82.243.51.8]) by mx.google.com with ESMTPS id c4sm17696493nfi.13.2008.11.30.14.28.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 14:28:54 -0800 (PST) Date: Mon, 1 Dec 2008 00:28:52 +0100 From: Lionel Flandrin To: ancelgray Message-ID: <20081130232851.GA1214@casibsd.svkt.org> References: <20080121170155.GC51116@hamlet.SetFilePointer.com> <20713056.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20713056.post@talk.nabble.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Hardware support for AMD Geode CS5536 audio? 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, 30 Nov 2008 22:57:40 -0000 On Wed, Nov 26, 2008 at 07:30:41PM -0800, ancelgray wrote: > > To AMD CS5536 users: > > This is Andrew Gray. I have finished the audio driver for the AMD CS5536 > companion > chip. It is working on a PC Engines Alix 1C low power board under FreeBSD > 7.0. > It can be found at: > > http://modelofreality.org/snd_amd5536.html > > Let me know how it goes. I own a fitpc[1] that runs an AMD Geode CPU with the AMD CS5536 chip. I followed the README (kldloaded the module, ran the two sysctl) and everything seemed to work fine: - As soon as I loaded the module I got (in the system messages): pcm0: port 0xd400-0xd47f irq 10 at device 15.3 on pci0 pcm0: [ITHREAD] pcm0: - cat /dev/sndstat says: FreeBSD Audio Driver (newpcm: 32bit 2007061600/i386) Installed devices: pcm0: at io 0xd400 irq 10 kld snd_cs5536 [MPSAFE] \ (2p:0v/1r:0v channels duplex default) However if I try to play something with mpg123 I get no sound and "pcm0: bm0 bus master error" every half second or so in the system messages. Please tell me if there's anything else I can provide to help you. [1] http://www.fit-pc.com/new/fit-pc-1-0-specifications.html Cheers, -- Lionel Flandrin From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 00:22:59 2008 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 02E661065670 for ; Mon, 1 Dec 2008 00:22:59 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id CED7A8FC0A for ; Mon, 1 Dec 2008 00:22:58 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.178] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mB10Mvtv096318; Sun, 30 Nov 2008 16:22:58 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <49332E5C.9020303@freebsd.org> Date: Sun, 30 Nov 2008 16:22:52 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?UTF-8?B?Tmlrb2xhIEtuZcW+ZXZpxIc=?= References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <2A1A4C21-8A2D-4151-BCA0-5FAE1D3BBE86@gmail.com> <200811301843.28564.fbsd.hackers@rachie.is-a-geek.net> <94D09AB0-86B6-4D91-BD61-AB02A12CC260@gmail.com> In-Reply-To: <94D09AB0-86B6-4D91-BD61-AB02A12CC260@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Mel , freebsd-hackers@freebsd.org Subject: Re: How to build kernel module spread on subdirectories? 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 Dec 2008 00:22:59 -0000 Nikola Knežević wrote: > As I described in my initial mail, I have to use two makefiles. One is > the main Makefile, while the other has to be generated. In the > generated .mk, I add to the SRCS, and I create the .PATH target with > other (necessary) directories. Unfortunately, make depend doesn't work > as it should be. > .MAKEFILEDEPS: elements.mk > > .sinclude "elements.mk" > .include > --->8--- > > When I run make depend, it only includes SRCSs from BSDmakefile, not > those from elements.mk. I would try adding a "beforedepend" requirement: beforedepend: elements.mk Look at /usr/share/mk/bsd.dep.mk, which has the 'make depend' logic. It supports optional "beforedepend" and "afterdepend" targets. Tim From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 01:39:34 2008 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 F34FF106564A for ; Mon, 1 Dec 2008 01:39:33 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 834F78FC08 for ; Mon, 1 Dec 2008 01:39:33 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by ey-out-2122.google.com with SMTP id 6so911464eyi.7 for ; Sun, 30 Nov 2008 17:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:reply-to:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=LNtxrJnah3LIoYo+XTblO89w2zzy9Qq3CZR7Um0A8G4=; b=ttYepeJlrkyLOdEZ7ubGIVD+NJ7u5y5jjyixDVu7owLG6JZOBFNnp+dtdKXhPdnv8J tGt9rxtePtLbRH8ARCK8/F25UcjiHu99xFkLQDPMQqWU5RjQeVfj22VMZwaABbjzga/l MWfvpLzYN6oeBHhhbjSz6hKsBB1eMH9JtAeQo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to :mime-version:content-type:content-disposition:user-agent; b=uSExmBRoldiKVeCljoeXKTTjuCxxheLubMFPQJF4/eiUXp4uOVErfTfWuQKMbIcZqO SdQoIMU0qq9gCL0LatRM9PwzkaXPeP6x4zankfvR3xyE8WGXmHC/I/gJ9q/kMbyT9hhF PZBBhOWHWfptxP2UjGCtpDPgyrs2nA/kgqnGU= Received: by 10.103.172.9 with SMTP id z9mr4283641muo.109.1228095571836; Sun, 30 Nov 2008 17:39:31 -0800 (PST) Received: from localhost (BAJ3022.baj.pppool.de [77.137.48.34]) by mx.google.com with ESMTPS id 14sm7351790muo.39.2008.11.30.17.39.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 17:39:30 -0800 (PST) Date: Mon, 1 Dec 2008 02:38:51 +0100 From: Alexej Sokolov To: freebsd-hackers@freebsd.org Message-ID: <20081201013851.GA20549@debian.samsung.router> Mail-Followup-To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: remapping kernel buffer in VMS of user process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexej Sokolov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 01:39:34 -0000 Hello, I would like to remap some buffers allocated in kernel space to memory space of certain process. For Example, in attach function of driver: static int driver_attach { ... struct vmspace *vms = some_thread->td_proc->p_vmspace; bufp = malloc (PAGE_SIZE, M_DEVBUF, M_NOWAIT); /* How to create in vms of some_thread->td_proc remapping of buffer pointed (in kernel) by bufp ? some_thread should access the buffer using its virtual user addresses and driver should access the same data using its kernel virtual addresses (bufp) */ ... } -- Alexej Sokolov From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 02:22:39 2008 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 EF9C61065670 for ; Mon, 1 Dec 2008 02:22:39 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id A133D8FC1B for ; Mon, 1 Dec 2008 02:22:39 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so867913ywe.13 for ; Sun, 30 Nov 2008 18:22:38 -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:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; bh=9crXAEz7z+3cgzBzmjomRf4YWHnaJMsHVls+l9A/Ew0=; b=x+TUK1I8ufUreR7+eVDWDhKGuflYO0Wokv0+OOmyoh9aUhJtxGghwU+wKZSIramPdu Ar/MEget/D0lMKfZZDw0UZGuaovYWclvRUN8tpgfHceK+A+FAigXjLpJdEkV49GLddnC +6b2t1qLyJ5G8t1RCRqC7wjEIRFRryNHV08pE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; b=vr5k97zFAnFuR5MC1A+88Xes6CqZsAXjxX0hmK/sU0tfAZR7atyrpcWQulsVa0drkA DjENQEOunJQbSH2dS9KnzaeVqvNtmQ6GyL3WQoL6KPUijp5fK9sQ8PUHCzz9AyiMrz0M 9A6Z76biwpuZUBeolgnLFFu4qROhx/McgsS5E= Received: by 10.90.84.2 with SMTP id h2mr5544898agb.42.1228098158737; Sun, 30 Nov 2008 18:22:38 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 18sm4161886agb.12.2008.11.30.18.22.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 18:22:37 -0800 (PST) Message-ID: <49334A62.7000800@gmail.com> Date: Sun, 30 Nov 2008 21:22:26 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Tim Kientzle References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> In-Reply-To: <4932E8CF.9040501@freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit From: Eitan Adler Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 02:22:40 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tim Kientzle wrote: > Eitan Adler wrote: > There are thousands of such; could you narrow it down > a little bit? Are you interested in kernel hacking? > Device support? Core libraries? Networking? Utilities? > Porting? Utilities mostly for now. > > * Search the source code for "TODO" or "XXX" to find > comments about things that could use cleaning or > improvement. As a bonus, these usually comment things > that someone thinks should be done, so you might have > a little easier job selling your solution. *slaps self for not thinking of this* Thanks for reminding me of this. I'm now working on * TODO: Make this better, so that "./a//b/./c/" == "a/b/c" part of src/usr.bin/tar/util.c I found a copy of abspath() in usr.sbin/pkg_install/info/perform.c This is the exact function needed to fix the TODO. Where should I move the function to so that they could share it? Should I just copy the function (for some reason I doubt it)? realpath(3) is in sys/param.h and stdlib.h Should I move the function there? > * Search the web for "FreeBSD GSoC" or "FreeBSD Summer of Code" > to find ideas that are intended to be 3-month projects > targeted at student-level developers. Interesting idea - thanks > Perhaps most importantly, by talking about your > work-in-progress, you have a better chance of connecting > with a committer who will help get your work into the > tree. A lot of excellent ideas never make it into > FreeBSD because the author never talked to anyone > until they were "done" and the result couldn't really fit > into FreeBSD correctly without a lot more work. I will do this > On the other hand, it also means I enjoy talking about FreeBSD > and sometimes get carried away writing overly-long email > epics with lots of detail about stuff that noone really > cares about. I really hope you don't think I'm no one. > > Welcome to the zoo! Thanks? > > Tim > > P.S. libarchive has a number of mid-sized projects... I actually picked this project after greping for TODO but before reading this. Interesting. - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEUEARECAAYFAkkzSmIACgkQtl8kq+nCzNFeYQCdGydbomyScD3HCFPq9Y6MgGsw GLYAlRTb0Dv0IDHbHOivsmNdD0kyBiA= =WUos -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 02:59:21 2008 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 54E991065670 for ; Mon, 1 Dec 2008 02:59:21 +0000 (UTC) (envelope-from gnemmi@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id 06C298FC08 for ; Mon, 1 Dec 2008 02:59:20 +0000 (UTC) (envelope-from gnemmi@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so488067qwb.7 for ; Sun, 30 Nov 2008 18:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=0rFSOqfC0b8P46OamDTaWx2uPrkeqSLypMjYEP7OXpQ=; b=kChMltHTNV40gkSKeRS+Q6lGdvwcU82gwIUWs16cXbke8n/Co+fuirI8o2i9I1K0U3 pUD+W/4tjIHg8qAAltTC2EvoAo3KM8fJmo9PFPkNd8HKR7MLQKhkmvQ32B/3X0oc7zmg T0f2pW0pYVaWnUIvbPyUHVKVI7kr3ohlgBhds= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=ARHaFnL0b/BTtCB5Hd28BgP1NnzKY5rYb/Lg//yU8/GnsT7os7vUzQv6agGmWBkIiD p0Dh8FrZ8x2LOH09TvevKD+7r4siItUo9QutMDdhOUk5vBEtq1t44fFO35lcGfpW4OzG gVyQmzX0k0Srogafe9BVJI0PsSmnhx88ckspY= Received: by 10.214.148.19 with SMTP id v19mr9125827qad.351.1228099098459; Sun, 30 Nov 2008 18:38:18 -0800 (PST) Received: from ?192.168.1.2? ([190.177.225.251]) by mx.google.com with ESMTPS id 34sm8298268yxl.8.2008.11.30.18.38.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Nov 2008 18:38:17 -0800 (PST) From: Gonzalo Nemmi To: freebsd-hackers@freebsd.org Date: Mon, 1 Dec 2008 00:38:16 -0200 User-Agent: KMail/1.9.10 References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> In-Reply-To: <4932E8CF.9040501@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812010038.16064.gnemmi@gmail.com> Cc: Tim Kientzle Subject: Re: keeping track of local modifications 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 Dec 2008 02:59:21 -0000 On Sunday 30 November 2008 5:26:07 pm Tim Kientzle wrote: > Eitan Adler wrote: > > As an aside can anyone point me to a relatively easy bug/feature that I > > can work on as a beginner C coder? > > There are thousands of such; could you narrow it down > a little bit? Are you interested in kernel hacking? > Device support? Core libraries? Networking? Utilities? > Porting? > > There are a couple of idea pages floating around and > many discussions in public mailing lists, blogs, and other > places: > > * Search the source code for "TODO" or "XXX" to find > comments about things that could use cleaning or > improvement. As a bonus, these usually comment things > that someone thinks should be done, so you might have > a little easier job selling your solution. > > * Search the web for "FreeBSD GSoC" or "FreeBSD Summer of Code" > to find ideas that are intended to be 3-month projects > targeted at student-level developers. You'll find links > both to past projects (a fair number of which are still > not yet entirely completed; maybe you could help?) and > web pages and mailing list discussions about possible > future projects. > > * Search the web for "Junior Kernel Hacker" for other > ideas that people have come up with over the years. > > * Go to FreeBSD.org and skim the mailing list archives > to find ideas and see what problems people are having. > hackers@ and current@ are good starting points, some > of the more specialized lists can also be interesting > reading. You might find problems that you can solve > yourself or you might find an ongoing project that > could use a little help. Projects like FreeBSD work best > when there are several people working on any given area. > > Of course, how a lot of people get involved is simply > to install and use FreeBSD for a little while, and find > something that doesn't seem quite right: > * a hardware device on your system that's not fully supported? > * a utility that doesn't work the way you think it should? > * an application that doesn't run on FreeBSD as well as it > does on some other platform? > > In my case, I'd used FreeBSD for many years, decided I didn't > like the installer (still don't, by the way) but found that > writing a new installer was too big a project for the limited > time I had available. So I cast around and found my niche > working on archiving tools. (Maybe Ivan Voras is interested > in having help with his finstall project?) > > As you figure it out, it's usually a good idea to ask > on mailing lists (hackers@ is good) or IRC to see if > other people are encountering the same problem or if > someone is already working on something. That kind of > discussion can help you get more complete background > on a particular problem, including approaches that other > people have tried or even partial code for fixes that > were never completed. (There's a lot of interesting > bits sitting around people's hard drives that are > worth the effort to study, test, and fix.) > > Perhaps most importantly, by talking about your > work-in-progress, you have a better chance of connecting > with a committer who will help get your work into the > tree. A lot of excellent ideas never make it into > FreeBSD because the author never talked to anyone > until they were "done" and the result couldn't really fit > into FreeBSD correctly without a lot more work. > > On this latter point, it can help to read carefully > through old commit logs, study past work in that area, > and ask questions specifically of developers who have > done work in that area. (Though it's usually better to > ask first in a public forum like hackers@ or current@; > individual developers are sometimes very busy or on > vacation or just slow to respond for various reasons.) > > Most importantly, have fun and remember that most of us are > volunteers who enjoy using and working on FreeBSD in our (often > quite limited) spare time. On the one hand, that sometimes > makes us slow to answer: If I only have a couple of hours > a week, I'd usually rather spend it coding than typing > long answers to questions that people could answer themselves. > On the other hand, it also means I enjoy talking about FreeBSD > and sometimes get carried away writing overly-long email > epics with lots of detail about stuff that noone really > cares about. Eitan cares and I do too ... Thanks a lot for your _really_good_ email :) -- Blessings Gonzalo Nemmi From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 04:40:35 2008 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 60F7C1065670 for ; Mon, 1 Dec 2008 04:40:35 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.freebsd.org (Postfix) with ESMTP id 4325B8FC17 for ; Mon, 1 Dec 2008 04:40:35 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.14.3/8.14.3) with ESMTP id mB14KbrS044206 for ; Sun, 30 Nov 2008 20:20:37 -0800 (PST) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.14.3/8.14.3/Submit) id mB14Kbxp044205 for hackers@freebsd.org; Sun, 30 Nov 2008 20:20:37 -0800 (PST) (envelope-from steve) Date: Sun, 30 Nov 2008 20:20:37 -0800 From: Steve Watt To: hackers@freebsd.org Message-ID: <20081201042037.GA43208@wattres.Watt.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Callsign: KD6GGD X-Archived: 1228105237.611737844@wattres.Watt.COM X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (wattres.watt.com [127.0.0.1]); Sun, 30 Nov 2008 20:20:37 -0800 (PST) Cc: Subject: tcsh loses the foreground process group? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Steve Watt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 04:40:35 -0000 (Please don't cc: me on replies, I can usually keep up with -hackers.) I've run into this about 5 or 6 times recently, and it seems to have survived the last couple of world updates. I'm running 6-STABLE (6.4-PRE as of 24 Nov right now), tcsh 6.15.00, which shows tcsh 6.15.00 (Astron) 2007-03-03 (i386-intel-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec as $version. The symptom is that when I do a long-ish running task inside a `` expansion that I then ^C, nobody gets the foreground process group... I never get a prompt back after the ^C, and ^T gets me load: 0.27 no foreground process group Sending SIGCHLD and/or SIGCONT to the tcsh doesn't seem to make any difference at all. The tcsh is sitting in "pause" WCHAN, which seems sensible. A truss on tcsh reveals (oddly enough) that it's sitting in sigsuspend(). Sending it signals makes it loop through a wait4() call and go back into sigsuspend(). It happens running either as root (from sudo) or as a regular user. It happens under xterm, under ssh sessions, and on a direct console login. One portable reproduction: # cd /usr/src # less `egrep -lir '^Foo.*baz' *` ^Cload: 0.02 no foreground process group (I typed ^C ^T) SIGKILL to the shell seems to be the only way to get things back to normal. I'm not sure how to isolate it further - it seems likely that this is a bug in the kernel, rather than in tcsh, but the session management stuff is pretty hairy in both places. Does anyone have debugging thoughts? -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.5" / 37N 20' 15.3" Internet: steve @ Watt.COM Whois: SW32-ARIN Free time? There's no such thing. It just comes in varying prices... From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 06:19:41 2008 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 34D891065675 for ; Mon, 1 Dec 2008 06:19:41 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 12ED68FC24 for ; Mon, 1 Dec 2008 06:19:41 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.178] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mB16Jetv097398; Sun, 30 Nov 2008 22:19:40 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <493381F7.4090301@freebsd.org> Date: Sun, 30 Nov 2008 22:19:35 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eitan Adler References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49334A62.7000800@gmail.com> In-Reply-To: <49334A62.7000800@gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 06:19:41 -0000 >>* Search the source code for "TODO" or "XXX" to find >> comments ... > > *slaps self for not thinking of this* > Thanks for reminding me of this. I'm now working on > * TODO: Make this better, so that "./a//b/./c/" == "a/b/c" > part of src/usr.bin/tar/util.c > I found a copy of abspath() in usr.sbin/pkg_install/info/perform.c > This is the exact function needed to fix the TODO. > > Where should I move the function to so that they could share it? Should > I just copy the function (for some reason I doubt it)? > realpath(3) is in sys/param.h and stdlib.h > Should I move the function there? Ah. You picked one of mine. I'll follow up with you off-list. ;-) Tim From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 06:36:49 2008 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 001BC106564A; Mon, 1 Dec 2008 06:36:48 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id BC4DC8FC0C; Mon, 1 Dec 2008 06:36:48 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id mB16Cuwv000785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 30 Nov 2008 22:12:56 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id mB16CuaK000781; Sun, 30 Nov 2008 22:12:56 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA03138; Sun, 30 Nov 08 22:03:27 PST Date: Sun, 30 Nov 2008 22:07:00 -0800 From: perryh@pluto.rain.com To: kientzle@freebsd.org Message-Id: <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> In-Reply-To: <4932E8CF.9040501@freebsd.org> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 06:36:49 -0000 Tim Kientzle wrote: > ... most of us are volunteers who enjoy using and working on > FreeBSD in our (often quite limited) spare time ... If I only > have a couple of hours a week, I'd usually rather spend it coding > ... Sounds familiar :) Getting back to the OP's original question, and in light of the limited time that many of us have available, I was wondering which of the readily-available VCS would impose the least overhead on someone who has very little experience with any open source VCS (and thus is going to have to learn *something* new). After looking at the pages recommended by others in this thread, I wonder if there are other possibilities which one should consider. * http://wiki.freebsd.org/SubversionPrimer I got the impression that SVN is quite resource-hungry, both in disk space and in bandwidth, and has an extremely steep learning curve. While a committer clearly has to deal with SVN, I was left wondering if it really had much to offer the more casual hacker, esp. one who is not already familiar with it. In particular, given that one will likely have already installed /usr/src/... from the distribution, I was put off by the apparent need to download another entire instance. * http://wiki.freebsd.org/LocalMercurial This seems less of a resource hog, and (if I am understanding matters correctly) is able to start from the installed /usr/src/... rather than requiring the would-be hacker to download a redundant instance, but I was concerned that the page may not be up to date with current FreeBSD development methodology (e.g. csup vs cvsup). In case it makes any difference, I've used SCCS and RCS a little (but neither all that recently), and have been using ClearCase a great deal for the last several years (but it is not a candidate for this inquiry since I'm not licensed to use it outside the office). From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 07:07:10 2008 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 BDB2A1065676 for ; Mon, 1 Dec 2008 07:07:10 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 9692F8FC17 for ; Mon, 1 Dec 2008 07:07:10 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.178] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mB1776tv097594; Sun, 30 Nov 2008 23:07:06 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <49338D15.7080803@freebsd.org> Date: Sun, 30 Nov 2008 23:07:01 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: perryh@pluto.rain.com References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> In-Reply-To: <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 07:07:10 -0000 perryh@pluto.rain.com wrote: > Tim Kientzle wrote: > >>... most of us are volunteers who enjoy using and working on >>FreeBSD in our (often quite limited) spare time ... If I only >>have a couple of hours a week, I'd usually rather spend it coding >>... > > Sounds familiar :) > > Getting back to the OP's original question, and in light of the > limited time that many of us have available, I was wondering which of > the readily-available VCS would impose the least overhead on someone > who has very little experience with any open source VCS (and thus is > going to have to learn *something* new). No matter what, I would plan on devoting at least a long weekend to learning a new VCS and getting a local mirror set up. In terms of learning new skills, I don't think you'll go far wrong with any of SVN, Hg, or git. For my part, I actually like SVN quite a lot. In part because it's close enough to CVS (which is in turn close to RCS) for folks familiar with that model to transition pretty easily. I've never used Mercurial or Git, so can't say anything for sure about those. It sounds like it's a little trickier to set up a local SVN mirror than one of the others. In terms of disk and bandwidth, I think SVNs requirements have been overstated just a bit. Unless you have pretty tight disk constraints or a pretty slow connection, I don't think you'll really notice the difference. Tim From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 07:30:20 2008 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 E92C71065677 for ; Mon, 1 Dec 2008 07:30:20 +0000 (UTC) (envelope-from max@love2party.net) Received: from mout-bounce.kundenserver.de (mout-bounce.kundenserver.de [212.227.17.1]) by mx1.freebsd.org (Postfix) with ESMTP id 7D42F8FC0A for ; Mon, 1 Dec 2008 07:30:20 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-022-193.pools.arcor-ip.net [88.66.22.193]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1L73EY3Jdf-0003o1; Mon, 01 Dec 2008 08:30:19 +0100 Received: (qmail 77995 invoked from network); 1 Dec 2008 07:30:17 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by router.laiers.local with SMTP; 1 Dec 2008 07:30:17 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Mon, 1 Dec 2008 08:30:16 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> In-Reply-To: <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812010830.17259.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/pFDJWYNibMSFrHjcRKJ4E+grl5VoCUXPuT1F tLNetFG2EkzlVQCQdV286uWX+4r/bPhr/GsZWYJQ2Xzx79hwLU gT6k45cx4TKIixZiKLyjg== Cc: kientzle@freebsd.org, perryh@pluto.rain.com Subject: Re: keeping track of local modifications 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 Dec 2008 07:30:21 -0000 On Monday 01 December 2008 07:07:00 perryh@pluto.rain.com wrote: > Tim Kientzle wrote: > > ... most of us are volunteers who enjoy using and working on > > FreeBSD in our (often quite limited) spare time ... If I only > > have a couple of hours a week, I'd usually rather spend it coding > > ... > > Sounds familiar :) > > Getting back to the OP's original question, and in light of the > limited time that many of us have available, I was wondering which of > the readily-available VCS would impose the least overhead on someone > who has very little experience with any open source VCS (and thus is > going to have to learn *something* new). After looking at the pages > recommended by others in this thread, I wonder if there are other > possibilities which one should consider. > > * http://wiki.freebsd.org/SubversionPrimer > > I got the impression that SVN is quite resource-hungry, both in > disk space and in bandwidth, and has an extremely steep learning > curve. While a committer clearly has to deal with SVN, I was left > wondering if it really had much to offer the more casual hacker, > esp. one who is not already familiar with it. In particular, given > that one will likely have already installed /usr/src/... from the > distribution, I was put off by the apparent need to download > another entire instance. > > * http://wiki.freebsd.org/LocalMercurial > > This seems less of a resource hog, and (if I am understanding > matters correctly) is able to start from the installed /usr/src/... > rather than requiring the would-be hacker to download a redundant > instance, but I was concerned that the page may not be up to date > with current FreeBSD development methodology (e.g. csup vs cvsup). If you want to contribute back, this is *not* the way to go. Patches from anything other than SVN and maybe CVS are mostly useless. The local hg/git approach is nice if you are already familiar with hg or git and just want to keep some patch sets for yourself. If you are looking to keep/develop a patch set and eventually share it with the world, svn or svk is the way to go. Yes, a full svk mirror takes up 3.5g of space, but that's not even two bucks at today's storage costs. The issue with the initial setup is a different thing, but once that is done (at your local university, employer, or the like) svn/svk is really resource efficient. On top of that you will find that "svn ann" is a very powerful tool to figure out why a certain line of code is the way it is (much more pleasant to use than cvsweb, too - esp. when you are on a slow network connection). So it really depends on what your goal is. If you are (as the OP) looking to contribute back to the community, there is really no way around svn - sorry. If you are looking for some means to store your favorite patches from the lists and some of your own, the local hg/git stuff might be a better fit. > In case it makes any difference, I've used SCCS and RCS a little (but > neither all that recently), and have been using ClearCase a great > deal for the last several years (but it is not a candidate for this > inquiry since I'm not licensed to use it outside the office). No idea about ClearCase, but SCCS and RCS are not too far away from SVN ... natural progression. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 08:13:12 2008 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 72FF210656D5 for ; Mon, 1 Dec 2008 08:13:12 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from n19.bullet.mail.mud.yahoo.com (n19.bullet.mail.mud.yahoo.com [68.142.206.146]) by mx1.freebsd.org (Postfix) with SMTP id 44BE78FC0A for ; Mon, 1 Dec 2008 08:13:12 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from [68.142.200.221] by n19.bullet.mail.mud.yahoo.com with NNFMP; 01 Dec 2008 08:00:16 -0000 Received: from [68.142.201.244] by t9.bullet.mud.yahoo.com with NNFMP; 01 Dec 2008 08:00:16 -0000 Received: from [127.0.0.1] by omp405.mail.mud.yahoo.com with NNFMP; 01 Dec 2008 08:00:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 63549.88812.bm@omp405.mail.mud.yahoo.com Received: (qmail 81930 invoked by uid 60001); 1 Dec 2008 08:00:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=Q9fUBl0CWoFmrjHUL206Ly6QJIbr6fFP50tNAl1wV6aMjbHeKK4dEtQTz3XGeEFEOLBXUzC66jUCl4Ygzr2qzPr1e4fX9pYAxPuQ7qSUWOV8KhB4YkysHvviR/o810u5FUDJgfZnLC9WJLHbDKk1Oumb/8G1sMAGQJBZFPkzFmc=; Received: from [58.71.34.137] by web45809.mail.sp1.yahoo.com via HTTP; Mon, 01 Dec 2008 00:00:12 PST X-Mailer: YahooMailRC/1155.32 YahooMailWebService/0.7.260.1 Date: Mon, 1 Dec 2008 00:00:12 -0800 (PST) From: Won De Erick To: freebsd-hardware@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <547602.79284.qm@web45809.mail.sp1.yahoo.com> Cc: Subject: Watchdog for Boser (HS-7001) 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 Dec 2008 08:13:12 -0000 Hello, I was trying the assembly language program that is specified in the following document (p24) to set, reset the built-in watchdog timer for the Boser Box. http://www.boser.com.tw/manual/HS-7001v1.1.pdf I then installed nasm in FreeBSD 6.2, and added the following lines at the beginning. section .text global _start _start: I did assemble, link (ld) and got no error. But when I run, I got the following error: # ./watchdog.out Bus error (core dumped) I noticed that the port addresses used are similar with the following used by Super Micro Computer. I don't know if these are standards or not. I suspect that the boards are using same controller chips from Intel. I've been googling the web for more documentations on these but I could hardly find one. http://www.stinkfoot.org/wdt.txt How should I make this program works? Thanks, Won # dmesg Copyright (c) 1992-2007 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2799.21-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff Features2=0x4400> real memory = 528416768 (503 MB) avail memory = 507666432 (484 MB) ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xe0000000-0xe7ffffff,0xec700000-0xec77ffff irq 16 at device 2.0 on pci0 agp0: detected 8060k stolen memory agp0: aperture size is 128M uhci0: port 0xe200-0xe21f irq 16 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xe000-0xe01f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xe100-0xe11f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered ehci0: mem 0xec780000-0xec7803ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb3: EHCI version 1.0 usb3: companion controllers, 2 ports each: usb0 usb1 usb2 usb3: on ehci0 usb3: USB revision 2.0 uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub3: 6 ports with 6 removable, self powered pcib1: at device 30.0 on pci0 pci1: on pcib1 fxp0: port 0xd100-0xd13f mem 0xec680000-0xec680fff irq 20 at device 8.0 on pci1 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:50:b7:f2:40:ea em0: port 0xd000-0xd03f mem 0xec620000-0xec63ffff,0xec600000-0xec61ffff irq 18 at device 9.0 on pci1 em0: Ethernet address: 00:50:b7:f2:40:eb pci1: at device 12.0 (no driver attached) pci1: at device 13.0 (no driver attached) pcib2: at device 15.0 on pci1 pci2: on pcib2 fxp1: port 0xc000-0xc03f mem 0xec502000-0xec502fff,0xec000000-0xec0fffff irq 23 at device 0.0 on pci2 miibus1: on fxp1 inphy1: on miibus1 inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp1: Ethernet address: 00:50:b7:f2:37:74 fxp2: port 0xc100-0xc13f mem 0xec500000-0xec500fff,0xec100000-0xec1fffff irq 20 at device 1.0 on pci2 miibus2: on fxp2 inphy2: on miibus2 inphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp2: Ethernet address: 00:50:b7:f2:37:73 fxp3: port 0xc200-0xc23f mem 0xec503000-0xec503fff,0xec200000-0xec2fffff irq 21 at device 2.0 on pci2 miibus3: on fxp3 inphy3: on miibus3 inphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp3: Ethernet address: 00:50:b7:f2:37:72 fxp4: port 0xc300-0xc33f mem 0xec501000-0xec501fff,0xec300000-0xec3fffff irq 22 at device 3.0 on pci2 miibus4: on fxp4 inphy4: on miibus4 inphy4: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp4: Ethernet address: 00:50:b7:f2:37:71 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 pci0: at device 31.3 (no driver attached) pci0: at device 31.5 (no driver attached) acpi_tz0: on acpi0 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A ppc0: port 0x378-0x37f,0x778-0x77b irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] sio2: <16550A-compatible COM port> port 0x3e8-0x3ef irq 10 on acpi0 sio2: type 16550A sio3: <16550A-compatible COM port> port 0x2e8-0x2ef irq 11 on acpi0 sio3: type 16550A pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2799213056 Hz quality 800 Timecounters tick every 1.000 msec ad0: 1946MB at ata0-master PIO4 Trying to mount root from ufs:/dev/ad0s1a pid 17016 (watchdog.out), uid 0: exited on signal 10 (core dumped) pid 17032 (watchdog.out), uid 0: exited on signal 10 (core dumped) From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 08:23:44 2008 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 73B83106564A; Mon, 1 Dec 2008 08:23:44 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 25E458FC0A; Mon, 1 Dec 2008 08:23:43 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=GaJIIjK4wXu2wYG4Rd8mYlnEjnJeaSadDIu/wRU9FII1Wtut8xqqtR+hWUpRGOxcUcipHkLxLGPXrMUz/9qsTsHUcL4mgGMgfkUlhrRu6FxFK+4a20b8HHErDWsiSyboI5rb9sKID4I0+j14RtC5yPELoMnWzA0iAuQsO9m/iXU=; Received: from phoenix.codelabs.ru ([91.78.248.236]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1L744D-0009ST-A2; Mon, 01 Dec 2008 11:23:41 +0300 Date: Mon, 1 Dec 2008 11:23:40 +0300 From: Eygene Ryabinkin To: Max Laier Message-ID: References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RYJh/3oyKhIjGcML" Content-Disposition: inline In-Reply-To: <200812010830.17259.max@love2party.net> Sender: rea-fbsd@codelabs.ru Cc: freebsd-hackers@freebsd.org, kientzle@freebsd.org, perryh@pluto.rain.com Subject: Re: keeping track of local modifications 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 Dec 2008 08:23:44 -0000 --RYJh/3oyKhIjGcML Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Max, good day. Mon, Dec 01, 2008 at 08:30:16AM +0100, Max Laier wrote: > On Monday 01 December 2008 07:07:00 perryh@pluto.rain.com wrote: > > * http://wiki.freebsd.org/LocalMercurial > > > > This seems less of a resource hog, and (if I am understanding > > matters correctly) is able to start from the installed /usr/src/... > > rather than requiring the would-be hacker to download a redundant > > instance, but I was concerned that the page may not be up to date > > with current FreeBSD development methodology (e.g. csup vs cvsup). >=20 > If you want to contribute back, this is *not* the way to go. Patches fro= m=20 > anything other than SVN and maybe CVS are mostly useless. May be I am missing something, but what's wrong with the patches from other VCS, providing that with Subversion you can exchange only by the plain diffs? Yes, Git/Mercurial patches should be applied with 'patch -p1', but that's all. Subversion has no notion simular to 'git format-patch' and 'git am', if I am not messing the things up, so the only way to exchange with others are the patches themselves. > The local hg/git > approach is nice if you are already familiar with hg or git and just want= to > keep some patch sets for yourself. If you are looking to keep/develop a = patch > set and eventually share it with the world, svn or svk is the way to go. The only issue I do see is about '$FreeBSD$', but plain Subversion clients shouldn't mess with it. If person has commit privileges to the FreeBSD repository, then yes, probably Subversion will be fine (but there are git-svn and hgsvn, so locally user can work with the different VCS even in this case). Do I missing some important thing here? Thanks! --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --RYJh/3oyKhIjGcML Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkznwwACgkQthUKNsbL7YgYrQCgnfotCgiiYTNdSr+KyZiUbSCK 0/MAn3g/00A5ogv8hQl5bzKjjHvViHVH =g+3G -----END PGP SIGNATURE----- --RYJh/3oyKhIjGcML-- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 08:38:54 2008 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 90C851065673 for ; Mon, 1 Dec 2008 08:38:54 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id D79958FC14 for ; Mon, 1 Dec 2008 08:38:53 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 01 Dec 2008 08:38:51 -0000 Received: from p54A3F341.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.243.65] by mail.gmx.net (mp049) with SMTP; 01 Dec 2008 09:38:51 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+exZdWdvOeOWv4n2l3jMzD82lsWPBrwAU+hqbrns ADSVjpxmZgCbjH Message-ID: <4933A29B.8060907@gmx.de> Date: Mon, 01 Dec 2008 09:38:51 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Won De Erick References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> In-Reply-To: <547602.79284.qm@web45809.mail.sp1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.63 Cc: freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 08:38:54 -0000 Won De Erick schrieb: > Hello, > > I was trying the assembly language program that is specified in the following document (p24) to set, reset the built-in watchdog timer for the Boser Box. > > http://www.boser.com.tw/manual/HS-7001v1.1.pdf > > I then installed nasm in FreeBSD 6.2, and added the following lines at the beginning. > > section .text > global _start > > _start: > > I did assemble, link (ld) and got no error. But when I run, I got the following error: > > # ./watchdog.out > Bus error (core dumped) > MOV DX, 2EH > MOV AL, 87H > OUT DX, AL > OUT DX, AL Userland is not allowed to write to ports. That's the bus error you see. Also without a call to the exit syscall at the end, it will segfault. Regards Christoph From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 09:03:48 2008 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 32BCC106564A for ; Mon, 1 Dec 2008 09:03:48 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id E7CD28FC14 for ; Mon, 1 Dec 2008 09:03:47 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id CBB586D43B; Mon, 1 Dec 2008 10:04:24 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l-JFh+L7wjuQ; Mon, 1 Dec 2008 10:04:21 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id BE62E6D439; Mon, 1 Dec 2008 10:04:21 +0100 (CET) Date: Mon, 1 Dec 2008 10:04:21 +0100 From: Rink Springer To: Christoph Mallon Message-ID: <20081201090421.GA99082@rink.nu> References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4933A29B.8060907@gmx.de> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org, Won De Erick Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 09:03:48 -0000 On Mon, Dec 01, 2008 at 09:38:51AM +0100, Christoph Mallon wrote: > Userland is not allowed to write to ports. That's the bus error you see. > Also without a call to the exit syscall at the end, it will segfault. Note that you can write to ports from userland by opening /dev/io - if you have it opened, you can write to the ports. -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 09:20:16 2008 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 3CC711065676 for ; Mon, 1 Dec 2008 09:20:16 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from n71.bullet.mail.sp1.yahoo.com (n71.bullet.mail.sp1.yahoo.com [98.136.44.36]) by mx1.freebsd.org (Postfix) with SMTP id 162F48FC1E for ; Mon, 1 Dec 2008 09:20:15 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from [69.147.65.150] by n71.bullet.mail.sp1.yahoo.com with NNFMP; 01 Dec 2008 09:20:15 -0000 Received: from [69.147.65.152] by t7.bullet.mail.sp1.yahoo.com with NNFMP; 01 Dec 2008 09:20:15 -0000 Received: from [127.0.0.1] by omp400.mail.sp1.yahoo.com with NNFMP; 01 Dec 2008 09:20:15 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 829137.70945.bm@omp400.mail.sp1.yahoo.com Received: (qmail 7311 invoked by uid 60001); 1 Dec 2008 09:20:15 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=v/gdz5wIir73955nlqaf+VS76PoAwGZaDyxP5q2G769ZgJMplu9oMuuQ24rUk6dPcJdgvFcTUoY07T2++zCgqmhXkklftE2HkHMZtiEa2Btum+Jy5GNVcJrb0ff39otmtPMOmmbLkpo7zAS3WIMYimarhnQkpi5GOXtR+sRSo7c=; X-YMail-OSG: 3RjG8MYVM1lM3Sf_ZZvJEZppfDxWZb1YYP__P6tysy2137viskpM9XwrwFKOyq1uOqlx6zSow79oI1Og5_zquksZjL7VXfDxh7cXtW7ox5RaobgICBqvH9LSqIOCjgip7lOJz9P1fCnsIv2sD_Jy9P.kUKrWl81qxwOY9kM1aw.Fmzxk5aQRlplVlVQb Received: from [58.71.34.137] by web45805.mail.sp1.yahoo.com via HTTP; Mon, 01 Dec 2008 01:20:14 PST X-Mailer: YahooMailRC/1155.32 YahooMailWebService/0.7.260.1 References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> <20081201090421.GA99082@rink.nu> Date: Mon, 1 Dec 2008 01:20:14 -0800 (PST) From: Won De Erick To: Rink Springer , Christoph Mallon MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <611173.7111.qm@web45805.mail.sp1.yahoo.com> Cc: freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 09:20:16 -0000 > ----- Original Message ---- > From: Rink Springer > > On Mon, Dec 01, 2008 at 09:38:51AM +0100, Christoph Mallon wrote: > > Userland is not allowed to write to ports. That's the bus error you see. > > Also without a call to the exit syscall at the end, it will segfault. > > Note that you can write to ports from userland by opening /dev/io - if > you have it opened, you can write to the ports. > I've added the following at the end mov eax, 1 ; SYS_exit call doint doint: int 0x80 ret Besides, I can see the following at /dev crw------- 1 root wheel 0, 16 Nov 27 01:53 io How should I make this open? do i need to %include this? > -- > Rink P.W. Springer - http://rink.nu > "Anyway boys, this is America. Just because you get more votes doesn't > mean you win." - Fox Mulder > From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 09:26:46 2008 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 5C9421065673; Mon, 1 Dec 2008 09:26:46 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1AB458FC17; Mon, 1 Dec 2008 09:26:46 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id F2C356D43B; Mon, 1 Dec 2008 10:27:23 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9BpbvqcY3HfE; Mon, 1 Dec 2008 10:27:20 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id AB1556D439; Mon, 1 Dec 2008 10:27:20 +0100 (CET) Date: Mon, 1 Dec 2008 10:27:20 +0100 From: Rink Springer To: Won De Erick Message-ID: <20081201092720.GB99082@rink.nu> References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> <20081201090421.GA99082@rink.nu> <611173.7111.qm@web45805.mail.sp1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <611173.7111.qm@web45805.mail.sp1.yahoo.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Christoph Mallon , freebsd-hackers@freebsd.org, Rink Springer , freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 09:26:46 -0000 On Mon, Dec 01, 2008 at 01:20:14AM -0800, Won De Erick wrote: > Besides, I can see the following at /dev > crw------- 1 root wheel 0, 16 Nov 27 01:53 io > > How should I make this open? do i need to %include this? No, you need to invoke an open syscall just in the same way you did the previous system call. Try looking at http://goodfellas.shellcode.com.ar/docz/asm/aslenguage.html, which is a tutorial for exactly this sort of thing. You don't have to read or write to it; just opening it is enough to get the I/O access you need. Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder > > > > -- > > Rink P.W. Springer - http://rink.nu > > "Anyway boys, this is America. Just because you get more votes doesn't > > mean you win." - Fox Mulder > > > > > > > > _______________________________________________ > 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 Dec 1 09:35:35 2008 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 3304F106564A for ; Mon, 1 Dec 2008 09:35:35 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 75E6E8FC14 for ; Mon, 1 Dec 2008 09:35:34 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 01 Dec 2008 09:35:17 -0000 Received: from p54A3F341.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.243.65] by mail.gmx.net (mp008) with SMTP; 01 Dec 2008 10:35:17 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+wfCJleOWwuIvfP2GVCbeELFTY0c8dvfNtfyg8uq xUdGkj+DKHg64E Message-ID: <4933AFD4.3070501@gmx.de> Date: Mon, 01 Dec 2008 10:35:16 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Won De Erick References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> <20081201090421.GA99082@rink.nu> <611173.7111.qm@web45805.mail.sp1.yahoo.com> In-Reply-To: <611173.7111.qm@web45805.mail.sp1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.51 Cc: freebsd-hackers@freebsd.org, Rink Springer , freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 09:35:35 -0000 Won De Erick schrieb: >> ----- Original Message ---- > >> From: Rink Springer >> >> > On Mon, Dec 01, 2008 at 09:38:51AM +0100, Christoph Mallon wrote: >>> Userland is not allowed to write to ports. That's the bus error you see. >>> Also without a call to the exit syscall at the end, it will segfault. >> Note that you can write to ports from userland by opening /dev/io - if >> you have it opened, you can write to the ports. >> > > I've added the following at the end > > mov eax, 1 ; SYS_exit > call doint > > doint: > int 0x80 > ret > > Besides, I can see the following at /dev > crw------- 1 root wheel 0, 16 Nov 27 01:53 io > > How should I make this open? do i need to %include this? You're probably better of writing this in C. Here is a wrapper for the out instruction: static inline outb(unsigned short port, unsigned char data) { asm("outb %0, %1" : : "a" (data), "dN" (port)); } As Rink mentioned, you have to open /dev/io. The process must have super-user privileges, see io(4). Regards Christoph From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 10:22:20 2008 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 B65B21065673 for ; Mon, 1 Dec 2008 10:22:20 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E801D8FC08 for ; Mon, 1 Dec 2008 10:22:19 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA22054; Mon, 01 Dec 2008 12:22:12 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4933BAD3.2060700@icyb.net.ua> Date: Mon, 01 Dec 2008 12:22:11 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Julian Stacey References: <200811302014.mAUKE5YF046736@fire.js.berklix.net> In-Reply-To: <200811302014.mAUKE5YF046736@fire.js.berklix.net> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: dd if=/dev/mem can hang a machine? 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 Dec 2008 10:22:20 -0000 on 30/11/2008 22:14 Julian Stacey said the following: > Gary Jennejohn wrote: >> On Fri, 28 Nov 2008 15:28:35 +0200 >> Andriy Gapon wrote: >> >>> I have a new machine with DG33TL mainboard (ICH9/G33). >>> In a course of some hacking I ran dd if=/dev/mem ... to scan all memory, >>> this caused the machine to hang. >>> I tried to reproduce and this is 100% reproducible. >>> >>> I am not used to such behavior. In older days I could scan all the >>> memory without any issues. >>> >>> Could this be related to some modern form of memory-mapped IO? Or to >>> Intel Management Engine (that seems t bite into DRAM)? >>> Or something else? >>> >>> Just wondering. >>> >> That's what I would assume. With some hardware just reading a register >> can be harmful. > > I just crashed 3 normally stable machines trying that. > I only tried for casual interest. I acknowledge Gary's comment above :-) > > dd if=/dev/mem of=/dev/null > > FreeBSD lapa.js.berklix.net 4.11-RELEASE FreeBSD 4.11-RELEASE > #0: Fri Jul 7 17:56:30 CEST 2006 > jhs@lapa.jhs.private:/usr/src/sys/compile/LAPA.small i386 > > FreeBSD laps.js.berklix.net 7.0-RELEASE FreeBSD 7.0-RELEASE > #2: Mon Sep 8 15:39:53 CEST 2008 > jhs@laps.js.berklix.net:/usr1/ftp/pri/FreeBSD/releases/7.0-RELEASE/src/sys/i386/compile/LAPS.small > i386 > > FreeBSD john.js.berklix.net 7.1-BETA2 FreeBSD 7.1-BETA2 #0: > Sun Oct 12 20:59:28 UTC 2008 > root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Thank you for going to all the trouble. I see now that I have to be more careful in this respect. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 11:08:21 2008 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 37D54106567C for ; Mon, 1 Dec 2008 11:08:21 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id B4EEA8FC08 for ; Mon, 1 Dec 2008 11:08:19 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by ug-out-1314.google.com with SMTP id 30so2527862ugs.39 for ; Mon, 01 Dec 2008 03:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=swZFX992y48g7OKqMVjnEBnA9Oy/ReWAlMKfhZz76HQ=; b=kSd2dQ67oKPa7zjGQigYO2M4vojdSLj/g9OpmejIHqmy/qX5kvRAuXSNvLqedmaedZ j5CFcRkFfojaCNyDecVAYs1g/3UyEdtAeFV/ylTJtkb+JUrf6gVWg2fAAN4ZC+FUE5k9 4bDcHx2G8FQCBWrOiQ+zxEyk5gNLH129JD0gY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=j3gOFnMkrbBCVCBbksFqSX8REhYRxxmVP/4yZjG+B86K9P75mGFSZPEU0WmqOx/fhV ecx6ajsdxYIFOs27TBsrQL3wXQdefevLbE3NKtISAQYzNdaiEmnWu7LxrQ5pLhwqCi6P dW6qHxYyFkTignerkgf8rQrrPDUlXhrtuqvtM= Received: by 10.103.247.14 with SMTP id z14mr4486907mur.70.1228129698176; Mon, 01 Dec 2008 03:08:18 -0800 (PST) Received: from nslpc5.epfl.ch (nslpc5.epfl.ch [128.178.149.20]) by mx.google.com with ESMTPS id 12sm8406310muq.40.2008.12.01.03.08.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Dec 2008 03:08:14 -0800 (PST) Message-Id: From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: freebsd-hackers@freebsd.org In-Reply-To: <49332E5C.9020303@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Mon, 1 Dec 2008 12:08:13 +0100 References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <2A1A4C21-8A2D-4151-BCA0-5FAE1D3BBE86@gmail.com> <200811301843.28564.fbsd.hackers@rachie.is-a-geek.net> <94D09AB0-86B6-4D91-BD61-AB02A12CC260@gmail.com> <49332E5C.9020303@freebsd.org> X-Mailer: Apple Mail (2.929.2) Subject: Re: How to build kernel module spread on subdirectories? 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 Dec 2008 11:08:21 -0000 On 1 Dec 2008, at 01:22 , Tim Kientzle wrote: >> .MAKEFILEDEPS: elements.mk >> .sinclude "elements.mk" >> .include >> --->8--- >> When I run make depend, it only includes SRCSs from BSDmakefile, >> not those from elements.mk. > > I would try adding a "beforedepend" requirement: > > beforedepend: elements.mk > > Look at /usr/share/mk/bsd.dep.mk, which has the 'make depend' > logic. It supports optional "beforedepend" and "afterdepend" > targets. Hi Tim, thanks for the tip. I've tried adding beforedepend: elements.mk rule before .sinclude. Unfortunately, everything is the same still. Is there a way to force explicitly what .MAKEFILEDEPS? beforedepend will create elements.mk, but that file won't be re-read and included before depend is called. Cheers, Nikola From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 11:31:55 2008 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 9A84B1065677 for ; Mon, 1 Dec 2008 11:31:55 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 64FD98FC17 for ; Mon, 1 Dec 2008 11:31:55 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id AB819AFC1C6; Mon, 1 Dec 2008 02:31:54 -0900 (AKST) From: Mel To: freebsd-hackers@freebsd.org Date: Mon, 1 Dec 2008 12:31:51 +0100 User-Agent: KMail/1.9.7 References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <49332E5C.9020303@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200812011231.52262.fbsd.hackers@rachie.is-a-geek.net> Cc: Nikola =?utf-8?q?Kne=C5=BEevi=C4=87?= Subject: Re: How to build kernel module spread on subdirectories? 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 Dec 2008 11:31:55 -0000 On Monday 01 December 2008 12:08:13 Nikola Kne=C5=BEevi=C4=87 wrote: > On 1 Dec 2008, at 01:22 , Tim Kientzle wrote: > >> .MAKEFILEDEPS: elements.mk > >> .sinclude "elements.mk" > >> .include > >> --->8--- > >> When I run make depend, it only includes SRCSs from BSDmakefile, > >> not those from elements.mk. > > > > I would try adding a "beforedepend" requirement: > > > > beforedepend: elements.mk > > > > Look at /usr/share/mk/bsd.dep.mk, which has the 'make depend' > > logic. It supports optional "beforedepend" and "afterdepend" > > targets. > > Hi Tim, > thanks for the tip. > > I've tried adding beforedepend: elements.mk rule before .sinclude. > > Unfortunately, everything is the same still. Is there a way to force > explicitly what .MAKEFILEDEPS? beforedepend will create elements.mk, > but that file won't be re-read and included before depend is called. Does it have to be generated? What's the contents of that file after=20 generation and what generates it? As you discovered, includes are done before targets. You would need seperat= e=20 invocations of make, to generate the file and get it included. Maybe this will work, tho I doubt it (I expect the include to screw with th= e=20 beforedepend target): beforedepend: =2Eif !exists(${.CURDIR}/elements.mk) ${MAKE} ${MAKEFLAGS} -f ${MAKEFILE} genmk =2Eendif =2Eif exists(${.CURDIR}/elements.mk) =2Einclude "${.CURDIR}/elements.mk" =2Eendif genmk: # do whatever here to generate the mk file =2D-=20 Mel From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 11:44:51 2008 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 677C61065670 for ; Mon, 1 Dec 2008 11:44:51 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 269198FC17 for ; Mon, 1 Dec 2008 11:44:51 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 6C64C6D452; Mon, 1 Dec 2008 11:44:50 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 4E27C844A0; Mon, 1 Dec 2008 12:44:50 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bruce Cran References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> <20081130004331.086941f3@tau> Date: Mon, 01 Dec 2008 12:44:50 +0100 In-Reply-To: <20081130004331.086941f3@tau> (Bruce Cran's message of "Sun, 30 Nov 2008 00:43:31 -0800") Message-ID: <86r64sqfv1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Eitan Adler , d@delphij.net Subject: Re: change to ee.c 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 Dec 2008 11:44:51 -0000 Bruce Cran writes: > The version of ee in FreeBSD is fairly old: the latest from > http://mahon.cwx.net/ is 1.4.6. Even so, the latest version still > generates lots of warnings from gcc because the developer used NULL > instead of '\0' (i.e the NULL constant instead of the NUL string). This is a good reason to define NULL as ((void *)0)... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 11:55:42 2008 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 9B9261065670 for ; Mon, 1 Dec 2008 11:55:42 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5CB8FC13 for ; Mon, 1 Dec 2008 11:55:42 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 61AA86D44C; Mon, 1 Dec 2008 11:55:41 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 46ABF844A7; Mon, 1 Dec 2008 12:55:41 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Eitan Adler References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> Date: Mon, 01 Dec 2008 12:55:41 +0100 In-Reply-To: <493214DC.2080904@gmail.com> (Eitan Adler's message of "Sat, 29 Nov 2008 23:21:48 -0500") Message-ID: <86myfgqfcy.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: change to ee.c 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 Dec 2008 11:55:42 -0000 Eitan Adler writes: > Xin LI writes: > > Tanks for interested in this but I'm afraid that your patch is > > incorrect. mkstemp returns a file descriptor rather than a string > > pointer, therefore, the subsequent open() would have undefined > > behavior. It looks like that we actually want fd =3D mkstemp() here. > Thanks. If this is the case how come gcc did not return any warnings? Because ee(1) is built with most warnings disabled, precisely because the source code is of such poor quality (by modern standards). Try this: $ cd /usr/src/usr.bin/ee $ make clean $ make WARNS=3D3 2>&1 | grep -cw warning 72 $ make WARNS=3D6 2>&1 | grep -cw warning=20 188 This is on amd64; you will get fewer on i386. Someone added casts to silence legitimate warnings about pointers being assigned to integers, so gcc will only complain about those assignments on platforms where sizeof(int) =3D=3D sizeof(void *). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 11:58:22 2008 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 64E771065676 for ; Mon, 1 Dec 2008 11:58:22 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1BE618FC12 for ; Mon, 1 Dec 2008 11:58:22 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 5F7336D44C; Mon, 1 Dec 2008 11:58:21 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 3FFFB844A0; Mon, 1 Dec 2008 12:58:21 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Christoph Mallon References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> <20081201090421.GA99082@rink.nu> <611173.7111.qm@web45805.mail.sp1.yahoo.com> <4933AFD4.3070501@gmx.de> Date: Mon, 01 Dec 2008 12:58:21 +0100 In-Reply-To: <4933AFD4.3070501@gmx.de> (Christoph Mallon's message of "Mon, 01 Dec 2008 10:35:16 +0100") Message-ID: <86fxl8qf8i.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Rink Springer , freebsd-hardware@freebsd.org, Won De Erick Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 11:58:22 -0000 Christoph Mallon writes: > You're probably better of writing this in C. He's probably better off writing a watchdog(4) driver for the Boser (or getting someone to write one for him - not easy to do without hardware to test on, though) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 12:19:16 2008 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 BD7751065676; Mon, 1 Dec 2008 12:19:16 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout0.freenet.de (mout0.freenet.de [IPv6:2001:748:100:40::2:2]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6308FC1E; Mon, 1 Dec 2008 12:19:15 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.20] (helo=10.mx.freenet.de) by mout0.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #65) id 1L77kA-0003eI-Jz; Mon, 01 Dec 2008 13:19:14 +0100 Received: from maef9.m.pppool.de ([89.49.174.249]:35495 helo=ernst.jennejohn.org) by 10.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #68) id 1L77kA-0005Bd-By; Mon, 01 Dec 2008 13:19:14 +0100 Date: Mon, 1 Dec 2008 13:19:12 +0100 From: Gary Jennejohn To: Christoph Mallon Message-ID: <20081201131912.355b8356@ernst.jennejohn.org> In-Reply-To: <4933A29B.8060907@gmx.de> References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org, Won De Erick Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 12:19:16 -0000 On Mon, 01 Dec 2008 09:38:51 +0100 Christoph Mallon wrote: > Won De Erick schrieb: > > Hello, > > > > I was trying the assembly language program that is specified in the following document (p24) to set, reset the built-in watchdog timer for the Boser Box. > > > > http://www.boser.com.tw/manual/HS-7001v1.1.pdf > > > > I then installed nasm in FreeBSD 6.2, and added the following lines at the beginning. > > > > section .text > > global _start > > > > _start: > > > > I did assemble, link (ld) and got no error. But when I run, I got the following error: > > > > # ./watchdog.out > > Bus error (core dumped) > > > MOV DX, 2EH > > MOV AL, 87H > > OUT DX, AL > > OUT DX, AL > > Userland is not allowed to write to ports. That's the bus error you see. > Also without a call to the exit syscall at the end, it will segfault. > See io(4), i386_get_ioperm(2), i386_set_ioperm(2), mem(4). --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 07:36:20 2008 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 B0CB11065670 for ; Mon, 1 Dec 2008 07:36:20 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 435688FC16 for ; Mon, 1 Dec 2008 07:36:20 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2CF93.dip.t-dialin.net [217.226.207.147]) by redbull.bpaserver.net (Postfix) with ESMTP id D30EB2E0C9; Mon, 1 Dec 2008 08:36:09 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 62C58181C97; Mon, 1 Dec 2008 08:36:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1228116966; bh=VPNNvHmRfbskw9JP1pMFS2RNcFbnXyUXG 7wmBN1Bhnk=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=xu07hDnZZ+dxTARzsvrgLqNJmK0XsoEoZCmhXEvw8jhBJoGRlFcuumgMKmVbDXw57 BEzNuoxk0E+dVJqmLQ4ZrGByUIUrRCY3Z73oHpoFJPvqUY3fHm17vN4pEywZ0GMJoOc GGn9lWBwpCQKqqebHFGKDwX1vTgThdPTti5c4YxhoirVxulXPmkBFlATrmrvNqUjOC3 Kbailamd9wd2jjf4uFsBolt8U0Elo/fER2N4bwfSuNcsbiio0jQ3kiMZYe0IFkP/gdv HG5+DFOfy6Zp9poO8Fc93siOO5+RBGKtZXnztHxJgl14Ta8HHlv+IjlqqseKymhGyiz HyM3KJ0ow== Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id mB17a5Ql010834; Mon, 1 Dec 2008 08:36:05 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 01 Dec 2008 08:36:04 +0100 Message-ID: <20081201083604.545172dag60hadc0@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 01 Dec 2008 08:36:04 +0100 From: Alexander Leidinger To: Bruce Cran References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> <20081130004331.086941f3@tau> <49329F4A.3070004@gmail.com> <20081130103156.6e4da70c@tau> In-Reply-To: <20081130103156.6e4da70c@tau> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: D30EB2E0C9.9AD6C X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-12.904, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, J_CHICKENPOX_21 0.60, MIME_QP_LONG_LINE 1.40, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Mon, 01 Dec 2008 12:25:31 +0000 Cc: freebsd-hackers@freebsd.org, Eitan Adler , d@delphij.net Subject: Re: change to ee.c 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 Dec 2008 07:36:20 -0000 Quoting Bruce Cran (from Sun, 30 Nov 2008 10:31:56 -0800= ): > On Sun, 30 Nov 2008 09:12:26 -0500 > Eitan Adler wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Bruce Cran wrote: >> >> > The version of ee in FreeBSD is fairly old: the latest from >> > http://mahon.cwx.net/ is 1.4.6. >> How difficult would it be to bring it up to date? How come it has not >> been updated so far? > > I'd guess it hasn't been updated because it works as it is and nobody > has taken an interest in bringing it up to date. I don't know how many > patches have been applied locally to it but that would be the main > challenge in importing a newer version: you'd have to go through the > FreeBSD CVS history and check that any changes/fixes that were made to > FreeBSD's version are either already included in the new release or > ensure that those changes get re-applied to the new version. It _may_ be more easy to find out which version is in our source tree, =20 and make a diff between the original vendor version and what we have. =20 Depending on the amount of changes there, this is faster than to real =20 all the version control logs to determine if there's a difference or =20 not. In the end you have to read some logs too, but only those, which =20 change lines which a different from those of the vendor version (e.g. =20 via the annotated view at cvsweb.freebsd.org). Bye, Alexander. --=20 In this vale Of toil and sin Your head grows bald But not your chin. =09=09-- Burma Shave http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 12:48:32 2008 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 E52DF106564A for ; Mon, 1 Dec 2008 12:48:32 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from n21.bullet.mail.mud.yahoo.com (n21.bullet.mail.mud.yahoo.com [68.142.206.160]) by mx1.freebsd.org (Postfix) with SMTP id 9B1178FC14 for ; Mon, 1 Dec 2008 12:48:32 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from [209.191.108.97] by n21.bullet.mail.mud.yahoo.com with NNFMP; 01 Dec 2008 12:48:22 -0000 Received: from [68.142.201.247] by t4.bullet.mud.yahoo.com with NNFMP; 01 Dec 2008 12:48:32 -0000 Received: from [127.0.0.1] by omp408.mail.mud.yahoo.com with NNFMP; 01 Dec 2008 12:48:32 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 79019.91425.bm@omp408.mail.mud.yahoo.com Received: (qmail 30561 invoked by uid 60001); 1 Dec 2008 12:48:31 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=Uu447YcK6llKNJDEyyp+OG7gTODGgYxTT/oqAjFB5Xle/mRbQJx2clvc02DMTEg//FsrVFB9f+9DHCdgaBzcQ7pYMx3MzgIs/aTrh9mvBvN5QkQACPq1mMrLXOYNfCoeJysC3pib8at5J6onrpv97GvU9bGMThsodP5SsgEwQb4=; X-YMail-OSG: 6Ms36DgVM1n55Te7WUmItmUIGzFpHiuQ0Kegns6n9.xUQADElJj3A58KSsH7JAqADfribFIT9QxHMKFzCShrsiSMhPQfqGBFg_5II33ILS2Bw.d28s0abrEQ0vAHTQTKEven4DZ.oV0dRqAtNoMovSXx1L9mI.4PrB8RI8K1OxiVBn.k7wfAVX6fyWI9 Received: from [58.71.34.137] by web45815.mail.sp1.yahoo.com via HTTP; Mon, 01 Dec 2008 04:48:31 PST X-Mailer: YahooMailRC/1155.32 YahooMailWebService/0.7.260.1 References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> <20081201090421.GA99082@rink.nu> <611173.7111.qm@web45805.mail.sp1.yahoo.com> <4933AFD4.3070501@gmx.de> <86fxl8qf8i.fsf@ds4.des.no> Date: Mon, 1 Dec 2008 04:48:31 -0800 (PST) From: Won De Erick To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , Christoph Mallon MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <576032.29521.qm@web45815.mail.sp1.yahoo.com> Cc: freebsd-hackers@freebsd.org, Rink Springer , freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 12:48:33 -0000 > ----- Original Message ----=0A=0A> From: Dag-Erling Sm=F8rgrav =0A> Christoph Mallon writes:=0A> > You're prob= ably better of writing this in C.=0Amaybe i get this as an option.=0A> =0A>= He's probably better off writing a watchdog(4) driver for the Boser (or=0A= > getting someone to write one for him - not easy to do without hardware=0A= > to test on, though)=0A> =0Athis is a great info. i am used to settings li= ke the following when using ipmi-compliant platform.=0A#bmc-watchdog -s -a = 1 -i 100 (#set timeout action to hard reset after a timeout of 100 secon= ds)=0Athen daemonize to constantly reset the timer, and prevent the box fro= m restarting.=0A=0AI installed watchdog(/usr/ports/sysutils/watchdog) from = ports, then noticed the following from the manual.=0A watchdog [-d] [-t= timeout]=0A=0A# watchdog -d -t 50=0ATimeout is 2^36 nanoseconds=0Awatchdog= : patting the dog: Operation not supported=0A=0Abut I don't know how it is = linked with watchdogd(8).=0A=0ALittle more explanation is appreciated, and/= or an example.=0A=0A> DES=0A> -- =0A> Dag-Erling Sm=F8rgrav - des@des.no=0A= =0A=0A From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 12:52:44 2008 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 96EA5106567D for ; Mon, 1 Dec 2008 12:52:44 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from n76.bullet.mail.sp1.yahoo.com (n76.bullet.mail.sp1.yahoo.com [98.136.44.48]) by mx1.freebsd.org (Postfix) with SMTP id 615EA8FC1F for ; Mon, 1 Dec 2008 12:52:44 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from [69.147.65.147] by n76.bullet.mail.sp1.yahoo.com with NNFMP; 01 Dec 2008 12:52:44 -0000 Received: from [69.147.65.153] by t10.bullet.mail.sp1.yahoo.com with NNFMP; 01 Dec 2008 12:52:44 -0000 Received: from [127.0.0.1] by omp401.mail.sp1.yahoo.com with NNFMP; 01 Dec 2008 12:52:43 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 984053.73762.bm@omp401.mail.sp1.yahoo.com Received: (qmail 65780 invoked by uid 60001); 1 Dec 2008 12:52:43 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=V8JSOJZb2YkCFCPsGUQI5K1ajK8Pa/rxpg/kyC95VcjUtlhFJDYULzotqgR9qfTc7R+NMY0J+ubFE43DjF1pt1ViCBjkP44PAMYXuNvSbpqExbpOky1gJl9JhqpkwD+v3QcASXB382kDs/KIxHL4tpgCtSoGZnxLpGaX8zoyo0k=; X-YMail-OSG: 82GVhzIVM1lsMCLKSac1mMSGmPNdZ96EPEwt0G7RhyvAdcS0CMWT3HA6EZ.41YScESAHSgm87QjZlG7wOaNo.hupE7q4RRyqHJ_O5at6m7hNYkG.pJCPdyIvbEr19XzzpP6WSNZH4m8SYepv2phs5TwyJ1Ob6DwM2uqauaBgUxP5VIW0m1kAytCszaVi Received: from [58.71.34.137] by web45808.mail.sp1.yahoo.com via HTTP; Mon, 01 Dec 2008 04:52:43 PST X-Mailer: YahooMailRC/1155.32 YahooMailWebService/0.7.260.1 Date: Mon, 1 Dec 2008 04:52:43 -0800 (PST) From: Won De Erick To: Christoph Mallon MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <838497.65099.qm@web45808.mail.sp1.yahoo.com> Cc: freebsd-hackers@freebsd.org, Rink Springer , freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 12:52:44 -0000 >----- Original Message ---- >From: Christoph Mallon > > Won De Erick schrieb: >>> ----- Original Message ---- >> >>> From: Rink Springer >>> >>> >> On Mon, Dec 01, 2008 at 09:38:51AM +0100, Christoph Mallon wrote: >>>> Userland is not allowed to write to ports. That's the bus error you see. Also without a call to the exit syscall at the end, it will segfault. >>> Note that you can write to ports from userland by opening /dev/io - if >>> you have it opened, you can write to the ports. >>> >> >> I've added the following at the end >> >> mov eax, 1 ; SYS_exit >> call doint >> >> doint: >> int 0x80 >> ret >> >> Besides, I can see the following at /dev >> crw------- 1 root wheel 0, 16 Nov 27 01:53 io >> >> How should I make this open? do i need to %include this? > >You're probably better of writing this in C. Here is a wrapper for the out instruction: > >static inline outb(unsigned short port, unsigned char data) >{ > asm("outb %0, %1" : : "a" (data), "dN" (port)); >} > >As Rink mentioned, you have to open /dev/io. The process must have super-user privileges, see io(4). will this be ok? int fd = open("/dev/fido", O_RDWR); > >Regards > Christoph From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 13:07:39 2008 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 F365E106564A for ; Mon, 1 Dec 2008 13:07:38 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from n21.bullet.mail.mud.yahoo.com (n21.bullet.mail.mud.yahoo.com [68.142.206.160]) by mx1.freebsd.org (Postfix) with SMTP id ADCF68FC1F for ; Mon, 1 Dec 2008 13:07:38 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from [68.142.194.244] by n21.bullet.mail.mud.yahoo.com with NNFMP; 01 Dec 2008 13:07:29 -0000 Received: from [68.142.201.253] by t2.bullet.mud.yahoo.com with NNFMP; 01 Dec 2008 13:07:38 -0000 Received: from [127.0.0.1] by omp414.mail.mud.yahoo.com with NNFMP; 01 Dec 2008 13:07:38 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 317432.80000.bm@omp414.mail.mud.yahoo.com Received: (qmail 25032 invoked by uid 60001); 1 Dec 2008 13:07:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=Ro7gstu12jL3stmqpmEalaOKX6tJSpy3aI2IQ4x7HOwAoaQe+bSidMqInJUYn+Nq/QJ1zY263dJVmOjWnjyq221c6dr7zZs7RG6jHhc3Oi6wUMhB3GfoPSht3dAi8b8lnpdYJPxDl74i2D7+dClIM+IMmPpMoBCeFLd0e0HKhos=; X-YMail-OSG: c5TDNu8VM1kS6iJI4fAgQUnbBZSvyMVeqdMfbEZKBpe7aLQ6fdyJlsQQaRtyWDBz3d9niZbsG9xbJYEedPpSynTDOy5JMogBH9BbXQO5IQfy9_nwEMNs.osRYWecULfsTB.bqOPb0WEKqrU9mIT0h0Y5Rplm9FZd7_g.A_rwCngevKHezEGw.shZPsKF Received: from [58.71.34.137] by web45816.mail.sp1.yahoo.com via HTTP; Mon, 01 Dec 2008 05:07:37 PST X-Mailer: YahooMailRC/1155.32 YahooMailWebService/0.7.260.1 Date: Mon, 1 Dec 2008 05:07:37 -0800 (PST) From: Won De Erick To: Christoph Mallon MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <839504.20277.qm@web45816.mail.sp1.yahoo.com> Cc: freebsd-hackers@freebsd.org, Rink Springer , freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 13:07:39 -0000 >From: Won De Erick >>From: Christoph Mallon >> > >Won De Erick schrieb: >>>> ----- Original Message ---- >>> >>>> From: Rink Springer >>>> >>>> >>> On Mon, Dec 01, 2008 at 09:38:51AM +0100, Christoph Mallon wrote: >>>>> Userland is not allowed to write to ports. That's the bus error you see. Also without a call to the exit syscall at the end, it will segfault. >>>> Note that you can write to ports from userland by opening /dev/io - if >>>> you have it opened, you can write to the ports. >>>> >>> >>> I've added the following at the end >>> >>> mov eax, 1 ; SYS_exit >>> call doint >>> >>> doint: >>> int 0x80 >>> ret >>> >>> Besides, I can see the following at /dev >>> crw------- 1 root wheel 0, 16 Nov 27 01:53 io >>> >>> How should I make this open? do i need to %include this? >> >>You're probably better of writing this in C. Here is a wrapper for the out instruction: >> >>static inline outb(unsigned short port, unsigned char data) >>{ >> asm("outb %0, %1" : : "a" (data), "dN" (port)); >>} >> >>As Rink mentioned, you have to open /dev/io. The process must have super-user privileges, see io(4). > >will this be ok? >int fd = open("/dev/fido", O_RDWR); > aww.. i mean int sio = open("/dev/io", O_RDWR); > >> >>Regards >> Christoph From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 13:32:28 2008 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 76E131065672; Mon, 1 Dec 2008 13:32:27 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2EF198FC13; Mon, 1 Dec 2008 13:32:27 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 319C46D43F; Mon, 1 Dec 2008 13:32:26 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 10069844A0; Mon, 1 Dec 2008 14:32:26 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Won De Erick References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> <20081201090421.GA99082@rink.nu> <611173.7111.qm@web45805.mail.sp1.yahoo.com> <4933AFD4.3070501@gmx.de> <86fxl8qf8i.fsf@ds4.des.no> <576032.29521.qm@web45815.mail.sp1.yahoo.com> Date: Mon, 01 Dec 2008 14:32:25 +0100 In-Reply-To: <576032.29521.qm@web45815.mail.sp1.yahoo.com> (Won De Erick's message of "Mon, 1 Dec 2008 04:48:31 -0800 (PST)") Message-ID: <867i6kqavq.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Christoph Mallon , Rink Springer , freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 13:32:28 -0000 Won De Erick writes: > this is a great info. i am used to settings like the following when using= ipmi-compliant platform. > #bmc-watchdog -s -a 1 -i 100 (#set timeout action to hard reset after = a timeout of 100 seconds) > then daemonize to constantly reset the timer, and prevent the box from re= starting. > > I installed watchdog(/usr/ports/sysutils/watchdog) from ports, Firt of all, that port won't help you; it only supports the AMD Elan SoC. Second, we've had kernel support for the Elan watchdog longer than the port has existed. > then noticed the following from the manual. > watchdog [-d] [-t timeout] That's the base system watchdog(8); the port installs a watchdogd(8) that works *only* for Elan chips. There is a watchdogd(8) in the base system as well. > # watchdog -d -t 50 > Timeout is 2^36 nanoseconds > watchdog: patting the dog: Operation not supported You need to load the appropriate watchdog driver first - and as far as I know, we don't have one for the Boser HS-7001. > but I don't know how it is linked with watchdogd(8). > > Little more explanation is appreciated, and/or an example. man -k watchdog DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 13:57:35 2008 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 565611065675 for ; Mon, 1 Dec 2008 13:57:35 +0000 (UTC) (envelope-from marinosi@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id 02DD08FC0A for ; Mon, 1 Dec 2008 13:57:34 +0000 (UTC) (envelope-from marinosi@ceid.upatras.gr) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id A1BFDEB4FC4 for ; Mon, 1 Dec 2008 15:33:34 +0200 (EET) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 8DE5A45088 for ; Mon, 1 Dec 2008 15:33:34 +0200 (EET) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t6bNDuoQY7oo for ; Mon, 1 Dec 2008 15:33:34 +0200 (EET) Received: from marinos.ceid.upatras.gr (marinos.ceid.upatras.gr [150.140.140.17]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 5CFE24503F for ; Mon, 1 Dec 2008 15:33:34 +0200 (EET) Received: by marinos.ceid.upatras.gr (Postfix, from userid 1001) id E836B2283A; Mon, 1 Dec 2008 15:33:33 +0200 (EET) Date: Mon, 1 Dec 2008 15:33:33 +0200 From: Ilias Marinos To: freebsd-hackers@freebsd.org Message-ID: <20081201133333.GA6445@marinos.ceid.upatras.gr> Mail-Followup-To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: TPM Device Driver - FreeBSD 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 Dec 2008 13:57:35 -0000 Hello list, We are two undergraduate students studying computer engineering and informatics at Patra's University, Greece. We are currently working on our diploma thesis which is about developing a driver for the TPM (Trusted Platform Module) for FreeBSD.We think that TPM can enhance security in FreeBSD and could be a great addition to the TrustedBSD project. We are still in the begining of the project and since this is our first effort in implementing a device driver we are trying to gather and read all available documentation on the subject first. However, we were unable to find a source of information related to how the BSD kernel and device communication is implemented and we would greatly appreciate it if you could point us one; either in form of a book or an article/tutorial. Last but not least, we'd like to make clear that we are oppossed to any DRM-related use of this device, however we believe that the TPM can be used in security or cryptographic applications. Thanks in advance for your time. Best Regards, Marinos Ilias Mellos Seraphim -- echo "Sysadmin know better bash than english." | sed s/min/mins/ \ | sed 's/better bash/bash better/' From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 14:55:22 2008 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 5EB19106567A for ; Mon, 1 Dec 2008 14:55:22 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id DA1E38FC22 for ; Mon, 1 Dec 2008 14:55:21 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by ug-out-1314.google.com with SMTP id 30so2592411ugs.39 for ; Mon, 01 Dec 2008 06:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=WYC9NT2IMfuH38Jgb2BGGnLswrF1XUCMWC8CnSgN5ps=; b=G7rrfcRKL+GMteeUC32jsU38oQQ5I9GiWEpxBlIj192uaODuWEgNAdt6UeufHqYJzq PKwmxBgL2A3c5QgLAtGbz+i2+0qsEb/ZJ5jPSSBLvPd40lDfhPTjh1VkRn2TxYdVAUHd vk6P3BLU6QqNqUrllBZe2AJtSmVWEukLK/Jdc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=JgUZ/4mFsCIJTewIHspcuUdFJdPd8/H4Bz5v/uFdaCsnPpNWx8r6Nt3mTL/iNAcyH4 /0tz6s8cWMXk9INXMtjiuHIccSs7Ms6WQSardgS3UE2vBlENlJgOfKJ2xHEbpk75zDsT vfg4AezMECqj6RTVLTJQMJlr3Zm1Z4BE+8GGc= Received: by 10.67.25.9 with SMTP id c9mr3397149ugj.18.1228141456380; Mon, 01 Dec 2008 06:24:16 -0800 (PST) Received: from ?127.0.0.1? (83-244-213-91.cust-83.exponential-e.net [83.244.213.91]) by mx.google.com with ESMTPS id k30sm8382600ugc.25.2008.12.01.06.24.14 (version=SSLv3 cipher=RC4-MD5); Mon, 01 Dec 2008 06:24:15 -0800 (PST) From: Tom Evans To: Ilias Marinos In-Reply-To: <20081201133333.GA6445@marinos.ceid.upatras.gr> References: <20081201133333.GA6445@marinos.ceid.upatras.gr> Content-Type: text/plain Date: Mon, 01 Dec 2008 14:24:29 +0000 Message-Id: <1228141469.4196.20.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: TPM Device Driver - FreeBSD 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 Dec 2008 14:55:22 -0000 On Mon, 2008-12-01 at 15:33 +0200, Ilias Marinos wrote: > Hello list, > > We are two undergraduate students studying computer engineering and > informatics at Patra's University, Greece. We are currently working on > our diploma thesis which is about developing a driver for the TPM > (Trusted Platform Module) for FreeBSD.We think that TPM can enhance > security in FreeBSD and could be a great addition to the TrustedBSD > project. > > We are still in the begining of the project and since this is our first > effort in implementing a device driver we are trying to gather and read > all available documentation on the subject first. However, we were > unable to find a source of information related to how the BSD kernel and > device communication is implemented and we would greatly appreciate it > if you could point us one; either in form of a book or an > article/tutorial. > > Last but not least, we'd like to make clear that we are oppossed to any > DRM-related use of this device, however we believe that the TPM can be > used in security or cryptographic applications. > > Thanks in advance for your time. > > Best Regards, > Marinos Ilias > Mellos Seraphim > > > -- > echo "Sysadmin know better bash than english." | sed s/min/mins/ \ > | sed 's/better bash/bash better/' This book[1] is very good, well worth a read. Not totally upto date, but reasonabley so. Cheers Tom [1] http://www.amazon.com/Design-Implementation-FreeBSD-Operating-System/dp/0201702452 From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 15:32:51 2008 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 3ACE8106564A for ; Mon, 1 Dec 2008 15:32:51 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id DBB608FC19 for ; Mon, 1 Dec 2008 15:32:50 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so965876ywe.13 for ; Mon, 01 Dec 2008 07:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=dMPVQ8s6f2gMRX1dUEPg3ZijSQv99EstUQeSuRCivvY=; b=jisKNcze9HkpBgC0Gx5BkeKMDb1G668EFuqPjxsjvS7cTzbDT8nbsxsHTBc8Qt7uOi bGFRnGGMt3+PnWRWkS73RuwpjIMpzgQxsogXcpNcWP14J+lUdUyW+Qm7w2Ko5vZdRcpt /HhHiup4+6t0dpEy5KJK0v0KN41Pw2zKWm6ek= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=kpkCKR76B4yPUyCd/FYhux5/OBrXTAPvRHVOwo7KxeKuNMCrFpKLAPaYuKZFPJhsEw W6lpL0X/X4Pi1jzRvITz0VU9kEJs/I6KNFmlE1j7JMuuCKdmhemnR3QnJmp4VI43+u9Q S8igEUz04aBpah9VrFPykp2JcS+e1j9g3jonU= Received: by 10.101.69.10 with SMTP id w10mr5792081ank.98.1228144358740; Mon, 01 Dec 2008 07:12:38 -0800 (PST) Received: from kan.dnsalias.net (c-24-62-106-68.hsd1.ma.comcast.net [24.62.106.68]) by mx.google.com with ESMTPS id c29sm1120638anc.49.2008.12.01.07.12.37 (version=SSLv3 cipher=RC4-MD5); Mon, 01 Dec 2008 07:12:37 -0800 (PST) Date: Mon, 1 Dec 2008 10:12:32 -0500 From: Alexander Kabaev To: Alexej Sokolov Message-ID: <20081201101232.42d55473@kan.dnsalias.net> In-Reply-To: <20081201013851.GA20549@debian.samsung.router> References: <20081201013851.GA20549@debian.samsung.router> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/I6uY5NvTixSBOwqSYVLYI+D"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org Subject: Re: remapping kernel buffer in VMS of user process 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 Dec 2008 15:32:51 -0000 --Sig_/I6uY5NvTixSBOwqSYVLYI+D Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 1 Dec 2008 02:38:51 +0100 Alexej Sokolov wrote: > Hello,=20 >=20 > I would like to remap some buffers allocated in kernel space to memory > space of certain process.=20 >=20 The simplest way is to expose this buffer through device pager. Implement the driver callback and let userland to simply mmap the page. --=20 Alexander Kabaev --Sig_/I6uY5NvTixSBOwqSYVLYI+D Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJM/7gQ6z1jMm+XZYRAuXpAJ4/3EqUOEhGr3QC+s1RWRpBdzrciwCgqA54 wKf/7958NLIWOp/ay5pa/wQ= =t2bm -----END PGP SIGNATURE----- --Sig_/I6uY5NvTixSBOwqSYVLYI+D-- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 15:55:01 2008 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 37AAF1065670; Mon, 1 Dec 2008 15:55:01 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id E2A238FC0C; Mon, 1 Dec 2008 15:55:00 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 9B0EC6D43F; Mon, 1 Dec 2008 15:54:59 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 75CCB844A0; Mon, 1 Dec 2008 16:54:59 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Won De Erick References: <547602.79284.qm@web45809.mail.sp1.yahoo.com> <4933A29B.8060907@gmx.de> <20081201090421.GA99082@rink.nu> <611173.7111.qm@web45805.mail.sp1.yahoo.com> <4933AFD4.3070501@gmx.de> <86fxl8qf8i.fsf@ds4.des.no> <576032.29521.qm@web45815.mail.sp1.yahoo.com> <867i6kqavq.fsf@ds4.des.no> Date: Mon, 01 Dec 2008 16:54:59 +0100 In-Reply-To: <867i6kqavq.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Mon, 01 Dec 2008 14:32:25 +0100") Message-ID: <86myffq4a4.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Christoph Mallon , Rink Springer , freebsd-hardware@freebsd.org Subject: Re: Watchdog for Boser (HS-7001) 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 Dec 2008 15:55:01 -0000 Dag-Erling Sm=C3=B8rgrav writes: > You need to load the appropriate watchdog driver first - and as far as I > know, we don't have one for the Boser HS-7001. I can't find the 7001 on Boser's web site, but their other SBCs seem to be ICH-based; try 'kldload ichwd'. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 16:34:28 2008 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 67413106567B for ; Mon, 1 Dec 2008 16:34:28 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.190]) by mx1.freebsd.org (Postfix) with ESMTP id E45A68FC24 for ; Mon, 1 Dec 2008 16:34:27 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by gv-out-0910.google.com with SMTP id n8so368525gve.39 for ; Mon, 01 Dec 2008 08:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:reply-to:mail-followup-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=/W2LLvlFYp4Nu2+oDta+ChesfzUSPN8G8Xq0dGee7Io=; b=kVvUJTrlHyuBM/Vs6BGHbloU8bTRo91/PfWo7dkyfNBNn3eKOZm+87bpIp6Z/GykwX +/jAvsfPgivNSeSf15Ha66/4+xyTZDgLal0w0ZZKFRIt2tTbPF2zODaa3WC1JjBk3WEZ QUsPtH8qNo+BA+YXliiMm1BQNcwAK5hLtfYY8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; b=wDstqn+d7mUowvb+C37H1E+mMRY9V9qOa8mz5nHXUNh9QOihvE+P9rRG5qhTGTPT0O qAACo3k1HFnC/IOupRTuVvgDISgSF8vmNCK2rEpk4rLyKJKFPIixsww/utZblPOXaEj9 C5JLfQwdMlpItLVWFKh6GorVpSyP+k52pxJI8= Received: by 10.86.79.19 with SMTP id c19mr6466160fgb.26.1228149266521; Mon, 01 Dec 2008 08:34:26 -0800 (PST) Received: from localhost (BAJ4686.baj.pppool.de [77.137.70.134]) by mx.google.com with ESMTPS id 4sm1084336fge.50.2008.12.01.08.34.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Dec 2008 08:34:25 -0800 (PST) Date: Mon, 1 Dec 2008 17:33:54 +0100 From: Alexej Sokolov To: freebsd-hackers@freebsd.org Message-ID: <20081201163354.GA5282@debian.samsung.router> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20081201013851.GA20549@debian.samsung.router> <20081201101232.42d55473@kan.dnsalias.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20081201101232.42d55473@kan.dnsalias.net> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: remapping kernel buffer in VMS of user process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexej Sokolov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 16:34:28 -0000 On Mon, Dec 01, 2008 at 10:12:09AM -0500, Alexander Kabaev wrote: > On Mon, 1 Dec 2008 02:38:51 +0100 > Alexej Sokolov wrote: > > > Hello, > > > > I would like to remap some buffers allocated in kernel space to memory > > space of certain process. > > > The simplest way is to expose this buffer through device pager. > Implement the driver callback and let userland to simply mmap the page. > Sorry, but I don't understand how to do it. I know how to implement mmap through character device. But I am working with network driver. Network devices doesn't appear in file system and they don't have any interface for mmaping. I think I can try to solve with task with: vm_map_lookup - to get a vm_object of allocated space and then vm_map_find (map_of_process, ... founded_object ...) - allocate a new space in the vms of process. I try to do it now with a small hope of success :-) > -- > Alexander Kabaev -- Alexej Sokolov From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 15:58:15 2008 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 621191065670 for ; Mon, 1 Dec 2008 15:58:15 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id 33AA58FC08 for ; Mon, 1 Dec 2008 15:58:15 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L7BA6-000627-9J for freebsd-hackers@freebsd.org; Mon, 01 Dec 2008 07:58:14 -0800 Message-ID: <20774487.post@talk.nabble.com> Date: Mon, 1 Dec 2008 07:58:14 -0800 (PST) From: ancelgray To: freebsd-hackers@freebsd.org In-Reply-To: <20081130232851.GA1214@casibsd.svkt.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ancelgray@yahoo.com References: <20080121170155.GC51116@hamlet.SetFilePointer.com> <20713056.post@talk.nabble.com> <20081130232851.GA1214@casibsd.svkt.org> X-Mailman-Approved-At: Mon, 01 Dec 2008 16:59:02 +0000 Subject: Re: Hardware support for AMD Geode CS5536 audio? 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 Dec 2008 15:58:15 -0000 Lionel, This is Andrew Gray. Thanx for testing. Does the command cat sound.raw > /dev/dsp output the sound of my voice out of one of the speakers? Does it also give the bus master error message? Thanx Andrew Gray Lionel Flandrin wrote: > > On Wed, Nov 26, 2008 at 07:30:41PM -0800, ancelgray wrote: >> >> To AMD CS5536 users: >> >> This is Andrew Gray. I have finished the audio driver for the AMD CS5536 >> companion >> chip. It is working on a PC Engines Alix 1C low power board under >> FreeBSD >> 7.0. >> It can be found at: >> >> http://modelofreality.org/snd_amd5536.html >> >> Let me know how it goes. > > I own a fitpc[1] that runs an AMD Geode CPU with the AMD CS5536 > chip. I followed the README (kldloaded the module, ran the two sysctl) > and everything seemed to work fine: > - As soon as I loaded the module I got (in the system messages): > pcm0: port 0xd400-0xd47f irq 10 at device 15.3 on pci0 > pcm0: [ITHREAD] > pcm0: > > - cat /dev/sndstat says: > FreeBSD Audio Driver (newpcm: 32bit 2007061600/i386) > Installed devices: > pcm0: at io 0xd400 irq 10 kld snd_cs5536 [MPSAFE] \ > (2p:0v/1r:0v channels duplex default) > > However if I try to play something with mpg123 I get no sound and > "pcm0: bm0 bus master error" every half second or so in the system > messages. > > Please tell me if there's anything else I can provide to help you. > > [1] http://www.fit-pc.com/new/fit-pc-1-0-specifications.html > > Cheers, > -- > Lionel Flandrin > _______________________________________________ > 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" > > -- View this message in context: http://www.nabble.com/Hardware-support-for-AMD-Geode-CS5536-audio--tp15002428p20774487.html Sent from the freebsd-hackers mailing list archive at Nabble.com. From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 17:21:22 2008 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 897EB1065672 for ; Mon, 1 Dec 2008 17:21:22 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id EE37D8FC25 for ; Mon, 1 Dec 2008 17:21:21 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl144-35.kln.forthnet.gr [195.74.243.35]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mB1HL5Ef013580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 1 Dec 2008 19:21:12 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mB1HL55T049783; Mon, 1 Dec 2008 19:21:05 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mB1HL3Gm049748; Mon, 1 Dec 2008 19:21:03 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Eygene Ryabinkin References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> Date: Mon, 01 Dec 2008 19:21:03 +0200 In-Reply-To: (Eygene Ryabinkin's message of "Mon, 1 Dec 2008 11:23:40 +0300") Message-ID: <874p1nlslc.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mB1HL5Ef013580 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.825, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.57, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: Max Laier , kientzle@freebsd.org, perryh@pluto.rain.com, freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 17:21:22 -0000 On Mon, 1 Dec 2008 11:23:40 +0300, Eygene Ryabinkin wrote: > May be I am missing something, but what's wrong with the patches from > other VCS, providing that with Subversion you can exchange only by the > plain diffs? Yes, Git/Mercurial patches should be applied with 'patch > -p1', but that's all. Subversion has no notion simular to 'git > format-patch' and 'git am', if I am not messing the things up, so the > only way to exchange with others are the patches themselves. Conflicts... Git and Mercurial cannot import Subversion $FreeBSD$ lines so far, and you may end up submitting patches that include unexpanded forms of the "$FreeBSD: xxxx $" text. These will fail to apply if they same patch touches nearby lines. I like Mercurial myself, but it's some times a pain to refresh patches that touch lines near "$FreeBSD$". > The only issue I do see is about '$FreeBSD$', but plain Subversion > clients shouldn't mess with it. Bingo :) From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 19:56:06 2008 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 37F3B1065670; Mon, 1 Dec 2008 19:56:06 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id D2A4C8FC08; Mon, 1 Dec 2008 19:56:05 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=RLOS9rV5PUgvYSw8LsZWH/LXESEeYZZN8a0wAXxdY6sziAZsUf8hF5jQDf3JGpLRkXEQm6GIrdPAMqW2n4IC0NoV6cHFnukd0+nHhsJoZugzkc77WQk4bNZNwRgcquqtj6ymNZmRaCBG5WCNj8YKy+2VOps1gY/IF2Qvqc9BjjY=; Received: from phoenix.codelabs.ru (ppp91-78-248-236.pppoe.mtu-net.ru [91.78.248.236]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1L7EsG-0007D9-Af; Mon, 01 Dec 2008 22:56:04 +0300 Date: Mon, 1 Dec 2008 22:56:02 +0300 From: Eygene Ryabinkin To: Giorgos Keramidas Message-ID: <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> <874p1nlslc.fsf@kobe.laptop> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RhUH2Ysw6aD5utA4" Content-Disposition: inline In-Reply-To: <874p1nlslc.fsf@kobe.laptop> Sender: rea-fbsd@codelabs.ru Cc: Max Laier , kientzle@freebsd.org, perryh@pluto.rain.com, freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 19:56:06 -0000 --RhUH2Ysw6aD5utA4 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Giorgos, good day. Mon, Dec 01, 2008 at 07:21:03PM +0200, Giorgos Keramidas wrote: > On Mon, 1 Dec 2008 11:23:40 +0300, Eygene Ryabinkin wrote: > > May be I am missing something, but what's wrong with the patches from > > other VCS, providing that with Subversion you can exchange only by the > > plain diffs? Yes, Git/Mercurial patches should be applied with 'patch > > -p1', but that's all. Subversion has no notion simular to 'git > > format-patch' and 'git am', if I am not messing the things up, so the > > only way to exchange with others are the patches themselves. >=20 > Conflicts... >=20 > Git and Mercurial cannot import Subversion $FreeBSD$ lines so far, and > you may end up submitting patches that include unexpanded forms of the > "$FreeBSD: xxxx $" text. These will fail to apply if they same patch > touches nearby lines. Ahm, yes. "sed -e's|$FreeBSD: [^$]* \$|$FreeBSD$|g'" should help in this case. Thanks for clarification! --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --RhUH2Ysw6aD5utA4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkk0QVEACgkQthUKNsbL7YgV1wCcDeOXAA9ToMioINp7oM2xZqcS O7UAnja9iZIfUr4esi/gJJgEwwlSZhdn =Y8eQ -----END PGP SIGNATURE----- --RhUH2Ysw6aD5utA4-- From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 22:16:28 2008 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 9150F1065672 for ; Mon, 1 Dec 2008 22:16:28 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 0F42F8FC0C for ; Mon, 1 Dec 2008 22:16:27 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl144-35.kln.forthnet.gr [195.74.243.35]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mB1MG97a030716 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 2 Dec 2008 00:16:16 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mB1MG9pX003561; Tue, 2 Dec 2008 00:16:09 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mB1MG8cA003560; Tue, 2 Dec 2008 00:16:08 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Eygene Ryabinkin References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> <874p1nlslc.fsf@kobe.laptop> <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> Date: Tue, 02 Dec 2008 00:16:08 +0200 In-Reply-To: <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> (Eygene Ryabinkin's message of "Mon, 1 Dec 2008 22:56:02 +0300") Message-ID: <87prkbk0d3.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mB1MG97a030716 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.232, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.17, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 22:16:28 -0000 On Mon, 1 Dec 2008 22:56:02 +0300, Eygene Ryabinkin wrote: > Giorgos, good day. Hi Eygene, thanks. The same to you too :) >> Git and Mercurial cannot import Subversion $FreeBSD$ lines so far, >> and you may end up submitting patches that include unexpanded forms >> of the "$FreeBSD: xxxx $" text. These will fail to apply if they >> same patch touches nearby lines. > > Ahm, yes. "sed -e's|$FreeBSD: [^$]* \$|$FreeBSD$|g'" should help in > this case. > > Thanks for clarification! Having said that, I have been using a patched version of the `crew' branch of Mercurial, for local FreeBSD work. I didn't want to convert the *full* history of the /head branch from Subversion, so I started by converting only the changes of 2008, using a local Subversion mirror for speed. The `convert' extension of Hg can pull changesets from Subversion, using the py-subversion bindings. An initial conversion of all the 2008 commits of the /head branch was bootstrapped with: % mkdir -p /hg/bsd % cd /hg/bsd % hg convert --config convert.svn.startrev='175021' \ --config convert.svn.trunk='head' \ --config convert.svn.branches='' \ --config convert.svn.tags='' \ file:///home/svn/base/ head After running for a while, this produced `/hg/bsd/head/.hg' which takes about 200 MB of space now, and it includes 6600+ changesets so far: % hg -R /hg/bsd/head tip changeset: 6603:bfec3e11214e branch: head tag: tip user: jasone date: Mon Dec 01 10:20:59 2008 +0000 summary: Fix a lock order reversal bug that could cause deadlock during fork(2). % Rerunning the same command can incrementally pull only the new changes from Subversion, and it is fast enough that I saved it to a shell script called `/hg/bsd/pull-head.sh' and I run it from time to time, whenever I want to resync with 8.0-CURRENT: % pwd /hg/bsd % \time ./pull-head.sh scanning source... sorting... converting... 10 Adjustments to make a tags file a bit more suitable to amd64. 9 Fix fread() to return a correct value on platforms where sizeof(int) != 8 Catch up with the disappearance of sys/dev/hfa. 7 Trivial patch to show on which geom has the error been detected. 6 The times(3) function returns the number of CLK_TCKs since the 5 import ath hal 4 Switch to ath hal source code. Note this removes the ath_hal 3 Fix typo. 2 Add controller suspend/resume support. 1 Invoke _rtld_atfork_post earlier, before we reinitialize rtld locks 0 Add ixgbe(4) and upgt(4). 12.06 real 3.52 user 1.42 sys % It's nice to be able to use local-only operation for merging some of the patches I have to test, so it may be useful to anyone who wants to keep doing local FreeBSD work with Hg. In particular, it's nice to be able to look at the local diffs very very fast. Once the filesystem cache is "warmed" with the .hg/ contents of one workspace, I like being able to see stuff like: % \time hg diff -r bfec3e11214e:tip > /dev/null 1.81 real 1.30 user 0.41 sys % I'll try to write to the Wiki how I keep a few local patches around, using a clone of the converted source tree. From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 22:20:20 2008 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 D08EF1065677 for ; Mon, 1 Dec 2008 22:20:20 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by mx1.freebsd.org (Postfix) with ESMTP id A89B88FC1A for ; Mon, 1 Dec 2008 22:20:20 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by wf-out-1314.google.com with SMTP id 24so2894396wfg.7 for ; Mon, 01 Dec 2008 14:20:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=+eS3K4164XbRTA4p23YkEh57og3P8j4on+gRPinIEQ4=; b=n3CnEBsrjYPE81hiNZd+cB6s6wtPYdwjdOTFLyJcAZAgYNIaAS7miV3+ALw4xrO64z SnLuGfyv88ZlrtvMwusIhcfJd98KKXAdx4E5cbemuW99rnOrUE3VsiKBh5XDrh0UXhYV nKXfXroUjk6496ob2y6yROjXANC9KtwqQRR58= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=OWSf6kEtp8VXAH+/PsnHlAVywcvSPV7VPQRs684Ez0XIRJUn+MyHtnSvssDXQmQT2/ D0sTzed/w/NhUX3h72ESTfLe+cVYP4HivSXeefbbm9t+Jlgnn+w1Dp6jy88Klvw604ho q1t/b6ju71XW9F262cNh7zLS+xUphbYRdllq4= Received: by 10.115.89.18 with SMTP id r18mr6844543wal.111.1228170020412; Mon, 01 Dec 2008 14:20:20 -0800 (PST) Received: by 10.114.76.4 with HTTP; Mon, 1 Dec 2008 14:20:20 -0800 (PST) Message-ID: <671bb5fc0812011420o6f20d8a0j691e4650aca2733f@mail.gmail.com> Date: Mon, 1 Dec 2008 23:20:20 +0100 From: "Alexej Sokolov" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: getting vm_object from allocated memory in kernel 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 Dec 2008 22:20:20 -0000 SGVsbG8sCkkgdHJ5IHRvIGFsbG9jYXRlIGEgbWVtb3J5IGluIHRoZSBzeXN0ZW0gY2FsbCBhbmQg dGhlbiBJIHdvdWxkIGxpa2UgdG8gZ2V0CnZtX29iamVjdApvZiBhbGxvY2F0ZWQgc3BhY2UgdG8g cmVtYXAgaXQgbGF0ZXI6CgovKiBTeXNjYWxsIGZ1bmMgKi8Kc3RhdGljIGludApzeXNjZihzdHJ1 Y3QgdGhyZWFkICp0ZCwgdm9pZCAqc2EpCnsKLi4uCiAgICAgICAgdm1fb2Zmc2V0X3QgYWRkcjsK Li4uCiAgICAgICAgTUFMTE9DKGFkZHIsIHZtX29mZnNldF90LCBQQUdFX1NJWkUsIE1fREVWQlVG LCBNX1dBSVRPSyB8IE1fWkVSTyk7CgovKiBUaGVuIEkgdHJ5IHRvIGdldCB2bV9vYmogKi8KICAg ICAgICB2bV9tYXBfbG9va3VwKCZrZXJuZWxfbWFwLCBhZGRyLCBWTV9QUk9UX0FMTCwKICAgICAg ICAgICAgICAgICAgICAgICAgJm15ZW50cnksICZteW9iamVjdCwgJm15cGluZGV4LCAmbXlwcm90 LCAmbXl3aXJlZCk7Ci8qIE9VVCAqLwogICAgICAgIHZtX21hcF9sb29rdXBfZG9uZSgma2VybmVs X21hcCwgbXllbnRyeSk7CgovKiBJZiBpIHRyeSB0byBtYWtlIHN5c3RlbSBjYWxsIGl0IHdvcmsg c3VjY2Vzc2Z1bCBidXQgYWZ0ZXIgYSBmZXcgc2Vjb25kcwpoYXBwZW5zCiAgICBrZXJuZWwgcGFu aWMgKi8KCi4uLgp9Cgpjb3VsZCBhbnlvbmUgZ2l2ZSBtZSBhIHRpcCB3aGF0IEkgZG8gd3Jvbmcg PwoKIyBrZ2RiIGtlcm5lbC5kZWJ1Zwp2bWNvcmUuMTAKL2hvbWUvYWxleGFuZHJlL2FsZXhhbmRy ZS1kYS9taXNjL2NyYXNoCmtnZGI6IGt2bV9ubGlzdChfc3RvcHBlZF9jcHVzKToKa2dkYjoga3Zt X25saXN0KF9zdG9wcGNicyk6CltHREIgd2lsbCBub3QgYmUgYWJsZSB0byBkZWJ1ZyB1c2VyLW1v ZGUgdGhyZWFkczogL3Vzci9saWIvbGlidGhyZWFkX2RiLnNvOgpVbmRlZmluZWQgc3ltYm9sICJw c19wZ2xvYmFsX2xvb2t1cCJdCkdOVSBnZGIgNi4xLjEgW0ZyZWVCU0RdCkNvcHlyaWdodCAyMDA0 IEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgpHREIgaXMgZnJlZSBzb2Z0d2FyZSwgY292 ZXJlZCBieSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB5b3UgYXJlCndlbGNv bWUgdG8gY2hhbmdlIGl0IGFuZC9vciBkaXN0cmlidXRlIGNvcGllcyBvZiBpdCB1bmRlciBjZXJ0 YWluCmNvbmRpdGlvbnMuClR5cGUgInNob3cgY29weWluZyIgdG8gc2VlIHRoZSBjb25kaXRpb25z LgpUaGVyZSBpcyBhYnNvbHV0ZWx5IG5vIHdhcnJhbnR5IGZvciBHREIuICBUeXBlICJzaG93IHdh cnJhbnR5IiBmb3IgZGV0YWlscy4KVGhpcyBHREIgd2FzIGNvbmZpZ3VyZWQgYXMgImkzODYtbWFy Y2VsLWZyZWVic2QiLgoKVW5yZWFkIHBvcnRpb24gb2YgdGhlIGtlcm5lbCBtZXNzYWdlIGJ1ZmZl cjoKa2VybmVsIHRyYXAgMTIgd2l0aCBpbnRlcnJ1cHRzIGRpc2FibGVkCgoKRmF0YWwgdHJhcCAx MjogcGFnZSBmYXVsdCB3aGlsZSBpbiBrZXJuZWwgbW9kZQpmYXVsdCB2aXJ0dWFsIGFkZHJlc3Mg ICA9IDB4MTQKZmF1bHQgY29kZSAgICAgICAgICAgICAgPSBzdXBlcnZpc29yIHJlYWQsIHBhZ2Ug bm90IHByZXNlbnQKaW5zdHJ1Y3Rpb24gcG9pbnRlciAgICAgPSAweDIwOjB4YzA1ODkwMjgKc3Rh Y2sgcG9pbnRlciAgICAgICAgICAgPSAweDI4OjB4ZTdhODM3NTgKZnJhbWUgcG9pbnRlciAgICAg ICAgICAgPSAweDI4OjB4ZTdhODM3NzQKY29kZSBzZWdtZW50ICAgICAgICAgICAgPSBiYXNlIDB4 MCwgbGltaXQgMHhmZmZmZiwgdHlwZSAweDFiCiAgICAgICAgICAgICAgICAgICAgICAgID0gRFBM IDAsIHByZXMgMSwgZGVmMzIgMSwgZ3JhbiAxCnByb2Nlc3NvciBlZmxhZ3MgICAgICAgID0gcmVz dW1lLCBJT1BMID0gMApjdXJyZW50IHByb2Nlc3MgICAgICAgICA9IDc5MiAoenNoKQpwYW5pYzog ZnJvbSBkZWJ1Z2dlcgpVcHRpbWU6IDIwbTU5cwpQaHlzaWNhbCBtZW1vcnk6IDIwMzQgTUIKRHVt cGluZyA3MyBNQjogNTggNDIgMjYgMTAKCiMwICBkb2FkdW1wICgpIGF0IHBjcHUuaDoxOTUKMTk1 ICAgICBwY3B1Lmg6IE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkuCiAgICAgICAgaW4gcGNwdS5o CihrZ2RiKSkgYnQKIzAgIGRvYWR1bXAgKCkgYXQgcGNwdS5oOjE5NQojMSAgMHhjMDU1OGMwMyBp biBib290IChob3d0bz0yNjApIGF0IC91c3Ivc3JjL3N5cy9rZXJuL2tlcm5fc2h1dGRvd24uYzo0 MDkKIzIgIDB4YzA1NThlMmMgaW4gcGFuaWMgKGZtdD1WYXJpYWJsZSAiZm10IiBpcyBub3QgYXZh aWxhYmxlLgopIGF0IC91c3Ivc3JjL3N5cy9rZXJuL2tlcm5fc2h1dGRvd24uYzo1NjMKIzMgIDB4 YzA0NTc5MjcgaW4gZGJfcGFuaWMgKGFkZHI9Q291bGQgbm90IGZpbmQgdGhlIGZyYW1lIGJhc2Ug Zm9yCiJkYl9wYW5pYyIuCikgYXQgL3Vzci9zcmMvc3lzL2RkYi9kYl9jb21tYW5kLmM6NDMzCiM0 ICAweGMwNDU4MDg1IGluIGRiX2NvbW1hbmRfbG9vcCAoKSBhdCAvdXNyL3NyYy9zeXMvZGRiL2Ri X2NvbW1hbmQuYzo0MDEKIzUgIDB4YzA0NTlhYjUgaW4gZGJfdHJhcCAodHlwZT0xMiwgY29kZT0w KSBhdAovdXNyL3NyYy9zeXMvZGRiL2RiX21haW4uYzoyMjIKIzYgIDB4YzA1N2VkODQgaW4ga2Ri X3RyYXAgKHR5cGU9MTIsIGNvZGU9MCwgdGY9MHhlN2E4MzcxOCkgYXQKL3Vzci9zcmMvc3lzL2tl cm4vc3Vicl9rZGIuYzo1MDIKIzcgIDB4YzA2YjNlZGYgaW4gdHJhcF9mYXRhbCAoZnJhbWU9MHhl N2E4MzcxOCwgZXZhPTIwKSBhdAovdXNyL3NyYy9zeXMvaTM4Ni9pMzg2L3RyYXAuYzo4OTAKIzgg IDB4YzA2YjQ4OWEgaW4gdHJhcCAoZnJhbWU9MHhlN2E4MzcxOCkgYXQKL3Vzci9zcmMvc3lzL2kz ODYvaTM4Ni90cmFwLmM6MjgwCiM5ICAweGMwNjlkYWNiIGluIGNhbGx0cmFwICgpIGF0IC91c3Iv c3JjL3N5cy9pMzg2L2kzODYvZXhjZXB0aW9uLnM6MTM5CiMxMCAweGMwNTg5MDI4IGluIHByb3Bh Z2F0ZV9wcmlvcml0eSAodGQ9MHhjNTk2MzIxMCkgYXQKL3Vzci9zcmMvc3lzL2tlcm4vc3Vicl90 dXJuc3RpbGUuYzoyNzIKIzExIDB4YzA1ODk5YTkgaW4gdHVybnN0aWxlX3dhaXQgKHRzPTB4YzUw ODM4NzAsIG93bmVyPTB4YzU5NjMyMTAsCnF1ZXVlPVZhcmlhYmxlICJxdWV1ZSIgaXMgbm90IGF2 YWlsYWJsZS4KKSBhdCAvdXNyL3NyYy9zeXMva2Vybi9zdWJyX3R1cm5zdGlsZS5jOjczOQojMTIg MHhjMDU0Y2RiZCBpbiBfbXR4X2xvY2tfc2xlZXAgKG09MHhjMTQ1NDBlOCwgdGlkPTMzMTI4OTg1 NzYsIG9wdHM9MCwKZmlsZT0weDAsIGxpbmU9MCkgYXQgL3Vzci9zcmMvc3lzL2tlcm4va2Vybl9t dXRleC5jOjQxNgojMTMgMHhjMDU0ZDE0MSBpbiBfbXR4X2xvY2tfZmxhZ3MgKG09MHhjMTQ1NDBl OCwgb3B0cz0wLCBmaWxlPTB4MCwgbGluZT0wKQphdCAvdXNyL3NyYy9zeXMva2Vybi9rZXJuX211 dGV4LmM6MTg2CiMxNCAweGMwNjZjMjM0IGluIF92bV9tYXBfbG9jayAobWFwPTB4YzE0NTQwOGMs IGZpbGU9MHgwLCBsaW5lPTApIGF0Ci91c3Ivc3JjL3N5cy92bS92bV9tYXAuYzo0NDkKIzE1IDB4 YzA2NjllNGEgaW4ga21lbV9tYWxsb2MgKG1hcD0weGMxNDU0MDhjLCBzaXplPTQwOTYsIGZsYWdz PTI1OSkgYXQKL3Vzci9zcmMvc3lzL3ZtL3ZtX2tlcm4uYzoyOTYKIzE2IDB4YzA2NjBhNzcgaW4g cGFnZV9hbGxvYyAoem9uZT0weGMxNDQ1NzgwLCBieXRlcz00MDk2LCBwZmxhZz0weGU3YTgzODhm CiJcMDAyXDIwMFwyMDdE77+9XDAwMyIsIHdhaXQ9MjU5KSBhdCAvdXNyL3NyYy9zeXMvdm0vdW1h X2NvcmUuYzo5NTUKIzE3IDB4YzA2NWZiM2MgaW4gc2xhYl96YWxsb2MgKHpvbmU9MHhjMTQ0NTc4 MCwgd2FpdD0yNTkpIGF0Ci91c3Ivc3JjL3N5cy92bS91bWFfY29yZS5jOjgyMAojMTggMHhjMDY2 MDAxNCBpbiB1bWFfem9uZV9zbGFiICh6b25lPTB4YzE0NDU3ODAsIGZsYWdzPTMpIGF0Ci91c3Iv c3JjL3N5cy92bS91bWFfY29yZS5jOjIwMTAKIzE5IDB4YzA2NjMyODYgaW4gdW1hX3phbGxvY19h cmcgKHpvbmU9MHhjMTQ0NTc4MCwgdWRhdGE9MHgwLCBmbGFncz0zKSBhdAovdXNyL3NyYy9zeXMv dm0vdW1hX2NvcmUuYzoyMTExCiMyMCAweGMwNWJmNjJmIGluIGNhY2hlX2VudGVyIChkdnA9MHhj NTcyNDc3MCwgdnA9MHgwLCBjbnA9MHhlN2E4M2JkMCkgYXQKdW1hLmg6Mjc3CiMyMSAweGMwNjUy MWQ4IGluIHVmc19sb29rdXAgKGFwPTB4ZTdhODNhMDApIGF0Ci91c3Ivc3JjL3N5cy91ZnMvdWZz L3Vmc19sb29rdXAuYzo0NDYKIzIyIDB4YzA2YzllZTIgaW4gVk9QX0NBQ0hFRExPT0tVUF9BUFYg KHZvcD0weGMwNzNhMTgwLCBhPTB4ZTdhODNhMDApIGF0CnZub2RlX2lmLmM6MTUzCiMyMyAweGMw NWJmZmEwIGluIHZmc19jYWNoZV9sb29rdXAgKGFwPTB4ZTdhODNhODQpIGF0IHZub2RlX2lmLmg6 ODMKIzI0IDB4YzA2Y2JiMjYgaW4gVk9QX0xPT0tVUF9BUFYgKHZvcD0weGMwNzNhNmEwLCBhPTB4 ZTdhODNhODQpIGF0CnZub2RlX2lmLmM6OTkKIzI1IDB4YzA1YzY0YzEgaW4gbG9va3VwIChuZHA9 MHhlN2E4M2JhOCkgYXQgdm5vZGVfaWYuaDo1NwojMjYgMHhjMDVjNzExOCBpbiBuYW1laSAobmRw PTB4ZTdhODNiYTgpIGF0Ci91c3Ivc3JjL3N5cy9rZXJuL3Zmc19sb29rdXAuYzoyMTkKIzI3IDB4 YzA1ZDRiNWQgaW4ga2Vybl9zdGF0ICh0ZD0weGM1NzZkMjEwLCBwYXRoPTB4YmZiZTUyMzggPEFk ZHJlc3MKMHhiZmJlNTIzOCBvdXQgb2YgYm91bmRzPiwgcGF0aHNlZz1VSU9fVVNFUlNQQUNFLCBz YnA9MHhlN2E4M2MxOCkKICAgIGF0IC91c3Ivc3JjL3N5cy9rZXJuL3Zmc19zeXNjYWxscy5jOjIx MDkKIzI4IDB4YzA1ZDRkMGYgaW4gc3RhdCAodGQ9MHhjNTc2ZDIxMCwgdWFwPTB4ZTdhODNjZmMp IGF0Ci91c3Ivc3JjL3N5cy9rZXJuL3Zmc19zeXNjYWxscy5jOjIwOTMKIzI5IDB4YzA2YjQ0Yjcg aW4gc3lzY2FsbCAoZnJhbWU9MHhlN2E4M2QzOCkgYXQKL3Vzci9zcmMvc3lzL2kzODYvaTM4Ni90 cmFwLmM6MTAzNQojMzAgMHhjMDY5ZGIzMCBpbiBYaW50MHg4MF9zeXNjYWxsICgpIGF0Ci91c3Iv c3JjL3N5cy9pMzg2L2kzODYvZXhjZXB0aW9uLnM6MTk2CiMzMSAweDAwMDAwMDMzIGluID8/ICgp ClByZXZpb3VzIGZyYW1lIGlubmVyIHRvIHRoaXMgZnJhbWUgKGNvcnJ1cHQgc3RhY2s/KQo= From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 01:19:11 2008 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 897B71065702 for ; Tue, 2 Dec 2008 01:19:11 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from mail-gx0-f19.google.com (mail-gx0-f19.google.com [209.85.217.19]) by mx1.freebsd.org (Postfix) with ESMTP id 334938FC1E for ; Tue, 2 Dec 2008 01:19:11 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by gxk12 with SMTP id 12so1512694gxk.19 for ; Mon, 01 Dec 2008 17:19:10 -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:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding :from; bh=b/REILtsak0lVEYuQqw4RqH3kFAPFF7M+6a5sPhg2Ok=; b=JOwuAjll03105qzNlEKp+/vment9ICSO4p3el6PXxmxxb774ItdWNwXMM5fKNuJdwU OcgirIPB0g1ThTzc2ni4TXC7oDK5iiwFepV/2m16ZWpEMqaSqWQJG4LxKbsQpiEXecYW 8d0yGa8CMbaNpk6JhtcZZjKKZqR2p/hYFInBU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding:from; b=UowJsPEEnwbbSAF8t0+gHUqE36KHfrJTifIfWcekCCxYRs8PlNMT3CElExwc0vaOxG /z1SLEhERmifROel2Ulk/Br5zqG8L8YYo4adJBVaNWk1435/YYk2bNsEFaZ82uX6ACJq NPUF7LDnG/EPv706+S/isukfnv39RyNNHCTzs= Received: by 10.90.98.13 with SMTP id v13mr6311395agb.28.1228180750033; Mon, 01 Dec 2008 17:19:10 -0800 (PST) Received: from aargh.lan (ool-182d26f3.dyn.optonline.net [24.45.38.243]) by mx.google.com with ESMTPS id 6sm5419496agd.37.2008.12.01.17.19.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Dec 2008 17:19:08 -0800 (PST) Message-ID: <49348D00.1040406@gmail.com> Date: Mon, 01 Dec 2008 20:18:56 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Alexander Leidinger References: <49320FF7.4040901@gmail.com> <4932122A.8070209@delphij.net> <493214DC.2080904@gmail.com> <20081130004331.086941f3@tau> <49329F4A.3070004@gmail.com> <20081130103156.6e4da70c@tau> <20081201083604.545172dag60hadc0@webmail.leidinger.net> In-Reply-To: <20081201083604.545172dag60hadc0@webmail.leidinger.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit From: Eitan Adler Cc: Bruce Cran , freebsd-hackers@freebsd.org, d@delphij.net Subject: Re: change to ee.c 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 Dec 2008 01:19:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alexander Leidinger wrote: > It _may_ be more easy to find out which version is in our source tree, > and make a diff between the original vendor version and what we have. > Depending on the amount of changes there, this is faster than to real > all the version control logs to determine if there's a difference or > not. In the end you have to read some logs too, but only those, which > change lines which a different from those of the vendor version (e.g. > via the annotated view at cvsweb.freebsd.org). I think I'm going to work on diff from current vendor release to ours and see what happens. - -- Eitan Adler GNU Key fingerptrint: 2E13 BC16 5F54 0FBD 62ED 42B6 B65F 24AB E9C2 CCD1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkk0jP8ACgkQtl8kq+nCzNHFvgCfcs7/au6FohllKbVTmMHjttn1 178Aniek69WKfyOHyh7woO9sDeBwNLMU =ds5J -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 03:36:33 2008 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 76E28106564A for ; Tue, 2 Dec 2008 03:36:33 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 5E3A48FC18 for ; Tue, 2 Dec 2008 03:36:33 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id mB23aWIh082264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 1 Dec 2008 19:36:32 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id mB23aWYt082263; Mon, 1 Dec 2008 19:36:32 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA07474; Mon, 1 Dec 08 19:12:52 PST Date: Mon, 01 Dec 2008 19:16:22 -0800 From: perryh@pluto.rain.com To: laladelausanne@gmail.com Message-Id: <4934a886.x0zd2wiIrFlfIq2T%perryh@pluto.rain.com> References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <49332E5C.9020303@freebsd.org> <200812011231.52262.fbsd.hackers@rachie.is-a-geek.net> In-Reply-To: <200812011231.52262.fbsd.hackers@rachie.is-a-geek.net> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: How to build kernel module spread on subdirectories? 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 Dec 2008 03:36:33 -0000 > As you discovered, includes are done before targets. You would > need seperate invocations of make, to generate the file and get > it included. Provided the module in question is contemplated for delivery as a port, rather than as part of the base -- so that having a build dependency on a port is tolerable -- perhaps it would be more easily built using devel/gmake? From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 05:13:08 2008 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 59FCC1065672; Tue, 2 Dec 2008 05:13:08 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC888FC0A; Tue, 2 Dec 2008 05:13:08 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id mB25Cq7v093328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 1 Dec 2008 21:12:54 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id mB25CqQv093327; Mon, 1 Dec 2008 21:12:52 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA07682; Mon, 1 Dec 08 21:04:54 PST Date: Mon, 01 Dec 2008 21:08:25 -0800 From: perryh@pluto.rain.com To: rea-fbsd@codelabs.ru, keramida@ceid.upatras.gr Message-Id: <4934c2c9./+HbbGwhphjtaXAT%perryh@pluto.rain.com> References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> <874p1nlslc.fsf@kobe.laptop> <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> In-Reply-To: <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: max@love2party.net, kientzle@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 05:13:08 -0000 > > Git and Mercurial cannot import Subversion $FreeBSD$ lines > > so far, and you may end up submitting patches that include > > unexpanded forms of the "$FreeBSD: xxxx $" text. These will > > fail to apply if they same patch touches nearby lines. > > Ahm, yes. "sed -e's|$FreeBSD: [^$]* \$|$FreeBSD$|g'" should help > in this case. Not sure I understand what is meant by "unexpanded" here, since it looks as if this sed example would convert an "expanded" form -- containing the version info -- to an "unexpanded" one that merely shows where that info should go. Perhaps it's my ClearCase background showing through, but I'd think it highly desirable for a patch to include what I think of as the expanded tag line -- including the version info, as it appears in the distributed files under /usr/src -- thereby explicitly showing the version on which the patch is based (the "base contributor" in ClearCase-speak). This should greatly simplify merging in the (likely) event that other development has occurred on the same file in the meantime -- provided one is using a 3-way merge tool that understands such things. From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 06:46:25 2008 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 DE9AD106564A for ; Tue, 2 Dec 2008 06:46:25 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id BCB378FC1E for ; Tue, 2 Dec 2008 06:46:25 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L7P1d-0001WJ-0Q for freebsd-hackers@freebsd.org; Mon, 01 Dec 2008 22:46:25 -0800 Message-ID: <20786956.post@talk.nabble.com> Date: Mon, 1 Dec 2008 22:46:25 -0800 (PST) From: ancelgray To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ancelgray@yahoo.com References: <20080121170155.GC51116@hamlet.SetFilePointer.com> <20713056.post@talk.nabble.com> X-Mailman-Approved-At: Tue, 02 Dec 2008 07:01:05 +0000 Subject: Re: Hardware support for AMD Geode CS5536 audio? 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 Dec 2008 06:46:25 -0000 Lionel replies: Hi Andrew, thank you for your quick reply. "cat count.raw > /dev/dsp" does indeed work without any message in the syslog. If I try to cat /dev/urandom > /dev/dsp I get a very thin white-ish noise and still no message. (I set all levels to 100 with mixer(8)) This is rather encouraging, I hope it helps. By the way, I forgot to put the version I'm running in my last email: # uname -a FreeBSD home.svkt.org 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #1: Sat \ Nov 1 23:24:38 CET 2008 \ simias@casibsd:/home/simias/build-fitpc/obj/i386/usr/src/sys/FITPC-CONF \ i386 Tell me if I can try something else or if you want me to provide you more details about my system. I'm using a heavily trimmed down kernel configuration so maybe I inadvertently disabled something mpg123 needs. Lionell, OK, this is indeed encouraging. Perhaps my default block size of 256 bytes is too small for the 44 Khz audio. I did not test the driver with mpg123. I am using Linphone with just mono 8 Khz audio. The 256 byte block size works fine for me. I will install the mpg123 package soon and see what's up. Thanx again for testing. Andrew Gray -- View this message in context: http://www.nabble.com/Hardware-support-for-AMD-Geode-CS5536-audio--tp15002428p20786956.html Sent from the freebsd-hackers mailing list archive at Nabble.com. From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 07:45:01 2008 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 BB4C01065679; Tue, 2 Dec 2008 07:45:01 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 737098FC17; Tue, 2 Dec 2008 07:45:00 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=K6ayYwagZuh+3DbO35SFJVmKujFAJNSwCEZAzadqqRG/FZN0v1PjEnk6tVOmL/flGX3hHjCY/E7xi2Q2OauHW48eVq4fmirQmVNEFeri50Yz4oE43SX+iuzZcOwf8z10G65uFq57rcscUYkTQy0naCq2zfOYuE5Foq+m7M8tIJQ=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1L7PwI-0005fR-F6; Tue, 02 Dec 2008 10:44:58 +0300 Date: Tue, 2 Dec 2008 10:44:56 +0300 From: Eygene Ryabinkin To: perryh@pluto.rain.com Message-ID: References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> <874p1nlslc.fsf@kobe.laptop> <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> <4934c2c9./+HbbGwhphjtaXAT%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4QzzFpAwbwI4hdN6" Content-Disposition: inline In-Reply-To: <4934c2c9./+HbbGwhphjtaXAT%perryh@pluto.rain.com> Sender: rea-fbsd@codelabs.ru Cc: keramida@ceid.upatras.gr, max@love2party.net, kientzle@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 07:45:01 -0000 --4QzzFpAwbwI4hdN6 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Perry, good day. Mon, Dec 01, 2008 at 09:08:25PM -0800, perryh@pluto.rain.com wrote: > > > Git and Mercurial cannot import Subversion $FreeBSD$ lines > > > so far, and you may end up submitting patches that include > > > unexpanded forms of the "$FreeBSD: xxxx $" text. These will > > > fail to apply if they same patch touches nearby lines. > > > > Ahm, yes. "sed -e's|$FreeBSD: [^$]* \$|$FreeBSD$|g'" should help > > in this case. >=20 > Not sure I understand what is meant by "unexpanded" here, since > it looks as if this sed example would convert an "expanded" form > -- containing the version info -- to an "unexpanded" one that > merely shows where that info should go. If you'll look at the diffs that are provided by Subversion, you'll see that '$Id$' tags at the diff are shrinked to the '$Id' if keyword expansion is enabled. For example, ----- Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- ChangeLog (revision 40) +++ ChangeLog (working copy) @@ -1,4 +1,5 @@ $Id$ +add Current version: - Added CRL check for all certificates in chain during S/MIME ----- while original ChangeLog reads ----- $Id: ChangeLog 35 2008-04-11 10:02:37Z root $ add Current version: - Added CRL check for all certificates in chain during S/MIME verification. ----- The above sed command will normalize $FreeBSD$ tags (de-expand them, you're right that the wording was a bit ambigious). But I was out of coffee yesterday, so I missed an important thing: such diffs won't also apply, because you're really right: Subversion shrinks 'Id' (think 'FreeBSD') tags for diffs it is generating, but it has no command 'svn patch' that will shrink these tags, apply the diff and unshink them to the original form. And this matters when you're generating the diff against version N, but maintainer applies it to the version N + m. If I am correct, there is no simple automatic solution, but special patching as described above will be needed. Please, correct me if I am wrong. --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --4QzzFpAwbwI4hdN6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkk053gACgkQthUKNsbL7Yi05gCghXK7xnRARUWJEhQ1NMgM5WG+ YWAAn3D/g5pkQPQnpTuk57B2l2CiZT1p =In3h -----END PGP SIGNATURE----- --4QzzFpAwbwI4hdN6-- From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 10:25:05 2008 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 302191065673 for ; Tue, 2 Dec 2008 10:25:05 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id BDF9B8FC21 for ; Tue, 2 Dec 2008 10:25:04 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so2190207fgb.35 for ; Tue, 02 Dec 2008 02:25:03 -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:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=6i1BqQ4Unl89/HAfhpEgodk0+xoDFaaKoXYduSnJx/c=; b=exHB3Jc+o58kkYn9p7qltX5GJhO+nVVZzbH8w/VW3A7hpndwaYMTggQyuwYV+zCDsH q8wAPU14+mObm8HnzKZJ4jgWdHJwS87qPQ8lafYfci4GKoWYBS/NT/FHACuQfCsXaLkU Obdn7q4+KxqQTPFVPu/ZnnjvFh7vtQoYipfY0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=F0FyVxtCHL7NMAjE4pWiZ+o4OmP+qiJZ8bJu5yMr+JytTFY+tQBP9iLOJR0Og1n2R6 FrM0K75sbcyHGKDwGQXdGGVacwXJwg2P2Bi5ysWUE6yHR1nIaNYlxSvopEq1Xz5YeMEO moIAXzY0vlwYGJ349wTW+Amt7PYBrnRgDPV7U= Received: by 10.181.144.10 with SMTP id w10mr4219252bkn.30.1228211589244; Tue, 02 Dec 2008 01:53:09 -0800 (PST) Received: by 10.181.13.12 with HTTP; Tue, 2 Dec 2008 01:53:09 -0800 (PST) Message-ID: <319cceca0812020153y6cde7b0ara2cff1d1b0525e10@mail.gmail.com> Date: Tue, 2 Dec 2008 09:53:09 +0000 From: Maslan To: "FreeBSD Hackers" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Controlling a process 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 Dec 2008 10:25:05 -0000 Hi guys, What is the best way to control a process (running in chroot env): 1- Execution time 2- Memory limit And to be able to kill the process when it breaks this limits. Finally, i would like to know the exit status of the process or the signal that killed it (sigfault, .....) The idea is that I'm developing a problem judge that runs FreeBSD (something like www.spoj.pl or topcoder.com/tc) Where every problem has a run-time and a memory limit. Thanks a lot -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 10:37:41 2008 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 8ED85106564A for ; Tue, 2 Dec 2008 10:37:41 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 277E08FC0A for ; Tue, 2 Dec 2008 10:37:41 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=ZQSgXuMAmB4nZbqBHeTzrqUjhokWbnqG9ig9whOIH5vvvrObmee0Fz/Be+TTyZOBEtU3oBmJbUAcNgCwLNtgJOHDSw20UcNp/SoTeRmTot78nGDGCwS7QP0Zwf8FfQAUX7GKUX9SZa8aA/L0cvIqaiwf4Stfz810Ov41BxmnEf8=; Received: from shadow.codelabs.ru (shadow.codelabs.ru [144.206.177.8]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1L7SdN-000ODV-Nu; Tue, 02 Dec 2008 13:37:37 +0300 Date: Tue, 2 Dec 2008 13:37:36 +0300 From: Eygene Ryabinkin To: Maslan Message-ID: References: <319cceca0812020153y6cde7b0ara2cff1d1b0525e10@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8vCeF2GUdMpe9ZbK" Content-Disposition: inline In-Reply-To: <319cceca0812020153y6cde7b0ara2cff1d1b0525e10@mail.gmail.com> Sender: rea-fbsd@codelabs.ru Cc: FreeBSD Hackers Subject: Re: Controlling a process 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 Dec 2008 10:37:41 -0000 --8vCeF2GUdMpe9ZbK Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Maslan, good day. Tue, Dec 02, 2008 at 09:53:09AM +0000, Maslan wrote: > What is the best way to control a process (running in chroot env): > 1- Execution time > 2- Memory limit > And to be able to kill the process when it breaks this limits. man 2 setrlimit > Finally, i would like to know the exit status of the process or the > signal that killed it (sigfault, .....) If you're spawning the process in question, then 'man 2 wait'. --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --8vCeF2GUdMpe9ZbK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkk1D+8ACgkQthUKNsbL7Yj/IQCgnj2VojFBm1zMEzC9/zdB+jmc 68AAn1xJAU8ykZydHsAsaNq2npbRuOy2 =64RD -----END PGP SIGNATURE----- --8vCeF2GUdMpe9ZbK-- From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 11:52:59 2008 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 CA5E41065670 for ; Tue, 2 Dec 2008 11:52:59 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 25A0C8FC17 for ; Tue, 2 Dec 2008 11:52:58 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl142-13.kln.forthnet.gr [195.74.241.13]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mB2BqiWf022769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 2 Dec 2008 13:52:50 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mB2BqiX1009829; Tue, 2 Dec 2008 13:52:44 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mB2BqgMO009828; Tue, 2 Dec 2008 13:52:42 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: perryh@pluto.rain.com References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> <874p1nlslc.fsf@kobe.laptop> <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> <4934c2c9./+HbbGwhphjtaXAT%perryh@pluto.rain.com> Date: Tue, 02 Dec 2008 13:52:42 +0200 In-Reply-To: <4934c2c9./+HbbGwhphjtaXAT%perryh@pluto.rain.com> (perryh@pluto.rain.com's message of "Mon, 01 Dec 2008 21:08:25 -0800") Message-ID: <87ej0q23qt.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mB2BqiWf022769 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.205, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.19, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: keeping track of local modifications 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 Dec 2008 11:52:59 -0000 On Mon, 01 Dec 2008 21:08:25 -0800, perryh@pluto.rain.com wrote: >>> Git and Mercurial cannot import Subversion $FreeBSD$ lines so far, >>> and you may end up submitting patches that include unexpanded forms >>> of the "$FreeBSD: xxxx $" text. These will fail to apply if they >>> same patch touches nearby lines. >> >> Ahm, yes. "sed -e's|$FreeBSD: [^$]* \$|$FreeBSD$|g'" should help >> in this case. > > Not sure I understand what is meant by "unexpanded" here, since it > looks as if this sed example would convert an "expanded" form -- > containing the version info -- to an "unexpanded" one that merely > shows where that info should go. > > Perhaps it's my ClearCase background showing through, but I'd think it > highly desirable for a patch to include what I think of as the > expanded tag line -- including the version info, as it appears in the > distributed files under /usr/src -- thereby explicitly showing the > version on which the patch is based (the "base contributor" in > ClearCase-speak). This should greatly simplify merging in the > (likely) event that other development has occurred on the same file in > the meantime -- provided one is using a 3-way merge tool that > understands such things. You are right, of course. The fact that `$FreeBSD$' is extracted in unexpanded form by the current svn->hg converter is a limitation of the Python bindings of Subversion. They do not support expansion of the svn:keywords property of checked out files. From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 12:27:40 2008 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 CCE971065672; Tue, 2 Dec 2008 12:27:40 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 869E68FC17; Tue, 2 Dec 2008 12:27:40 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1L7Tjl-000Ert-J6; Tue, 02 Dec 2008 13:48:17 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: freebsd-stable@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 02 Dec 2008 13:48:17 +0200 From: Danny Braniss Message-ID: Cc: freebsd-hackers@freebsd.org Subject: btx/pxeboot problem 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 Dec 2008 12:27:40 -0000 latest pxeboot (7.1): mother-board NIC/LOM CPU ------------- ------- --- Intel SWV25 em xeon works fine SUN X2200 bge amd works fine DELL PE 2950 bce xeon failes 95% of the times hangs or goes into btx dump regs. mode :-) Intel SE7320VP21 msk xeon failes 50% of the times - hangs pxeboot with btx.S 1.45 2008/02/27 23:35:39, works fine. so it seems that changes since 1.45 have fixed it for some, but it brakes for others :-). I can help testing, but btx is way out of my league. danny From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 12:33:47 2008 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 4D6611065670 for ; Tue, 2 Dec 2008 12:33:47 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 0AB058FC1B for ; Tue, 2 Dec 2008 12:33:47 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id E17A26D449; Tue, 2 Dec 2008 12:33:45 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id A9FD4844F2; Tue, 2 Dec 2008 13:33:42 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: perryh@pluto.rain.com References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <49332E5C.9020303@freebsd.org> <200812011231.52262.fbsd.hackers@rachie.is-a-geek.net> <4934a886.x0zd2wiIrFlfIq2T%perryh@pluto.rain.com> Date: Tue, 02 Dec 2008 13:33:42 +0100 In-Reply-To: <4934a886.x0zd2wiIrFlfIq2T%perryh@pluto.rain.com> (perryh@pluto.rain.com's message of "Mon, 01 Dec 2008 19:16:22 -0800") Message-ID: <8663m269jt.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, laladelausanne@gmail.com Subject: Re: How to build kernel module spread on subdirectories? 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 Dec 2008 12:33:47 -0000 perryh@pluto.rain.com writes: > Provided the module in question is contemplated for delivery > as a port, rather than as part of the base -- so that having a build > dependency on a port is tolerable -- perhaps it would be more easily > built using devel/gmake? You'd have to reproduce most of /usr/share/mk/*.mk in gmake syntax. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 15:25:27 2008 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 24AF6106576A for ; Tue, 2 Dec 2008 15:25:27 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.188]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7038FC14 for ; Tue, 2 Dec 2008 15:25:26 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by gv-out-0910.google.com with SMTP id n8so491033gve.39 for ; Tue, 02 Dec 2008 07:25:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=6MzbSP7VgncLgsmVwhNaZU+HtIptIsr3TrHZysHw9f8=; b=YNK21I4lwaJgGqQP23bAvwSXc2EOMFLdOEIww67SASTt/A9DJ/+6uZFqhcDe4DHPjQ s/bkAuiquheAzVl43g4SHAXhsmQHfrzXX97cb9PhXYhDpzX72CiyYtUmIifsuhdddWfs 7zqeaG0lO9yjD+m008BAcIJh3eSixnvxtQv3k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=Rbcb0BpLkyNYF0nSQVqMfKN92VTS3Vehq6PWej8gW4CUa2aEBKimjJyKi+vUS8pXtz AO9+vSUwgTt0g28TLsmfYo+aGEuXNRcJD1Di7wMiQE3tjPIt2wSRSQCzWSgbqVHFkHTJ EWFNDmtHZ1haME0NSuDXB6tRAy+Nr2x81FPbo= Received: by 10.86.59.18 with SMTP id h18mr7289567fga.42.1228231525235; Tue, 02 Dec 2008 07:25:25 -0800 (PST) Received: from nslpc5.epfl.ch (nslpc5.epfl.ch [128.178.149.20]) by mx.google.com with ESMTPS id 3sm1845714fge.41.2008.12.02.07.25.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Dec 2008 07:25:24 -0800 (PST) Message-Id: <6B2CC576-A295-4430-9CC9-B7FA7C276B6D@gmail.com> From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: freebsd-hackers@freebsd.org In-Reply-To: <8663m269jt.fsf@ds4.des.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v929.2) Date: Tue, 2 Dec 2008 16:25:22 +0100 References: <711D7381-D852-4B6B-991A-84BA6DEFB679@gmail.com> <49332E5C.9020303@freebsd.org> <200812011231.52262.fbsd.hackers@rachie.is-a-geek.net> <4934a886.x0zd2wiIrFlfIq2T%perryh@pluto.rain.com> <8663m269jt.fsf@ds4.des.no> X-Mailer: Apple Mail (2.929.2) Subject: Re: How to build kernel module spread on subdirectories? 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 Dec 2008 15:25:27 -0000 On 2 Dec 2008, at 13:33 , Dag-Erling Sm=F8rgrav wrote: > perryh@pluto.rain.com writes: >> Provided the module in question is contemplated for delivery >> as a port, rather than as part of the base -- so that having a build >> dependency on a port is tolerable -- perhaps it would be more easily >> built using devel/gmake? > > You'd have to reproduce most of /usr/share/mk/*.mk in gmake syntax. That was the main reason why I decided to switch to make :) I had =20 problems with CFLAGS set in that GNUmakefile, so I wanted to extract =20 CFLAGS used to build the rest of the kernel. And it works now, without =20= any problems :) To answer the other question in other email: yes, that file needs to =20 be generated, or I would need to regenerate it whenever I add a new =20 element... Which I may forget... So, this is what I ended up using: .MAKEFILEDEPS: elements.mk beforedepend: elements.mk .if make(depend) && !exists(${.CURDIR}/elements.mk) .warning "You should first generate elements.mk" afterdepend: rm -f .depend $(MAKE) depend .endif .sinclude "elements.mk" .include Cheers, Nikola= From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 15:45:12 2008 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 E18E81065673; Tue, 2 Dec 2008 15:45:12 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 9DA238FC18; Tue, 2 Dec 2008 15:45:12 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 8D9D17309E; Tue, 2 Dec 2008 16:34:08 +0100 (CET) Date: Tue, 2 Dec 2008 16:34:08 +0100 From: Luigi Rizzo To: Danny Braniss Message-ID: <20081202153408.GC54445@onelab2.iet.unipi.it> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: btx/pxeboot problem 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 Dec 2008 15:45:13 -0000 On Tue, Dec 02, 2008 at 01:48:17PM +0200, Danny Braniss wrote: > latest pxeboot (7.1): > mother-board NIC/LOM CPU > ------------- ------- --- > Intel SWV25 em xeon works fine > SUN X2200 bge amd works fine > DELL PE 2950 bce xeon failes 95% of the times > hangs or goes into btx dump regs. mode :-) > Intel SE7320VP21 msk xeon failes 50% of the times - hangs > > pxeboot with btx.S 1.45 2008/02/27 23:35:39, works fine. > so it seems that changes since 1.45 have fixed it for some, but it > brakes for others :-). I can help testing, but btx is way out of > my league. interesting, so this is the same problem i was seeing on the Asus/amd machines here... the commit log for 1.47 mention interrupt issues which are consistent with the random hangs or errors that I see while booting over the network. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/boot/i386/btx/btx/btx.S.diff?r1=1.46;r2=1.47 I wonder if the hangs are related to interrupts coming in at the wrong time. I also wonder whether the same symptoms might also affect the standard loader and not just pxeloader, in which case the problem would be slightly more serious. I am afraid my ability to debug the problem isn't going much beyond this... cheers luigi From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 16:57:40 2008 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 86D6110656D3 for ; Tue, 2 Dec 2008 16:57:40 +0000 (UTC) (envelope-from prvs=1222a67ddc=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 0DF268FC16 for ; Tue, 2 Dec 2008 16:57:39 +0000 (UTC) (envelope-from prvs=1222a67ddc=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1228236201; x=1228841001; q=dns/txt; h=Received: Message-ID:From:To:Subject:Date:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=ybYPhkVYJ+aRoz/oQ2CoolqeJxC0yjtD32 toZaf6AWM=; b=T7MpRh53M4iEnMe70/g5c1gVVEnWbCXZhdZbUPEYXxQxbCHOob 61u0EZZKp1g33zFszQka7yEpIUEzXBUV0UzOmosOyYDLUZLgWcRgPygmMy1f6+GL CJqlzkAA7DwaUB98EXa9GcvPZZ/ML7LZNQ74SZrXiC8trZu/LRO84SdoM= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, FORGED_MUA_OUTLOOK, USER_IN_WHITELIST,USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.6) with ESMTP id md50006650251.msg for ; Tue, 02 Dec 2008 16:43:20 +0000 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 213.123.247.160 X-Return-Path: prvs=1222a67ddc=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Message-ID: <29A6B82D99A749799B4D662ABAE6A960@multiplay.co.uk> From: "Steven Hartland" To: Date: Tue, 2 Dec 2008 16:42:58 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Spam-Processed: mail1.multiplay.co.uk, Tue, 02 Dec 2008 16:43:20 +0000 X-MDAV-Processed: mail1.multiplay.co.uk, Tue, 02 Dec 2008 16:43:21 +0000 Subject: unionfs kernel panic on 7.1-PRERELEASE 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 Dec 2008 16:57:40 -0000 Not sure where to go with this one any help appreciated:- FreeBSD dedicated11.multiplay.co.uk 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #4: Tue Dec 2 16:53:30 UTC 2008 root@dedicated11.multiplay.co.uk:/usr/obj/usr/src/sys/MULTIPLAY i386 kgdb kernel /var/crash/vmcore.1 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... Unread portion of the kernel message buffer: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x150 fault code = supervisor read, page not present instruction pointer = 0x20:0xc0624115 stack pointer = 0x28:0xe62c3b80 frame pointer = 0x28:0xe62c3ba8 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 763 (srcds_i686) trap number = 12 panic: page fault cpuid = 0 Uptime: 2m5s Physical memory: 1007 MB Dumping 53 MB: 38 22 6 warning: kld_current_sos: Can't read filename: Input/output error Reading symbols from /boot/kernel/acpi.ko...Reading symbols from /boot/kernel/acpi.ko.symbols...done. done. Loaded symbols for /boot/kernel/acpi.ko Reading symbols from /boot/kernel/linprocfs.ko...Reading symbols from /boot/kernel/linprocfs.ko.symbols...done. done. Loaded symbols for /boot/kernel/linprocfs.ko Reading symbols from /boot/kernel/linux.ko...Reading symbols from /boot/kernel/linux.ko.symbols...done. done. Loaded symbols for /boot/kernel/linux.ko Reading symbols from /boot/kernel/unionfs.ko...Reading symbols from /boot/kernel/unionfs.ko.symbols...done. done. Loaded symbols for /boot/kernel/unionfs.ko #0 doadump () at pcpu.h:196 196 pcpu.h: No such file or directory. in pcpu.h (kgdb) list *0xc0624115 0xc0624115 is in getvnode (/usr/src/sys/kern/vfs_syscalls.c:3969). 3964 fp = NULL; 3965 if (fdp == NULL) 3966 error = EBADF; 3967 else { 3968 FILEDESC_SLOCK(fdp); 3969 if ((u_int)fd >= fdp->fd_nfiles || 3970 (fp = fdp->fd_ofiles[fd]) == NULL) 3971 error = EBADF; 3972 else if (fp->f_vnode == NULL) { 3973 fp = NULL; (kgdb) bt #0 doadump () at pcpu.h:196 #1 0xc05a0937 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc05a0c09 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xc072eb8c in trap_fatal (frame=0xe62c3b40, eva=336) at /usr/src/sys/i386/i386/trap.c:939 #4 0xc072ee10 in trap_pfault (frame=0xe62c3b40, usermode=0, eva=336) at /usr/src/sys/i386/i386/trap.c:852 #5 0xc072f7cc in trap (frame=0xe62c3b40) at /usr/src/sys/i386/i386/trap.c:530 #6 0xc071563b in calltrap () at /usr/src/sys/i386/i386/exception.s:159 #7 0xc0624115 in getvnode (fdp=0xc40b4d00, fd=4, fpp=0xe62c3c70) at /usr/src/sys/kern/vfs_syscalls.c:3969 #8 0xc3e2a13d in getdents_common (td=0xc408f460, args=0xe62c3cfc, is64bit=0) at /usr/src/sys/modules/linux/../../compat/linux/linux_file.c:446 #9 0xc072f165 in syscall (frame=0xe62c3d38) at /usr/src/sys/i386/i386/trap.c:1090 #10 0xc07156a0 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:255 #11 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) frame 7 #7 0xc0624115 in getvnode (fdp=0xc40b4d00, fd=4, fpp=0xe62c3c70) at /usr/src/sys/kern/vfs_syscalls.c:3969 3969 if ((u_int)fd >= fdp->fd_nfiles || (kgdb) print *fdp $1 = {fd_ofiles = 0x140, fd_ofileflags = 0x154
, fd_cdir = 0x168, fd_rdir = 0x17c, fd_jdir = 0x18c, fd_nfiles = 512, fd_map = 0xc3bed560, fd_lastfile = 4, fd_freefile = 5, fd_cmask = 18, fd_refcnt = 1, fd_holdcnt = 1, fd_sx = {lock_object = {lo_name = 0xc076e1c2 "filedesc structure", lo_type = 0xc076e1c2 "filedesc structure", lo_flags = 37421056, lo_witness_data = {lod_list = {stqe_next = 0x0}, lod_witness = 0x0}}, sx_lock = 17, sx_recurse = 0}, fd_kqlist = {slh_first = 0x0}, fd_holdleaderscount = 0, fd_holdleaderswakeup = 0} (kgdb) print fd $2 = 4 (kgdb) print fdp->fd_ofiles $3 = (struct file **) 0x140 (kgdb) print fdp->fd_ofiles[fd] Cannot access memory at address 0x150 (kgdb) print fdp->fd_ofiles[0] Cannot access memory at address 0x140 (kgdb) print *fdp->fd_ofiles Cannot access memory at address 0x140 0xc3e2a13d is in getdents_common (/usr/src/sys/modules/linux/../../compat/linux/linux_file.c:446). 441 nbytes = sizeof(linux_dirent); 442 justone = 1; 443 } else 444 justone = 0; 445 446 if ((error = getvnode(td->td_proc->p_fd, args->fd, &fp)) != 0) 447 return (error); 448 449 if ((fp->f_flag & FREAD) == 0) { 450 fdrop(fp, td); (kgdb) print *args $5 = {fd_l_ = 0xe62c3cfc "\004", fd = 4, fd_r_ = 0xe62c3d00 "°!\020\b", dirent_l_ = 0xe62c3d00 "°!\020\b", dirent = 0x81021b0, dirent_r_ = 0xe62c3d04 "", count_l_ = 0xe62c3d04 "", count = 4096, count_r_ = 0xe62c3d08 "°!\020\bô¯ (\234\235¿¿"} ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 17:08:58 2008 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 2D06C106564A for ; Tue, 2 Dec 2008 17:08:58 +0000 (UTC) (envelope-from baldur@foo.is) Received: from gremlin.foo.is (gremlin.foo.is [194.105.250.10]) by mx1.freebsd.org (Postfix) with ESMTP id D5FEE8FC16 for ; Tue, 2 Dec 2008 17:08:57 +0000 (UTC) (envelope-from baldur@foo.is) Received: from 127.0.0.1 (localhost.foo.is [127.0.0.1]) by injector.foo.is (Postfix) with SMTP id 13974DA853 for ; Tue, 2 Dec 2008 16:52:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on gremlin.foo.is X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.7 Received: by gremlin.foo.is (Postfix, from userid 1000) id 36762DA843; Tue, 2 Dec 2008 16:52:58 +0000 (GMT) Date: Tue, 2 Dec 2008 16:52:58 +0000 From: Baldur Gislason To: freebsd-hackers@freebsd.org Message-ID: <20081202165258.GM12776@gremlin.foo.is> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Help debugging, machine won't boot anymore. 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 Dec 2008 17:08:58 -0000 I have a machine running 7.0-STABLE/amd64 and it has suddenly stopped booting. It just leaves me at the debugger with this message: Fatal trap 9: general protection fault while in kernel mode cpuid = 0; apic id = 00 instruction pointer = 0x8:0xffffffff804d913d stack pointer = 0x10:0xffffffff80c9ec10 frame pointer = 0x10:0xffffffff80c9ec70 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 0 (swapper) [thread pid 0 tid 0 ] Stopped at device_probe_child+0x61: movq 0x28(%rax),%rsi db> dmesg at http://foo.is/~baldur/enigmaboot.txt The ACPI warning has always been there. Any places of interest in the debugger? What's a likely culprit? bad RAM? Baldur From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 21:15:53 2008 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 F35AA10656DC for ; Tue, 2 Dec 2008 21:15:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 899328FC28 for ; Tue, 2 Dec 2008 21:15:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1L7c25-000FNr-K3; Tue, 02 Dec 2008 22:39:45 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mB2KdfO7014096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Dec 2008 22:39:41 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mB2KdfxA006847; Tue, 2 Dec 2008 22:39:41 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mB2KddMk006845; Tue, 2 Dec 2008 22:39:39 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 2 Dec 2008 22:39:39 +0200 From: Kostik Belousov To: Steven Hartland Message-ID: <20081202203939.GD3045@deviant.kiev.zoral.com.ua> References: <29A6B82D99A749799B4D662ABAE6A960@multiplay.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCPLy5NpE1Kdjj9y" Content-Disposition: inline In-Reply-To: <29A6B82D99A749799B4D662ABAE6A960@multiplay.co.uk> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1L7c25-000FNr-K3 b580b8bc5d5333e3aa6df7c97c4ce2a2 X-Terabit: YES Cc: freebsd-hackers@freebsd.org Subject: Re: unionfs kernel panic on 7.1-PRERELEASE 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 Dec 2008 21:15:53 -0000 --FCPLy5NpE1Kdjj9y Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 02, 2008 at 04:42:58PM -0000, Steven Hartland wrote: > Not sure where to go with this one any help appreciated:- > FreeBSD dedicated11.multiplay.co.uk 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE= =20 > #4: Tue Dec 2 16:53:30 UTC 2008=20 > root@dedicated11.multiplay.co.uk:/usr/obj/usr/src/sys/MULTIPLAY i386 >=20 > kgdb kernel /var/crash/vmcore.1 > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you = are > welcome to change it and/or distribute copies of it under certain=20 > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for detail= s. > This GDB was configured as "i386-marcel-freebsd"... >=20 > Unread portion of the kernel message buffer: >=20 >=20 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 0; apic id =3D 00 > fault virtual address =3D 0x150 > fault code =3D supervisor read, page not present > instruction pointer =3D 0x20:0xc0624115 > stack pointer =3D 0x28:0xe62c3b80 > frame pointer =3D 0x28:0xe62c3ba8 > code segment =3D base 0x0, limit 0xfffff, type 0x1b > =3D DPL 0, pres 1, def32 1, gran 1 > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > current process =3D 763 (srcds_i686) > trap number =3D 12 > panic: page fault > cpuid =3D 0 > Uptime: 2m5s > Physical memory: 1007 MB > Dumping 53 MB: 38 22 6 >=20 >=20 > warning: kld_current_sos: Can't read filename: Input/output error >=20 > Reading symbols from /boot/kernel/acpi.ko...Reading symbols from=20 > /boot/kernel/acpi.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/acpi.ko > Reading symbols from /boot/kernel/linprocfs.ko...Reading symbols from=20 > /boot/kernel/linprocfs.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/linprocfs.ko > Reading symbols from /boot/kernel/linux.ko...Reading symbols from=20 > /boot/kernel/linux.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/linux.ko > Reading symbols from /boot/kernel/unionfs.ko...Reading symbols from=20 > /boot/kernel/unionfs.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/unionfs.ko > #0 doadump () at pcpu.h:196 > 196 pcpu.h: No such file or directory. > in pcpu.h > (kgdb) list *0xc0624115 > 0xc0624115 is in getvnode (/usr/src/sys/kern/vfs_syscalls.c:3969). > 3964 fp =3D NULL; > 3965 if (fdp =3D=3D NULL) > 3966 error =3D EBADF; > 3967 else { > 3968 FILEDESC_SLOCK(fdp); > 3969 if ((u_int)fd >=3D fdp->fd_nfiles || > 3970 (fp =3D fdp->fd_ofiles[fd]) =3D=3D NULL) > 3971 error =3D EBADF; > 3972 else if (fp->f_vnode =3D=3D NULL) { > 3973 fp =3D NULL; > (kgdb) bt > #0 doadump () at pcpu.h:196 > #1 0xc05a0937 in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c= :418 > #2 0xc05a0c09 in panic (fmt=3DVariable "fmt" is not available. > ) at /usr/src/sys/kern/kern_shutdown.c:574 > #3 0xc072eb8c in trap_fatal (frame=3D0xe62c3b40, eva=3D336) at=20 > /usr/src/sys/i386/i386/trap.c:939 > #4 0xc072ee10 in trap_pfault (frame=3D0xe62c3b40, usermode=3D0, eva=3D33= 6) at=20 > /usr/src/sys/i386/i386/trap.c:852 > #5 0xc072f7cc in trap (frame=3D0xe62c3b40) at=20 > /usr/src/sys/i386/i386/trap.c:530 > #6 0xc071563b in calltrap () at /usr/src/sys/i386/i386/exception.s:159 > #7 0xc0624115 in getvnode (fdp=3D0xc40b4d00, fd=3D4, fpp=3D0xe62c3c70) a= t=20 > /usr/src/sys/kern/vfs_syscalls.c:3969 > #8 0xc3e2a13d in getdents_common (td=3D0xc408f460, args=3D0xe62c3cfc,=20 > is64bit=3D0) at /usr/src/sys/modules/linux/../../compat/linux/linux_file.= c:446 > #9 0xc072f165 in syscall (frame=3D0xe62c3d38) at=20 > /usr/src/sys/i386/i386/trap.c:1090 > #10 0xc07156a0 in Xint0x80_syscall () at=20 > /usr/src/sys/i386/i386/exception.s:255 > #11 0x00000033 in ?? () > Previous frame inner to this frame (corrupt stack?) >=20 >=20 > (kgdb) frame 7 > #7 0xc0624115 in getvnode (fdp=3D0xc40b4d00, fd=3D4, fpp=3D0xe62c3c70) a= t=20 > /usr/src/sys/kern/vfs_syscalls.c:3969 > 3969 if ((u_int)fd >=3D fdp->fd_nfiles || > (kgdb) print *fdp > $1 =3D {fd_ofiles =3D 0x140, fd_ofileflags =3D 0x154
bounds>, fd_cdir =3D 0x168, fd_rdir =3D 0x17c, fd_jdir =3D 0x18c, fd_nfil= es =3D=20 > 512, fd_map =3D 0xc3bed560, fd_lastfile =3D 4, > fd_freefile =3D 5, fd_cmask =3D 18, fd_refcnt =3D 1, fd_holdcnt =3D 1, f= d_sx =3D=20 > {lock_object =3D {lo_name =3D 0xc076e1c2 "filedesc structure", lo_type = =3D=20 > 0xc076e1c2 "filedesc structure", lo_flags =3D 37421056, > lo_witness_data =3D {lod_list =3D {stqe_next =3D 0x0}, lod_witness = =3D 0x0}},=20 > sx_lock =3D 17, sx_recurse =3D 0}, fd_kqlist =3D {slh_first =3D 0x0}= ,=20 > fd_holdleaderscount =3D 0, fd_holdleaderswakeup =3D 0} > (kgdb) print fd > $2 =3D 4 > (kgdb) print fdp->fd_ofiles > $3 =3D (struct file **) 0x140 > (kgdb) print fdp->fd_ofiles[fd] > Cannot access memory at address 0x150 > (kgdb) print fdp->fd_ofiles[0] > Cannot access memory at address 0x140 > (kgdb) print *fdp->fd_ofiles > Cannot access memory at address 0x140 >=20 > 0xc3e2a13d is in getdents_common=20 > (/usr/src/sys/modules/linux/../../compat/linux/linux_file.c:446). > 441 nbytes =3D sizeof(linux_dirent); > 442 justone =3D 1; > 443 } else > 444 justone =3D 0; > 445 > 446 if ((error =3D getvnode(td->td_proc->p_fd, args->fd, &fp)= ) !=3D=20 > 0) > 447 return (error); > 448 > 449 if ((fp->f_flag & FREAD) =3D=3D 0) { > 450 fdrop(fp, td); >=20 > (kgdb) print *args > $5 =3D {fd_l_ =3D 0xe62c3cfc "\004", fd =3D 4, fd_r_ =3D 0xe62c3d00 "=9C!= \020\b",=20 > dirent_l_ =3D 0xe62c3d00 "=9C!\020\b", dirent =3D 0x81021b0, dirent_r_ = =3D=20 > 0xe62c3d04 "", count_l_ =3D 0xe62c3d04 "", count =3D 4096, > count_r_ =3D 0xe62c3d08 "=9C!\020\b?? (\234\235??"} Is it reproducable ? The start of *fdp structure looks very suspicious, fd_ofiles =3D 0x140, fd_ofileflags =3D 0x154, fd_cdir =3D 0x168, fd_rdir = =3D 0x17c, fd_jdir =3D 0x18c The values are consequently increasing by 0x14, except fd_jdir, and pointer values are wrong for kernel. --FCPLy5NpE1Kdjj9y Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkk1nQsACgkQC3+MBN1Mb4gVpwCdHk1NtUqQTWChA84F2MSsIG4P giQAn0LgFL/NzLWhosL0KSzIAe7KXG7W =d90K -----END PGP SIGNATURE----- --FCPLy5NpE1Kdjj9y-- From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 21:14:35 2008 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 B153D1065678 for ; Tue, 2 Dec 2008 21:14:35 +0000 (UTC) (envelope-from noresult@xs4all.nl) Received: from smtp-vbr4.xs4all.nl (smtp-vbr4.xs4all.nl [194.109.24.24]) by mx1.freebsd.org (Postfix) with ESMTP id 360058FC19 for ; Tue, 2 Dec 2008 21:14:34 +0000 (UTC) (envelope-from noresult@xs4all.nl) Received: from [192.168.10.200] (noresult.xs4all.nl [82.95.100.74]) (authenticated bits=0) by smtp-vbr4.xs4all.nl (8.13.8/8.13.8) with ESMTP id mB2KuaXn025090 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Tue, 2 Dec 2008 21:56:37 +0100 (CET) (envelope-from noresult@xs4all.nl) Message-Id: <54A75E03-AE64-4DD9-8D15-7A7499E73D43@xs4all.nl> From: Arjan van der Velde To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v929.2) Date: Tue, 2 Dec 2008 21:56:28 +0100 X-Mailer: Apple Mail (2.929.2) X-Virus-Scanned: by XS4ALL Virus Scanner X-Mailman-Approved-At: Tue, 02 Dec 2008 21:22:33 +0000 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: TCSBRK not implemented in linux compat 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 Dec 2008 21:14:35 -0000 Hi, While trying to get a linux binary running on FreeBSD I encountered the following problem during serial port I/O. Dec 1 22:22:34 soekris kernel: linux: pid 7239 (linuxbinary): ioctl fd=0, cmd=0x5409 ('T',9) is not implemented 0x5409 turns out to be TCSBRK, which is not implemented (yet?). Can anyone give me some clues where / how to start implementing this? It seems like the linux way of handling it is to call tcdrain(), but I'm not sure as to how this translates to the FreeBSD compat layer. Thanks, Regards, Arjan From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 21:35:07 2008 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 9BA3B106564A for ; Tue, 2 Dec 2008 21:35:07 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 4D6358FC19 for ; Tue, 2 Dec 2008 21:35:06 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id EE9419CB27A; Tue, 2 Dec 2008 22:30:33 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JPh6SfVoqzLj; Tue, 2 Dec 2008 22:30:21 +0100 (CET) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id C4A5A9CB525; Tue, 2 Dec 2008 22:30:21 +0100 (CET) Received: (from rdivacky@localhost) by lev.vlakno.cz (8.14.2/8.14.2/Submit) id mB2LULoU015134; Tue, 2 Dec 2008 22:30:21 +0100 (CET) (envelope-from rdivacky) Date: Tue, 2 Dec 2008 22:30:21 +0100 From: Roman Divacky To: Arjan van der Velde Message-ID: <20081202213021.GA14877@freebsd.org> References: <54A75E03-AE64-4DD9-8D15-7A7499E73D43@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54A75E03-AE64-4DD9-8D15-7A7499E73D43@xs4all.nl> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, ed@freebsd.org Subject: Re: TCSBRK not implemented in linux compat 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 Dec 2008 21:35:07 -0000 On Tue, Dec 02, 2008 at 09:56:28PM +0100, Arjan van der Velde wrote: > Hi, > > While trying to get a linux binary running on FreeBSD I encountered > the following problem during serial port I/O. > > Dec 1 22:22:34 soekris kernel: linux: pid 7239 (linuxbinary): ioctl > fd=0, cmd=0x5409 ('T',9) is not implemented > > 0x5409 turns out to be TCSBRK, which is not implemented (yet?). Can > anyone give me some clues where / how to start implementing this? It > seems like the linux way of handling it is to call tcdrain(), but I'm > not sure as to how this translates to the FreeBSD compat layer. I believe you want to talk to Ed Schouten as this is a TTY thing.. I CCed him From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 22:03:13 2008 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 D698B1065692 for ; Tue, 2 Dec 2008 22:03:13 +0000 (UTC) (envelope-from prvs=1222a67ddc=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 61F9C8FC20 for ; Tue, 2 Dec 2008 22:03:13 +0000 (UTC) (envelope-from prvs=1222a67ddc=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1228255338; x=1228860138; q=dns/txt; h=Received: Message-ID:From:To:Cc:References:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=KjjecJBhi1BIwdEaHdiEu voNsQWB9IlCFC386BvK+ns=; b=PskE/myM+z4Ix1AmRWKA8e9d3Q4uhMEyKHxRx /0R8CYaTXr9y+SuvpiwodCwD9qJAaZzZMMh2cdPu5K6/muQX0oOJ3VOcU/OCFkRN wpFWB7PdANbY8m85NHfWZ/SdS+7aeX7ZElKpDXvx2wPawWXVzfl9KrS8IKBoDmsV DVNbBY= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, FORGED_MUA_OUTLOOK, USER_IN_WHITELIST,USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.6) with ESMTP id md50006652240.msg for ; Tue, 02 Dec 2008 22:02:17 +0000 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 213.123.247.160 X-Return-Path: prvs=1222a67ddc=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Message-ID: <7F18FDB94BC14E3995D15F0C3BD6312D@multiplay.co.uk> From: "Steven Hartland" To: "Kostik Belousov" References: <29A6B82D99A749799B4D662ABAE6A960@multiplay.co.uk> <20081202203939.GD3045@deviant.kiev.zoral.com.ua> Date: Tue, 2 Dec 2008 22:02:13 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Spam-Processed: mail1.multiplay.co.uk, Tue, 02 Dec 2008 22:02:17 +0000 X-MDAV-Processed: mail1.multiplay.co.uk, Tue, 02 Dec 2008 22:02:18 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: unionfs kernel panic on 7.1-PRERELEASE 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 Dec 2008 22:03:13 -0000 Yes every time, I've got a half life 2 dedicated install mounted under unionfs:- mount -t unionfs -o noatime -o below /usr/local/games/hl2ds /usr/local/games/servers/1 As soon as I start the server from under servers/1 the machine panics I'm thinking its a combination of the Linux ABI and unionfs interaction which is causing the issue. Regards Steve ----- Original Message ----- From: "Kostik Belousov" To: "Steven Hartland" Cc: Sent: Tuesday, December 02, 2008 8:39 PM Subject: Re: unionfs kernel panic on 7.1-PRERELEASE Is it reproducible ? The start of *fdp structure looks very suspicious, fd_ofiles = 0x140, fd_ofileflags = 0x154, fd_cdir = 0x168, fd_rdir = 0x17c, fd_jdir = 0x18c The values are consequently increasing by 0x14, except fd_jdir, and pointer values are wrong for kernel. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 22:13:50 2008 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 C51451065673 for ; Tue, 2 Dec 2008 22:13:50 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 649108FC1B for ; Tue, 2 Dec 2008 22:13:50 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 4E9CA1CE1F; Tue, 2 Dec 2008 23:13:49 +0100 (CET) Date: Tue, 2 Dec 2008 23:13:49 +0100 From: Ed Schouten To: Arjan van der Velde Message-ID: <20081202221349.GT64969@hoeg.nl> References: <54A75E03-AE64-4DD9-8D15-7A7499E73D43@xs4all.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3a/Z8KDuKqDOIvAo" Content-Disposition: inline In-Reply-To: <54A75E03-AE64-4DD9-8D15-7A7499E73D43@xs4all.nl> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Hackers Subject: Re: TCSBRK not implemented in linux compat 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 Dec 2008 22:13:50 -0000 --3a/Z8KDuKqDOIvAo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Arjan, * Arjan van der Velde wrote: > While trying to get a linux binary running on FreeBSD I encountered the= =20 > following problem during serial port I/O. > > Dec 1 22:22:34 soekris kernel: linux: pid 7239 (linuxbinary): ioctl =20 > fd=3D0, cmd=3D0x5409 ('T',9) is not implemented > > 0x5409 turns out to be TCSBRK, which is not implemented (yet?). Can =20 > anyone give me some clues where / how to start implementing this? It =20 > seems like the linux way of handling it is to call tcdrain(), but I'm =20 > not sure as to how this translates to the FreeBSD compat layer. I think you could just make it call TIOCDRAIN directly. Unfortunately that's not correct if the argument is 0, because then we have to call TIOCSBRK and TIOCCBRK with a 250 msec interval. I guess adding some kind of printf() there should be good enough for now. I can't look into it right now, because I have to get up at 6:15 tomorrow. Sorry! :-/ --=20 Ed Schouten WWW: http://80386.nl/ --3a/Z8KDuKqDOIvAo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkk1sx0ACgkQ52SDGA2eCwX3rgCeMSbiBpZmzb0E6354tdD1dUlf BhQAnicrS/svQDk/Gp2muraPDS7WlZ04 =o/mh -----END PGP SIGNATURE----- --3a/Z8KDuKqDOIvAo-- From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 22:09:22 2008 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 78F621065673 for ; Tue, 2 Dec 2008 22:09:22 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms173003pub.verizon.net (vms173003pub.verizon.net [206.46.173.3]) by mx1.freebsd.org (Postfix) with ESMTP id 5AAD38FC17 for ; Tue, 2 Dec 2008 22:09:22 +0000 (UTC) (envelope-from babkin@verizon.net) Received: from vms226.mailsrvcs.net ([172.18.12.131]) by vms173003.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KB900BLQS736NI9@vms173003.mailsrvcs.net> for freebsd-hackers@freebsd.org; Tue, 02 Dec 2008 16:09:03 -0600 (CST) Received: from 65.242.108.162 ([65.242.108.162]) by vms226.mailsrvcs.net (Verizon Webmail) with HTTP; Tue, 02 Dec 2008 16:09:03 -0600 (CST) Date: Tue, 02 Dec 2008 16:09:03 -0600 (CST) From: Sergey Babkin X-Originating-IP: [65.242.108.162] To: noresult@xs4all.nl Message-id: <1446553908.92321228255743687.JavaMail.root@vms226.mailsrvcs.net> Content-transfer-encoding: quoted-printable X-Mailman-Approved-At: Tue, 02 Dec 2008 22:30:06 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: TCSBRK not implemented in linux compat 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 Dec 2008 22:09:22 -0000 >While trying to get = a linux binary running on FreeBSD I encountered >the following prob= lem during serial port I/O. > >Dec 1 22:22:34 soekris kernel: = linux: pid 7239 (linuxbinary): ioctl >fd=3D0, cmd=3D0x5409 ('T',9) = is not implemented > >0x5409 turns out to be TCSBRK, which is = not implemented (yet?). Can >anyone give me some clues where / how = to start implementing this? It >seems like the linux way of handlin= g it is to call tcdrain(), but I'm >not sure as to how this transla= tes to the FreeBSD compat layer. It should probably be translated to= the same BSD call. What it does is drain the buffer then send the seria= l BREAK signal: a low-voltage signal lasting longer than the length of o= ne normal character. The other side can detect this and generate an inte= rrupt, which then may get translated to a signal (see the stty parameters&n= bsp; ignbrk, brkint). -SB From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 2 23:28:26 2008 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 D8629106564A for ; Tue, 2 Dec 2008 23:28:26 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.freebsd.org (Postfix) with ESMTP id B8F498FC0A for ; Tue, 2 Dec 2008 23:28:26 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.14.3/8.14.3) with ESMTP id mB2NSQVl049528 for ; Tue, 2 Dec 2008 15:28:26 -0800 (PST) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.14.3/8.14.3/Submit) id mB2NSQa6049527 for hackers@freebsd.org; Tue, 2 Dec 2008 15:28:26 -0800 (PST) (envelope-from steve) Message-Id: <200812022328.mB2NSQa6049527@wattres.watt.com> X-Newsgroups: local.freebsd-hackers In-Reply-To: <20081201042037.GA43208@wattres.Watt.COM> From: steve@Watt.COM (Steve Watt) Organization: Watt Consultants, San Jose, CA, USA Date: Tue, 2 Dec 2008 15:28:26 -0800 X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: hackers@freebsd.org X-Archived: 1228260506.473517448@wattres.Watt.COM X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (wattres.watt.com [127.0.0.1]); Tue, 02 Dec 2008 15:28:26 -0800 (PST) Cc: Subject: Re: tcsh loses the foreground process group? 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 Dec 2008 23:28:26 -0000 In article <20081201042037.GA43208@wattres.Watt.COM> you write: [ ... ] >I'm running 6-STABLE (6.4-PRE as of 24 Nov right now), tcsh 6.15.00, which >shows > > tcsh 6.15.00 (Astron) 2007-03-03 (i386-intel-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec > >as $version. > >The symptom is that when I do a long-ish running task inside a `` expansion >that I then ^C, nobody gets the foreground process group... I never get >a prompt back after the ^C, and ^T gets me > > load: 0.27 no foreground process group [ ... ] >One portable reproduction: ># cd /usr/src ># less `egrep -lir '^Foo.*baz' *` >^Cload: 0.02 no foreground process group > >(I typed ^C ^T) > >SIGKILL to the shell seems to be the only way to get things back to >normal. I've gotten one "me too", which indicated that SIGHUP to the shell will also make it go away, but does not solve the problem. I've got another FreeBSD machine available that was running tcsh 6.14.00, and it does _NOT_ display the problem. When I build 6.15.00 on that same box (/usr/src is more up to date than the install right now), that does fail. Thus I'm pretty comfortable saying that it's a tcsh bug of some sort, and probably a regression. Hopefully this can be fixed (PR being filed now) before 6.4 releases... -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.5" / 37N 20' 15.3" Internet: steve @ Watt.COM Whois: SW32-ARIN Free time? There's no such thing. It just comes in varying prices... From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 00:15:57 2008 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 7A0B1106564A for ; Wed, 3 Dec 2008 00:15:57 +0000 (UTC) (envelope-from jamesfrancistoy@gmail.com) Received: from mail-gx0-f19.google.com (mail-gx0-f19.google.com [209.85.217.19]) by mx1.freebsd.org (Postfix) with ESMTP id 1AF778FC19 for ; Wed, 3 Dec 2008 00:15:56 +0000 (UTC) (envelope-from jamesfrancistoy@gmail.com) Received: by gxk12 with SMTP id 12so2149421gxk.19 for ; Tue, 02 Dec 2008 16:15:56 -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:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=+m7FIvnJ1tcHDUsX1OY3UKB/Z/UqxaAjqaIo8rEXneU=; b=UbhEO+EcJbrg1ybkWs+AwdP03grqIRwLgl3N0yNKzHCuhA0mz5t4H/TDB/weorZO3e MGdNsHAK0Qj/UpTT6uQ+ZF+CQquy8Vhnkq8nzMPEhoJcHGf5RhQXviRjGdoCKTjSMW11 Zhip98USK0AtKXyvgtavVDEcjA/4jTtlWzDx4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=QjozaHpJW5Fk3j7yLLpkXw5GfrW6nNaNgrReDZHEego5z2tx0DFqe2XnJ4idqueNPo M/uUTpKVEUwxMypyAJzOdSktK2qjOQeGTwm1gb0Ci/uHwXrt6FQZPIoKs5HqrTv7PCNm b4uKMY5ZnEf0AYEIOtDIel43QkL32yG0KsLVE= Received: by 10.151.110.14 with SMTP id n14mr20062028ybm.136.1228263355558; Tue, 02 Dec 2008 16:15:55 -0800 (PST) Received: by 10.151.133.10 with HTTP; Tue, 2 Dec 2008 16:15:55 -0800 (PST) Message-ID: <9f8af95f0812021615s1b06f10bl3a317da64b7263e8@mail.gmail.com> Date: Tue, 2 Dec 2008 19:15:55 -0500 From: jT Sender: jamesfrancistoy@gmail.com To: "Giorgos Keramidas" In-Reply-To: <87ej0q23qt.fsf@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> <874p1nlslc.fsf@kobe.laptop> <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> <4934c2c9./+HbbGwhphjtaXAT%perryh@pluto.rain.com> <87ej0q23qt.fsf@kobe.laptop> X-Google-Sender-Auth: b1f844b90edc61ca Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com Subject: Re: keeping track of local modifications 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 Dec 2008 00:15:57 -0000 On Tue, Dec 2, 2008 at 6:52 AM, Giorgos Keramidas wrote: > On Mon, 01 Dec 2008 21:08:25 -0800, perryh@pluto.rain.com wrote: >>>> Git and Mercurial cannot import Subversion $FreeBSD$ lines so far, >>>> and you may end up submitting patches that include unexpanded forms >>>> of the "$FreeBSD: xxxx $" text. These will fail to apply if they >>>> same patch touches nearby lines. >>> >>> Ahm, yes. "sed -e's|$FreeBSD: [^$]* \$|$FreeBSD$|g'" should help >>> in this case. > > You are right, of course. > > The fact that `$FreeBSD$' is extracted in unexpanded form by the current > svn->hg converter is a limitation of the Python bindings of Subversion. > They do not support expansion of the svn:keywords property of checked > out files. > good evening Giorgos and Eygene (and list), So am i to understand that there is no automatic way to use Hg or Git? -- and as Eygene said in order to use them in such a manner special patching will be required? I too am looking to set something else up other than my SVN repository because i personally prefer Hg and Git to SVN. Thank you to all who have contributed to this conversation it has been extremely informative for me and i'm sure several others. I hope everyone is looking forward to the holidays Respectfully, -- /jT http://git.zen-sources.org/?p=kernel/zenmm.git;a=summary From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 00:26:41 2008 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 E77F01065672 for ; Wed, 3 Dec 2008 00:26:41 +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 9C3928FC14 for ; Wed, 3 Dec 2008 00:26:41 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id mB30Fdhv099330 for ; Tue, 2 Dec 2008 16:15:39 -0800 (PST) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id mB30FcOM099329 for hackers@freebsd.org; Tue, 2 Dec 2008 16:15:38 -0800 (PST) (envelope-from david) Date: Tue, 2 Dec 2008 16:15:38 -0800 From: David Wolfskill To: hackers@freebsd.org Message-ID: <20081203001538.GC96383@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hYooF8G/hrfVAmum" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Subject: NFS (& amd?) dysfunction descending a hierarchy 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 Dec 2008 00:26:42 -0000 --hYooF8G/hrfVAmum Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I seem to have a fairly- (though not deterministly so) reproducible mode of failure with an NFS-mounted directory hierarchy: An attempt to traverse a "sufficiently large" hierarchy (e.g., via "tar zcpf" or "rm -fr") will fail to "visit" some subdirectories, typically apparently acting as if the subdirectories in question do not actually exist (despite the names having been returned in the output of a previous readdir()). The file system is mounted read-write, courtesy of amd(8); none of the files has any non-default flags; there are no ACLs involved; and I owned the lot (that is, as "owning user" of the files). An example of "sufficiently large" has been demonstrated to be a recent copy of a FreeBSD ports tree. (The problem was discovered using a hierarchy that had some proprietary content; I tried a copy of the ports tree to see if I could replicate the issue with something a FreeBSD hacker would more likely have handy. And avoid NDA issues. :-}) Now, before I go further: I'm not pointing the finger at FreeBSD, here (yet). At minimum, there could be fault with FreeBSD (as the NFS client); with amd(8); with the NetApp Filer (as the NFS server); or the network -- or the configuration(s) of any of them. But I just tried this, using the same NFS server, but a machine running Solaris 8 as an NFS client, and was unable to re-create the problem. And I found a way to avoid having the problem occur using a FreeBSD NFS client: whack amd(8)'s config so that the dismount_interval is 12 hours instead of the default 2 minutes, thus effectivly preventing amd(8) from its normal attempts to unmount file systems. Please note that I don't consider this a fix -- or even an acceptable circumvention, in the long term. Rather, it's a diagnostic change, in an attempt to better understand the nature of the problem. Here are step-by-step instructions to recreate the problem; unfortunately, I believe I don't have the resources to test this anywhere but at work, though I will try it at home, to the extent that I can: * Set up the environment. * The failing environment uses NetApp filers as NFS servers. I don't know what kind or how recent the software is on them, but can find out. (I exepct they're fairly well-maintained.) * Ensure that the NFS space available is at least 10 GB or more. I will refer to this as "~/NFS/", as I tend to create such symlinks to keep track of things. * I used a dual, quad-core machine running FreeBSD RELENG_7_1 as of yesterday morning as an NFS client. It also had a recently-updated /usr/ports tree, which was a CVS working directory (so each "real" subdirectory also had a CVS subdirectory within it). * Set up amd(8) so that ~/NFS is mounted on demand when it's referenced, and only via amd(8). Ensure that the dismount_interval has the default value of 120 seconds. * Create a reference tarball. * cd /usr && tar zcpf ~/NFS/ports.tgz ports/ * Create the test directory hierarchy. * cd ~/NFS && tar zxpf ports.tgz * Clear any cache. * Unmount ~/NFS, then re-mount it. Or just reboot the NFS client machine. Or arrange to have done all of the above set-up stuff from a differnet NFS client. * Set up for information capture (optional). * Use ps(1) or your favorite alternative tool to determine the PID for amd(8). Note that `cat /var/run/amd.pid` won't do the trick. :-{ * Run ktrace(1) to capture activity from amd(8) and its descendants, e.g.: sudo ktrace -dip ${amd_pid} -f ktrace_amd.out * Start a packet-capture for NFS traffic, e.g.: sudo tcpdump -s 0 -n -w nfs.bpf host ${nfs_server} * Start the test. * Do this under ktrace(1), if you did the above optional step: rm -fr ~/NFS/ports; echo $? As soon as rm(1) issues a whine, you might as well interrupt it (^C). * Stop the information capture, if you started it. * ^C for the tcpdump(1) process. * sudo ktrace -C If the packet capture file is too big for the analysis program you prefer to digest as a unit, see the net/tcpslice port for a bit of relief. (Wireshark seems to want to read an entire packet capture file into main memory.) I have performed the above, with the "information-gathering" step; I can *probably* make that information available, but I'll need to check -- some organizations get paranoid about things like host names. I don't expect that my current employer is, but I don't know yet, so I won't promise. In the mean time, I should be able to extract somewhat-relevant information from what I've collected, if that would be useful. While I wouldn't mind sharing the results, I strongly suspect that blow-by-blow analysis wouldn't be ideal for this (or any other) mailing list; I would be very happy to work with others to figure out what's gone wrong (or is misconfigured) and get things working properly. If someone(s) would be willing to help, I'd appreciate it very much. If (enough) folks would actually prefer that the details stay in the list (or some other list), I'm willing to do that, too. 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. --hYooF8G/hrfVAmum Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkk1z6oACgkQmprOCmdXAD2mrwCfTEVXI1WgKKGBlhx9mKSzAcbb UucAniRFPjrIOXonJk9Id6v1lFhXsAvF =9NVu -----END PGP SIGNATURE----- --hYooF8G/hrfVAmum-- From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 01:44:11 2008 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 F06E81065672 for ; Wed, 3 Dec 2008 01:44:10 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-gx0-f19.google.com (mail-gx0-f19.google.com [209.85.217.19]) by mx1.freebsd.org (Postfix) with ESMTP id CDF488FC0C for ; Wed, 3 Dec 2008 01:44:09 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by gxk12 with SMTP id 12so2180174gxk.19 for ; Tue, 02 Dec 2008 17:44:08 -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:to :subject:mime-version:content-type; bh=MfSNjRVdihqtHhD0e/UpC0PZuwBxzYsdCOEKQdJqTso=; b=MJ8jkBEg9DYVmypK46VyCVIe++gXb0e8YpbRUv6S59hu65fc0HAIHtvtWAEt2wfM7X b7iS5h/iMAsSuHD4rOcZQt2OoOJVJSj6xaEQfA+8iIxdK0slGg6s4xHs8WQB21cVr1wc /ijmu2mchw4IBNFKiJ2R/rm3W307r1th4G/tg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=nNJqvBO0XT+5N94V6aVziyarcl0v7ZaYCX/hLIv/pkMyH8GOrrYwqe7bgdVSHrYxyZ lJt7BuK3Ob/UBHF6qq2VbGpAoRuKpVGUgyLYlgOC7vwXx/KK9em9sHwPgQhsmx/YZNSo 3bc6oJrc8PrI9qHwlzpFuibhUAgZzXO/7Ixuc= Received: by 10.150.191.15 with SMTP id o15mr14888982ybf.197.1228267098419; Tue, 02 Dec 2008 17:18:18 -0800 (PST) Received: by 10.151.128.6 with HTTP; Tue, 2 Dec 2008 17:18:18 -0800 (PST) Message-ID: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> Date: Tue, 2 Dec 2008 20:18:18 -0500 From: "Zaphod Beeblebrox" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: AMD64 qemu completely broken? 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 Dec 2008 01:44:11 -0000 I decided to take the comments about testing ZFS to heart --- so I decided to try copying my 7.0 "v6" ZFS configuration into a qemu instance and upgrading it. To do this, I carefully copied my UFS boot partition and my ZFS partion to a physical USB disk that I could put on a system to do the test. After compiling qemu and loading the kqemu and aio kernel module, I started the emulator, first in VNC mode. It loaded the kernel (currently 7.1-RC) and tried to boot, but kept failing either shortly after kbdmux detected a keyboard or it would get through to mounting root and not find any drives. For reference, besides the display option (ie: -vnc or whatever), my command line was: qemu-system-x86_64 -hda /dev/da0 -snapshot -m 512 I couldn't scroll back in VNC mode using the pause/break key, so I tried to get qemu running directly in X. Now... I see a few posts stating that running qemu remotely causes an X protocol error. I can confirm that. Something about Qemu's use of X will no work over an SSH remote connection (with -X), nor will it work with dxpc. It dies for me every time at X event sequence number 22. Xterms work. Gimp even works. qemu does not. So I got a vnc server running to run it locally. And now it crashes reliably in one spot. boot0 and boot1 don't recognize the keyboard ... but the press space after crash does. Besides that quirk, the 7.1-RC kernel crashes with the following transcript reliably: MADT: Forcing active-low polarity and level trigger for SCI kbd1 at kbdmux0 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) Fatal trap 9: general protection fault while in kernel mode cpuid = 0; apic id=00 instruction pointer = 0x8:0xffff ... and so on. I'd like to test this... has anyone any successes with the AMD64 qemu? From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 02:26:39 2008 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 058F3106564A for ; Wed, 3 Dec 2008 02:26:39 +0000 (UTC) (envelope-from ken@mthelicon.com) Received: from hercules.mthelicon.com (hercules.mthelicon.com [IPv6:2001:49f0:2023::2]) by mx1.freebsd.org (Postfix) with ESMTP id C2DE78FC1B for ; Wed, 3 Dec 2008 02:26:38 +0000 (UTC) (envelope-from ken@mthelicon.com) Received: from feathers.peganest.com (78-33-110-3.static-adsl.entanet.co.uk [78.33.110.3] (may be forged)) (authenticated bits=0) by hercules.mthelicon.com (8.14.3/8.14.2) with ESMTP id mB32QVnf089269 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Wed, 3 Dec 2008 02:26:37 GMT (envelope-from ken@mthelicon.com) From: Pegasus Mc Cleaft Organization: Feathers To: hackers@freebsd.org Date: Wed, 3 Dec 2008 02:26:30 +0000 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; amd64; ; ) MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200812030226.30448.ken@mthelicon.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Subject: ZFS & make install with exec=no in /tmp 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 Dec 2008 02:26:39 -0000 Hello hackers, I was wondering if there is a work around for this... In 8.0-current I have installed the new version of ZFS and upgraded the filing systems to 13. I had a thought that I would make a zfs for /tmp and set the exec to no (thinking that nothing should ever be executed in the tmp). All seemed to work ok, however, I ran into a problem when I was installing a new world. The script immediately bombed out with a permission denied message. I remembered seeing that type of message before when I was testing the no- exec bit in /tmp before, so I reset it to 'yes' and all is well and installed fine.. Is there any way to specify what directory is used for building and executing the install scripts? Ta, Peg From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 02:53:53 2008 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 AC03B1065672 for ; Wed, 3 Dec 2008 02:53:53 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from dhcp-172-29-11-40.kir.corp.google.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8BE5C8FC13; Wed, 3 Dec 2008 02:53:53 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4935F4C1.8060907@FreeBSD.org> Date: Tue, 02 Dec 2008 18:53:53 -0800 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Pegasus Mc Cleaft References: <200812030226.30448.ken@mthelicon.com> In-Reply-To: <200812030226.30448.ken@mthelicon.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: ZFS & make install with exec=no in /tmp 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 Dec 2008 02:53:53 -0000 Pegasus Mc Cleaft wrote: > Hello hackers, > > I was wondering if there is a work around for this... > > In 8.0-current I have installed the new version of ZFS and upgraded the > filing systems to 13. I had a thought that I would make a zfs for /tmp and set > the exec to no (thinking that nothing should ever be executed in the tmp). All > seemed to work ok, however, I ran into a problem when I was installing a new > world. The script immediately bombed out with a permission denied message. > > I remembered seeing that type of message before when I was testing the no- > exec bit in /tmp before, so I reset it to 'yes' and all is well and installed > fine.. > > Is there any way to specify what directory is used for building and executing > the install scripts? The standard UNIX way is to set the TMPDIR env variable. Kris From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 07:10:08 2008 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 295DE1065675 for ; Wed, 3 Dec 2008 07:10:08 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id B00018FC16 for ; Wed, 3 Dec 2008 07:10:07 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=OfcmTZwbd+B8GCxkId+c8VZfnowehOpQhGvfluNNjQyOlibUsn9fZQd8ZjCUo58OBSWURuKmp1n/Dlc/L068ntDTS7UKIyjYh3FOYgf3QtE9f8gZVyCi739ii0KsGOaToc9+w7eW1oHVH95RCZgGiuhOhPCQXEcOBdgMLS8KVeQ=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1L7ls4-000LH3-NC; Wed, 03 Dec 2008 10:10:04 +0300 Date: Wed, 3 Dec 2008 10:10:03 +0300 From: Eygene Ryabinkin To: jT Message-ID: References: <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> <874p1nlslc.fsf@kobe.laptop> <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK+/sQ5DW5981v71UogZJPf/0> <4934c2c9./+HbbGwhphjtaXAT%perryh@pluto.rain.com> <87ej0q23qt.fsf@kobe.laptop> <9f8af95f0812021615s1b06f10bl3a317da64b7263e8@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x0PBmTWHB3bjoOVh" Content-Disposition: inline In-Reply-To: <9f8af95f0812021615s1b06f10bl3a317da64b7263e8@mail.gmail.com> Sender: rea-fbsd@codelabs.ru Cc: freebsd-hackers@freebsd.org, perryh@pluto.rain.com, Giorgos Keramidas Subject: Re: keeping track of local modifications 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 Dec 2008 07:10:08 -0000 --x0PBmTWHB3bjoOVh Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable jT, good day. Tue, Dec 02, 2008 at 07:15:55PM -0500, jT wrote: > On Tue, Dec 2, 2008 at 6:52 AM, Giorgos Keramidas = wrote: > > The fact that `$FreeBSD$' is extracted in unexpanded form by the current > > svn->hg converter is a limitation of the Python bindings of Subversion. > > They do not support expansion of the svn:keywords property of checked > > out files. > > >=20 > So am i to understand that there is no automatic way to use Hg or > Git? -- and as Eygene said in order to use them in such a manner > special patching will be required? I am happily using Git for my FreeBSD work: I have local repository that is just CVSupped from time to time to sync the master branch to the mainline and, possibly, rebase my work against it. This isn't even git-svn, just Git repo + CVSup. Probably git-svn will also work here, but as ports are still using CVS and I have both ports and src repositories, this is just easier for me to use CVSup. Yes, I am losing the commit history, but I don't care about this: cvsweb.freebsd.org is still alive and kicking. About patching: the point was that some percentage of patches, that are carrying '$FreeBSD$' tags in their body, won't apply cleanly in some situations (namely, when your patch is based on the revision N and maintainer applies it to the revision !=3D N). It turns to be true even for Subversion itself, but the hope isn't completely lost -- for some cases patches can be applied with fuzz (namely, ignoring the '$Id' mismatch). Larry Wall and others were smart about introducing the fuzz factor ;)) > I too am looking to set something > else up other than my SVN repository because i personally prefer Hg > and Git to SVN. Thank you to all who have contributed to this > conversation it has been extremely informative for me and i'm sure > several others. I think that you can at least try to work with git-svn: you'll check out the master timely and will be able to rebase your own work, provided that it is lying in the separate branches. This way you'll have the whole history, at least you should. Don't know for Mercurial, hadn't used it for FreeBSD yet. --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --x0PBmTWHB3bjoOVh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkk2MMsACgkQthUKNsbL7Yj02wCfWNfnTgtgcNdqV3Y1Gl/fLlGU rncAn0l1+neCuKqfIufZE3ZyC6r67U24 =sfKo -----END PGP SIGNATURE----- --x0PBmTWHB3bjoOVh-- From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 07:42:40 2008 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 EABBD1065670 for ; Wed, 3 Dec 2008 07:42:40 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id 7A9428FC17 for ; Wed, 3 Dec 2008 07:42:40 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so2484657fgb.35 for ; Tue, 02 Dec 2008 23:42:39 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=q7HrUyOcxyrfHwV9qlcwPCv7oQnJbTYPUZTU0TMCzfA=; b=XdGUTUdpY3gFs4cwdi2izk4Zp9CibdbX28lulgOHqvOuNMIU1yEacYLb4cbrKxuE2J 2Jqi9XxEg8xpRvOP0MHqQwmEzstuRpp3GP8fMZwDomQgu95vpTymBHCwvdu0MKlRx/Ub LOtHQs3rzGZ+OB+Ls1/mxL3zx6kLLCPeQlikI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=GBWtftpzPNm0LYduFB0LiI1M3ExipCaxVPHRqOZH8WE4XNMgU55rA8Q6J51O/RPGlr yZ7yQYNDJCnRcu1BCzJYaE99AWwYw3Kn0TPOX0u4Soif+cRLKs/zfFa5AbN9hZ9mYHJM fM9788VQOV+JNcPdzLwrwzg/Klj1ZQWPrrrP4= Received: by 10.181.57.7 with SMTP id j7mr4138718bkk.115.1228290158396; Tue, 02 Dec 2008 23:42:38 -0800 (PST) Received: by 10.181.13.12 with HTTP; Tue, 2 Dec 2008 23:42:38 -0800 (PST) Message-ID: <319cceca0812022342p5727d2e2n14dd52e54455a870@mail.gmail.com> Date: Wed, 3 Dec 2008 07:42:38 +0000 From: Maslan To: "Eygene Ryabinkin" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <319cceca0812020153y6cde7b0ara2cff1d1b0525e10@mail.gmail.com> Cc: FreeBSD Hackers Subject: Re: Controlling a process 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 Dec 2008 07:42:41 -0000 setrlimit(2) Ok thanks a lot On Tue, Dec 2, 2008 at 10:37 AM, Eygene Ryabinkin wrote: > Maslan, good day. > > Tue, Dec 02, 2008 at 09:53:09AM +0000, Maslan wrote: >> What is the best way to control a process (running in chroot env): >> 1- Execution time >> 2- Memory limit >> And to be able to kill the process when it breaks this limits. > > man 2 setrlimit > >> Finally, i would like to know the exit status of the process or the >> signal that killed it (sigfault, .....) > > If you're spawning the process in question, then 'man 2 wait'. > -- > Eygene > _ ___ _.--. # > \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard > / ' ` , __.--' # to read the on-line manual > )/' _/ \ `-_, / # while single-stepping the kernel. > `-'" `"\_ ,_.-;_.-\_ ', fsc/as # > _.-'_./ {_.' ; / # -- FreeBSD Developers handbook > {_.-``-' {_/ # > -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 12:20:35 2008 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 677DB1065701 for ; Wed, 3 Dec 2008 12:20:35 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id EB7FB8FC20 for ; Wed, 3 Dec 2008 12:20:34 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1L7qiW-0003np-NF; Wed, 03 Dec 2008 14:20:32 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: David Wolfskill In-reply-to: <20081203001538.GC96383@bunrab.catwhisker.org> References: <20081203001538.GC96383@bunrab.catwhisker.org> Comments: In-reply-to David Wolfskill message dated "Tue, 02 Dec 2008 16:15:38 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 03 Dec 2008 14:20:32 +0200 From: Danny Braniss Message-ID: Cc: hackers@freebsd.org Subject: Re: NFS (& amd?) dysfunction descending a hierarchy 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 Dec 2008 12:20:35 -0000 > > --hYooF8G/hrfVAmum > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > I seem to have a fairly- (though not deterministly so) reproducible > mode of failure with an NFS-mounted directory hierarchy: An attempt to > traverse a "sufficiently large" hierarchy (e.g., via "tar zcpf" or "rm > -fr") will fail to "visit" some subdirectories, typically apparently > acting as if the subdirectories in question do not actually exist > (despite the names having been returned in the output of a previous > readdir()). > > The file system is mounted read-write, courtesy of amd(8); none of > the files has any non-default flags; there are no ACLs involved; > and I owned the lot (that is, as "owning user" of the files). > > An example of "sufficiently large" has been demonstrated to be a recent > copy of a FreeBSD ports tree. (The problem was discovered using a > hierarchy that had some proprietary content; I tried a copy of the ports > tree to see if I could replicate the issue with something a FreeBSD > hacker would more likely have handy. And avoid NDA issues. :-}) > > Now, before I go further: I'm not pointing the finger at FreeBSD, > here (yet). At minimum, there could be fault with FreeBSD (as the NFS > client); with amd(8); with the NetApp Filer (as the NFS server); > or the network -- or the configuration(s) of any of them. > > But I just tried this, using the same NFS server, but a machine running > Solaris 8 as an NFS client, and was unable to re-create the problem. > > And I found a way to avoid having the problem occur using a FreeBSD NFS > client: whack amd(8)'s config so that the dismount_interval is 12 hours > instead of the default 2 minutes, thus effectivly preventing amd(8) from > its normal attempts to unmount file systems. Please note that I don't > consider this a fix -- or even an acceptable circumvention, in the long > term. Rather, it's a diagnostic change, in an attempt to better > understand the nature of the problem. > > Here are step-by-step instructions to recreate the problem; > unfortunately, I believe I don't have the resources to test this > anywhere but at work, though I will try it at home, to the extent > that I can: > > * Set up the environment. > * The failing environment uses NetApp filers as NFS servers. I don't > know what kind or how recent the software is on them, but can > find out. (I exepct they're fairly well-maintained.) > * Ensure that the NFS space available is at least 10 GB or more. > I will refer to this as "~/NFS/", as I tend to create such symlinks > to keep track of things. > * I used a dual, quad-core machine running FreeBSD RELENG_7_1 as of > yesterday morning as an NFS client. It also had a recently-updated > /usr/ports tree, which was a CVS working directory (so each "real" > subdirectory also had a CVS subdirectory within it). > * Set up amd(8) so that ~/NFS is mounted on demand when it's > referenced, and only via amd(8). Ensure that the dismount_interval > has the default value of 120 seconds. > * Create a reference tarball. > * cd /usr && tar zcpf ~/NFS/ports.tgz ports/ > * Create the test directory hierarchy. > * cd ~/NFS && tar zxpf ports.tgz > * Clear any cache. > * Unmount ~/NFS, then re-mount it. Or just reboot the NFS client > machine. Or arrange to have done all of the above set-up stuff > from a differnet NFS client. > * Set up for information capture (optional). > * Use ps(1) or your favorite alternative tool to determine the PID for > amd(8). Note that `cat /var/run/amd.pid` won't do the trick. :-{ > * Run ktrace(1) to capture activity from amd(8) and its descendants, > e.g.: > > sudo ktrace -dip ${amd_pid} -f ktrace_amd.out > > * Start a packet-capture for NFS traffic, e.g.: > > sudo tcpdump -s 0 -n -w nfs.bpf host ${nfs_server} > > * Start the test. > * Do this under ktrace(1), if you did the above optional step: > > rm -fr ~/NFS/ports; echo $? > > As soon as rm(1) issues a whine, you might as well interrupt it > (^C). > > * Stop the information capture, if you started it. > * ^C for the tcpdump(1) process. > * sudo ktrace -C > > > If the packet capture file is too big for the analysis program you > prefer to digest as a unit, see the net/tcpslice port for a bit of > relief. (Wireshark seems to want to read an entire packet capture file > into main memory.) > > I have performed the above, with the "information-gathering" step; I can > *probably* make that information available, but I'll need to check -- > some organizations get paranoid about things like host names. I don't > expect that my current employer is, but I don't know yet, so I won't > promise. > > In the mean time, I should be able to extract somewhat-relevant > information from what I've collected, if that would be useful. While I > wouldn't mind sharing the results, I strongly suspect that blow-by-blow > analysis wouldn't be ideal for this (or any other) mailing list; I would > be very happy to work with others to figure out what's gone wrong (or is > misconfigured) and get things working properly. > > If someone(s) would be willing to help, I'd appreciate it very much. If > (enough) folks would actually prefer that the details stay in the list > (or some other list), I'm willing to do that, too. > i'll try to check it here soon, but in the meantime, could you try the same but mounting directly, not via amd, to remove one item from the equation? (I don't know how much amd is involved here, but if you are running on a 64bit host, amd could be swapped out, in which case it tends to realy screw things up, which is not your case, but ...) danny > 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. > > --hYooF8G/hrfVAmum > Content-Type: application/pgp-signature > Content-Disposition: inline > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.0 (FreeBSD) > > iEYEARECAAYFAkk1z6oACgkQmprOCmdXAD2mrwCfTEVXI1WgKKGBlhx9mKSzAcbb > UucAniRFPjrIOXonJk9Id6v1lFhXsAvF > =9NVu > -----END PGP SIGNATURE----- > > --hYooF8G/hrfVAmum-- > From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 12:45:43 2008 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 EEEE91065672 for ; Wed, 3 Dec 2008 12:45:43 +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 A38BB8FC14 for ; Wed, 3 Dec 2008 12:45:43 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id mB3Cj7dA008543; Wed, 3 Dec 2008 04:45:07 -0800 (PST) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id mB3Cj7JD008542; Wed, 3 Dec 2008 04:45:07 -0800 (PST) (envelope-from david) Date: Wed, 3 Dec 2008 04:45:07 -0800 From: David Wolfskill To: Danny Braniss Message-ID: <20081203124507.GE96383@bunrab.catwhisker.org> References: <20081203001538.GC96383@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vmttodhTwj0NAgWp" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org Subject: Re: NFS (& amd?) dysfunction descending a hierarchy 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 Dec 2008 12:45:44 -0000 --vmttodhTwj0NAgWp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 03, 2008 at 02:20:32PM +0200, Danny Braniss wrote: > ... > i'll try to check it here soon, but in the meantime, could you try the sa= me > but mounting directly, not via amd, to remove one item from the equation? > (I don't know how much amd is involved here, but if you are running on a > 64bit host, amd could be swapped out, in which case it tends to realy scr= ew > things up, which is not your case, but ...) Sorry; I should have mentioned that the NFS client was running RELENG_7_1 as of Monday morning, i386 arch. The amd.conf file specifies "plock" for amd(8). Note that merely telling amd(8) to kick the interval of attempted unmounts from 2 minutes to 12 hours appears to avoid the observed symptoms, so I'm fairly confident that bypassing amd(8) altogether would do so as well. In looking at the output from ktrace against amd(8), I recall having seen that shortly before an observed failure, the (master) amd process forks a child to attempt the unmount; the child issues an unmount, the return for which is EBUSY (IIRC -- I'm not in a good position to check just at the moment), so the child terminates with an "interrupted system call". I'd have thought that since the attempted unmount failed, it wouldn't make any difference, but it's right around that point that rm(1) is told that a directory entry it found earlier doesn't exist, which rather snowballs into the previously-described symptoms. 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. --vmttodhTwj0NAgWp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkk2f1IACgkQmprOCmdXAD0QGgCfV6hjA8RNY1gy2kd1AgFgO4/f rEoAn2/9n0tkA9auQrYetLZvLd3N0GGJ =CyTQ -----END PGP SIGNATURE----- --vmttodhTwj0NAgWp-- From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 12:59:05 2008 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 6F4481065675 for ; Wed, 3 Dec 2008 12:59:05 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 24CD58FC0A for ; Wed, 3 Dec 2008 12:59:04 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1L7rJn-0004KA-OQ; Wed, 03 Dec 2008 14:59:03 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: David Wolfskill In-reply-to: <20081203124507.GE96383@bunrab.catwhisker.org> References: <20081203001538.GC96383@bunrab.catwhisker.org> <20081203124507.GE96383@bunrab.catwhisker.org> Comments: In-reply-to David Wolfskill message dated "Wed, 03 Dec 2008 04:45:07 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 03 Dec 2008 14:59:03 +0200 From: Danny Braniss Message-ID: Cc: hackers@freebsd.org Subject: Re: NFS (& amd?) dysfunction descending a hierarchy 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 Dec 2008 12:59:05 -0000 > > --vmttodhTwj0NAgWp > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Wed, Dec 03, 2008 at 02:20:32PM +0200, Danny Braniss wrote: > > ... > > i'll try to check it here soon, but in the meantime, could you try the sa= > me > > but mounting directly, not via amd, to remove one item from the equation? > > (I don't know how much amd is involved here, but if you are running on a > > 64bit host, amd could be swapped out, in which case it tends to realy scr= > ew > > things up, which is not your case, but ...) > > Sorry; I should have mentioned that the NFS client was running > RELENG_7_1 as of Monday morning, i386 arch. The amd.conf file specifies > "plock" for amd(8). > > Note that merely telling amd(8) to kick the interval of attempted > unmounts from 2 minutes to 12 hours appears to avoid the observed > symptoms, so I'm fairly confident that bypassing amd(8) altogether would > do so as well. > > In looking at the output from ktrace against amd(8), I recall having > seen that shortly before an observed failure, the (master) amd > process forks a child to attempt the unmount; the child issues an > unmount, the return for which is EBUSY (IIRC -- I'm not in a good > position to check just at the moment), so the child terminates with an > "interrupted system call". > > I'd have thought that since the attempted unmount failed, it wouldn't > make any difference, but it's right around that point that rm(1) is told > that a directory entry it found earlier doesn't exist, which rather > snowballs into the previously-described symptoms. so it does point to amd - or something inocent it does - which triggers the error. btw, there are some patches (5 I think), that try to fix some of amd problems. I've installed them, and things are quiet/ok -most of the time- but I get a glitch once in a while. would love to iron them out though. cheers, danny From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 13:57:13 2008 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 B2FDE1065670 for ; Wed, 3 Dec 2008 13:57:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0388FC0C for ; Wed, 3 Dec 2008 13:57:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1L7rdC-00030f-9y; Wed, 03 Dec 2008 15:19:06 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mB3DJ3Tu081988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Dec 2008 15:19:03 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mB3DJ2Fe006114; Wed, 3 Dec 2008 15:19:02 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mB3DJ2t5006113; Wed, 3 Dec 2008 15:19:02 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 3 Dec 2008 15:19:02 +0200 From: Kostik Belousov To: David Wolfskill Message-ID: <20081203131902.GK3045@deviant.kiev.zoral.com.ua> References: <20081203001538.GC96383@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nwn6wlxaqfRJxJFc" Content-Disposition: inline In-Reply-To: <20081203001538.GC96383@bunrab.catwhisker.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1L7rdC-00030f-9y 0f434ac2832ec0d21d72c7418f5c217e X-Terabit: YES Cc: hackers@freebsd.org Subject: Re: NFS (& amd?) dysfunction descending a hierarchy 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 Dec 2008 13:57:13 -0000 --Nwn6wlxaqfRJxJFc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 02, 2008 at 04:15:38PM -0800, David Wolfskill wrote: > I seem to have a fairly- (though not deterministly so) reproducible > mode of failure with an NFS-mounted directory hierarchy: An attempt to > traverse a "sufficiently large" hierarchy (e.g., via "tar zcpf" or "rm > -fr") will fail to "visit" some subdirectories, typically apparently > acting as if the subdirectories in question do not actually exist > (despite the names having been returned in the output of a previous > readdir()). >=20 > The file system is mounted read-write, courtesy of amd(8); none of > the files has any non-default flags; there are no ACLs involved; > and I owned the lot (that is, as "owning user" of the files). >=20 > An example of "sufficiently large" has been demonstrated to be a recent > copy of a FreeBSD ports tree. (The problem was discovered using a > hierarchy that had some proprietary content; I tried a copy of the ports > tree to see if I could replicate the issue with something a FreeBSD > hacker would more likely have handy. And avoid NDA issues. :-}) >=20 > Now, before I go further: I'm not pointing the finger at FreeBSD, > here (yet). At minimum, there could be fault with FreeBSD (as the NFS > client); with amd(8); with the NetApp Filer (as the NFS server); > or the network -- or the configuration(s) of any of them. >=20 > But I just tried this, using the same NFS server, but a machine running > Solaris 8 as an NFS client, and was unable to re-create the problem. >=20 > And I found a way to avoid having the problem occur using a FreeBSD NFS > client: whack amd(8)'s config so that the dismount_interval is 12 hours > instead of the default 2 minutes, thus effectivly preventing amd(8) from > its normal attempts to unmount file systems. Please note that I don't > consider this a fix -- or even an acceptable circumvention, in the long > term. Rather, it's a diagnostic change, in an attempt to better > understand the nature of the problem. >=20 > Here are step-by-step instructions to recreate the problem; > unfortunately, I believe I don't have the resources to test this > anywhere but at work, though I will try it at home, to the extent > that I can: >=20 > * Set up the environment. > * The failing environment uses NetApp filers as NFS servers. I don't > know what kind or how recent the software is on them, but can > find out. (I exepct they're fairly well-maintained.) > * Ensure that the NFS space available is at least 10 GB or more. > I will refer to this as "~/NFS/", as I tend to create such symlinks > to keep track of things. > * I used a dual, quad-core machine running FreeBSD RELENG_7_1 as of > yesterday morning as an NFS client. It also had a recently-updated > /usr/ports tree, which was a CVS working directory (so each "real" > subdirectory also had a CVS subdirectory within it). > * Set up amd(8) so that ~/NFS is mounted on demand when it's > referenced, and only via amd(8). Ensure that the dismount_interval > has the default value of 120 seconds. > * Create a reference tarball. > * cd /usr && tar zcpf ~/NFS/ports.tgz ports/ > * Create the test directory hierarchy. > * cd ~/NFS && tar zxpf ports.tgz > * Clear any cache. > * Unmount ~/NFS, then re-mount it. Or just reboot the NFS client > machine. Or arrange to have done all of the above set-up stuff > from a differnet NFS client. > * Set up for information capture (optional). > * Use ps(1) or your favorite alternative tool to determine the PID for > amd(8). Note that `cat /var/run/amd.pid` won't do the trick. :-{ > * Run ktrace(1) to capture activity from amd(8) and its descendants, > e.g.: >=20 > sudo ktrace -dip ${amd_pid} -f ktrace_amd.out >=20 > * Start a packet-capture for NFS traffic, e.g.: >=20 > sudo tcpdump -s 0 -n -w nfs.bpf host ${nfs_server} >=20 > * Start the test. > * Do this under ktrace(1), if you did the above optional step: >=20 > rm -fr ~/NFS/ports; echo $? >=20 > As soon as rm(1) issues a whine, you might as well interrupt it > (^C). >=20 > * Stop the information capture, if you started it. > * ^C for the tcpdump(1) process. > * sudo ktrace -C >=20 >=20 > If the packet capture file is too big for the analysis program you > prefer to digest as a unit, see the net/tcpslice port for a bit of > relief. (Wireshark seems to want to read an entire packet capture file > into main memory.) >=20 > I have performed the above, with the "information-gathering" step; I can > *probably* make that information available, but I'll need to check -- > some organizations get paranoid about things like host names. I don't > expect that my current employer is, but I don't know yet, so I won't > promise. >=20 > In the mean time, I should be able to extract somewhat-relevant > information from what I've collected, if that would be useful. While I > wouldn't mind sharing the results, I strongly suspect that blow-by-blow > analysis wouldn't be ideal for this (or any other) mailing list; I would > be very happy to work with others to figure out what's gone wrong (or is > misconfigured) and get things working properly. >=20 > If someone(s) would be willing to help, I'd appreciate it very much. If > (enough) folks would actually prefer that the details stay in the list > (or some other list), I'm willing to do that, too. >=20 I highly suspect that I know what happen. What branch are you using ? I committed a possible fix yesterday, r185557. The patch shall be directly applicable to 7. --Nwn6wlxaqfRJxJFc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkk2h0YACgkQC3+MBN1Mb4iyDQCfUeI7WAmfV9tEaxL3R5y0V40z 4IAAoLeHIp1rETAo2URZx0BgpAArrrdR =SWaV -----END PGP SIGNATURE----- --Nwn6wlxaqfRJxJFc-- From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 14:35:32 2008 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 29A3C1065676 for ; Wed, 3 Dec 2008 14:35:32 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id F2E088FC1B for ; Wed, 3 Dec 2008 14:35:28 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by wf-out-1314.google.com with SMTP id 24so3781236wfg.7 for ; Wed, 03 Dec 2008 06:35:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=IIucYgSvqtv44yvD2RrQYOMFJXmA+25lM5WqwUw/BSw=; b=ICr67KJqYAZY7y7jn01qnCssomrknPp9H/h2Sk3s7z+fdhaiNmM/mp7/9MMeWWEBsa 4LImsRBca6gB1omj7Mno5qzvRkp9vXzPOO2U4Xv6EPimpA7FUULVGAH1wVH3oY+Rwo+w L51bCW+QQgtmkZQNozRUuoAoc/KSZ5DHoof1c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=k8CSyg/GgKLQ8G3SAzoZ+c2kSyCrtIYHB7z1Mnjmo6uLiNeC2Oe4OeXoTtRlPfjCXD 1DEgQyFVV0RoSnIXq4QpxDE9Lc90bhfZuerXmDzlK5u5IYKweaHyVfHcDVGqlxzwL/55 r9Zen0P2/5xrrutnoTRWJw/iRKkF5y7O9QIUE= Received: by 10.114.177.1 with SMTP id z1mr8223752wae.68.1228314927753; Wed, 03 Dec 2008 06:35:27 -0800 (PST) Received: by 10.114.76.4 with HTTP; Wed, 3 Dec 2008 06:35:27 -0800 (PST) Message-ID: <671bb5fc0812030635s1fd7fe4frc1840a85e87b4047@mail.gmail.com> Date: Wed, 3 Dec 2008 15:35:27 +0100 From: "Alexej Sokolov" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: vm_map_entry for kernel virtual addres 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 Dec 2008 14:35:32 -0000 Hello, If I allocate memory from a kernel module: MALLOC(addr, vm_offset_t, PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO); how can I get a pointer to vm_map_entry structure which describes the memory region where "addr" is ? Thanks, Alexey From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 3 19:28:51 2008 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 4A3E7106564A for ; Wed, 3 Dec 2008 19:28:51 +0000 (UTC) (envelope-from noresult@xs4all.nl) Received: from smtp-vbr7.xs4all.nl (smtp-vbr7.xs4all.nl [194.109.24.27]) by mx1.freebsd.org (Postfix) with ESMTP id DBC9D8FC1C for ; Wed, 3 Dec 2008 19:28:50 +0000 (UTC) (envelope-from noresult@xs4all.nl) Received: from [192.168.10.200] (noresult.xs4all.nl [82.95.100.74]) (authenticated bits=0) by smtp-vbr7.xs4all.nl (8.13.8/8.13.8) with ESMTP id mB3JSUie047285 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 3 Dec 2008 20:28:31 +0100 (CET) (envelope-from noresult@xs4all.nl) Message-Id: From: Arjan van der Velde To: Ed Schouten In-Reply-To: <20081202221349.GT64969@hoeg.nl> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Wed, 3 Dec 2008 20:28:29 +0100 References: <54A75E03-AE64-4DD9-8D15-7A7499E73D43@xs4all.nl> <20081202221349.GT64969@hoeg.nl> X-Mailer: Apple Mail (2.929.2) X-Virus-Scanned: by XS4ALL Virus Scanner X-Mailman-Approved-At: Wed, 03 Dec 2008 19:33:29 +0000 Cc: FreeBSD Hackers Subject: Re: TCSBRK not implemented in linux compat 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 Dec 2008 19:28:51 -0000 Hi, thanks. I think for now I can work around this although it would be nice to have this implemented. Regards, Arjan On Dec 2, 2008, at 11:13 PM, Ed Schouten wrote: > Hello Arjan, > > * Arjan van der Velde wrote: >> While trying to get a linux binary running on FreeBSD I encountered >> the >> following problem during serial port I/O. >> >> Dec 1 22:22:34 soekris kernel: linux: pid 7239 (linuxbinary): ioctl >> fd=0, cmd=0x5409 ('T',9) is not implemented >> >> 0x5409 turns out to be TCSBRK, which is not implemented (yet?). Can >> anyone give me some clues where / how to start implementing this? It >> seems like the linux way of handling it is to call tcdrain(), but I'm >> not sure as to how this translates to the FreeBSD compat layer. > > I think you could just make it call TIOCDRAIN directly. Unfortunately > that's not correct if the argument is 0, because then we have to call > TIOCSBRK and TIOCCBRK with a 250 msec interval. I guess adding some > kind > of printf() there should be good enough for now. > > I can't look into it right now, because I have to get up at 6:15 > tomorrow. Sorry! :-/ > > -- > Ed Schouten > WWW: http://80386.nl/ From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 00:19:03 2008 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 6B5651065670 for ; Thu, 4 Dec 2008 00:19:03 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 0CBE88FC08 for ; Thu, 4 Dec 2008 00:19:02 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) 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 mB3Nwb602778; Wed, 3 Dec 2008 15:58:37 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id mB3Nwbr22065; Wed, 3 Dec 2008 15:58:37 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Wed, 3 Dec 2008 15:58:36 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Steve Watt In-Reply-To: <200812022328.mB2NSQa6049527@wattres.watt.com> Message-ID: References: <200812022328.mB2NSQa6049527@wattres.watt.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@FreeBSD.org Subject: Re: tcsh loses the foreground process group? 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 Dec 2008 00:19:03 -0000 On Tue, 2 Dec 2008, Steve Watt wrote: > In article <20081201042037.GA43208@wattres.Watt.COM> you write: > [ ... ] >> I'm running 6-STABLE (6.4-PRE as of 24 Nov right now), tcsh 6.15.00, which >> shows >> >> tcsh 6.15.00 (Astron) 2007-03-03 (i386-intel-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec >> >> as $version. >> >> The symptom is that when I do a long-ish running task inside a `` expansion >> that I then ^C, nobody gets the foreground process group... I never get >> a prompt back after the ^C, and ^T gets me >> >> load: 0.27 no foreground process group > > [ ... ] > >> One portable reproduction: >> # cd /usr/src >> # less `egrep -lir '^Foo.*baz' *` >> ^Cload: 0.02 no foreground process group >> >> (I typed ^C ^T) >> >> SIGKILL to the shell seems to be the only way to get things back to >> normal. > > I've gotten one "me too", which indicated that SIGHUP to the shell > will also make it go away, but does not solve the problem. > > I've got another FreeBSD machine available that was running tcsh > 6.14.00, and it does _NOT_ display the problem. When I build > 6.15.00 on that same box (/usr/src is more up to date than the > install right now), that does fail. > > Thus I'm pretty comfortable saying that it's a tcsh bug of some > sort, and probably a regression. Hopefully this can be fixed > (PR being filed now) before 6.4 releases... Thanks for the report. It looks like this is yet another manifestation of a problem in tcsh, where it does inappropriate things in a vfork'ed subshell. In my tests, running tcsh with -F (which causes it to use fork instead of vfork) causes the problem to go away. It is also present in 7.0-RELEASE and probably all later versions. There are several open bugs related to this problem, but so far they do not seem to have attracted the interest of any committers. Among them are: bin/41297 bin/52746 bin/125185 amd64/128259 bin/129378 (which you just opened) The fix is simple: make -F the default. There is a minor performance penalty, but that's a small price to pay for correct behavior. A more involved fix would be to make tcsh not do inappropriate things after vfork (modifying global variables), or at least clean up before exiting, but IMHO that is less clean; vfork really shouldn't be used here at all. -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 00:33:26 2008 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 7AB041065670 for ; Thu, 4 Dec 2008 00:33:26 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 5C49F8FC0C for ; Thu, 4 Dec 2008 00:33:26 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) 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 mB40XO607657; Wed, 3 Dec 2008 16:33:24 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id mB40XOG22301; Wed, 3 Dec 2008 16:33:24 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Wed, 3 Dec 2008 16:33:23 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Nate Eldredge In-Reply-To: Message-ID: References: <200812022328.mB2NSQa6049527@wattres.watt.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Steve Watt , hackers@freebsd.org Subject: Re: tcsh loses the foreground process group? 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 Dec 2008 00:33:26 -0000 On Wed, 3 Dec 2008, Nate Eldredge wrote: > Thanks for the report. It looks like this is yet another manifestation of a > problem in tcsh, where it does inappropriate things in a vfork'ed subshell. > In my tests, running tcsh with -F (which causes it to use fork instead of > vfork) causes the problem to go away. It is also present in 7.0-RELEASE and > probably all later versions. > > There are several open bugs related to this problem, but so far they do not > seem to have attracted the interest of any committers. Among them are: > > bin/41297 > bin/52746 > bin/125185 > amd64/128259 > bin/129378 (which you just opened) I have opened bin/129405 as an omnibus PR for these problems. -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 05:08:26 2008 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 992F21065676 for ; Thu, 4 Dec 2008 05:08:26 +0000 (UTC) (envelope-from freebsd-hackers@adam.gs) Received: from mail.adam.gs (cl-127.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:7e::2]) by mx1.freebsd.org (Postfix) with ESMTP id C8E518FC19 for ; Thu, 4 Dec 2008 05:08:25 +0000 (UTC) (envelope-from freebsd-hackers@adam.gs) Received: from [127.0.0.1] (localhost.adam.gs [127.0.0.1]) by mail.adam.gs (Postfix) with ESMTP id 3EFBB109FB46 for ; Thu, 4 Dec 2008 00:08:25 -0500 (EST) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=mail; d=adam.gs; b=OqvFVM1YMH0VApjvHyt3rPk/V0k1JcsFMeM0auHmOOD+G5RzlhUFOGLcCIJZfetixlV/nT3jRT5S5g+LhEuWftsUXrN+ZHYIkVZhlDiEEUDDgGM+H33jCcvWIxysQg32nllGVt1bamIgMWr1H7P7hjoECwz9ROb+wK4VjYbJzy8=; Message-Id: From: Adam Jacob Muller To: Karl Fischer In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Thu, 4 Dec 2008 00:08:19 -0500 References: <39DC135F7F0571489196E0B6F5D58B4A03B460D0@MWBEXCH.mweb.com> X-Authentication: UIr/fC7PQOS0IOa+tYl5O4z55Z0dgtPRZiPBMlI7sljjtcPOoysYypldYMPvCklTdbOi9YS4+zx3KohjzCGjRMHyQr4Fcz5rTxgfVh+RKk2Rn8EAb8As0xzCNJXWRsWKYcjY1SUR7OnKXUWPMtFbGc9W5BiXk1GOlLLT/NQpNIEp2DB+ZoQt/DuxfA== Cc: freebsd-hackers@freebsd.org, Rudi Kramer - MWEB , Steven Hartland Subject: Re: FreeBSD 7.0-RELEASE amd64 on Dell M600 Blade 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 Dec 2008 05:08:26 -0000 On Sep 12, 2008, at 2:03 AM, Karl Fischer wrote: > On Fri, Sep 12, 2008 at 01:00, Steven Hartland > wrote: >> Thanks Rudi, would really like to get is sorted as they would make >> ideal app servers. >> >> ----- Original Message ----- From: "Rudi Kramer - MWEB" > > >> >> >> Hi Steven, >> >> We recently purchased a few M600's but haven't got around to loading >> FBSD on them, we should start installing next week and I will let you >> know if we run in to any problems. > > I have the same problem on my M600 Blades has anyone tested the 7.1 > Beta and > I'm about to purchase more of them. > > Karl > > Anyone ever get this to work? Perhaps this was fixed in a newer FreeBSD? Have some M600 that i'd like to get FreeBSD running on :) hint.apic.0.disabled seemed to change things a bit, it would reach loading mfs root but then lock hard again anyway :/ -Adam From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 06:52:35 2008 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 5DEE51065686 for ; Thu, 4 Dec 2008 06:52:35 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.freebsd.org (Postfix) with ESMTP id 201718FC13 for ; Thu, 4 Dec 2008 06:52:35 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.14.3/8.14.3) with ESMTP id mB46qYdO029839; Wed, 3 Dec 2008 22:52:34 -0800 (PST) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.14.3/8.14.3/Submit) id mB46qY8Z029838; Wed, 3 Dec 2008 22:52:34 -0800 (PST) (envelope-from steve) Date: Wed, 3 Dec 2008 22:52:34 -0800 From: Steve Watt To: Nate Eldredge Message-ID: <20081204065234.GA28327@wattres.Watt.COM> References: <200812022328.mB2NSQa6049527@wattres.watt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Callsign: KD6GGD X-Archived: 1228373554.869449376@wattres.Watt.COM X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (wattres.watt.com [127.0.0.1]); Wed, 03 Dec 2008 22:52:35 -0800 (PST) Cc: hackers@FreeBSD.org Subject: Re: tcsh loses the foreground process group? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Steve Watt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 06:52:35 -0000 On Wed, Dec 03, 2008 at 03:58:36PM -0800, Nate Eldredge wrote: > On Tue, 2 Dec 2008, Steve Watt wrote: > > >In <20081201042037.GA43208@wattres.Watt.COM> Steve Watt wrote: [ tcsh 6.15.00 ] > >>The symptom is that when I do a long-ish running task inside a `` > >>expansion > >>that I then ^C, nobody gets the foreground process group... I never get > >>a prompt back after the ^C, and ^T gets me > >> > >> load: 0.27 no foreground process group > > > >I've got another FreeBSD machine available that was running tcsh > >6.14.00, and it does _NOT_ display the problem. When I build > >6.15.00 on that same box (/usr/src is more up to date than the > >install right now), that does fail. > > Thanks for the report. It looks like this is yet another manifestation of > a problem in tcsh, where it does inappropriate things in a vfork'ed > subshell. In my tests, running tcsh with -F (which causes it to use fork > instead of vfork) causes the problem to go away. It is also present in > 7.0-RELEASE and probably all later versions. Did the behavior change between 6.14.00 and 6.15.00? (Yeah, OK, I can go look myself.) OK, I went and looked. Answer: Yep, lots of additions of inappropriate things in backeval(). But it no longer has a 10K limit. > There are several open bugs related to this problem, but so far they do > not seem to have attracted the interest of any committers. Among them > are: > > bin/41297 > bin/52746 > bin/125185 > amd64/128259 > bin/129378 (which you just opened) > > The fix is simple: make -F the default. There is a minor performance > penalty, but that's a small price to pay for correct behavior. A more > involved fix would be to make tcsh not do inappropriate things after vfork > (modifying global variables), or at least clean up before exiting, but > IMHO that is less clean; vfork really shouldn't be used here at all. Actually, there's another cost to making -F default: It makes hashstat rather less useful. OK, it's not like it's that useful to begin with, and is arguably a debugging function, but it's a side effect. As for a possible "why?" -F changes the hashstat behavior so? Probably because it's counting on not-quite-legal vfork() activity. Ugh. I'd managed to forget how unfun the code inside that shell is. I'll try to forget again. From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 11:06:40 2008 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 9EBDE1065672 for ; Thu, 4 Dec 2008 11:06:40 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id 6FCCA8FC36 for ; Thu, 4 Dec 2008 11:06:40 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by wa-out-1112.google.com with SMTP id m34so1956553wag.27 for ; Thu, 04 Dec 2008 03:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=PmJnzX8eb/AOii+DUJMzEo9ib3FTGZxfC8yFGn/vQco=; b=ktJUI6hfccqCQrYpTNIwJaLKCWZB7QLms42sCMkgiWWU/LSvUDYg7cVtFqWXkwi0Vr t+tepzvH4MO6PEFxRAiH1Rg4kEWomdzqg9Jd0O8KlzU5K488+YJSNO0H81QSP96Hzl82 q8GOh2m8qmDjtXo9zfFw96tiHlwZM/xguWcxQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=plnWDYcj9RIcAjeEmMGWR04rydQ8UWwQEWQ49pIa4Pd47i4osrgK1VLT3tI2I/1Vi5 1cQEr+tVffZxlSgNe74sSGcorAiPk/8LeFDc7HFiLtlG3nOB5ZAFdw/zjhjVJg8B+HPr yuE1pwO1Lxbuu/yskpZSha2hKmtMj3z2YBbNo= Received: by 10.114.148.2 with SMTP id v2mr8901001wad.169.1228388799995; Thu, 04 Dec 2008 03:06:39 -0800 (PST) Received: by 10.114.76.4 with HTTP; Thu, 4 Dec 2008 03:06:39 -0800 (PST) Message-ID: <671bb5fc0812040306i67345928wf5124e224d46bd52@mail.gmail.com> Date: Thu, 4 Dec 2008 12:06:39 +0100 From: "Alexej Sokolov" To: "Mark Tinguely" , freebsd-hackers@freebsd.org In-Reply-To: <200812031859.mB3IxHCi046359@casselton.net> MIME-Version: 1.0 References: <671bb5fc0812031004j28e9bfc4j88df11ce18b436b6@mail.gmail.com> <200812031859.mB3IxHCi046359@casselton.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: vm_map_entry for kernel virtual addres 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 Dec 2008 11:06:40 -0000 2008/12/3 Mark Tinguely > > 2008/12/3 Mark Tinguely > > > > > on 3 Dec 2008 15:35:27, Alexej Sokolov > asked: > > > > > > > Hello, > > > > If I allocate memory from a kernel module: > > > > MALLOC(addr, vm_offset_t, PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO); > > > > > > > > how can I get a pointer to vm_map_entry structure which describes > the > > > memory > > > > region where "addr" is ? > > > > > > > > Thanks, > > > > Alexey > > > > > > MALLOC is a macro for malloc() which returns a kernel virtual address > into > > > the variable addr in this case. > > > > > > You want to find the vm_map_entry, use something like: > > > > > > vm_map_entry_t *result; > > > if (vm_map_lookup_entry(kernel_map, addr, result)) { > > > /* found */ > > > } else { > > > /* not found */ > > > } > > > > > > 1. Should i use any locks or mutex for doing it ? > > Good question, it really should be: > > vm_map_lock(map); > > > 2. What map is used by MALLOC? It can be a some submap. Should i use > then a > > submap for searching entry? > > I thought originally that malloc() allocated memory from kernel map > (kernel_map), but on closer inspection, malloc() seems to use the > default UMA zone allocator [page_alloc()] which takes the memory from > the kmem_map. Which I should have know, big mallocs fill the kmem space. > sooo I guess the more correct code would be: > > vm_map_entry_t result; > vm_map_lock(kmem_map); > if (vm_map_lookup_entry(kmem_map, addr, &result)) { > /* found */ > } else { > /* not found */ > } > vm_map_unlock(kmem_map); > > Ok, thanks a lot! From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 11:27:36 2008 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 1B1971065672 for ; Thu, 4 Dec 2008 11:27:36 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id E27708FC16 for ; Thu, 4 Dec 2008 11:27:35 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3854937rvf.43 for ; Thu, 04 Dec 2008 03:27:35 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ZagqToGxn8dh++cU9XpbPpP7QdTEf7zS/+NEf7NyJyU=; b=lf4sV77aHx7QzamJUo1UtJzsE3zdZxGezlsojRV8NqwbJX4VrSV+CqL6r22fT61uen 8qxKX3ZElYxoPVIbpZbg9/l5Kwlf0LEnyQ9+XZ8mEAuzYjqBdtoVifp3WtXBitw5bfc2 OOhqOv9UtbYFbavd0E+TklSqeFhjDdGeKtPd8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=XJIczFO7j+jsmSvryjITJZ9lmHWvKc0J4u+rd4/wajyW2cbS5Pxc4TQ9yu5H7wEzu+ z1nyf0es3X3Bjbj5/7iAlrfWhmY42bgJXJmhHON2v3XBwDLQ1uupxmHGJw5WNdjBoTE3 q3C321T3E2yxJtC5Mc1sIxGooL+ovbACuZoHE= Received: by 10.141.179.5 with SMTP id g5mr6893873rvp.53.1228390055720; Thu, 04 Dec 2008 03:27:35 -0800 (PST) Received: by 10.140.158.13 with HTTP; Thu, 4 Dec 2008 03:27:35 -0800 (PST) Message-ID: <7d6fde3d0812040327w7c92826i64c6073a453d65ef@mail.gmail.com> Date: Thu, 4 Dec 2008 03:27:35 -0800 From: "Garrett Cooper" To: "Zaphod Beeblebrox" In-Reply-To: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: AMD64 qemu completely broken? 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 Dec 2008 11:27:36 -0000 On Tue, Dec 2, 2008 at 5:18 PM, Zaphod Beeblebrox wrote: > I decided to take the comments about testing ZFS to heart --- so I decided > to try copying my 7.0 "v6" ZFS configuration into a qemu instance and > upgrading it. To do this, I carefully copied my UFS boot partition and my > ZFS partion to a physical USB disk that I could put on a system to do the > test. > > After compiling qemu and loading the kqemu and aio kernel module, I started > the emulator, first in VNC mode. It loaded the kernel (currently 7.1-RC) > and tried to boot, but kept failing either shortly after kbdmux detected a > keyboard or it would get through to mounting root and not find any drives. > For reference, besides the display option (ie: -vnc or whatever), my command > line was: > > qemu-system-x86_64 -hda /dev/da0 -snapshot -m 512 > > I couldn't scroll back in VNC mode using the pause/break key, so I tried to > get qemu running directly in X. > > Now... I see a few posts stating that running qemu remotely causes an X > protocol error. I can confirm that. Something about Qemu's use of X will > no work over an SSH remote connection (with -X), nor will it work with > dxpc. It dies for me every time at X event sequence number 22. Xterms > work. Gimp even works. qemu does not. > > So I got a vnc server running to run it locally. > > And now it crashes reliably in one spot. boot0 and boot1 don't recognize > the keyboard ... but the press space after crash does. Besides that quirk, > the 7.1-RC kernel crashes with the following transcript reliably: > > MADT: Forcing active-low polarity and level trigger for SCI > kbd1 at kbdmux0 > ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) > > > Fatal trap 9: general protection fault while in kernel mode > cpuid = 0; apic id=00 > instruction pointer = 0x8:0xffff > > ... and so on. > > I'd like to test this... has anyone any successes with the AMD64 qemu? Are you running the ports version, or a different version, and/or are you using kqemu (I've heard this was broken, in the past)? My group at Cisco has several issues with older versions of qemu for PPC and when we applied patches, it improved support greatly in some cases, and introduced bugs in other cases =\. I'd definitely hit the devel list for QEMU and see what they say while you're waiting for a more substantial reply here. Cheers, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 11:30:02 2008 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 739D01065675 for ; Thu, 4 Dec 2008 11:30:02 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.236]) by mx1.freebsd.org (Postfix) with ESMTP id 47A918FC22 for ; Thu, 4 Dec 2008 11:30:02 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3855692rvf.43 for ; Thu, 04 Dec 2008 03:30:02 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=S00ry1FMth1q8KYwynCD6Uzb0K/EmS9hi9662980us4=; b=ZQPVb+W22j5XLgaiLXhW3dnV1e9oSzXmeNhU5THeHv7l1iRh9iBipImxoAKG4UcJ4q 3ErEhVkpHNg3C5LGaXx8uqORavEGHVlB80OgvGB6Pp8rK6SIc5JDCvkQmw3MRc+K9w/j Cpm7Q1mZ3ng94FoHEOqcy8AsprO4mZDiBMXU8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=aomRC5QW7lrTD79dZpHk2oDIxscl1UUl4x6ThWETEhbzECxCGSr7yAPKKfqIa+mzv4 +83xQnHfmt09gi3UP0X5Rbvr6nxycGbagyUxHRc3w91kd4tdhfNA1//AXQaEfHNrwYMB t3HRMjFVeAbJsrbfkXV18VyiY/6tfv2G8FfWA= Received: by 10.141.75.17 with SMTP id c17mr6874640rvl.169.1228390202086; Thu, 04 Dec 2008 03:30:02 -0800 (PST) Received: by 10.140.158.13 with HTTP; Thu, 4 Dec 2008 03:30:02 -0800 (PST) Message-ID: <7d6fde3d0812040330n362bd709t1232a9b6a932d11c@mail.gmail.com> Date: Thu, 4 Dec 2008 03:30:02 -0800 From: "Garrett Cooper" To: "Baldur Gislason" In-Reply-To: <20081202165258.GM12776@gremlin.foo.is> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20081202165258.GM12776@gremlin.foo.is> Cc: freebsd-hackers@freebsd.org Subject: Re: Help debugging, machine won't boot anymore. 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 Dec 2008 11:30:02 -0000 On Tue, Dec 2, 2008 at 8:52 AM, Baldur Gislason wrote: > I have a machine running 7.0-STABLE/amd64 and it has suddenly > stopped booting. It just leaves me at the debugger with this message: > > Fatal trap 9: general protection fault while in kernel mode > cpuid = 0; apic id = 00 > instruction pointer = 0x8:0xffffffff804d913d > stack pointer = 0x10:0xffffffff80c9ec10 > frame pointer = 0x10:0xffffffff80c9ec70 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 0 (swapper) > [thread pid 0 tid 0 ] > Stopped at device_probe_child+0x61: movq 0x28(%rax),%rsi > db> > > dmesg at http://foo.is/~baldur/enigmaboot.txt > The ACPI warning has always been there. > > Any places of interest in the debugger? What's a likely culprit? bad RAM? > > Baldur As the stopped area suggests, it looks like it's stuck probing a device. Have you added any new hardware to your system recently? Have you checked the connections internally in the machine? Does all of the hardware work with a vanilla livefs 7.0-RELEASE CD? -Garrett From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 12:27:28 2008 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 0105C106564A for ; Thu, 4 Dec 2008 12:27:28 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id CAD3D8FC0A for ; Thu, 4 Dec 2008 12:27:27 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by wa-out-1112.google.com with SMTP id m34so1968292wag.27 for ; Thu, 04 Dec 2008 04:27:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=N0v6/UVyfqKnDt80H2evXlF/SZDL5wXzykgyObQNAlI=; b=lOlyMlJyWQ+xo+e6UXUeTPDvnQhkDZ1TtNNj+I5c7EuxNotIjyLrAZph0p8qicbXP1 HaKl7tvCiUFQmL93/5FVR0URWifVDirsCnC6Hr5gv5YwIHF8A9djp1hiKoOJVBf+1+4y 1ekz8WZKHLtHwdeWF5PNeRspbtH7FbwTs0QoI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=HcS7FkFToLprsLFU65WTsehFkMPFSZU2Lut1AM6We6oTix7HRUvXGIn3yozIHfSyny WFWOAaKQa7ZhQngtQPCYcV26D5y2zuwAsStSTAT7HhU0fMXPvWi+8G9LGUSLszr76W74 dTgoT8om6o9fT78qT1Una42rCWZIos9U9eOJg= Received: by 10.114.72.1 with SMTP id u1mr8966884waa.39.1228393647401; Thu, 04 Dec 2008 04:27:27 -0800 (PST) Received: by 10.114.76.4 with HTTP; Thu, 4 Dec 2008 04:27:27 -0800 (PST) Message-ID: <671bb5fc0812040427n6ff9a88fy7bf1cdc6382db8db@mail.gmail.com> Date: Thu, 4 Dec 2008 13:27:27 +0100 From: "Alexej Sokolov" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: kernel vm_submap's 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 Dec 2008 12:27:28 -0000 Hello, Where/How can I get information about vm_submap's in the actual stable kernel: % uname -v FreeBSD 7.0-RELEASE-p5 #0: Tue Oct 7 19:05:20 CEST 2008 And what kind of data is present in these submaps (mallocs, mbufs, DMA-buffer..)? Thanks, From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 14:25:49 2008 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 1B1AC1065673 for ; Thu, 4 Dec 2008 14:25:49 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id A0A418FC08 for ; Thu, 4 Dec 2008 14:25:48 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so1714624eyi.7 for ; Thu, 04 Dec 2008 06:25:47 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=q/D4fI5lcXmVtTfatG5Z9QL62YvuU6pEqXUH8BDk4a4=; b=XTD8cVEh4n/YWE5joXzk2bwlKPs0ogZ2ODXzbr5rWMcOMwbfRjQnw19ibAPjVlGXp1 J2cnsjZWpGEAEw1c+/+hqJ8EabdhGqBGvrDJ5UeJr09jJf+rEFiA4sXD3IfgL7DoWkrb q9B4SFxoD1gBydUqIWQDEDgwI6g5+t5jqLvKw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=LtkFPGHjz/06JJe00vIl9FvW6ORQ60fOA5HIiB7SHcMdTeFGLwLDwnBLfcIlNWX/+l fGwuGgWeCJK0PJi0d3XWj9hGRWbJORHnt68bQbLwessLynhwqXNd4IOgwNOpYYIp8wD+ cHWE17d4DmeF/l8fUCJ/glqXoHZJmS9gQkLkk= Received: by 10.210.19.11 with SMTP id 11mr16528325ebs.168.1228400746889; Thu, 04 Dec 2008 06:25:46 -0800 (PST) Received: by 10.210.34.12 with HTTP; Thu, 4 Dec 2008 06:25:46 -0800 (PST) Message-ID: Date: Thu, 4 Dec 2008 17:25:46 +0300 From: pluknet To: "Alexej Sokolov" In-Reply-To: <671bb5fc0812040427n6ff9a88fy7bf1cdc6382db8db@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <671bb5fc0812040427n6ff9a88fy7bf1cdc6382db8db@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: kernel vm_submap's 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 Dec 2008 14:25:49 -0000 2008/12/4 Alexej Sokolov : > Hello, > Where/How can I get information about vm_submap's in the actual stable > kernel: > % uname -v > FreeBSD 7.0-RELEASE-p5 #0: Tue Oct 7 19:05:20 CEST 2008 > And what kind of data is present in these submaps (mallocs, mbufs, > DMA-buffer..)? > vm_map_submap(9) might help you. btw, it's called only from one place I can find: kmem_suballoc. > Thanks, -- wbr, pluknet From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 16:33:00 2008 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 E07EF1065672 for ; Thu, 4 Dec 2008 16:33:00 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id B1D1F8FC12 for ; Thu, 4 Dec 2008 16:33:00 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by wa-out-1112.google.com with SMTP id m34so2011366wag.27 for ; Thu, 04 Dec 2008 08:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=yCFOlcPQOEGm5gh45w0NxjGalxpcfVxVj9Aj5e/vIxs=; b=fHR6ckailBaA/7idjA58U9Zpc0uM1KThDOVJjhdbSS8jBO9Y5mgWeylNTZLfRqFcMh 9Wcnz924EgO43qN/LQbjWKjYAZ8rx+mu8FUOkYsI8kCR9gQ/18BhRYHnjSUkp6MyH+d1 s4oOFkPNlHLy5DIHQiTPgqpaTHonWuqU6UDSQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=Spu3r6uMKqVsYWIXX+zIFGq/AP5Ng9nnhjTdp6DJsjQqvJGWNi8hysVK4AgI9samhm x52sJ0FH4lYfngurz0PgdUmwvW9liZ6o7df0v8H+bFVS8liyrUFZmu+XdH+LwEjYCO2l ynrTXio2jDQcFJrdsqvwd2OY/7nRrSG4AEIk4= Received: by 10.115.59.4 with SMTP id m4mr9125379wak.37.1228408377958; Thu, 04 Dec 2008 08:32:57 -0800 (PST) Received: by 10.114.76.4 with HTTP; Thu, 4 Dec 2008 08:32:57 -0800 (PST) Message-ID: <671bb5fc0812040832x6ff884cbv805bddb3d1471671@mail.gmail.com> Date: Thu, 4 Dec 2008 17:32:57 +0100 From: "Alexej Sokolov" To: pluknet In-Reply-To: MIME-Version: 1.0 References: <671bb5fc0812040427n6ff9a88fy7bf1cdc6382db8db@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: kernel vm_submap's 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 Dec 2008 16:33:01 -0000 2008/12/4 pluknet > 2008/12/4 Alexej Sokolov : > > Hello, > > Where/How can I get information about vm_submap's in the actual stable > > kernel: > > % uname -v > > FreeBSD 7.0-RELEASE-p5 #0: Tue Oct 7 19:05:20 CEST 2008 > > And what kind of data is present in these submaps (mallocs, mbufs, > > DMA-buffer..)? > > > > vm_map_submap(9) might help you. > btw, it's called only from one place I can find: kmem_suballoc. Ok, then the next question: If I have some kernel virtual addres, what is the best way to find out which submap it belongs to? > > > > Thanks, > > -- > wbr, > pluknet > From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 17:52:35 2008 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 D094A1065672 for ; Thu, 4 Dec 2008 17:52:35 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id 8229A8FC1C for ; Thu, 4 Dec 2008 17:52:35 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1785574yxb.13 for ; Thu, 04 Dec 2008 09:52:34 -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:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=90JDhDTUWHjT6xs3TddPOXgtPffdIZFhB1ZruDb6anM=; b=AJiB+/58kOFjI/DWJs5x5CckrWkbAcKR7XslqhWkvNX69uQRH9bx7Wp9LG9MPP5ba/ 0KxzesGrMYLiI2MSE4CkRLzf4aqgcfb95wCHXq3tdVEpj2npXDyg5wvtWolpfrTEQ8gq dgHMfcjFVaXsBZ3Pu2lnAyipQQ7c4Y/Emzgtc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=yADcbELNiXR60dgNphzD/dmMIeJ0O12Yjd6aQvLv+IghvQ4epgq+ScuuQwcrlgT30y mZv+YQTX9xBJVzuo+wSD4DGjtiDeWrtijh3ZBfWqxJ9j8saTkSHOj6XwrobDapluuFmU 1SMYvv9n+6muPN/CD0WWI62ufudyzqChd5AG0= Received: by 10.150.95.15 with SMTP id s15mr1794631ybb.158.1228413154813; Thu, 04 Dec 2008 09:52:34 -0800 (PST) Received: by 10.151.128.6 with HTTP; Thu, 4 Dec 2008 09:52:34 -0800 (PST) Message-ID: <5f67a8c40812040952u1364563awcfd493695e7fea7c@mail.gmail.com> Date: Thu, 4 Dec 2008 12:52:34 -0500 From: "Zaphod Beeblebrox" To: "Garrett Cooper" In-Reply-To: <7d6fde3d0812040327w7c92826i64c6073a453d65ef@mail.gmail.com> MIME-Version: 1.0 References: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> <7d6fde3d0812040327w7c92826i64c6073a453d65ef@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: AMD64 qemu completely broken? 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 Dec 2008 17:52:35 -0000 On Thu, Dec 4, 2008 at 6:27 AM, Garrett Cooper wrote: > > Are you running the ports version, or a different version, and/or are > you using kqemu (I've heard this was broken, in the past)? My group at > Cisco has several issues with older versions of qemu for PPC and when > we applied patches, it improved support greatly in some cases, and > introduced bugs in other cases =\. > > I'd definitely hit the devel list for QEMU and see what they say while > you're waiting for a more substantial reply here. I'm using the ports version. I am using kqemu... although I can try without the kernel module later today. How out-of-date is the port? From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 18:41:18 2008 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 0CD831065670; Thu, 4 Dec 2008 18:41:18 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 00BF28FC0A; Thu, 4 Dec 2008 18:41:16 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA03603; Thu, 04 Dec 2008 20:41:14 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <49382449.80002@icyb.net.ua> Date: Thu, 04 Dec 2008 20:41:13 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: FreeBSD Stable , freebsd-hackers@freebsd.org References: <49300020.6060603@icyb.net.ua> In-Reply-To: <49300020.6060603@icyb.net.ua> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: ichwd problem: watchdog doesn't "bark" 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 Dec 2008 18:41:18 -0000 on 28/11/2008 16:28 Andriy Gapon said the following: > uname: > FreeBSD 7.1-PRERELEASE r185311 amd64 > > dmesg: > ichwd0: on isa0 > ichwd0: Intel ICH9R watchdog timer (ICH9 or equivalent) > ichwd0: timer disabled > > pciconf: > isab0@pci0:0:31:0: class=0x060100 card=0x50448086 chip=0x29168086 > rev=0x02 hdr=0x00 > vendor = 'Intel Corporation' > device = '82801IR (ICH9R) LPC Interface Controller' > class = bridge > subclass = PCI-ISA > > > When I start watchdogd I see the following messages: > timer enabled > timeout set to 28 ticks > and then a flow of messages: > timer reloaded > > Then I kill -9 watchdogd. > "timer reloded" messages are no longer produced. > And there are no other messages. > > But nothing happens for many minutes that I waited. > BTW, can someone knowledgeable tell me if watchdog better be firing SMI or NMI when it runs down? My bet is on NMI, but who knows. Thanks! Or maybe I am trying to ask a different question. I see that NMI2SMI_EN bit of TCO1_CNT is set 1 on my machine and our watchdog driver is careful to preserve this bit unmodified. This means that watchdog would try to cause SMI instead of NMI. On the other hand I see that bit GBL_SMI_EN of SMI_EN is set to zero, which means that chipset would never generate an SMI. So I think this is why I don't see anything happening. Now, would should try first - reset NMI2SMI_EN to zero or set GBL_SMI_EN to 1? As additional data points: I see that TCO_EN bit of SMI_EN is 1 and it is locked to that value because TCO_LOCK bit of TCO1_CNT is 1. SMI_LOCK in PCI config register GEN_PMCON_1 is not set. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 18:42:39 2008 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 77887106567B for ; Thu, 4 Dec 2008 18:42:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2918FC1B for ; Thu, 4 Dec 2008 18:42:38 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA03657; Thu, 04 Dec 2008 20:42:35 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4938249A.20300@icyb.net.ua> Date: Thu, 04 Dec 2008 20:42:34 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Julian Stacey References: <200811302014.mAUKE5YF046736@fire.js.berklix.net> <4933BAD3.2060700@icyb.net.ua> In-Reply-To: <4933BAD3.2060700@icyb.net.ua> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: dd if=/dev/mem can hang a machine? 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 Dec 2008 18:42:39 -0000 BTW, I think it was related to reading memory-mapped registers intended to put CPU into Cx states (x >= 2). -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 19:05:06 2008 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 2E5AF1065670 for ; Thu, 4 Dec 2008 19:05:06 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by mx1.freebsd.org (Postfix) with ESMTP id EF6E78FC12 for ; Thu, 4 Dec 2008 19:05:05 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so4010007rvf.43 for ; Thu, 04 Dec 2008 11:05:05 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=VvnmXbu2PDP+1Cor7TkrYR0n2wsCsV7T+8MfObzi1Ow=; b=IsQaQE9UNhDkg4FMEEMHM7rh0CwxpdWVYlq4uQQMpd03CkqCRaLlIwWrSE48/J9nGV Es15jPQZXacjY5H/MkFkOH6bQzhm6sGMITgQbRCTnsqW9BwGre5QFx9svFtUNZw5eZ8J +pv6tRV2UrDfOmHi6vxxxZUcS5+eJkOm+Z5ls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=n3/22dNc/t3m1NDZq9vevMlcna19q1hFmDxwRHyIOrGODeYTf+pBJyq1qqalHa2P+F btnHFAtP3Cg0nGRNbK2UTMAGRZuIHbq0DzG4yn+jfFU/89mAK/aF2zcJxBzNK//PVLY3 hpWJq5qBR84HMevZC0N61xrwJrC9sfnrEt20Q= Received: by 10.140.164.1 with SMTP id m1mr7078627rve.212.1228417505528; Thu, 04 Dec 2008 11:05:05 -0800 (PST) Received: by 10.140.158.13 with HTTP; Thu, 4 Dec 2008 11:05:05 -0800 (PST) Message-ID: <7d6fde3d0812041105h43cf6586r5092e234a6350310@mail.gmail.com> Date: Thu, 4 Dec 2008 11:05:05 -0800 From: "Garrett Cooper" To: "Zaphod Beeblebrox" In-Reply-To: <5f67a8c40812040952u1364563awcfd493695e7fea7c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> <7d6fde3d0812040327w7c92826i64c6073a453d65ef@mail.gmail.com> <5f67a8c40812040952u1364563awcfd493695e7fea7c@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: AMD64 qemu completely broken? 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 Dec 2008 19:05:06 -0000 On Thu, Dec 4, 2008 at 9:52 AM, Zaphod Beeblebrox wrote: > On Thu, Dec 4, 2008 at 6:27 AM, Garrett Cooper wrote: >> >> Are you running the ports version, or a different version, and/or are >> you using kqemu (I've heard this was broken, in the past)? My group at >> Cisco has several issues with older versions of qemu for PPC and when >> we applied patches, it improved support greatly in some cases, and >> introduced bugs in other cases =\. >> >> I'd definitely hit the devel list for QEMU and see what they say while >> you're waiting for a more substantial reply here. > > I'm using the ports version. I am using kqemu... although I can try without > the kernel module later today. > > How out-of-date is the port? 1. Try without kqemu :) (or at least rebuild it, then disable it if you continue to run into problems). 2. emulators/qemu is the latest stable, but there are typically a number of changes floating out in the devel branch (emulators/qemu-devel) that might be of interest to you: [root@optimus /store]# grep -r ^PORTVERSION /usr/ports/emulators/qemu* /usr/ports/emulators/qemu/Makefile:PORTVERSION= 0.9.1 /usr/ports/emulators/qemu-devel/Makefile:PORTVERSION= 0.9.1s.20080620 -Garrett From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 20:21:06 2008 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 1104C1065672 for ; Thu, 4 Dec 2008 20:21:06 +0000 (UTC) (envelope-from tjaviss@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 94A678FC1D for ; Thu, 4 Dec 2008 20:21:05 +0000 (UTC) (envelope-from tjaviss@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so3096171fgb.35 for ; Thu, 04 Dec 2008 12:21:04 -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:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=RfdqK3S9jj7Ng1qqI1D3KQznYHRXVJ3ScQVKoHdENQU=; b=UWUTaGl8FlEXhv5BbFswWHxT0ri5OyUMuwOmtrZi8XOnAkMZAD5vOV0e9VtD4lhaFm zJBXZq29vi0xyEszO9tkGjoCCkWWnA7LXVNbArU1my9u8k3KLrcqu1eEG0hyCRSNWoyQ r6+4D8LdRISLlhJU+ANFUnTjo6ZizogRCO5d0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=jEeSw2Ed8MEKDbedZzIvNqsk3bI/qHuL15GSg6J21Mqs33uWAZssnM1DznEGB2c2BU 3bXAD8ZZHSn0YTwpea+4VjrpRy/sS4XIDLapfmiWJ8Ncwf2wECuMtCyIIu4+Gc+UF81S yZdu0yVGfdl2+QKP9Wx9MABMGI692CtZX5hkM= Received: by 10.181.203.11 with SMTP id f11mr5155777bkq.67.1228420836985; Thu, 04 Dec 2008 12:00:36 -0800 (PST) Received: by 10.181.198.5 with HTTP; Thu, 4 Dec 2008 12:00:36 -0800 (PST) Message-ID: <3a97ef0812041200yb85a426g3f8dc75dec513fe7@mail.gmail.com> Date: Thu, 4 Dec 2008 15:00:36 -0500 From: "Tyler Aviss" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mailman-Approved-At: Thu, 04 Dec 2008 20:42:39 +0000 Subject: Issues with 7.0-RELEASE-p2 and netstat/ld.elf.so-1 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 Dec 2008 20:21:06 -0000 When running netstat on many boxes with this version of BSD, I'm seeing funky errors in my /var/log/messages, such as: Dec 4 14:55:49 server10 kernel: up_symbol Dec 4 14:55:49 server10 kernel: : missing Dec 4 14:55:49 server10 kernel: symbol h Dec 4 14:55:49 server10 kernel: ash tabl Dec 4 14:55:49 server10 kernel: e Dec 4 14:55:49 server10 kernel: I've traced this to whenever netstat runs. Unfortunately the box in question is "inherited" from a previous admin, and I don't have any other boxes that I've setup to check these files against. Can anyone running 7.0-release-p2 verify these MD5's? MD5 (/usr/bin/netstat) = e9e062b6523f2ccbc5befc8b52584346 MD5 (/libexec/ld-elf.so.1) = 86610ef79a07643572603c9b09b1af53 Thanks! Tyler Aviss From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 21:10:23 2008 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 B42361065675 for ; Thu, 4 Dec 2008 21:10:23 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 4157C8FC24 for ; Thu, 4 Dec 2008 21:10:23 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 665041920CD; Thu, 4 Dec 2008 21:49:18 +0100 (CET) Received: from saturn.kn-bremen.de (noident@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.14.2/8.13.8) with ESMTP id mB4KkC6P016854; Thu, 4 Dec 2008 21:46:12 +0100 (CET) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.14.2/8.13.6/Submit) id mB4KkC0k016853; Thu, 4 Dec 2008 21:46:12 +0100 (CET) (envelope-from nox) Date: Thu, 4 Dec 2008 21:46:12 +0100 (CET) From: Juergen Lock Message-Id: <200812042046.mB4KkC0k016853@saturn.kn-bremen.de> To: yanefbsd@gmail.com X-Newsgroups: local.list.freebsd.hackers In-Reply-To: <7d6fde3d0812041105h43cf6586r5092e234a6350310@mail.gmail.com> References: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> <7d6fde3d0812040327w7c92826i64c6073a453d65ef@mail.gmail.com> <5f67a8c40812040952u1364563awcfd493695e7fea7c@mail.gmail.com> Organization: home X-Mailman-Approved-At: Thu, 04 Dec 2008 21:17:28 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: AMD64 qemu completely broken? 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 Dec 2008 21:10:23 -0000 In article <7d6fde3d0812041105h43cf6586r5092e234a6350310@mail.gmail.com> you write: >On Thu, Dec 4, 2008 at 9:52 AM, Zaphod Beeblebrox wrote: >> On Thu, Dec 4, 2008 at 6:27 AM, Garrett Cooper wrote: >>> >>> Are you running the ports version, or a different version, and/or are >>> you using kqemu (I've heard this was broken, in the past)? My group at >>> Cisco has several issues with older versions of qemu for PPC and when >>> we applied patches, it improved support greatly in some cases, and >>> introduced bugs in other cases =\. >>> >>> I'd definitely hit the devel list for QEMU and see what they say while >>> you're waiting for a more substantial reply here. >> >> I'm using the ports version. I am using kqemu... although I can try without >> the kernel module later today. >> >> How out-of-date is the port? > >1. Try without kqemu :) (or at least rebuild it, then disable it if >you continue to run into problems). >2. emulators/qemu is the latest stable, but there are typically a >number of changes floating out in the devel branch >(emulators/qemu-devel) that might be of interest to you: > >[root@optimus /store]# grep -r ^PORTVERSION /usr/ports/emulators/qemu* >/usr/ports/emulators/qemu/Makefile:PORTVERSION= 0.9.1 >/usr/ports/emulators/qemu-devel/Makefile:PORTVERSION= 0.9.1s.20080620 Yes, qemu-devel is worth a try. I also post experimental port updates on -emulation once in a while that bring the qemu-devel port to more recent svn snapshots, like here: http://lists.freebsd.org/pipermail/freebsd-emulation/2008-November/005530.html Oh and btw -kernel-kqemu is known to be broken with FreeBSD/amd64 guests, I was still able to boot 7.1-BETA2-amd64-livefs.iso into fixit->cdrom and try a few things in there using `regular' (userland) kqemu and my latest qemu-devel snapshot tho. HTH, Juergen From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 21:25:22 2008 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 E89E31065692 for ; Thu, 4 Dec 2008 21:25:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 88FDB8FC17 for ; Thu, 4 Dec 2008 21:25:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mB4LOIOo033364; Thu, 4 Dec 2008 16:25:10 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 4 Dec 2008 15:06:22 -0500 User-Agent: KMail/1.9.7 References: <20081202165258.GM12776@gremlin.foo.is> In-Reply-To: <20081202165258.GM12776@gremlin.foo.is> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812041506.22371.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 04 Dec 2008 16:25:10 -0500 (EST) X-Virus-Scanned: ClamAV 0.93.1/8721/Thu Dec 4 08:26:10 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Baldur Gislason Subject: Re: Help debugging, machine won't boot anymore. 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 Dec 2008 21:25:23 -0000 On Tuesday 02 December 2008 11:52:58 am Baldur Gislason wrote: > I have a machine running 7.0-STABLE/amd64 and it has suddenly > stopped booting. It just leaves me at the debugger with this message: > > Fatal trap 9: general protection fault while in kernel mode > cpuid = 0; apic id = 00 > instruction pointer = 0x8:0xffffffff804d913d > stack pointer = 0x10:0xffffffff80c9ec10 > frame pointer = 0x10:0xffffffff80c9ec70 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 0 (swapper) > [thread pid 0 tid 0 ] > Stopped at device_probe_child+0x61: movq 0x28(%rax),%rsi > db> > > dmesg at http://foo.is/~baldur/enigmaboot.txt > The ACPI warning has always been there. > > Any places of interest in the debugger? What's a likely culprit? bad RAM? I would get a stack trace first. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 21:25:04 2008 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 34C981065676 for ; Thu, 4 Dec 2008 21:25:04 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id B046C8FC17 for ; Thu, 4 Dec 2008 21:25:03 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 8BEA8192053; Thu, 4 Dec 2008 22:25:02 +0100 (CET) Received: from saturn.kn-bremen.de (noident@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.14.2/8.13.8) with ESMTP id mB4LNCmn018293; Thu, 4 Dec 2008 22:23:12 +0100 (CET) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.14.2/8.13.6/Submit) id mB4LNBMN018292; Thu, 4 Dec 2008 22:23:11 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Thu, 4 Dec 2008 22:23:11 +0100 To: yanefbsd@gmail.com Message-ID: <20081204212311.GA17962@saturn.kn-bremen.de> References: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> <7d6fde3d0812040327w7c92826i64c6073a453d65ef@mail.gmail.com> <5f67a8c40812040952u1364563awcfd493695e7fea7c@mail.gmail.com> <200812042046.mB4KkC0k016853@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812042046.mB4KkC0k016853@saturn.kn-bremen.de> User-Agent: Mutt/1.5.17 (2007-11-01) X-Mailman-Approved-At: Thu, 04 Dec 2008 21:46:13 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: AMD64 qemu completely broken? 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 Dec 2008 21:25:04 -0000 On Thu, Dec 04, 2008 at 09:46:12PM +0100, I wrote: > In article <7d6fde3d0812041105h43cf6586r5092e234a6350310@mail.gmail.com> you write: > >On Thu, Dec 4, 2008 at 9:52 AM, Zaphod Beeblebrox wrote: > >> On Thu, Dec 4, 2008 at 6:27 AM, Garrett Cooper wrote: > >>> > >>> Are you running the ports version, or a different version, and/or are > >>> you using kqemu (I've heard this was broken, in the past)? My group at > >>> Cisco has several issues with older versions of qemu for PPC and when > >>> we applied patches, it improved support greatly in some cases, and > >>> introduced bugs in other cases =\. > >>> > >>> I'd definitely hit the devel list for QEMU and see what they say while > >>> you're waiting for a more substantial reply here. > >> > >> I'm using the ports version. I am using kqemu... although I can try without > >> the kernel module later today. > >> > >> How out-of-date is the port? > > > >1. Try without kqemu :) (or at least rebuild it, then disable it if > >you continue to run into problems). > >2. emulators/qemu is the latest stable, but there are typically a > >number of changes floating out in the devel branch > >(emulators/qemu-devel) that might be of interest to you: > > > >[root@optimus /store]# grep -r ^PORTVERSION /usr/ports/emulators/qemu* > >/usr/ports/emulators/qemu/Makefile:PORTVERSION= 0.9.1 > >/usr/ports/emulators/qemu-devel/Makefile:PORTVERSION= 0.9.1s.20080620 > > Yes, qemu-devel is worth a try. I also post experimental port updates > on -emulation once in a while that bring the qemu-devel port to more recent > svn snapshots, like here: > http://lists.freebsd.org/pipermail/freebsd-emulation/2008-November/005530.html > > Oh and btw -kernel-kqemu is known to be broken with FreeBSD/amd64 guests, > I was still able to boot 7.1-BETA2-amd64-livefs.iso into fixit->cdrom > and try a few things in there using `regular' (userland) kqemu and my > latest qemu-devel snapshot tho. I forgot to say the qemu-devel port (as well as the later snapshots I posted about on -emulation) also support -curses, which shows the emulated vga text(!)console on qemu's tty. This works quite well with FreeBSD guests (even the isos) if you extend your xterm/whatever by one line (the default vga textconsole is 80x25 instead of 80x24.) Of course if you have an installed guest you can also configure it for a serial console (in a FreeBSD guest:) # echo console=\"comconsole\" >>/boot/loader.conf # sed -i -e '/^ttyd0/s/off/on/' /etc/ttys and from then on run qemu with -nographic. (with -nographic, the guest's serial console and qemu's monitor are multiplexed on qemu's tty, hit ctrl-a and then `h' to show a small help.) -nographic also works with older qemu versions. HTH, Juergen From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 4 22:43:48 2008 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 976831065670 for ; Thu, 4 Dec 2008 22:43:48 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 75FE18FC18 for ; Thu, 4 Dec 2008 22:43:48 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) 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 mB4Mhl626992; Thu, 4 Dec 2008 14:43:47 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id mB4Mhl428021; Thu, 4 Dec 2008 14:43:47 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Thu, 4 Dec 2008 14:43:47 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Juergen Lock In-Reply-To: <20081204212311.GA17962@saturn.kn-bremen.de> Message-ID: References: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> <7d6fde3d0812040327w7c92826i64c6073a453d65ef@mail.gmail.com> <5f67a8c40812040952u1364563awcfd493695e7fea7c@mail.gmail.com> <200812042046.mB4KkC0k016853@saturn.kn-bremen.de> <20081204212311.GA17962@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: yanefbsd@gmail.com, freebsd-hackers@freebsd.org Subject: Re: AMD64 qemu completely broken? 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 Dec 2008 22:43:48 -0000 On Thu, 4 Dec 2008, Juergen Lock wrote: > I forgot to say the qemu-devel port (as well as the later snapshots I > posted about on -emulation) also support -curses, which shows the emulated > vga text(!)console on qemu's tty. This works quite well with FreeBSD guests > (even the isos) if you extend your xterm/whatever by one line (the default > vga textconsole is 80x25 instead of 80x24.) As long as we're sharing tips about qemu: I've recently been working with qemu on amd64 and have set up a Debian etch i386 guest which is working well. I am using the qemu-devel and kqemu-kmod-devel ports. I am not using -kernel-kqemu at the moment; I thought I would get things working before trying to speed up. Using qemu I've finally achieved my goal of being able to use flash on FreeBSD/amd64 (in some sense :-O). savevm and loadvm don't work due to a security patch. Since my guest system is trusted I reverted the patch. I filed a PR as ports/129417 . I found that '-net user' is horribly broken on amd64 (qemu segfaults). It uses some ancient [*] BSD TCP/IP code (via slirp) which assumes that pointers are 32 bits and doesn't hesitate to shove them into random 32-bit corners of externally defined structures if it's convenient. Looks like a pain to clean up. '-net tap' works fine, but requires root privileges and is more work to set up. [*] Out of curiosity, I looked at some Unix Archive stuff and found the identical code in BSD's Net2, circa 1991. It is identified in a comment as a "quick hack" and adorned with several /* XXX */. Naturally the code and the comments survive intact, 17 years later. :-( -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 00:45:54 2008 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 949041065679 for ; Fri, 5 Dec 2008 00:45:54 +0000 (UTC) (envelope-from ravi.murty@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id 6672A8FC14 for ; Fri, 5 Dec 2008 00:45:54 +0000 (UTC) (envelope-from ravi.murty@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so4132736rvf.43 for ; Thu, 04 Dec 2008 16:45:54 -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:to :subject:mime-version:content-type; bh=xtopK9smZlaPhF2ONKvbxaFHIwyMktKjcsxmTUS+zz8=; b=ZgKxHuua/RxiH2GVHcSXM1+cY7+P+fisMqnY14ctWW6iRHPXF/0NEvdERPyAPUbAJn GwKojPt+ySkeOKUQvugTX7QZAgtx+L7fhmiR14tb2jj+Q42OtkSkokaSnT6dJoCO0ptC a12zi+vlRk0br+bRF07ZQ/4THf18cjxp0bEqc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=YjlRbdjkfYyKuVgoMXSkJ/VUEfIDq8igB3ylyu27Rxpdu23ZTBgHgVdm8QZ8/ow7Gh 3kPx4gZWoBkjZrbTMu03H4ndPYHYtoi/nc5B0Wu0H4FKzdLPIShJinXgAg5Du5SsnJh9 X7pkEbOziVqsvWo8lu5t/wTXIk9Qb+JlKl4HQ= Received: by 10.141.141.3 with SMTP id t3mr7240817rvn.106.1228437954060; Thu, 04 Dec 2008 16:45:54 -0800 (PST) Received: by 10.140.251.14 with HTTP; Thu, 4 Dec 2008 16:45:53 -0800 (PST) Message-ID: <95b10a340812041645t770b1d8sc7802773ab6beff2@mail.gmail.com> Date: Thu, 4 Dec 2008 16:45:53 -0800 From: "Ravi Murty" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: local APIC 2 interrupt fifo limit 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 Dec 2008 00:45:54 -0000 Hello, There is this comment in apicvar.h in the amd64 tree that talks about why the kernel uses smp_ipi_mtx and how it prevents more than 2 outstanding IPIs per interrupt vector. It appears that modern CPUs collapse the IRR bit if there is an interrupt when both the IRR and ISR bits are set. I was wondering why we need smp_ipi_mtx besides the fact that the kernel uses global variables for things like invalidate page ranges. Thanks, Ravi From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 08:20:42 2008 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 E53BF1065670 for ; Fri, 5 Dec 2008 08:20:42 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id C46D58FC08 for ; Fri, 5 Dec 2008 08:20:42 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id mB58Kf0V080782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 5 Dec 2008 00:20:41 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id mB58Kfad080781; Fri, 5 Dec 2008 00:20:41 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA18469; Fri, 5 Dec 08 00:07:30 PST Date: Fri, 05 Dec 2008 00:10:52 -0800 From: perryh@pluto.rain.com To: avg@icyb.net.ua Message-Id: <4938e20c.nP8q+JgDZ0gKUsAU%perryh@pluto.rain.com> References: <49300020.6060603@icyb.net.ua> <49382449.80002@icyb.net.ua> In-Reply-To: <49382449.80002@icyb.net.ua> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: ichwd problem: watchdog doesn't "bark" 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 Dec 2008 08:20:43 -0000 [dropped stable@ since I'm not on it and I suspect it may not accept non-member posts] > BTW, can someone knowledgeable tell me if watchdog better > be firing SMI or NMI when it runs down? > My bet is on NMI, but who knows. It may depend on whether you want the BIOS, or FreeBSD, handling the interrupt. Unless you are running *very* old h/w, there's a good chance the BIOS intercepts SMI, even with a protected-mode OS running, and I wouldn't be surprised if the BIOS' response to a watchdog timeout were an immediate reboot. It might be good to check the motherboard and/or BIOS manuals. > Or maybe I am trying to ask a different question. > I see that NMI2SMI_EN bit of TCO1_CNT is set 1 on my machine and > our watchdog driver is careful to preserve this bit unmodified. > This means that watchdog would try to cause SMI instead of NMI. > On the other hand I see that bit GBL_SMI_EN of SMI_EN is set to > zero, which means that chipset would never generate an SMI. > So I think this is why I don't see anything happening. > > Now, would should try first - reset NMI2SMI_EN to zero or set > GBL_SMI_EN to 1? If you want to handle the interrupt in FreeBSD, I'd try resetting NMI2SMI_EN to zero. From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 08:35:31 2008 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 E23111065673 for ; Fri, 5 Dec 2008 08:35:31 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from po-out-1718.google.com (po-out-1718.google.com [72.14.252.155]) by mx1.freebsd.org (Postfix) with ESMTP id AC8098FC0A for ; Fri, 5 Dec 2008 08:35:31 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by po-out-1718.google.com with SMTP id y22so6868649pof.3 for ; Fri, 05 Dec 2008 00:35:31 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=BDKd9I8rQ/OR6InTuShPul3A2v8srGzdjE1v5TMIzjM=; b=JnosJB2eqg0S8P9l9Kqy6TxaLzdqAIPljpzniI9uxkzUQ3mtsFXA398jTIW7i17QKz U+bbKRng7PcCdaPMniOdxOfAoqW5WdCnjOOwnOCDGET5OeuZYSlGhe4TtdstuLljhzaE oCdBVX5J9r4kio7vYgS1nThP0Ai9sJ6+fP1N4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=D9J8XMDDXwKGUglJa39zh0paz7rNZBVDPyW7tZApqVvYBXN1/eKxjSwXlQx54Wzp0I IP3k5u9mbZPyxawQQgclV92hvCw0HdczMHL600lJwBIFcCyNi9r350iU0Yg3SaEk1xfR riplsA0TEa59AaSpDC54Fvd05Ry4HJHythuME= Received: by 10.140.128.3 with SMTP id a3mr7409837rvd.232.1228466131453; Fri, 05 Dec 2008 00:35:31 -0800 (PST) Received: by 10.140.158.13 with HTTP; Fri, 5 Dec 2008 00:35:31 -0800 (PST) Message-ID: <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> Date: Fri, 5 Dec 2008 00:35:31 -0800 From: "Garrett Cooper" To: "Maksim Yevmenkin" In-Reply-To: <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> Cc: FreeBSD Hackers Subject: RFC: small syscons and kbd patch 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 Dec 2008 08:35:32 -0000 On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten wrote: > * Maksim Yevmenkin wrote: >> the idea was to ensure that kbd->kb_locked variable only takes values >> 0 (zero) and 1 (one). > > I often use constructs like these to do that: > > foo = bar ? 1 : 0; > > Maybe !!bar is a lot shorter to write, I think the line above is a lot > easier to read. Indeed. I had no idea (and I would assume that many people wouldn't in my similar level of systems programming) what in the work you were trying to do above with that line. The one-line conditional is universal in almost all major high-level language dialects I've hit, minus Python and Tcl. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 08:38:21 2008 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 976171065675 for ; Fri, 5 Dec 2008 08:38:21 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from po-out-1718.google.com (po-out-1718.google.com [72.14.252.152]) by mx1.freebsd.org (Postfix) with ESMTP id 6A3E68FC19 for ; Fri, 5 Dec 2008 08:38:21 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by po-out-1718.google.com with SMTP id y22so6870163pof.3 for ; Fri, 05 Dec 2008 00:38:21 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Rlw3AxNIA0hKHpm0eneE+TPWeXnBGwgVuIhWlQ1T8ZE=; b=Gwggu179q9Se5Nqwg7WlsiTbcjIgTQhWZFSX2tzTm3TCAx96kdSpHXW6wSGX2axqgt +lpUWEdax8j7zaZOUxLyzv+Zbz02+dFLb2pJ6fl2vtBsIjzD9d/gChGBJGp08ZvoYzHX RYqNihhMzX6qvkoQbbi65sC7MKXz3ngSlymhc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Ay+ou5mEEdXrll1PpbYEt2mjxddoEipVNpSaVqA2iwgxBKjC9W405p1JkkoTK7zOzh 8BMKtw6rRarXzy4AE329utoToGiNLbLwWZO7X0ZC0Q4DLM+cGVv4tMXAAkzP4o9nYlWL o5bcUcy8/Uan1F2hWT8r44jqs/VAcpO1leYpc= Received: by 10.140.172.20 with SMTP id u20mr7402556rve.244.1228466301227; Fri, 05 Dec 2008 00:38:21 -0800 (PST) Received: by 10.140.158.13 with HTTP; Fri, 5 Dec 2008 00:38:21 -0800 (PST) Message-ID: <7d6fde3d0812050038m766ecd92j352ab33bc37b6c8e@mail.gmail.com> Date: Fri, 5 Dec 2008 00:38:21 -0800 From: "Garrett Cooper" To: perryh@pluto.rain.com In-Reply-To: <4938e20c.nP8q+JgDZ0gKUsAU%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49300020.6060603@icyb.net.ua> <49382449.80002@icyb.net.ua> <4938e20c.nP8q+JgDZ0gKUsAU%perryh@pluto.rain.com> Cc: freebsd-hackers@freebsd.org, avg@icyb.net.ua Subject: Re: ichwd problem: watchdog doesn't "bark" 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 Dec 2008 08:38:21 -0000 On Fri, Dec 5, 2008 at 12:10 AM, wrote: > [dropped stable@ since I'm not on it and > I suspect it may not accept non-member posts] > >> BTW, can someone knowledgeable tell me if watchdog better >> be firing SMI or NMI when it runs down? >> My bet is on NMI, but who knows. > > It may depend on whether you want the BIOS, or FreeBSD, handling > the interrupt. Unless you are running *very* old h/w, there's a > good chance the BIOS intercepts SMI, even with a protected-mode > OS running, and I wouldn't be surprised if the BIOS' response to > a watchdog timeout were an immediate reboot. It might be good > to check the motherboard and/or BIOS manuals. Yeah. I just recently have embarked on an adventure of installing FreeBSD on my work T61 laptop, and while poking around the BIOS I discovered that NMI could be enabled or disabled, so I'd determine whether or not that feature is available, and see if it's turned on or off. Intel and/or the laptop vendor should be helpful in this pursuit. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 08:44:45 2008 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 3CE311065675 for ; Fri, 5 Dec 2008 08:44:45 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id E87788FC17 for ; Fri, 5 Dec 2008 08:44:44 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-255-48-78.bredband.comhem.se ([83.255.48.78]:55411 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1L8WIl-0002Kj-9R for freebsd-hackers@freebsd.org; Fri, 05 Dec 2008 09:44:44 +0100 Received: (qmail 84850 invoked from network); 5 Dec 2008 09:44:41 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 5 Dec 2008 09:44:41 +0100 Received: (qmail 29357 invoked by uid 1001); 5 Dec 2008 09:44:41 +0100 Date: Fri, 5 Dec 2008 09:44:41 +0100 From: Erik Trulsson To: Garrett Cooper Message-ID: <20081205084441.GA29312@owl.midgard.homeip.net> References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-IP: 83.255.48.78 X-Scan-Result: No virus found in message 1L8WIl-0002Kj-9R. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1L8WIl-0002Kj-9R 21c5f55b8ec54c8d4873865aae68eb2c Cc: FreeBSD Hackers , Maksim Yevmenkin Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 08:44:45 -0000 On Fri, Dec 05, 2008 at 12:35:31AM -0800, Garrett Cooper wrote: > On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten wrote: > > * Maksim Yevmenkin wrote: > >> the idea was to ensure that kbd->kb_locked variable only takes values > >> 0 (zero) and 1 (one). > > > > I often use constructs like these to do that: > > > > foo = bar ? 1 : 0; > > > > Maybe !!bar is a lot shorter to write, I think the line above is a lot > > easier to read. > > Indeed. I had no idea (and I would assume that many people wouldn't in > my similar level of systems programming) what in the work you were > trying to do above with that line. The one-line conditional is > universal in almost all major high-level language dialects I've hit, > minus Python and Tcl. > -Garrett The !!bar construction to map {0, not-0} to {0,1} is fairly common in C programming, and I would certainly expect any experienced C programmer to recognize it. -- Erik Trulsson ertr1013@student.uu.se From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 08:50:38 2008 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 EAFBD1065673 for ; Fri, 5 Dec 2008 08:50:38 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from po-out-1718.google.com (po-out-1718.google.com [72.14.252.159]) by mx1.freebsd.org (Postfix) with ESMTP id B83FA8FC13 for ; Fri, 5 Dec 2008 08:50:38 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by po-out-1718.google.com with SMTP id y22so6876098pof.3 for ; Fri, 05 Dec 2008 00:50:38 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=h8DPyRlmOFHKrZOeO4cxzX0wFRHort2P97jg+LRnUvw=; b=Ln3pnydy6eNd7uoOrakAv+lhlnml5sboorZ/ph0aeo9ds35Y9RQ3/2B73j3h1exC9j zYWEP+8HbhWwxp4xND20SiQK5ZEv/vU9go90Gr00W5WfxUvqm5yCAfkQgKUCnE/eZwLz YF7o98NQHSmgl77Jc8aZkmyCjz+hExTb/N4mA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=LZOSfX0oEXE1Xk5GDz9PSAWiYP3f5PQye5/90GXBo0M4J4Q4Lv6xNnYhPsLque8tSj lYyWg2y0uiaStGjikalvp4ET0evqr/ZvU1RQXch629lbF12WTGuXBVPCXzyQ+pzthqly Mbj/HSl6fPOJyZGjMBUmokNXnDy3QFLq0RxBA= Received: by 10.141.45.16 with SMTP id x16mr7429469rvj.85.1228467038390; Fri, 05 Dec 2008 00:50:38 -0800 (PST) Received: by 10.140.158.13 with HTTP; Fri, 5 Dec 2008 00:50:38 -0800 (PST) Message-ID: <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> Date: Fri, 5 Dec 2008 00:50:38 -0800 From: "Garrett Cooper" To: "Erik Trulsson" In-Reply-To: <20081205084441.GA29312@owl.midgard.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> Cc: FreeBSD Hackers , Maksim Yevmenkin Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 08:50:39 -0000 On Fri, Dec 5, 2008 at 12:44 AM, Erik Trulsson wrote: > On Fri, Dec 05, 2008 at 12:35:31AM -0800, Garrett Cooper wrote: >> On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten wrote: >> > * Maksim Yevmenkin wrote: >> >> the idea was to ensure that kbd->kb_locked variable only takes values >> >> 0 (zero) and 1 (one). >> > >> > I often use constructs like these to do that: >> > >> > foo = bar ? 1 : 0; >> > >> > Maybe !!bar is a lot shorter to write, I think the line above is a lot >> > easier to read. >> >> Indeed. I had no idea (and I would assume that many people wouldn't in >> my similar level of systems programming) what in the work you were >> trying to do above with that line. The one-line conditional is >> universal in almost all major high-level language dialects I've hit, >> minus Python and Tcl. >> -Garrett > > The !!bar construction to map {0, not-0} to {0,1} is fairly common in C > programming, and I would certainly expect any experienced C programmer to > recognize it. (I feel like I'm getting off on a bikeshed topic, but...) 1. What dialect of C was it defined in? Is it still used in the standard dialect (honestly, this is the first time I've ever seen it before, but then again I am a younger generation user)? 2. Is it still taught in schools (I didn't learn it when I was taught C)? If not in schools, what about the Richie text (it's sort of like the defacto C programming standard book of course)? 3. What's the real loss of going to `? :', beyond maybe 3 extra keystrokes if it's easier for folks who may not be as experienced to read? -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 09:11:22 2008 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 D594D106564A for ; Fri, 5 Dec 2008 09:11:22 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 2237D8FC1C for ; Fri, 5 Dec 2008 09:11:21 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Dec 2008 09:11:19 -0000 Received: from p54A3E8C7.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.232.199] by mail.gmx.net (mp013) with SMTP; 05 Dec 2008 10:11:19 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+JF5Z/wmKJB0Tn1T/mq9NiMrDiS5C/NAgSdBgZCt swQzAjtOiKbSEg Message-ID: <4938F036.4010600@gmx.de> Date: Fri, 05 Dec 2008 10:11:18 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Garrett Cooper References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> In-Reply-To: <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.68 Cc: Maksim Yevmenkin , FreeBSD Hackers Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 09:11:22 -0000 Garrett Cooper schrieb: > (I feel like I'm getting off on a bikeshed topic, but...) > > 1. What dialect of C was it defined in? Is it still used in the > standard dialect (honestly, this is the first time I've ever seen it > before, but then again I am a younger generation user)? Dialect? The ! operator is plain vanilla standard C. It takes a scalar operand and returns 1, if it compares equal to 0, otherwise it returns 0. !!, i.e. two consecutive ! operators, is one of the oldest tricks in the book, right next to (a > b) - (a < b) for comparison functions and countless other idioms. > 3. What's the real loss of going to `? :', beyond maybe 3 extra > keystrokes if it's easier for folks who may not be as experienced to > read? I'd like my bikeshed grass green, please. Christoph From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 09:30:10 2008 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 4F7321065675 for ; Fri, 5 Dec 2008 09:30:10 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id CC7828FC13 for ; Fri, 5 Dec 2008 09:30:09 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-255-48-78.bredband.comhem.se ([83.255.48.78]:62403 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1L8X0i-0003Is-4e for freebsd-hackers@freebsd.org; Fri, 05 Dec 2008 10:30:09 +0100 Received: (qmail 85056 invoked from network); 5 Dec 2008 10:30:05 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 5 Dec 2008 10:30:05 +0100 Received: (qmail 29547 invoked by uid 1001); 5 Dec 2008 10:30:05 +0100 Date: Fri, 5 Dec 2008 10:30:05 +0100 From: Erik Trulsson To: Garrett Cooper Message-ID: <20081205093005.GA29478@owl.midgard.homeip.net> References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-IP: 83.255.48.78 X-Scan-Result: No virus found in message 1L8X0i-0003Is-4e. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1L8X0i-0003Is-4e 1b0207a258bc302f531a5addaef8a2dd Cc: FreeBSD Hackers , Maksim Yevmenkin Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 09:30:10 -0000 On Fri, Dec 05, 2008 at 12:50:38AM -0800, Garrett Cooper wrote: > On Fri, Dec 5, 2008 at 12:44 AM, Erik Trulsson wrote: > > On Fri, Dec 05, 2008 at 12:35:31AM -0800, Garrett Cooper wrote: > >> On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten wrote: > >> > * Maksim Yevmenkin wrote: > >> >> the idea was to ensure that kbd->kb_locked variable only takes values > >> >> 0 (zero) and 1 (one). > >> > > >> > I often use constructs like these to do that: > >> > > >> > foo = bar ? 1 : 0; > >> > > >> > Maybe !!bar is a lot shorter to write, I think the line above is a lot > >> > easier to read. > >> > >> Indeed. I had no idea (and I would assume that many people wouldn't in > >> my similar level of systems programming) what in the work you were > >> trying to do above with that line. The one-line conditional is > >> universal in almost all major high-level language dialects I've hit, > >> minus Python and Tcl. > >> -Garrett > > > > The !!bar construction to map {0, not-0} to {0,1} is fairly common in C > > programming, and I would certainly expect any experienced C programmer to > > recognize it. > > (I feel like I'm getting off on a bikeshed topic, but...) > > 1. What dialect of C was it defined in? Is it still used in the > standard dialect (honestly, this is the first time I've ever seen it > before, but then again I am a younger generation user)? The '!!x' construct is well defined in all dialects of C as far as I know. It is after all just using the standard '!' logical negation operator twice in a fairly straight-forward manner. If you know what the '!' operator does it should not be too difficult to figure out what applying it twice would do, even if one has never seen it done that way before. > 2. Is it still taught in schools (I didn't learn it when I was taught > C)? If not in schools, what about the Richie text (it's sort of like > the defacto C programming standard book of course)? Since I did not learn C in a school I have no idea what is (or has been) taught in schools in that regard. As for K&R I must admit to never having read it. It is however one (of many) idiomatic constructions in C that I would not really expect to be explicitly taught in a class. It is rather something I would expect programmers to either come up with on their own or to encounter when reading other peoples programs. > 3. What's the real loss of going to `? :', beyond maybe 3 extra > keystrokes if it's easier for folks who may not be as experienced to > read? An inexperienced C programmer who do not understand the '!!x' construct is not a programmer I would count on being familiar with the '? :' operator either. Besides, I personally find the corresponding '? :' construction harder to read. -- Erik Trulsson ertr1013@student.uu.se From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 09:31:13 2008 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 80E3F106567A for ; Fri, 5 Dec 2008 09:31:13 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from po-out-1718.google.com (po-out-1718.google.com [72.14.252.155]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3B08FC08 for ; Fri, 5 Dec 2008 09:31:13 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by po-out-1718.google.com with SMTP id y22so6896843pof.3 for ; Fri, 05 Dec 2008 01:31:12 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Jcl1y7NRy1Ifxy64vpXo8YFxvUQ7fihgimaDlWlMHAc=; b=dPvBYtlcnDQKasEGaljkWDyXFqYneeIZhyKn90OQOsyuhTDDDmUWJUNFJzbM/Ekyln u5T3FlgdugQXqA552avi4nq3IcU4oSFEV8okcBgoLcFm8Lkbl+Fxy54N7xn6DpUl+KPb 1cH+0EidK8mD/kWx5gnFSgpPXRZc25WQug7eo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=DDUCmrHlJGx3e2zWfE0zHO7sftLLb1nZy5Hmd9WLPGcXN8sHK+GH/++/VMWjYLlC3X 1dKlOGYs6tflrjLgcRMOhmNiNzeQoURjF/7TJNFpneLVRJCci6sWkGZD6cmz4kci4PUB 73Mus8ruLQrn6j1XcENXVa3BpYy+Y6OVwUsbs= Received: by 10.140.226.13 with SMTP id y13mr7441118rvg.93.1228469472864; Fri, 05 Dec 2008 01:31:12 -0800 (PST) Received: by 10.140.158.13 with HTTP; Fri, 5 Dec 2008 01:31:12 -0800 (PST) Message-ID: <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> Date: Fri, 5 Dec 2008 01:31:12 -0800 From: "Garrett Cooper" To: "Christoph Mallon" In-Reply-To: <4938F036.4010600@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> <4938F036.4010600@gmx.de> Cc: Maksim Yevmenkin , FreeBSD Hackers Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 09:31:13 -0000 On Fri, Dec 5, 2008 at 1:11 AM, Christoph Mallon wrote: > Garrett Cooper schrieb: >> >> (I feel like I'm getting off on a bikeshed topic, but...) >> >> 1. What dialect of C was it defined in? Is it still used in the >> standard dialect (honestly, this is the first time I've ever seen it >> before, but then again I am a younger generation user)? > > Dialect? The ! operator is plain vanilla standard C. It takes a scalar > operand and returns 1, if it compares equal to 0, otherwise it returns 0. > !!, i.e. two consecutive ! operators, is one of the oldest tricks in the > book, right next to (a > b) - (a < b) for comparison functions and countless > other idioms. > >> 3. What's the real loss of going to `? :', beyond maybe 3 extra >> keystrokes if it's easier for folks who may not be as experienced to >> read? > > I'd like my bikeshed grass green, please. > > Christoph If you really want to split hairs, ! only negates the logic value, whereas ~ actually negates the bits. So technically, you're not flipping 0 to make 1 and vice versa, but instead flipping 0 to make non-zero, etc. There is a clear distinction in hardware. The point was that !! isn't obvious at first glancing the C code. It's important for code to be readable as well as functional (that's why we have style(9)). Getting down to it I'd like to see what the compiler optimizes each as, because I can see dumb compilers saying `!!' translates to `not, bne => set, else set, continue', whereas `? :' could be translated to `bne, set, else set, continue'; I'm sure gcc has moved passed these really minute details. Hopefully this helps shed more light on where I'm coming from. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 09:54:08 2008 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 3F0A41065687 for ; Fri, 5 Dec 2008 09:54:08 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id B18538FC1A for ; Fri, 5 Dec 2008 09:54:07 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Dec 2008 09:54:02 -0000 Received: from p54A3E8C7.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.232.199] by mail.gmx.net (mp050) with SMTP; 05 Dec 2008 10:54:02 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX19h1s1F4aphcprdhCcbE9icuWDNqTKa1O4hstVXjD 1Qqs9LBmCjoki+ Message-ID: <4938FA39.50709@gmx.de> Date: Fri, 05 Dec 2008 10:54:01 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Garrett Cooper References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> <4938F036.4010600@gmx.de> <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> In-Reply-To: <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 Cc: Maksim Yevmenkin , FreeBSD Hackers Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 09:54:08 -0000 Garrett Cooper schrieb: > On Fri, Dec 5, 2008 at 1:11 AM, Christoph Mallon > wrote: >> Garrett Cooper schrieb: >>> (I feel like I'm getting off on a bikeshed topic, but...) >>> >>> 1. What dialect of C was it defined in? Is it still used in the >>> standard dialect (honestly, this is the first time I've ever seen it >>> before, but then again I am a younger generation user)? >> Dialect? The ! operator is plain vanilla standard C. It takes a scalar >> operand and returns 1, if it compares equal to 0, otherwise it returns 0. >> !!, i.e. two consecutive ! operators, is one of the oldest tricks in the >> book, right next to (a > b) - (a < b) for comparison functions and countless >> other idioms. >> >>> 3. What's the real loss of going to `? :', beyond maybe 3 extra >>> keystrokes if it's easier for folks who may not be as experienced to >>> read? >> I'd like my bikeshed grass green, please. >> >> Christoph > > If you really want to split hairs, ! only negates the logic value, > whereas ~ actually negates the bits. So technically, you're not > flipping 0 to make 1 and vice versa, but instead flipping 0 to make > non-zero, etc. There is a clear distinction in hardware. I have no idea, what you are referring to. I did not even mention the bitwise complement operator ~. I just described, what ! does. I explicitely said, the operand is compared to 0. I just paraphrased, what the standard says. You can verify this by reading ISO/IEC 9899:1999 (E) §6.5.3.3:5. > The point was that !! isn't obvious at first glancing the C code. It's I disagree. I sometimes even see stuff like (x ? 0 : 1) or worse (x ? false : true). I find this hard to read, because the "true" case returns "false" and vice versa. I clearly prefer a nice and concise ! or two. But today !! is not as important anymore, because C99 has a real bool type, which always is 0 or 1. See _Bool and the header . > important for code to be readable as well as functional (that's why we > have style(9)). Getting down to it I'd like to see what the compiler Don't try to argue about style(9). IMO it's horribly outdated, but there are conservative forces, which would prefer to cling to K&R. At least we got function prototypes! > optimizes each as, because I can see dumb compilers saying `!!' > translates to `not, bne => set, else set, continue', whereas `? :' > could be translated to `bne, set, else set, continue'; I'm sure gcc > has moved passed these really minute details. If you use the classic approach to implement short circuit evaluation for && and || you also handle !. Otherwise the code generated for stuff like if (!x || !y) would be horrible. Here's a very short explanation: You generate jump labels for the "true" and "false" cases. When traversing a logical expression and encountering a !, you just swap the "true" and "false" jump labels - nothing more happens for a !. So at no point you generate code, which produces a 0/1 and compares it again. While evaluating a logical expression with short circuit evaluation, there are no intermediate 0 and 1 constants involved at all. This is a very simpel model. Modern optimizing compilers do not generate code directly from the abstract syntax tree, but use a intermediate representation, which is more suited for optimization[1][2]. Hopefully this helps to shed a bit light on compiler construction. Christoph [1] (self advertisement) FIRM is a modern graph based IR, which uses SSA form: http://www.libfirm.org/ [2] LLVM has a nice IR, too: http://www.llvm.org/ From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 09:59:56 2008 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 A10E7106564A for ; Fri, 5 Dec 2008 09:59:56 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 5C0488FC08 for ; Fri, 5 Dec 2008 09:59:56 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 31B9F6D43F; Fri, 5 Dec 2008 09:59:55 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 0A892844B1; Fri, 5 Dec 2008 10:59:55 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Garrett Cooper" References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> <4938F036.4010600@gmx.de> <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> Date: Fri, 05 Dec 2008 10:59:54 +0100 In-Reply-To: <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> (Garrett Cooper's message of "Fri, 5 Dec 2008 01:31:12 -0800") Message-ID: <861vwnhrhh.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers , Christoph Mallon , Maksim Yevmenkin Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 09:59:56 -0000 "Garrett Cooper" writes: > If you really want to split hairs, ! only negates the logic value, > whereas ~ actually negates the bits. So technically, you're not > flipping 0 to make 1 and vice versa, but instead flipping 0 to make > non-zero, etc. There is a clear distinction in hardware. He didn't say anything about flipping bits... and you're wrong, !0 is guaranteed to evaluate to 1. > The point was that !! isn't obvious at first glancing the C code. It is to an experienced C programmer. > Getting down to it I'd like to see what the compiler optimizes each > as, because I can see dumb compilers saying `!!' translates to `not, > bne =3D> set, else set, continue', whereas `? :' could be translated to > `bne, set, else set, continue'; I'm sure gcc has moved passed these > really minute details. Never try to second-guess the compiler. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 10:04:57 2008 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 ABB001065672; Fri, 5 Dec 2008 10:04:57 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8828FC1A; Fri, 5 Dec 2008 10:04:57 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B8EC56D44E; Fri, 5 Dec 2008 10:04:56 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9D6648448C; Fri, 5 Dec 2008 11:04:56 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Andriy Gapon References: <49300020.6060603@icyb.net.ua> <49382449.80002@icyb.net.ua> Date: Fri, 05 Dec 2008 11:04:56 +0100 In-Reply-To: <49382449.80002@icyb.net.ua> (Andriy Gapon's message of "Thu, 04 Dec 2008 20:41:13 +0200") Message-ID: <86wsefgcon.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, FreeBSD Stable Subject: Re: ichwd problem: watchdog doesn't "bark" 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 Dec 2008 10:04:57 -0000 Andriy Gapon writes: > When I start watchdogd I see the following messages: > timer enabled > timeout set to 28 ticks > and then a flow of messages: > timer reloaded >=20 > Then I kill -9 watchdogd. > "timer reloded" messages are no longer produced. > And there are no other messages. >=20 > But nothing happens for many minutes that I waited. The watchdog may be disabled, either in hardware or by the BIOS at boot time, but the driver should have detected that. It is also possible that the BIOS catches the SMI but ignores it. > BTW, can someone knowledgeable tell me if watchdog better be firing SMI > or NMI when it runs down? It should fire SMI, IIRC. Read the comments at the top of the code for references to the relevant Intel documentation, which you can download for free. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 11:17:04 2008 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 211D6106564A for ; Fri, 5 Dec 2008 11:17:04 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id D03308FC18 for ; Fri, 5 Dec 2008 11:17:03 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id DCA896D44C; Fri, 5 Dec 2008 11:17:02 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id BC0D784491; Fri, 5 Dec 2008 12:17:02 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Christoph Mallon References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> <4938F036.4010600@gmx.de> <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> <4938FA39.50709@gmx.de> Date: Fri, 05 Dec 2008 12:17:02 +0100 In-Reply-To: <4938FA39.50709@gmx.de> (Christoph Mallon's message of "Fri, 05 Dec 2008 10:54:01 +0100") Message-ID: <86skp2hnwx.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Garrett Cooper , FreeBSD Hackers , Maksim Yevmenkin Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 11:17:04 -0000 Christoph Mallon writes: > Don't try to argue about style(9). IMO it's horribly outdated, but > there are conservative forces, which would prefer to cling to K&R. At > least we got function prototypes! If there's something specific in style(9) you don't like, you are welcome to start a discussion about it, and we will consider the merits of your arguments; talking about "conservative forces that would prefer to cling to K&R" will get you nowhere. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 11:45:37 2008 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 008DE1065675 for ; Fri, 5 Dec 2008 11:45:37 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 285BB8FC19 for ; Fri, 5 Dec 2008 11:45:35 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA22442; Fri, 05 Dec 2008 13:45:29 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <49391458.8060708@icyb.net.ua> Date: Fri, 05 Dec 2008 13:45:28 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Garrett Cooper References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> In-Reply-To: <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Maksim Yevmenkin , FreeBSD Hackers Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 11:45:37 -0000 on 05/12/2008 10:50 Garrett Cooper said the following: > On Fri, Dec 5, 2008 at 12:44 AM, Erik Trulsson wrote: >> On Fri, Dec 05, 2008 at 12:35:31AM -0800, Garrett Cooper wrote: >>> On Thu, Dec 4, 2008 at 11:22 PM, Ed Schouten wrote: >>>> * Maksim Yevmenkin wrote: >>>>> the idea was to ensure that kbd->kb_locked variable only takes values >>>>> 0 (zero) and 1 (one). >>>> I often use constructs like these to do that: >>>> >>>> foo = bar ? 1 : 0; >>>> >>>> Maybe !!bar is a lot shorter to write, I think the line above is a lot >>>> easier to read. >>> Indeed. I had no idea (and I would assume that many people wouldn't in >>> my similar level of systems programming) what in the work you were >>> trying to do above with that line. The one-line conditional is >>> universal in almost all major high-level language dialects I've hit, >>> minus Python and Tcl. >>> -Garrett >> The !!bar construction to map {0, not-0} to {0,1} is fairly common in C >> programming, and I would certainly expect any experienced C programmer to >> recognize it. > > (I feel like I'm getting off on a bikeshed topic, but...) > > 1. What dialect of C was it defined in? Is it still used in the > standard dialect (honestly, this is the first time I've ever seen it > before, but then again I am a younger generation user)? I am not sure what you meant by dialect of C, just in case you meant something different from others understood here's my personal observation: you will quite a bit of '!!' in Linux kernel code, you would see much much fewer of them in our code. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 08:08:09 2008 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 DDFCB106564A for ; Fri, 5 Dec 2008 08:08:09 +0000 (UTC) (envelope-from frank@harz.behrens.de) Received: from post.behrens.de (post.behrens.de [IPv6:2a01:170:1023::1:2]) by mx1.freebsd.org (Postfix) with ESMTP id 3FDE78FC1A for ; Fri, 5 Dec 2008 08:08:08 +0000 (UTC) (envelope-from frank@harz.behrens.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=behrens.de; h=from:to:date:mime-version:subject:cc:in-reply-to:references:content-type:content-transfer-encoding:content-description; s=pinky1; t=1228464486; i=frank@harz.behrens.de; bh=kpSKCKoUGMRUOxM8Xz1ibS7KQPLSe6TE2Ah0SYinb1I=; b=e7hWdNN7TkraTbPOAuKmoK7zJRysyd2JuwgA1ILbh6eKjoZq9q+0ChMDw2EBfEfocC5c3bZ/qWeIneFENlJdKg== Received: from sun.behrens ([IPv6:2a01:170:1023:0:b8c3:8554:f004:1f36]) by post.behrens.de (8.14.3/8.14.2) with ESMTP(MSA) id mB5880Fo050923; Fri, 5 Dec 2008 09:08:00 +0100 (CET) (envelope-from frank@harz.behrens.de) Message-Id: <200812050808.mB5880Fo050923@post.behrens.de> From: "Frank Behrens" To: Nate Eldredge Date: Fri, 05 Dec 2008 09:08:00 +0100 MIME-Version: 1.0 Priority: normal In-reply-to: References: <20081204212311.GA17962@saturn.kn-bremen.de> X-mailer: Pegasus Mail for Windows (4.31, DE v4.31 R1) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Hashcash: 1:23:081205:freebsd-hackers@freebsd.org::wt8eRuAUlKqt68ht:000000boUV X-Hashcash: 1:23:081205:neldredge@math.ucsd.edu::5BWgyzHPz0OI31ec:00000000003MES X-Mailman-Approved-At: Fri, 05 Dec 2008 12:35:33 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: AMD64 qemu completely broken? 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 Dec 2008 08:08:09 -0000 Nate Eldredge wrote on 4 Dec 2008 14:43: >... > pain to clean up. '-net tap' works fine, but requires root privileges and No. > is more work to set up. Yes, and this must be as root, but you can use later the tap device as unprivileged user. (Isn't it a virtual network jack, where you can plug into your cable? ;-) -- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available. From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 13:05:25 2008 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 9CFF91065675 for ; Fri, 5 Dec 2008 13:05:25 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 343358FC08 for ; Fri, 5 Dec 2008 13:05:25 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=ETKsCBiF7WWirOoZ++psPCqDVpBUt3opOQnywUqHGLGwBkKjf+gPUDtKBpudSV3b3puRGIBFXdUk1qoRYV/zKbUq8AJdqB5XoJAlnQTZ2n/oJ5r6me4F7uSAIt8Ygk2aYKnkDc9/6pQjE/fATQQTQN+mjld3n4LjNFHVdZ9apkg=; Received: from amnesiac.at.no.dns ([144.206.182.38]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1L8aN1-000IAt-B8; Fri, 05 Dec 2008 16:05:23 +0300 Date: Fri, 5 Dec 2008 16:05:21 +0300 From: Eygene Ryabinkin To: Garrett Cooper Message-ID: References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/e2eDi0V/xtL+Mc8" Content-Disposition: inline In-Reply-To: <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> Sender: rea-fbsd@codelabs.ru Cc: Maksim Yevmenkin , FreeBSD Hackers Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 13:05:25 -0000 --/e2eDi0V/xtL+Mc8 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Garret, Fri, Dec 05, 2008 at 12:50:38AM -0800, Garrett Cooper wrote: > 1. What dialect of C was it defined in? Is it still used in the > standard dialect (honestly, this is the first time I've ever seen it > before, but then again I am a younger generation user)? It is the standard negation operator: !(expr) is equal to (expr =3D=3D 0). > 2. Is it still taught in schools (I didn't learn it when I was taught > C)? Yes. I am personally teaching the people in school and I am explaining the concept of double negation every two years ;)) > If not in schools, what about the Richie text (it's sort of like > the defacto C programming standard book of course)? K&R book is good but it at no means covers all tricks and idioms of a C language. > 3. What's the real loss of going to `? :', beyond maybe 3 extra > keystrokes if it's easier for folks who may not be as experienced to > read? No real loss, just easier to type and looks more compact. It is the matter of a personal taste, I think. If one knows this idiom, he will recognize it at a glance. If not, one should think a bit about the logics behind it, but it shouldn't be hard: almost everyone uses constructs like 'if (!ptr)'. And there is only one step from there to the double negation. --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --/e2eDi0V/xtL+Mc8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkk5JxEACgkQthUKNsbL7YguFACgitCINYMboc3XROsVpHiqZXJS lGoAn1wsMu62iIqyfyBJ1GbtFln1sISV =mxfg -----END PGP SIGNATURE----- --/e2eDi0V/xtL+Mc8-- From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 18:10:14 2008 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 9E468106564A for ; Fri, 5 Dec 2008 18:10:14 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-gx0-f19.google.com (mail-gx0-f19.google.com [209.85.217.19]) by mx1.freebsd.org (Postfix) with ESMTP id 391C38FC12 for ; Fri, 5 Dec 2008 18:10:13 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by gxk12 with SMTP id 12so136820gxk.19 for ; Fri, 05 Dec 2008 10:10:12 -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:to :subject:mime-version:content-type; bh=i8oqM4AKKEGTJS0WgHOXkNi+p+h7rgaWc6RXSbymi5Q=; b=Otq02wJB7eht54fquCq4SC27vPzCg9pB2L6/L6gei7s+67UPHMKIxezqlE9tvTyzSM 4AVSyNK5IAzCPKCVDvEhYbmOu7sOtKsp+2ZcJ02P9NsJKnCjRxoA5r78ibQz1eRwEdwm /Tj7aDz0vNnD0fmOtFWA41VElJGCgTRppmL7I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=aul618Aam0GCIgXtbETgp2XkkXDNzp3+jDqQWWAaY4NijXeSPU/TQVAlE9E/rel/XY YxvESkMLpfZ9vD25pccF+/+h4RPWxjogPyPYeDpaCAlWJtW9ky2rL1tOsC6OZaQ6ThcK vLHkische5Vk0zaLK3+Vaqv61Z9DM1i6raCZg= Received: by 10.151.11.17 with SMTP id o17mr2136405ybi.77.1228500612315; Fri, 05 Dec 2008 10:10:12 -0800 (PST) Received: by 10.151.128.6 with HTTP; Fri, 5 Dec 2008 10:10:12 -0800 (PST) Message-ID: <5f67a8c40812051010u55ef6d70m1b4270c98852d87c@mail.gmail.com> Date: Fri, 5 Dec 2008 13:10:12 -0500 From: "Zaphod Beeblebrox" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: IPMI shared ethernet ports (again). 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 Dec 2008 18:10:14 -0000 I posted here a month or two ago about being amazed that some system management cards can share a physical ethernet port. Some of you responded that it doesn't always work. Well... I've encountered this and I'm wondering if I can work around it somehow. The ones that work are in Dell 1950-III servers (The R-200 seem to work, too). They have "bce" driver ports. The HP DL/360 that I have here today have "bge" driver ports and the IPMI console appears to stop working just as soon as FreeBSD probes the port. Is this something that can be configured in BGE or is it just not going to work? From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 18:27:46 2008 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 36B371065673 for ; Fri, 5 Dec 2008 18:27:46 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 1299C8FC17 for ; Fri, 5 Dec 2008 18:27:45 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) 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 mB5IRh624264; Fri, 5 Dec 2008 10:27:43 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id mB5IRhr02329; Fri, 5 Dec 2008 10:27:43 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Fri, 5 Dec 2008 10:27:43 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Garrett Cooper In-Reply-To: <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> Message-ID: References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> <4938F036.4010600@gmx.de> <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Hackers , Christoph Mallon , Maksim Yevmenkin Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 18:27:46 -0000 On Fri, 5 Dec 2008, Garrett Cooper wrote: > On Fri, Dec 5, 2008 at 1:11 AM, Christoph Mallon > wrote: >> Garrett Cooper schrieb: >>> >>> (I feel like I'm getting off on a bikeshed topic, but...) >>> >>> 1. What dialect of C was it defined in? Is it still used in the >>> standard dialect (honestly, this is the first time I've ever seen it >>> before, but then again I am a younger generation user)? >> >> Dialect? The ! operator is plain vanilla standard C. It takes a scalar >> operand and returns 1, if it compares equal to 0, otherwise it returns 0. >> !!, i.e. two consecutive ! operators, is one of the oldest tricks in the >> book, right next to (a > b) - (a < b) for comparison functions and countless >> other idioms. >> >>> 3. What's the real loss of going to `? :', beyond maybe 3 extra >>> keystrokes if it's easier for folks who may not be as experienced to >>> read? >> >> I'd like my bikeshed grass green, please. >> >> Christoph > > If you really want to split hairs, ! only negates the logic value, > whereas ~ actually negates the bits. So technically, you're not > flipping 0 to make 1 and vice versa, but instead flipping 0 to make > non-zero, etc. There is a clear distinction in hardware. > > The point was that !! isn't obvious at first glancing the C code. It's > important for code to be readable as well as functional (that's why we > have style(9)). Getting down to it I'd like to see what the compiler > optimizes each as, because I can see dumb compilers saying `!!' > translates to `not, bne => set, else set, continue', whereas `? :' > could be translated to `bne, set, else set, continue'; I'm sure gcc > has moved passed these really minute details. Out of curiosity, I tried some various compilers, including gcc on i386, amd64, and sparc; Intel's C compiler on i386; tcc (tiny, non-optimizing C compiler) on i386; and Sun's compiler (old version) on sparc. I compiled the following file: int bangbang(int x) { return !!x; } int ternary(int x) { return x ? 1 : 0; } Intel's compiler generated different code for these two functions when optimization was turned off. bangbang used a conditional set instruction, while ternary used conditional jumps. With optimization on the two were identical. All other compilers generated identical code for the two functions whether optimization was on or off. (Of course, the generated code varied between compilers; tcc's in particular was decidedly non-optimized.) I really don't think something as simple as this is worth worrying about in terms of code efficiency. Even if they weren't identical, the difference is at most a couple of instructions and a pipeline flush, and if that's a serious problem you need to be using assembly anyway. Besides, it's not a piece of code that comes up all that often. The only basis for arguing about it is style, and I think we've established that it's purely a matter of taste. In particular, there isn't a clear favorite for which is easier to read. IMHO, style(9) should remain agnostic and let the programmer decide. However, if people really feel that consistency is necessary here, I propose the following: if the cents digit of the closing price of the Dow Jones Industrial Average on this coming Monday, December 8, 2008, is even, then style(9) shall be edited to indicate that `!!x' is preferred. If odd, then style(9) shall prefer `x ? 1 : 0'. :-) -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 19:02:01 2008 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 626211065673 for ; Fri, 5 Dec 2008 19:02:01 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from math.missouri.edu (math.missouri.edu [128.206.184.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2604B8FC08 for ; Fri, 5 Dec 2008 19:02:00 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from [128.206.184.213] (cauchy.math.missouri.edu [128.206.184.213]) by math.missouri.edu (8.13.1/8.13.1) with ESMTP id mB5Ibr2d051619; Fri, 5 Dec 2008 12:37:53 -0600 (CST) (envelope-from stephen@math.missouri.edu) Message-ID: <493974DE.1050802@math.missouri.edu> Date: Fri, 05 Dec 2008 12:37:18 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.18) Gecko/20081120 SeaMonkey/1.1.13 MIME-Version: 1.0 To: Nate Eldredge References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> <4938F036.4010600@gmx.de> <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88/8728/Fri Dec 5 09:44:27 2008 on math.missouri.edu X-Virus-Status: Clean Cc: Garrett Cooper , Christoph Mallon , Maksim Yevmenkin , FreeBSD Hackers Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 19:02:01 -0000 Nate Eldredge wrote: > int bangbang(int x) { return !!x; } > int ternary(int x) { return x ? 1 : 0; } Stylewise, I prefer int notzero(int x) { return x!=0; } From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 19:12:28 2008 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 616811065676 for ; Fri, 5 Dec 2008 19:12:28 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 387EE8FC23 for ; Fri, 5 Dec 2008 19:12:27 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) 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 mB5JCR601636; Fri, 5 Dec 2008 11:12:27 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id mB5JCRc03084; Fri, 5 Dec 2008 11:12:27 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Fri, 5 Dec 2008 11:12:26 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Stephen Montgomery-Smith In-Reply-To: <493974DE.1050802@math.missouri.edu> Message-ID: References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> <4938F036.4010600@gmx.de> <7d6fde3d0812050131p2e9ac761n1c76575d3a3f5792@mail.gmail.com> <493974DE.1050802@math.missouri.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Nate Eldredge , Garrett Cooper , Christoph Mallon , FreeBSD Hackers , Maksim Yevmenkin Subject: Re: RFC: small syscons and kbd patch 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 Dec 2008 19:12:28 -0000 On Fri, 5 Dec 2008, Stephen Montgomery-Smith wrote: > Nate Eldredge wrote: > >> int bangbang(int x) { return !!x; } >> int ternary(int x) { return x ? 1 : 0; } > > Stylewise, I prefer > > int notzero(int x) { return x!=0; } icc -O0 compiles notzero the same as bangbang (better than ternary). tcc produces better code for notzero than the other two. Sun cc without optimization produces slightly better code for notzero than the other two (one jump instead of two). For everything else all three produce equivalent code. `x && 1' and `x || 0' are some other possibilities. Anyway, maybe there is something more useful we could all be doing. :) -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 22:44:55 2008 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 45FDA106564A for ; Fri, 5 Dec 2008 22:44:55 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.175]) by mx1.freebsd.org (Postfix) with ESMTP id 2669B8FC13 for ; Fri, 5 Dec 2008 22:44:55 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: by wf-out-1314.google.com with SMTP id 24so192938wfg.7 for ; Fri, 05 Dec 2008 14:44:54 -0800 (PST) Received: by 10.142.241.15 with SMTP id o15mr189879wfh.258.1228515272391; Fri, 05 Dec 2008 14:14:32 -0800 (PST) Received: by 10.142.136.4 with HTTP; Fri, 5 Dec 2008 14:14:32 -0800 (PST) Message-ID: Date: Fri, 5 Dec 2008 14:14:32 -0800 From: "Sheldon Givens" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Small change to wc 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 Dec 2008 22:44:55 -0000 Hello everyone, In the process of migrating the last of a few Linux servers to FreeBSD, we ran in to a bit of a snag with one of our scripts when BSD wc didn't have an equivalent to the Linux -L. This flag tells wc to keep track of the longest line in the input. Here's a little diff to add this functionality to BSD wc. With this patch, an additional parameter is added to output that shows the length of the longest line My apologies if this is in the wrong format. I don't often post here. Happy Holidays, Sheldon Givens ---snip--- 65,66c65,66 < uintmax_t tlinect, twordct, tcharct; < int doline, doword, dochar, domulti; --- > uintmax_t tlinect, twordct, tcharct, tlongline; > int doline, doword, dochar, domulti, dolongline; 78c78 < while ((ch = getopt(argc, argv, "clmw")) != -1) --- > while ((ch = getopt(argc, argv, "clmwL")) != -1) 93a94,96 > case 'L': > dolongline = 1; > break; 127a131,132 > if (dolongline) > (void)printf(" %7ju", tlongline); 137c142 < uintmax_t linect, wordct, charct; --- > uintmax_t linect, wordct, charct, llcnt, tmpll; 146c151 < linect = wordct = charct = 0; --- > linect = wordct = charct = llcnt = tmpll = 0; 171c176,179 < if (*p == '\n') --- > if (*p == '\n') { > if (tmpll > llcnt) > llcnt = tmpll; > tmpll = 0; 172a181 > } else { tmpll++; } 179a189,192 > if (dolongline) { > tlongline = llcnt; > (void)printf(" %7ju", tlongline); > } 197c210 < return (0); --- > return (0); 231a245 > tmpll++; 234c248,251 < if (wch == L'\n') --- > if (wch == L'\n') { > if (tmpll > llcnt) > llcnt = tmpll; > tmpll = 0; 235a253 > } 258a277,280 > if (dolongline) { > tlongline = llcnt; > (void)printf(" %7ju", llcnt - 1); > } 266c288 < (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); --- > (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); ---unsnip--- From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 22:48:46 2008 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 AD1921065672 for ; Fri, 5 Dec 2008 22:48:46 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from po-out-1718.google.com (po-out-1718.google.com [72.14.252.152]) by mx1.freebsd.org (Postfix) with ESMTP id 802628FC13 for ; Fri, 5 Dec 2008 22:48:46 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by po-out-1718.google.com with SMTP id y22so268948pof.3 for ; Fri, 05 Dec 2008 14:48:46 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=iS/ULb5valXXqQmfGwqKSXRSZ0Va/DIs4a+nV3JpyNs=; b=drQvryF7nKFya8os0UGpsOZbbX65RVgAOdTiyVZ39VB/leNih0bccUnBHIH6XrOyLy AZ8Kf46vhjGQHeMewMIL3RiXKe4dzegBaki68H1RDLxoZNV4yW3r1q9r4Yc67gbqVyvj N+boV8vnHi+kIy+IdzwRrKefgGzNzOpwSvRYs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Nhjaq50YpjeFxPAnnNSqFzCtIt/4/Nh/OPW8qRe9ioyd+ETU407ajUL1m9wStkx6/X IyW5w1+0U8gpVrd/lR1u40OqRcVsaEz04DxY1hpeMbdt5NIjRXB8gNv33rtLfBLVnQg4 hqRDFsNbAxA5LCofooMaouAjyw5529Z/nseqQ= Received: by 10.141.162.1 with SMTP id p1mr224568rvo.190.1228517326253; Fri, 05 Dec 2008 14:48:46 -0800 (PST) Received: by 10.140.158.13 with HTTP; Fri, 5 Dec 2008 14:48:46 -0800 (PST) Message-ID: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> Date: Fri, 5 Dec 2008 14:48:46 -0800 From: "Garrett Cooper" To: "Sheldon Givens" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to wc 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 Dec 2008 22:48:46 -0000 On Fri, Dec 5, 2008 at 2:14 PM, Sheldon Givens wrote: > Hello everyone, > In the process of migrating the last of a few Linux servers to FreeBSD, we > ran in to a bit of a snag with one of our scripts when BSD wc didn't have an > equivalent to the Linux -L. This flag tells wc to keep track of the longest > line in the input. > > Here's a little diff to add this functionality to BSD wc. > > With this patch, an additional parameter is added to output that shows the > length of the longest line > > My apologies if this is in the wrong format. I don't often post here. > > Happy Holidays, > > Sheldon Givens > > > ---snip--- > 65,66c65,66 > < uintmax_t tlinect, twordct, tcharct; > < int doline, doword, dochar, domulti; > --- >> uintmax_t tlinect, twordct, tcharct, tlongline; >> int doline, doword, dochar, domulti, dolongline; > 78c78 > < while ((ch = getopt(argc, argv, "clmw")) != -1) > --- >> while ((ch = getopt(argc, argv, "clmwL")) != -1) > 93a94,96 >> case 'L': >> dolongline = 1; >> break; > 127a131,132 >> if (dolongline) >> (void)printf(" %7ju", tlongline); > 137c142 > < uintmax_t linect, wordct, charct; > --- >> uintmax_t linect, wordct, charct, llcnt, tmpll; > 146c151 > < linect = wordct = charct = 0; > --- >> linect = wordct = charct = llcnt = tmpll = 0; > 171c176,179 > < if (*p == '\n') > --- >> if (*p == '\n') { >> if (tmpll > llcnt) >> llcnt = tmpll; >> tmpll = 0; > 172a181 >> } else { tmpll++; } > 179a189,192 >> if (dolongline) { >> tlongline = llcnt; >> (void)printf(" %7ju", tlongline); >> } > 197c210 > < return (0); > --- >> return (0); > 231a245 >> tmpll++; > 234c248,251 > < if (wch == L'\n') > --- >> if (wch == L'\n') { >> if (tmpll > llcnt) >> llcnt = tmpll; >> tmpll = 0; > 235a253 >> } > 258a277,280 >> if (dolongline) { >> tlongline = llcnt; >> (void)printf(" %7ju", llcnt - 1); >> } > 266c288 > < (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); > --- >> (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); > > ---unsnip--- What's the plus side of having this? I can accomplish the same with something like awk without the additional overhead, which would be guaranteed to be portable. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 22:49:40 2008 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 0C982106567C for ; Fri, 5 Dec 2008 22:49:40 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from po-out-1718.google.com (po-out-1718.google.com [72.14.252.152]) by mx1.freebsd.org (Postfix) with ESMTP id C906C8FC0C for ; Fri, 5 Dec 2008 22:49:39 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by po-out-1718.google.com with SMTP id y22so269417pof.3 for ; Fri, 05 Dec 2008 14:49:39 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=iu7zlHoaIq74Dt6v9wVX9i1fK1/2vPEFn2AWTRJ16cE=; b=Tio/Q+ACk4rS13qnScIsEr6M/CBEtPRfKVZmIKixtxw16QotO6/VxDPilvw8CiA18h utAG/FuSm721vQwaWIeAPL7aUU9HEpkRroGM1wSfoqR0S1N4+NMvuE6wV8BRhhHwFME4 Qx7RY5/VPLXJI0RHMa0oaJYDlC5mvhItDSCHo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=l9mUkPV2GP/T8AsyoA1f0Ekg34djV/2gZsG4rAHTiIpAwsP7jvEiiRodMHvUMPMFG+ OXSutLDsB5Tuug4PqbrhysCCaxgu469Vf3FfY0Q0SdnObih88pUqgDwxwZYwDLpR2BZf SWKI1pDCkVd/2jWzW2eWx9AvlNSDI4gxxWpVA= Received: by 10.140.166.21 with SMTP id o21mr230703rve.121.1228517379519; Fri, 05 Dec 2008 14:49:39 -0800 (PST) Received: by 10.140.158.13 with HTTP; Fri, 5 Dec 2008 14:49:39 -0800 (PST) Message-ID: <7d6fde3d0812051449s2ada98a7y848afc78caa8d096@mail.gmail.com> Date: Fri, 5 Dec 2008 14:49:39 -0800 From: "Garrett Cooper" To: "Sheldon Givens" In-Reply-To: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to wc 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 Dec 2008 22:49:40 -0000 On Fri, Dec 5, 2008 at 2:48 PM, Garrett Cooper wrote: > On Fri, Dec 5, 2008 at 2:14 PM, Sheldon Givens wrote: >> Hello everyone, >> In the process of migrating the last of a few Linux servers to FreeBSD, we >> ran in to a bit of a snag with one of our scripts when BSD wc didn't have an >> equivalent to the Linux -L. This flag tells wc to keep track of the longest >> line in the input. >> >> Here's a little diff to add this functionality to BSD wc. [..] > What's the plus side of having this? I can accomplish the same with > something like awk without the additional overhead, which would be > guaranteed to be portable. s/overhead/overhead to wc/. > -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 23:10:58 2008 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 1989A106564A for ; Fri, 5 Dec 2008 23:10:58 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id B47E88FC0A for ; Fri, 5 Dec 2008 23:10:57 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: by yx-out-2324.google.com with SMTP id 8so137547yxb.13 for ; Fri, 05 Dec 2008 15:10:57 -0800 (PST) Received: by 10.142.203.19 with SMTP id a19mr206815wfg.310.1228518656338; Fri, 05 Dec 2008 15:10:56 -0800 (PST) Received: by 10.142.136.4 with HTTP; Fri, 5 Dec 2008 15:10:56 -0800 (PST) Message-ID: Date: Fri, 5 Dec 2008 15:10:56 -0800 From: "Sheldon Givens" To: "Garrett Cooper" , freebsd-hackers@freebsd.org In-Reply-To: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> MIME-Version: 1.0 References: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Small change to wc 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 Dec 2008 23:10:58 -0000 What's the problem having it? The total code is mere bytes and it eases the transition for others who are migrating from Linux. You're absolutely right in that it can be done with awk (fairly simply, too) but it doesn't hurt to explore options. Additionally, with awk, you can't get other figures with the same command, which increases ease of use. IE: What's the equivalent to "wc -clwL" in awk? Would you really rather run wc -clw && awk '{if(length>x){x=length}}END{if(x>0){print x}else{print 0}}'`? Isn't wc -L a more elegant solution than awk '{if(length>x){x=length}}END{if(x>0){print x}else{print 0}}'`? Should I continue? On Fri, Dec 5, 2008 at 2:48 PM, Garrett Cooper wrote: > On Fri, Dec 5, 2008 at 2:14 PM, Sheldon Givens wrote: > > Hello everyone, > > In the process of migrating the last of a few Linux servers to FreeBSD, > we > > ran in to a bit of a snag with one of our scripts when BSD wc didn't have > an > > equivalent to the Linux -L. This flag tells wc to keep track of the > longest > > line in the input. > > > > Here's a little diff to add this functionality to BSD wc. > > > > With this patch, an additional parameter is added to output that shows > the > > length of the longest line > > > > My apologies if this is in the wrong format. I don't often post here. > > > > Happy Holidays, > > > > Sheldon Givens > > > > > > ---snip--- > > 65,66c65,66 > > < uintmax_t tlinect, twordct, tcharct; > > < int doline, doword, dochar, domulti; > > --- > >> uintmax_t tlinect, twordct, tcharct, tlongline; > >> int doline, doword, dochar, domulti, dolongline; > > 78c78 > > < while ((ch = getopt(argc, argv, "clmw")) != -1) > > --- > >> while ((ch = getopt(argc, argv, "clmwL")) != -1) > > 93a94,96 > >> case 'L': > >> dolongline = 1; > >> break; > > 127a131,132 > >> if (dolongline) > >> (void)printf(" %7ju", tlongline); > > 137c142 > > < uintmax_t linect, wordct, charct; > > --- > >> uintmax_t linect, wordct, charct, llcnt, tmpll; > > 146c151 > > < linect = wordct = charct = 0; > > --- > >> linect = wordct = charct = llcnt = tmpll = 0; > > 171c176,179 > > < if (*p == '\n') > > --- > >> if (*p == '\n') { > >> if (tmpll > llcnt) > >> llcnt = tmpll; > >> tmpll = 0; > > 172a181 > >> } else { tmpll++; } > > 179a189,192 > >> if (dolongline) { > >> tlongline = llcnt; > >> (void)printf(" %7ju", tlongline); > >> } > > 197c210 > > < return (0); > > --- > >> return (0); > > 231a245 > >> tmpll++; > > 234c248,251 > > < if (wch == L'\n') > > --- > >> if (wch == L'\n') { > >> if (tmpll > llcnt) > >> llcnt = tmpll; > >> tmpll = 0; > > 235a253 > >> } > > 258a277,280 > >> if (dolongline) { > >> tlongline = llcnt; > >> (void)printf(" %7ju", llcnt - 1); > >> } > > 266c288 > > < (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); > > --- > >> (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); > > > > ---unsnip--- > > What's the plus side of having this? I can accomplish the same with > something like awk without the additional overhead, which would be > guaranteed to be portable. > -Garrett > From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 23:15:06 2008 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 EEC7C1065673 for ; Fri, 5 Dec 2008 23:15:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 807D08FC1C for ; Fri, 5 Dec 2008 23:15:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1L8jt2-000Fr1-70; Sat, 06 Dec 2008 01:15:04 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mB5NEwMT001307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Dec 2008 01:14:58 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mB5NEw0h059523; Sat, 6 Dec 2008 01:14:58 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mB5NEwnL059522; Sat, 6 Dec 2008 01:14:58 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 6 Dec 2008 01:14:58 +0200 From: Kostik Belousov To: Sheldon Givens Message-ID: <20081205231458.GY2038@deviant.kiev.zoral.com.ua> References: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5cJDuji44TeXTx+X" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1L8jt2-000Fr1-70 52070edf249592802480f7e900476c81 X-Terabit: YES Cc: Garrett Cooper , freebsd-hackers@freebsd.org Subject: Re: Small change to wc 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 Dec 2008 23:15:07 -0000 --5cJDuji44TeXTx+X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 05, 2008 at 03:10:56PM -0800, Sheldon Givens wrote: > What's the problem having it? The total code is mere bytes and it eases t= he > transition for others who are migrating from Linux. > You're absolutely right in that it can be done with awk (fairly simply, t= oo) > but it doesn't hurt to explore options. Additionally, with awk, you can't > get other figures with the same command, which increases ease of use. > IE: What's the equivalent to "wc -clwL" in awk? Would you really rather r= un > wc -clw && awk '{if(length>x){x=3Dlength}}END{if(x>0){print x}else{print > 0}}'`? >=20 > Isn't wc -L a more elegant solution than awk > '{if(length>x){x=3Dlength}}END{if(x>0){print x}else{print 0}}'`? >=20 > Should I continue? Real argument pro is that you have one less thing to worry when you trying to run some script, written on Linux, on the FreeBSD system. >=20 > On Fri, Dec 5, 2008 at 2:48 PM, Garrett Cooper wrote: >=20 > > On Fri, Dec 5, 2008 at 2:14 PM, Sheldon Givens wro= te: > > > Hello everyone, > > > In the process of migrating the last of a few Linux servers to FreeBS= D, > > we > > > ran in to a bit of a snag with one of our scripts when BSD wc didn't = have > > an > > > equivalent to the Linux -L. This flag tells wc to keep track of the > > longest > > > line in the input. > > > > > > Here's a little diff to add this functionality to BSD wc. > > > > > > With this patch, an additional parameter is added to output that shows > > the > > > length of the longest line > > > > > > My apologies if this is in the wrong format. I don't often post here. > > > > > > Happy Holidays, > > > > > > Sheldon Givens > > > > > > > > > ---snip--- > > > 65,66c65,66 > > > < uintmax_t tlinect, twordct, tcharct; > > > < int doline, doword, dochar, domulti; > > > --- > > >> uintmax_t tlinect, twordct, tcharct, tlongline; > > >> int doline, doword, dochar, domulti, dolongline; > > > 78c78 > > > < while ((ch =3D getopt(argc, argv, "clmw")) !=3D -1) > > > --- > > >> while ((ch =3D getopt(argc, argv, "clmwL")) !=3D -1) > > > 93a94,96 > > >> case 'L': > > >> dolongline =3D 1; > > >> break; > > > 127a131,132 > > >> if (dolongline) > > >> (void)printf(" %7ju", tlongline); > > > 137c142 > > > < uintmax_t linect, wordct, charct; > > > --- > > >> uintmax_t linect, wordct, charct, llcnt, tmpll; > > > 146c151 > > > < linect =3D wordct =3D charct =3D 0; > > > --- > > >> linect =3D wordct =3D charct =3D llcnt =3D tmpll =3D 0; > > > 171c176,179 > > > < if (*p =3D=3D '\n') > > > --- > > >> if (*p =3D=3D '\n') { > > >> if (tmpll > llcnt) > > >> llcnt =3D tmpl= l; > > >> tmpll =3D 0; > > > 172a181 > > >> } else { tmpll++; } > > > 179a189,192 > > >> if (dolongline) { > > >> tlongline =3D llcnt; > > >> (void)printf(" %7ju", tlongline); > > >> } > > > 197c210 > > > < return (0); > > > --- > > >> return (0); > > > 231a245 > > >> tmpll++; > > > 234c248,251 > > > < if (wch =3D=3D L'\n') > > > --- > > >> if (wch =3D=3D L'\n') { > > >> if (tmpll > llcnt) > > >> llcnt =3D tmpll; > > >> tmpll =3D 0; > > > 235a253 > > >> } > > > 258a277,280 > > >> if (dolongline) { > > >> tlongline =3D llcnt; > > >> (void)printf(" %7ju", llcnt - 1); > > >> } > > > 266c288 > > > < (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); > > > --- > > >> (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); > > > > > > ---unsnip--- > > > > What's the plus side of having this? I can accomplish the same with > > something like awk without the additional overhead, which would be > > guaranteed to be portable. > > -Garrett > > > _______________________________________________ > 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" --5cJDuji44TeXTx+X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEUEARECAAYFAkk5tfEACgkQC3+MBN1Mb4hV3gCY9L1hZJBV9Q/KqadGOJu9wOCU HgCgj6Jn9mqz9V/6zBZUHnPGV2zn8Os= =6H/f -----END PGP SIGNATURE----- --5cJDuji44TeXTx+X-- From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 23:20:02 2008 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 A88361065677 for ; Fri, 5 Dec 2008 23:20:02 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outZ.internet-mail-service.net (outz.internet-mail-service.net [216.240.47.249]) by mx1.freebsd.org (Postfix) with ESMTP id 8CD3D8FC0C for ; Fri, 5 Dec 2008 23:20:02 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A5DB92517; Fri, 5 Dec 2008 15:05:07 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id C74B72D6017; Fri, 5 Dec 2008 15:05:07 -0800 (PST) Message-ID: <4939B3A1.6060307@elischer.org> Date: Fri, 05 Dec 2008 15:05:05 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Garrett Cooper References: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> In-Reply-To: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Sheldon Givens Subject: Re: Small change to wc 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 Dec 2008 23:20:02 -0000 Garrett Cooper wrote: > On Fri, Dec 5, 2008 at 2:14 PM, Sheldon Givens wrote: >> Hello everyone, >> In the process of migrating the last of a few Linux servers to FreeBSD, we >> ran in to a bit of a snag with one of our scripts when BSD wc didn't have an >> equivalent to the Linux -L. This flag tells wc to keep track of the longest >> line in the input. >> >> Here's a little diff to add this functionality to BSD wc. >> >> With this patch, an additional parameter is added to output that shows the >> length of the longest line >> >> My apologies if this is in the wrong format. I don't often post here. >> >> Happy Holidays, >> >> Sheldon Givens >> >> >> ---snip--- >> 65,66c65,66 >> < uintmax_t tlinect, twordct, tcharct; >> < int doline, doword, dochar, domulti; >> --- >>> uintmax_t tlinect, twordct, tcharct, tlongline; >>> int doline, doword, dochar, domulti, dolongline; >> 78c78 >> < while ((ch = getopt(argc, argv, "clmw")) != -1) >> --- >>> while ((ch = getopt(argc, argv, "clmwL")) != -1) >> 93a94,96 >>> case 'L': >>> dolongline = 1; >>> break; >> 127a131,132 >>> if (dolongline) >>> (void)printf(" %7ju", tlongline); >> 137c142 >> < uintmax_t linect, wordct, charct; >> --- >>> uintmax_t linect, wordct, charct, llcnt, tmpll; >> 146c151 >> < linect = wordct = charct = 0; >> --- >>> linect = wordct = charct = llcnt = tmpll = 0; >> 171c176,179 >> < if (*p == '\n') >> --- >>> if (*p == '\n') { >>> if (tmpll > llcnt) >>> llcnt = tmpll; >>> tmpll = 0; >> 172a181 >>> } else { tmpll++; } >> 179a189,192 >>> if (dolongline) { >>> tlongline = llcnt; >>> (void)printf(" %7ju", tlongline); >>> } >> 197c210 >> < return (0); >> --- >>> return (0); >> 231a245 >>> tmpll++; >> 234c248,251 >> < if (wch == L'\n') >> --- >>> if (wch == L'\n') { >>> if (tmpll > llcnt) >>> llcnt = tmpll; >>> tmpll = 0; >> 235a253 >>> } >> 258a277,280 >>> if (dolongline) { >>> tlongline = llcnt; >>> (void)printf(" %7ju", llcnt - 1); >>> } >> 266c288 >> < (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); >> --- >>> (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); >> ---unsnip--- > > What's the plus side of having this? I can accomplish the same with > something like awk without the additional overhead, which would be > guaranteed to be portable. true, but this is a well known extension that people use and to tell the truth, I have no idea how I would do it in awk without reading a lot where in wc it's obvious from the synopsis. > -Garrett > _______________________________________________ > 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 Dec 5 23:23:01 2008 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 425031065735 for ; Fri, 5 Dec 2008 23:23:01 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.234]) by mx1.freebsd.org (Postfix) with ESMTP id 0CDCB8FC23 for ; Fri, 5 Dec 2008 23:23:00 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so210807rvf.43 for ; Fri, 05 Dec 2008 15:23:00 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ZWz78A82pmbzBNIvMrUS6iZoKSiEMU9PQlpP4demhxQ=; b=P9z3CdBys5gIqiZb8uxASG88ipwRD3oCfYUi0+ujvNWfcvQKG22Diux8C0pFD3+DzM T+HqWukwMMRpo+jjmEHdC2parJgJyQ2OiDrEJGzSVThRYwRlW6qj2EtGDVOuvSyvOUc+ ucts3TZmW2Y8dAaiFBeeJwqhqOMLRrIwZyf0E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=lnR2JDmslQvtsjNqD2L5pksWdWJ5mQKGFIGIi89zTj4d0rXKl89vUlfB4vQc1PPh2U H6JBpfqwUMJFWUnvasNbpKiGaehEbpWPgPBn2dm+3U//mVDQoavZVFboc5pJyUcv6NlG KMv9l7DA1Fd3fwXjll0YrT6C6ADOtwp+NRPVs= Received: by 10.141.76.21 with SMTP id d21mr240289rvl.154.1228519380606; Fri, 05 Dec 2008 15:23:00 -0800 (PST) Received: by 10.140.158.13 with HTTP; Fri, 5 Dec 2008 15:23:00 -0800 (PST) Message-ID: <7d6fde3d0812051523p6be3fc19re3322f3ddba78b1e@mail.gmail.com> Date: Fri, 5 Dec 2008 15:23:00 -0800 From: "Garrett Cooper" To: "Kostik Belousov" In-Reply-To: <20081205231458.GY2038@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> <20081205231458.GY2038@deviant.kiev.zoral.com.ua> Cc: freebsd-hackers@freebsd.org, Sheldon Givens Subject: Re: Small change to wc 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 Dec 2008 23:23:01 -0000 On Fri, Dec 5, 2008 at 3:14 PM, Kostik Belousov wrote: > On Fri, Dec 05, 2008 at 03:10:56PM -0800, Sheldon Givens wrote: >> What's the problem having it? The total code is mere bytes and it eases the >> transition for others who are migrating from Linux. >> You're absolutely right in that it can be done with awk (fairly simply, too) >> but it doesn't hurt to explore options. Additionally, with awk, you can't >> get other figures with the same command, which increases ease of use. >> IE: What's the equivalent to "wc -clwL" in awk? Would you really rather run >> wc -clw && awk '{if(length>x){x=length}}END{if(x>0){print x}else{print >> 0}}'`? >> >> Isn't wc -L a more elegant solution than awk >> '{if(length>x){x=length}}END{if(x>0){print x}else{print 0}}'`? >> >> Should I continue? > > Real argument pro is that you have one less thing to worry when you > trying to run some script, written on Linux, on the FreeBSD system. > >> >> On Fri, Dec 5, 2008 at 2:48 PM, Garrett Cooper wrote: >> >> > On Fri, Dec 5, 2008 at 2:14 PM, Sheldon Givens wrote: >> > > Hello everyone, >> > > In the process of migrating the last of a few Linux servers to FreeBSD, >> > we >> > > ran in to a bit of a snag with one of our scripts when BSD wc didn't have >> > an >> > > equivalent to the Linux -L. This flag tells wc to keep track of the >> > longest >> > > line in the input. >> > > >> > > Here's a little diff to add this functionality to BSD wc. >> > > >> > > With this patch, an additional parameter is added to output that shows >> > the >> > > length of the longest line >> > > >> > > My apologies if this is in the wrong format. I don't often post here. >> > > >> > > Happy Holidays, >> > > >> > > Sheldon Givens >> > > >> > > >> > > ---snip--- >> > > 65,66c65,66 >> > > < uintmax_t tlinect, twordct, tcharct; >> > > < int doline, doword, dochar, domulti; >> > > --- >> > >> uintmax_t tlinect, twordct, tcharct, tlongline; >> > >> int doline, doword, dochar, domulti, dolongline; >> > > 78c78 >> > > < while ((ch = getopt(argc, argv, "clmw")) != -1) >> > > --- >> > >> while ((ch = getopt(argc, argv, "clmwL")) != -1) >> > > 93a94,96 >> > >> case 'L': >> > >> dolongline = 1; >> > >> break; >> > > 127a131,132 >> > >> if (dolongline) >> > >> (void)printf(" %7ju", tlongline); >> > > 137c142 >> > > < uintmax_t linect, wordct, charct; >> > > --- >> > >> uintmax_t linect, wordct, charct, llcnt, tmpll; >> > > 146c151 >> > > < linect = wordct = charct = 0; >> > > --- >> > >> linect = wordct = charct = llcnt = tmpll = 0; >> > > 171c176,179 >> > > < if (*p == '\n') >> > > --- >> > >> if (*p == '\n') { >> > >> if (tmpll > llcnt) >> > >> llcnt = tmpll; >> > >> tmpll = 0; >> > > 172a181 >> > >> } else { tmpll++; } >> > > 179a189,192 >> > >> if (dolongline) { >> > >> tlongline = llcnt; >> > >> (void)printf(" %7ju", tlongline); >> > >> } >> > > 197c210 >> > > < return (0); >> > > --- >> > >> return (0); >> > > 231a245 >> > >> tmpll++; >> > > 234c248,251 >> > > < if (wch == L'\n') >> > > --- >> > >> if (wch == L'\n') { >> > >> if (tmpll > llcnt) >> > >> llcnt = tmpll; >> > >> tmpll = 0; >> > > 235a253 >> > >> } >> > > 258a277,280 >> > >> if (dolongline) { >> > >> tlongline = llcnt; >> > >> (void)printf(" %7ju", llcnt - 1); >> > >> } >> > > 266c288 >> > > < (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); >> > > --- >> > >> (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); >> > > >> > > ---unsnip--- >> > >> > What's the plus side of having this? I can accomplish the same with >> > something like awk without the additional overhead, which would be >> > guaranteed to be portable. >> > -Garrett Very true. Ok, I've been easily won over :). The patch looks largely ok, but have you gone through compiling it in your own dev tree (vatting out possible warnings, etc). -Garrett From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 23:28:01 2008 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 A1C4C106564A for ; Fri, 5 Dec 2008 23:28:01 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB108FC16 for ; Fri, 5 Dec 2008 23:28:01 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: by wf-out-1314.google.com with SMTP id 24so209403wfg.7 for ; Fri, 05 Dec 2008 15:28:01 -0800 (PST) Received: by 10.142.163.1 with SMTP id l1mr224645wfe.108.1228519680864; Fri, 05 Dec 2008 15:28:00 -0800 (PST) Received: by 10.142.136.4 with HTTP; Fri, 5 Dec 2008 15:28:00 -0800 (PST) Message-ID: Date: Fri, 5 Dec 2008 15:28:00 -0800 From: "Sheldon Givens" To: "Garrett Cooper" , freebsd-hackers@freebsd.org In-Reply-To: <7d6fde3d0812051523p6be3fc19re3322f3ddba78b1e@mail.gmail.com> MIME-Version: 1.0 References: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> <20081205231458.GY2038@deviant.kiev.zoral.com.ua> <7d6fde3d0812051523p6be3fc19re3322f3ddba78b1e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Small change to wc 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 Dec 2008 23:28:01 -0000 I've successfully built it in multiple circumstances. The only thing I'm worried about (I'm on the road now and can't test) is what will occur if wc is fed a zero-length input... ie, a "touched" file or a echo "" | wc -L. On Fri, Dec 5, 2008 at 3:23 PM, Garrett Cooper wrote: > On Fri, Dec 5, 2008 at 3:14 PM, Kostik Belousov > wrote: > > On Fri, Dec 05, 2008 at 03:10:56PM -0800, Sheldon Givens wrote: > >> What's the problem having it? The total code is mere bytes and it eases > the > >> transition for others who are migrating from Linux. > >> You're absolutely right in that it can be done with awk (fairly simply, > too) > >> but it doesn't hurt to explore options. Additionally, with awk, you > can't > >> get other figures with the same command, which increases ease of use. > >> IE: What's the equivalent to "wc -clwL" in awk? Would you really rather > run > >> wc -clw && awk '{if(length>x){x=length}}END{if(x>0){print x}else{print > >> 0}}'`? > >> > >> Isn't wc -L a more elegant solution than awk > >> '{if(length>x){x=length}}END{if(x>0){print x}else{print 0}}'`? > >> > >> Should I continue? > > > > Real argument pro is that you have one less thing to worry when you > > trying to run some script, written on Linux, on the FreeBSD system. > > > >> > >> On Fri, Dec 5, 2008 at 2:48 PM, Garrett Cooper > wrote: > >> > >> > On Fri, Dec 5, 2008 at 2:14 PM, Sheldon Givens > wrote: > >> > > Hello everyone, > >> > > In the process of migrating the last of a few Linux servers to > FreeBSD, > >> > we > >> > > ran in to a bit of a snag with one of our scripts when BSD wc didn't > have > >> > an > >> > > equivalent to the Linux -L. This flag tells wc to keep track of the > >> > longest > >> > > line in the input. > >> > > > >> > > Here's a little diff to add this functionality to BSD wc. > >> > > > >> > > With this patch, an additional parameter is added to output that > shows > >> > the > >> > > length of the longest line > >> > > > >> > > My apologies if this is in the wrong format. I don't often post > here. > >> > > > >> > > Happy Holidays, > >> > > > >> > > Sheldon Givens > >> > > > >> > > > >> > > ---snip--- > >> > > 65,66c65,66 > >> > > < uintmax_t tlinect, twordct, tcharct; > >> > > < int doline, doword, dochar, domulti; > >> > > --- > >> > >> uintmax_t tlinect, twordct, tcharct, tlongline; > >> > >> int doline, doword, dochar, domulti, dolongline; > >> > > 78c78 > >> > > < while ((ch = getopt(argc, argv, "clmw")) != -1) > >> > > --- > >> > >> while ((ch = getopt(argc, argv, "clmwL")) != -1) > >> > > 93a94,96 > >> > >> case 'L': > >> > >> dolongline = 1; > >> > >> break; > >> > > 127a131,132 > >> > >> if (dolongline) > >> > >> (void)printf(" %7ju", tlongline); > >> > > 137c142 > >> > > < uintmax_t linect, wordct, charct; > >> > > --- > >> > >> uintmax_t linect, wordct, charct, llcnt, tmpll; > >> > > 146c151 > >> > > < linect = wordct = charct = 0; > >> > > --- > >> > >> linect = wordct = charct = llcnt = tmpll = 0; > >> > > 171c176,179 > >> > > < if (*p == '\n') > >> > > --- > >> > >> if (*p == '\n') { > >> > >> if (tmpll > llcnt) > >> > >> llcnt = > tmpll; > >> > >> tmpll = 0; > >> > > 172a181 > >> > >> } else { tmpll++; } > >> > > 179a189,192 > >> > >> if (dolongline) { > >> > >> tlongline = llcnt; > >> > >> (void)printf(" %7ju", tlongline); > >> > >> } > >> > > 197c210 > >> > > < return (0); > >> > > --- > >> > >> return (0); > >> > > 231a245 > >> > >> tmpll++; > >> > > 234c248,251 > >> > > < if (wch == L'\n') > >> > > --- > >> > >> if (wch == L'\n') { > >> > >> if (tmpll > llcnt) > >> > >> llcnt = tmpll; > >> > >> tmpll = 0; > >> > > 235a253 > >> > >> } > >> > > 258a277,280 > >> > >> if (dolongline) { > >> > >> tlongline = llcnt; > >> > >> (void)printf(" %7ju", llcnt - 1); > >> > >> } > >> > > 266c288 > >> > > < (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); > >> > > --- > >> > >> (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); > >> > > > >> > > ---unsnip--- > >> > > >> > What's the plus side of having this? I can accomplish the same with > >> > something like awk without the additional overhead, which would be > >> > guaranteed to be portable. > >> > -Garrett > > Very true. Ok, I've been easily won over :). > The patch looks largely ok, but have you gone through compiling it in > your own dev tree (vatting out possible warnings, etc). > -Garrett > From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 23:40:17 2008 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 30C921065673 for ; Fri, 5 Dec 2008 23:40:17 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (five.mired.org [66.92.153.75]) by mx1.freebsd.org (Postfix) with ESMTP id B35E28FC17 for ; Fri, 5 Dec 2008 23:40:16 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 8876 invoked by uid 1001); 5 Dec 2008 18:39:50 -0500 Received: from bhuda.mired.org (localhost.localdomain [127.0.0.1]) by bhuda (tmda-ofmipd) with ESMTP; Fri, 05 Dec 2008 18:39:49 -0500 Date: Fri, 5 Dec 2008 18:39:49 -0500 To: freebsd-hackers@freebsd.org Message-ID: <20081205183949.6ee1d288@bhuda.mired.org> In-Reply-To: <20081205231458.GY2038@deviant.kiev.zoral.com.ua> References: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> <20081205231458.GY2038@deviant.kiev.zoral.com.ua> Organization: Meyer Consulting X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.0) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Mike Meyer Subject: Re: Small change to wc 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 Dec 2008 23:40:17 -0000 On Sat, 6 Dec 2008 01:14:58 +0200 Kostik Belousov wrote: > On Fri, Dec 05, 2008 at 03:10:56PM -0800, Sheldon Givens wrote: > > What's the problem having it? The total code is mere bytes and it eases the > > transition for others who are migrating from Linux. > > You're absolutely right in that it can be done with awk (fairly simply, too) > > but it doesn't hurt to explore options. Additionally, with awk, you can't > > get other figures with the same command, which increases ease of use. > > IE: What's the equivalent to "wc -clwL" in awk? Would you really rather run > > wc -clw && awk '{if(length>x){x=length}}END{if(x>0){print x}else{print > > 0}}'`? > > > > Isn't wc -L a more elegant solution than awk > > '{if(length>x){x=length}}END{if(x>0){print x}else{print 0}}'`? > > > > Should I continue? > > Real argument pro is that you have one less thing to worry when you > trying to run some script, written on Linux, on the FreeBSD system. Real argument con is that you're making life easier on users of GNU/Linux software whose authors ought to be taught how to write portable code. I think compatibility with GNU/Linux is a miserable reason for bloating software on BSD - especially considering how NU the typical GNU/Linux extensions are. However, this seems like a useful feature in and of itself, and fits in well with the command it's being added to. So adding it - and adding it to wc - seem like reasonable things. And if we're going to add a feature to a command, making it compatible with an existing implementation seems like a good idea. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 6 00:17:13 2008 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 CC2151065676 for ; Sat, 6 Dec 2008 00:17:13 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 43A958FC13 for ; Sat, 6 Dec 2008 00:17:13 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl153-194.kln.forthnet.gr [62.1.244.194]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mB60H1hr003789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 6 Dec 2008 02:17:08 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mB60H1Di053020; Sat, 6 Dec 2008 02:17:01 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mB60H03f053019; Sat, 6 Dec 2008 02:17:00 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: "Sheldon Givens" References: Date: Sat, 06 Dec 2008 02:17:00 +0200 In-Reply-To: (Sheldon Givens's message of "Fri, 5 Dec 2008 14:14:32 -0800") Message-ID: <871vwmtawz.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mB60H1hr003789 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.005, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.39, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to wc 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 Dec 2008 00:17:13 -0000 On Fri, 5 Dec 2008 14:14:32 -0800, "Sheldon Givens" wrote: > Hello everyone, > In the process of migrating the last of a few Linux servers to > FreeBSD, we ran in to a bit of a snag with one of our scripts when BSD > wc didn't have an equivalent to the Linux -L. This flag tells wc to > keep track of the longest line in the input. > > Here's a little diff to add this functionality to BSD wc. > > With this patch, an additional parameter is added to output that shows > the length of the longest line Adding the option to increase finger-compatibility and make shell scripts a bit easier to port over sounds fine by me :) > My apologies if this is in the wrong format. I don't often post here. > ---snip--- > [patch] > ---unsnip--- Can you post a `diff -u' or `diff -c' version of the patch? I like the idea of the new option but it would be easier to read in -u/-c format. From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 6 02:46:01 2008 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 7890F1065672 for ; Sat, 6 Dec 2008 02:46:01 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.168]) by mx1.freebsd.org (Postfix) with ESMTP id 53C058FC13 for ; Sat, 6 Dec 2008 02:46:01 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: by wf-out-1314.google.com with SMTP id 24so269012wfg.7 for ; Fri, 05 Dec 2008 18:46:01 -0800 (PST) Received: by 10.142.128.15 with SMTP id a15mr295620wfd.260.1228531560962; Fri, 05 Dec 2008 18:46:00 -0800 (PST) Received: by 10.142.136.4 with HTTP; Fri, 5 Dec 2008 18:46:00 -0800 (PST) Message-ID: Date: Fri, 5 Dec 2008 18:46:00 -0800 From: "Sheldon Givens" To: "Giorgos Keramidas" , freebsd-hackers@freebsd.org In-Reply-To: <871vwmtawz.fsf@kobe.laptop> MIME-Version: 1.0 References: <871vwmtawz.fsf@kobe.laptop> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Small change to wc 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 Dec 2008 02:46:01 -0000 New diff -u: --- /usr/src/usr.bin/wc/wc.c 2004-12-27 14:27:56.000000000 -0800 +++ wc/wc.c 2008-12-05 14:33:21.000000000 -0800 @@ -62,8 +62,8 @@ #include #include -uintmax_t tlinect, twordct, tcharct; -int doline, doword, dochar, domulti; +uintmax_t tlinect, twordct, tcharct, tlongline; +int doline, doword, dochar, domulti, dolongline; static int cnt(const char *); static void usage(void); @@ -75,7 +75,7 @@ (void) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc, argv, "clmw")) != -1) + while ((ch = getopt(argc, argv, "clmwL")) != -1) switch((char)ch) { case 'l': doline = 1; @@ -91,6 +91,9 @@ domulti = 1; dochar = 0; break; + case 'L': + dolongline = 1; + break; case '?': default: usage(); @@ -125,6 +128,8 @@ (void)printf(" %7ju", twordct); if (dochar || domulti) (void)printf(" %7ju", tcharct); + if (dolongline) + (void)printf(" %7ju", tlongline); (void)printf(" total\n"); } exit(errors == 0 ? 0 : 1); @@ -134,7 +139,7 @@ cnt(const char *file) { struct stat sb; - uintmax_t linect, wordct, charct; + uintmax_t linect, wordct, charct, llcnt, tmpll; int fd, len, warned; size_t clen; short gotsp; @@ -143,7 +148,7 @@ wchar_t wch; mbstate_t mbs; - linect = wordct = charct = 0; + linect = wordct = charct = llcnt = tmpll = 0; if (file == NULL) { file = "stdin"; fd = STDIN_FILENO; @@ -167,9 +172,13 @@ return (1); } charct += len; - for (p = buf; len--; ++p) - if (*p == '\n') + for (p = buf; len--; ++p) + if (*p == '\n') { + if (tmpll > llcnt) + llcnt = tmpll; + tmpll = 0; ++linect; + } else {tmpll++;} } tlinect += linect; (void)printf(" %7ju", linect); @@ -177,6 +186,10 @@ tcharct += charct; (void)printf(" %7ju", charct); } + if (dolongline) { + tlongline = llcnt; + (void)printf(" %7ju", tlongline); + } (void)close(fd); return (0); } @@ -194,7 +207,7 @@ (void)printf(" %7lld", (long long)sb.st_size); tcharct += sb.st_size; (void)close(fd); - return (0); + return (0); } } } @@ -229,10 +242,15 @@ else if (clen == 0) clen = 1; charct++; + tmpll++; len -= clen; p += clen; - if (wch == L'\n') + if (wch == L'\n') { + if (tmpll > llcnt) + llcnt = tmpll; + tmpll = 0; ++linect; + } if (iswspace(wch)) gotsp = 1; else if (gotsp) { @@ -256,6 +274,10 @@ tcharct += charct; (void)printf(" %7ju", charct); } + if (dolongline) { + tlongline = llcnt; + (void)printf(" %7ju", llcnt - 1); + } (void)close(fd); return (0); } @@ -263,6 +285,6 @@ static void usage() { - (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); + (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); exit(1); } On Fri, Dec 5, 2008 at 4:17 PM, Giorgos Keramidas wrote: > On Fri, 5 Dec 2008 14:14:32 -0800, "Sheldon Givens" > wrote: > > Hello everyone, > > In the process of migrating the last of a few Linux servers to > > FreeBSD, we ran in to a bit of a snag with one of our scripts when BSD > > wc didn't have an equivalent to the Linux -L. This flag tells wc to > > keep track of the longest line in the input. > > > > Here's a little diff to add this functionality to BSD wc. > > > > With this patch, an additional parameter is added to output that shows > > the length of the longest line > > Adding the option to increase finger-compatibility and make shell > scripts a bit easier to port over sounds fine by me :) > > > My apologies if this is in the wrong format. I don't often post here. > > ---snip--- > > [patch] > > ---unsnip--- > > Can you post a `diff -u' or `diff -c' version of the patch? I like the > idea of the new option but it would be easier to read in -u/-c format. > From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 6 04:01:09 2008 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 450411065672 for ; Sat, 6 Dec 2008 04:01:09 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by mx1.freebsd.org (Postfix) with ESMTP id 0EEAA8FC0A for ; Sat, 6 Dec 2008 04:01:08 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so291424rvf.43 for ; Fri, 05 Dec 2008 20:01:08 -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:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=DqZp8PpE5SScEWzAAECzLj1AWm3qeARMnSQAcvygaHw=; b=uswgT1dRRGfXReY5EAuETwjXztfbj7wACKx6dCCcU9oFVdTHco80Jn0rlj18pMIfWc dzNhJ4YtHXCky9Nig31pT6bu0YiUg4EzRpv9Uw8yXRx1ho6pd2hLorrwQai0ShAgtTQX mbffznJJpt+ZEE5NFto4KCHngwb7XyEgQOw/M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=vr0lAzWvAnHHLu37r5UYxLz5UnRMOEU3mQXY5Vj7oey11bJ8fTsN6dwaMdc/FNFfTr mNiMhd+8jRs59YRTeQ0CdU0b6B6OWlxhW5K+a3hWeXH3cP7cghNv6rASsOs/mDQ0+KPn WN/7cMG5BrCNLSahWAd2c9zvJs9UkEtqrBVe0= Received: by 10.140.161.11 with SMTP id j11mr342766rve.292.1228536068676; Fri, 05 Dec 2008 20:01:08 -0800 (PST) Received: by 10.140.158.13 with HTTP; Fri, 5 Dec 2008 20:01:08 -0800 (PST) Message-ID: <7d6fde3d0812052001g4742c2l45cb830e1ea85c9@mail.gmail.com> Date: Fri, 5 Dec 2008 20:01:08 -0800 From: "Garrett Cooper" To: "Sheldon Givens" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7d6fde3d0812051448r1581d666v50d162cae348982a@mail.gmail.com> <20081205231458.GY2038@deviant.kiev.zoral.com.ua> <7d6fde3d0812051523p6be3fc19re3322f3ddba78b1e@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to wc 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 Dec 2008 04:01:09 -0000 On Fri, Dec 5, 2008 at 3:28 PM, Sheldon Givens wrote: > I've successfully built it in multiple circumstances. The only thing I'm > worried about (I'm on the road now and can't test) is what will occur if wc > is fed a zero-length input... ie, a "touched" file or a echo "" | wc -L. > > On Fri, Dec 5, 2008 at 3:23 PM, Garrett Cooper wrote: >> >> On Fri, Dec 5, 2008 at 3:14 PM, Kostik Belousov >> wrote: >> > On Fri, Dec 05, 2008 at 03:10:56PM -0800, Sheldon Givens wrote: >> >> What's the problem having it? The total code is mere bytes and it eases >> >> the >> >> transition for others who are migrating from Linux. >> >> You're absolutely right in that it can be done with awk (fairly simply, >> >> too) >> >> but it doesn't hurt to explore options. Additionally, with awk, you >> >> can't >> >> get other figures with the same command, which increases ease of use. >> >> IE: What's the equivalent to "wc -clwL" in awk? Would you really rather >> >> run >> >> wc -clw && awk '{if(length>x){x=length}}END{if(x>0){print x}else{print >> >> 0}}'`? >> >> >> >> Isn't wc -L a more elegant solution than awk >> >> '{if(length>x){x=length}}END{if(x>0){print x}else{print 0}}'`? >> >> >> >> Should I continue? >> > >> > Real argument pro is that you have one less thing to worry when you >> > trying to run some script, written on Linux, on the FreeBSD system. >> > >> >> >> >> On Fri, Dec 5, 2008 at 2:48 PM, Garrett Cooper >> >> wrote: >> >> >> >> > On Fri, Dec 5, 2008 at 2:14 PM, Sheldon Givens >> >> > wrote: >> >> > > Hello everyone, >> >> > > In the process of migrating the last of a few Linux servers to >> >> > > FreeBSD, >> >> > we >> >> > > ran in to a bit of a snag with one of our scripts when BSD wc >> >> > > didn't have >> >> > an >> >> > > equivalent to the Linux -L. This flag tells wc to keep track of the >> >> > longest >> >> > > line in the input. >> >> > > >> >> > > Here's a little diff to add this functionality to BSD wc. >> >> > > >> >> > > With this patch, an additional parameter is added to output that >> >> > > shows >> >> > the >> >> > > length of the longest line >> >> > > >> >> > > My apologies if this is in the wrong format. I don't often post >> >> > > here. >> >> > > >> >> > > Happy Holidays, >> >> > > >> >> > > Sheldon Givens >> >> > > >> >> > > >> >> > > ---snip--- >> >> > > 65,66c65,66 >> >> > > < uintmax_t tlinect, twordct, tcharct; >> >> > > < int doline, doword, dochar, domulti; >> >> > > --- >> >> > >> uintmax_t tlinect, twordct, tcharct, tlongline; >> >> > >> int doline, doword, dochar, domulti, dolongline; >> >> > > 78c78 >> >> > > < while ((ch = getopt(argc, argv, "clmw")) != -1) >> >> > > --- >> >> > >> while ((ch = getopt(argc, argv, "clmwL")) != -1) >> >> > > 93a94,96 >> >> > >> case 'L': >> >> > >> dolongline = 1; >> >> > >> break; >> >> > > 127a131,132 >> >> > >> if (dolongline) >> >> > >> (void)printf(" %7ju", tlongline); >> >> > > 137c142 >> >> > > < uintmax_t linect, wordct, charct; >> >> > > --- >> >> > >> uintmax_t linect, wordct, charct, llcnt, tmpll; >> >> > > 146c151 >> >> > > < linect = wordct = charct = 0; >> >> > > --- >> >> > >> linect = wordct = charct = llcnt = tmpll = 0; >> >> > > 171c176,179 >> >> > > < if (*p == '\n') >> >> > > --- >> >> > >> if (*p == '\n') { >> >> > >> if (tmpll > llcnt) >> >> > >> llcnt = >> >> > >> tmpll; >> >> > >> tmpll = 0; >> >> > > 172a181 >> >> > >> } else { tmpll++; } >> >> > > 179a189,192 >> >> > >> if (dolongline) { >> >> > >> tlongline = llcnt; >> >> > >> (void)printf(" %7ju", tlongline); >> >> > >> } >> >> > > 197c210 >> >> > > < return (0); >> >> > > --- >> >> > >> return (0); >> >> > > 231a245 >> >> > >> tmpll++; >> >> > > 234c248,251 >> >> > > < if (wch == L'\n') >> >> > > --- >> >> > >> if (wch == L'\n') { >> >> > >> if (tmpll > llcnt) >> >> > >> llcnt = tmpll; >> >> > >> tmpll = 0; >> >> > > 235a253 >> >> > >> } >> >> > > 258a277,280 >> >> > >> if (dolongline) { >> >> > >> tlongline = llcnt; >> >> > >> (void)printf(" %7ju", llcnt - 1); >> >> > >> } >> >> > > 266c288 >> >> > > < (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); >> >> > > --- >> >> > >> (void)fprintf(stderr, "usage: wc [-clmwL] [file ...]\n"); >> >> > > >> >> > > ---unsnip--- >> >> > >> >> > What's the plus side of having this? I can accomplish the same with >> >> > something like awk without the additional overhead, which would be >> >> > guaranteed to be portable. >> >> > -Garrett >> >> Very true. Ok, I've been easily won over :). >> The patch looks largely ok, but have you gone through compiling it in >> your own dev tree (vatting out possible warnings, etc). >> -Garrett 1. Please don't top-post. 2. Solving the problem is easy. Have the value default to something unrealistic (like -1) and simply, set the value to 0, if indeed the value is < 0. Cheers, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 6 08:43:33 2008 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 5522E1065675 for ; Sat, 6 Dec 2008 08:43:33 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4FA8FC14 for ; Sat, 6 Dec 2008 08:43:32 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1L8sl9-000HvW-CR; Sat, 06 Dec 2008 10:43:31 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: "Zaphod Beeblebrox" In-reply-to: <5f67a8c40812051010u55ef6d70m1b4270c98852d87c@mail.gmail.com> References: <5f67a8c40812051010u55ef6d70m1b4270c98852d87c@mail.gmail.com> Comments: In-reply-to "Zaphod Beeblebrox" message dated "Fri, 05 Dec 2008 13:10:12 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 06 Dec 2008 10:43:31 +0200 From: Danny Braniss Message-ID: Cc: freebsd-hackers@freebsd.org Subject: Re: IPMI shared ethernet ports (again). 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 Dec 2008 08:43:33 -0000 > I posted here a month or two ago about being amazed that some system > management cards can share a physical ethernet port. Some of you responded > that it doesn't always work. > > Well... I've encountered this and I'm wondering if I can work around it > somehow. > > The ones that work are in Dell 1950-III servers (The R-200 seem to work, > too). They have "bce" driver ports. > > The HP DL/360 that I have here today have "bge" driver ports and the IPMI > console appears to stop working just as soon as FreeBSD probes the port. > > Is this something that can be configured in BGE or is it just not going to > work? > set hw.bge.allow_asf=1 in /boot/loader.conf from man bge: hw.bge.allow_asf Allow the ASF feature for cooperating with IPMI. Can cause sys- tem lockup problems on a small number of systems. Disabled by default. cheers, danny _______________________________________________ > 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 Sat Dec 6 12:09:06 2008 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 5DD2E1065675 for ; Sat, 6 Dec 2008 12:09:06 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id D02A88FC1D for ; Sat, 6 Dec 2008 12:09:05 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl153-194.kln.forthnet.gr [62.1.244.194]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mB6C8pwv009835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 6 Dec 2008 14:08:57 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mB6C8pNN034796; Sat, 6 Dec 2008 14:08:51 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mB6C8o8c034795; Sat, 6 Dec 2008 14:08:50 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: "Sheldon Givens" In-Reply-To: (Sheldon Givens's message of "Fri, 5 Dec 2008 18:46:00 -0800") Date: Sat, 06 Dec 2008 13:57:53 +0200 Message-ID: <87prk5ms72.fsf@kobe.laptop> References: <871vwmtawz.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mB6C8pwv009835 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.455, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.06, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to wc 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 Dec 2008 12:09:06 -0000 On Fri, 5 Dec 2008 18:46:00 -0800, "Sheldon Givens" wrote: > On Fri, Dec 5, 2008 at 4:17 PM, Giorgos Keramidas wrote: >> Adding the option to increase finger-compatibility and make shell >> scripts a bit easier to port over sounds fine by me :) >> >> > My apologies if this is in the wrong format. I don't often post here. >> > ---snip--- >> > [patch] >> > ---unsnip--- >> >> Can you post a `diff -u' or `diff -c' version of the patch? I like the >> idea of the new option but it would be easier to read in -u/-c format. > > New diff -u: Excellent, thanks! Other than a few minor style-bugs, which can be fixed before committing it (see inline comments for details), the patch looks great to me :-) > --- /usr/src/usr.bin/wc/wc.c 2004-12-27 14:27:56.000000000 -0800 > +++ wc/wc.c 2008-12-05 14:33:21.000000000 -0800 > @@ -167,9 +172,13 @@ > return (1); > } > charct += len; > - for (p = buf; len--; ++p) > - if (*p == '\n') > + for (p = buf; len--; ++p) > + if (*p == '\n') { > + if (tmpll > llcnt) > + llcnt = tmpll; > + tmpll = 0; > ++linect; > + } else {tmpll++;} It's probably more 'stylish' to write the else part as: if (*p == '\n') { if (tmpll > llcnt) llcnt = tmpll; tmpll = 0; ++linect; } else tmpll++; > @@ -194,7 +207,7 @@ > (void)printf(" %7lld", (long > long)sb.st_size); > tcharct += sb.st_size; > (void)close(fd); > - return (0); > + return (0); This change only removes indendation from a return statement. We should probably keep it out of the final commit. Thanks for writing & posting the patch :-) From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 6 15:40:28 2008 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 CE65D1065676; Sat, 6 Dec 2008 15:40:28 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 606D78FC21; Sat, 6 Dec 2008 15:40:27 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl153-194.kln.forthnet.gr [62.1.244.194]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mB6FeFbm019938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 6 Dec 2008 17:40:21 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mB6FeFWp037491; Sat, 6 Dec 2008 17:40:15 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mB6FeEUg037490; Sat, 6 Dec 2008 17:40:14 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Konstantin Belousov To: "Sheldon Givens" References: <871vwmtawz.fsf@kobe.laptop> <87prk5ms72.fsf@kobe.laptop> Date: Sat, 06 Dec 2008 17:40:14 +0200 In-Reply-To: <87prk5ms72.fsf@kobe.laptop> (Giorgos Keramidas's message of "Sat, 06 Dec 2008 13:57:53 +0200") Message-ID: <878wqtia75.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mB6FeFbm019938 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.004, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.40, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@FreeBSD.org Subject: Re: Small change to wc 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 Dec 2008 15:40:28 -0000 On Sat, 06 Dec 2008 13:57:53 +0200, Giorgos Keramidas wrote: >>> Can you post a `diff -u' or `diff -c' version of the patch? I like the >>> idea of the new option but it would be easier to read in -u/-c format. >> >> New diff -u: > > Excellent, thanks! Other than a few minor style-bugs, which can be > fixed before committing it (see inline comments for details), the patch > looks great to me :-) Ok, I've fixed a few minor bugs I noticed: * When only -L is specified it should not enable the default 'cwl' set of options. * The tlongline total length should not be overwritten by each input file, unless we *did* find a longer line in the particular file. * The (llct - 1) trick is not needed when printing llcnt if we only count != '\n' characters near line 229. The updated patch, and a manpage change to document the new option is attached below. Konstantin, if you like this version of the patch, I'll commit it to /head and schedule an MFC after a week or so. The longer line length that -L reports seems to work like this here: : keramida@kobe:/hg/bsd/src/usr.bin/wc$ ./wc /etc/rc.conf : 114 222 2632 /etc/rc.conf : keramida@kobe:/hg/bsd/src/usr.bin/wc$ ./wc -L /etc/rc.conf : 82 /etc/rc.conf : keramida@kobe:/hg/bsd/src/usr.bin/wc$ ./wc -lwc -L /etc/rc.conf : 114 222 2632 82 /etc/rc.conf : keramida@kobe:/hg/bsd/src/usr.bin/wc$ ./wc -lwc -L /etc/rc.???? : 114 222 2632 82 /etc/rc.conf : 1598 5648 36725 85 /etc/rc.subr : 1712 5870 39357 85 total : keramida@kobe:/hg/bsd/src/usr.bin/wc$ Here's the current patch version... %%% diff -r fb56dd4c9c47 usr.bin/wc/wc.1 --- a/usr.bin/wc/wc.1 Sat Dec 06 17:04:51 2008 +0200 +++ b/usr.bin/wc/wc.1 Sat Dec 06 17:39:17 2008 +0200 @@ -43,7 +43,7 @@ .Nd word, line, character, and byte count .Sh SYNOPSIS .Nm -.Op Fl clmw +.Op Fl Lclmw .Op Ar .Sh DESCRIPTION The @@ -71,6 +71,15 @@ .Pp The following options are available: .Bl -tag -width indent +.It Fl L +The number of characters in the longest input line +is written to the standard output. +When more then one +.Ar file +argument is specified, the longest input line of +.Em all +files is reported as the value of the final +.Dq total . .It Fl c The number of bytes in each input file is written to the standard output. @@ -129,6 +138,10 @@ as well as the totals for both: .Pp .Dl "wc -mlw report1 report2" +.Pp +Find the longest line in a list of files: +.Pp +.Dl "wc -L file1 file2 file3 | fgrep total" .Sh COMPATIBILITY Historically, the .Nm @@ -154,6 +167,16 @@ .Xr iswspace 3 function, as required by .St -p1003.2 . +.Pp +The +.Fl L +option is a non-standard +.Fx +extension, compatible with the +.Fl L +option of the GNU +.Nm +utility. .Sh SEE ALSO .Xr iswspace 3 .Sh STANDARDS diff -r fb56dd4c9c47 usr.bin/wc/wc.c --- a/usr.bin/wc/wc.c Sat Dec 06 17:04:51 2008 +0200 +++ b/usr.bin/wc/wc.c Sat Dec 06 17:39:17 2008 +0200 @@ -62,8 +62,8 @@ #include #include -uintmax_t tlinect, twordct, tcharct; -int doline, doword, dochar, domulti; +uintmax_t tlinect, twordct, tcharct, tlongline; +int doline, doword, dochar, domulti, dolongline; static int cnt(const char *); static void usage(void); @@ -75,7 +75,7 @@ (void) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc, argv, "clmw")) != -1) + while ((ch = getopt(argc, argv, "clmwL")) != -1) switch((char)ch) { case 'l': doline = 1; @@ -87,6 +87,9 @@ dochar = 1; domulti = 0; break; + case 'L': + dolongline = 1; + break; case 'm': domulti = 1; dochar = 0; @@ -99,7 +102,7 @@ argc -= optind; /* Wc's flags are on by default. */ - if (doline + doword + dochar + domulti == 0) + if (doline + doword + dochar + domulti + dolongline == 0) doline = doword = dochar = 1; errors = 0; @@ -125,6 +128,8 @@ (void)printf(" %7ju", twordct); if (dochar || domulti) (void)printf(" %7ju", tcharct); + if (dolongline) + (void)printf(" %7ju", tlongline); (void)printf(" total\n"); } exit(errors == 0 ? 0 : 1); @@ -134,7 +139,7 @@ cnt(const char *file) { struct stat sb; - uintmax_t linect, wordct, charct; + uintmax_t linect, wordct, charct, llct, tmpll; int fd, len, warned; size_t clen; short gotsp; @@ -143,7 +148,7 @@ wchar_t wch; mbstate_t mbs; - linect = wordct = charct = 0; + linect = wordct = charct = llct = tmpll = 0; if (file == NULL) { file = "stdin"; fd = STDIN_FILENO; @@ -168,8 +173,13 @@ } charct += len; for (p = buf; len--; ++p) - if (*p == '\n') + if (*p == '\n') { + if (tmpll > llct) + llct = tmpll; + tmpll = 0; ++linect; + } else + tmpll++; } tlinect += linect; (void)printf(" %7ju", linect); @@ -177,6 +187,11 @@ tcharct += charct; (void)printf(" %7ju", charct); } + if (dolongline) { + if (llct > tlongline) + tlongline = llct; + (void)printf(" %7ju", tlongline); + } (void)close(fd); return (0); } @@ -229,10 +244,16 @@ else if (clen == 0) clen = 1; charct++; + if (wch != L'\n') + tmpll++; len -= clen; p += clen; - if (wch == L'\n') + if (wch == L'\n') { + if (tmpll > llct) + llct = tmpll; + tmpll = 0; ++linect; + } if (iswspace(wch)) gotsp = 1; else if (gotsp) { @@ -256,6 +277,11 @@ tcharct += charct; (void)printf(" %7ju", charct); } + if (dolongline) { + if (llct > tlongline) + tlongline = llct; + (void)printf(" %7ju", llct); + } (void)close(fd); return (0); } @@ -263,6 +289,6 @@ static void usage() { - (void)fprintf(stderr, "usage: wc [-clmw] [file ...]\n"); + (void)fprintf(stderr, "usage: wc [-Lclmw] [file ...]\n"); exit(1); } %%% From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 6 15:59:09 2008 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 4588C106564A for ; Sat, 6 Dec 2008 15:59:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id DAF838FC14 for ; Sat, 6 Dec 2008 15:59:08 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 1A6FB1CDD8; Sat, 6 Dec 2008 16:59:08 +0100 (CET) Date: Sat, 6 Dec 2008 16:59:08 +0100 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20081206155908.GG18652@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fCcDWlUEdh43YKr8" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Syscons with xterm emulation: one step closer to UTF-8 support? 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 Dec 2008 15:59:09 -0000 --fCcDWlUEdh43YKr8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello all, I may have mentioned this to some people some time ago, but I thought it would be nice to start a thread about this here on -hackers: A couple of weeks ago I started working on a library (libteken) that implements a subset of features (escape sequences) of xterm, our trusty X11 terminal application. I've done most hacking/testing in userspace, but this week I experimented with removing the terminal emulation from syscons and replaced it by the library. The result: - We can finally SSH to other operating systems, network switches, etc. without messing up our terminals. Almost any operating system out there has termcap entries for `xterm', which means stuff should Just Work (tm). - My library only accepts one character set of input: UTF-8. Right now it just directly forwards the character codes to Syscons, hoping Syscons has a character map that is capable of displaying them (which doesn't work). There are still many small issues I have to fix in the terminal emulation library, but also in the Syscons <-> libteken code. I won't commit it on short notice, obviously. If people want to test it, the code is in the MPSAFE TTY branch in Perforce. Diffs are available at: http://people.FreeBSD.org/~ed/mpsafetty/ My question is if there are people out there who could help me implementing UTF-8 font rendering. I wouldn't have a clue where to start (yet). Yours, --=20 Ed Schouten WWW: http://80386.nl/ --fCcDWlUEdh43YKr8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkk6oUwACgkQ52SDGA2eCwUWdgCeIww6rDWOB/CFmBiNPs+zL3PP QL0AnRdWa/d+lMy5wxk4jpfsE3GiYY3o =uMGu -----END PGP SIGNATURE----- --fCcDWlUEdh43YKr8-- From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 6 19:25:25 2008 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 1DA1F106567A; Sat, 6 Dec 2008 19:25:25 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 835C38FC12; Sat, 6 Dec 2008 19:25:24 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl153-194.kln.forthnet.gr [62.1.244.194]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mB6JPFWK032232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 6 Dec 2008 21:25:21 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mB6JPEMT038948; Sat, 6 Dec 2008 21:25:14 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mB6JPD4c038947; Sat, 6 Dec 2008 21:25:13 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Konstantin Belousov , "Sheldon Givens" In-Reply-To: <878wqtia75.fsf@kobe.laptop> (Giorgos Keramidas's message of "Sat, 06 Dec 2008 17:40:14 +0200") Date: Sat, 06 Dec 2008 21:25:05 +0200 Message-ID: <87ljut2jji.fsf@kobe.laptop> References: <871vwmtawz.fsf@kobe.laptop> <87prk5ms72.fsf@kobe.laptop> <878wqtia75.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mB6JPFWK032232 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.004, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.40, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to wc 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 Dec 2008 19:25:25 -0000 On Sat, 06 Dec 2008 17:40:14 +0200, Giorgos Keramidas wrote: > The updated patch, and a manpage change to document the new option is > attached below. Konstantin, if you like this version of the patch, > I'll commit it to /head and schedule an MFC after a week or so. Committed to /head as change 185714: http://svn.freebsd.org/viewvc/base?view=revision&revision=185714 Sheldon, thanks for the patch. I will merge it to the stable branches after about a few days :-) From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 6 23:48:16 2008 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 A135C1065677 for ; Sat, 6 Dec 2008 23:48:16 +0000 (UTC) (envelope-from prvs=12261788c0=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 2B4B18FC1F for ; Sat, 6 Dec 2008 23:48:15 +0000 (UTC) (envelope-from prvs=12261788c0=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1228606128; x=1229210928; q=dns/txt; h=Received: Message-ID:From:To:Cc:References:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=pETVTeQnipRWZiCD21q5Y AqzYe01vQZ1UhV8KZeDQkI=; b=KwRTaH/phybXAv0ej4Mwjy2ebKlPV4PzWD0qK LB5gJQcZZqx/CUrE/suWb8GJZG8B+z/9QpvlCfcRmouhwyzwG2Sxz/RwcSkRbAJY D26lLrZFV3i8Xp8JBGhq4ykPEmkiH0GjT/AyDzBTzlxG5FD3F1N1Qiv1CN1tVThA xSYQQo= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, FORGED_MUA_OUTLOOK, USER_IN_WHITELIST,USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.6) with ESMTP id md50006676991.msg for ; Sat, 06 Dec 2008 23:28:46 +0000 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 213.123.247.160 X-Return-Path: prvs=12261788c0=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org Message-ID: From: "Steven Hartland" To: "Steven Hartland" , "Kostik Belousov" References: <29A6B82D99A749799B4D662ABAE6A960@multiplay.co.uk><20081202203939.GD3045@deviant.kiev.zoral.com.ua> <7F18FDB94BC14E3995D15F0C3BD6312D@multiplay.co.uk> Date: Sat, 6 Dec 2008 23:28:19 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Spam-Processed: mail1.multiplay.co.uk, Sat, 06 Dec 2008 23:28:47 +0000 X-MDAV-Processed: mail1.multiplay.co.uk, Sat, 06 Dec 2008 23:28:48 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: unionfs kernel panic on 7.1-PRERELEASE 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 Dec 2008 23:48:16 -0000 Did you have any ideas where the root of this problem may lie Kostik? ----- Original Message ----- From: "Steven Hartland" > Yes every time, I've got a half life 2 dedicated install mounted under unionfs:- > mount -t unionfs -o noatime -o below /usr/local/games/hl2ds /usr/local/games/servers/1 > > As soon as I start the server from under servers/1 the machine panics I'm thinking its > a combination of the Linux ABI and unionfs interaction which is causing the issue. > > Regards > Steve > > ----- Original Message ----- > From: "Kostik Belousov" > To: "Steven Hartland" > Cc: > Sent: Tuesday, December 02, 2008 8:39 PM > Subject: Re: unionfs kernel panic on 7.1-PRERELEASE > > Is it reproducible ? > > The start of *fdp structure looks very suspicious, > fd_ofiles = 0x140, fd_ofileflags = 0x154, fd_cdir = 0x168, fd_rdir = 0x17c, > fd_jdir = 0x18c > The values are consequently increasing by 0x14, except fd_jdir, and > pointer values are wrong for kernel. ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.