From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 04:17:19 2011 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 36280106566B for ; Sun, 30 Oct 2011 04:17:18 +0000 (UTC) (envelope-from lichray@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 83E278FC08 for ; Sun, 30 Oct 2011 04:17:18 +0000 (UTC) Received: by eyd10 with SMTP id 10so5896323eyd.13 for ; Sat, 29 Oct 2011 21:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=HsiFn7KgF3SzbtFuLx8Fu3f7yRPbOGyLeh2ODy9hqdY=; b=vyM97Qpxaw5PQ2U6OC65VvNr95TzbmV4EE2CNqSXWd5CO7yf+Qmjq0bZmGmOy4X4IO SFuNY/NwqlKP2Gi5vk9V6UTEjWJ8lHITpxXhowBsj/suNZJ9wUEZ70X3JGZrXM8F9DGU Qs7CVxSAJui/DuzopMQ02XLf0Ui/uCj3CDcyk= MIME-Version: 1.0 Received: by 10.213.4.75 with SMTP id 11mr342603ebq.27.1319948237072; Sat, 29 Oct 2011 21:17:17 -0700 (PDT) Received: by 10.213.113.10 with HTTP; Sat, 29 Oct 2011 21:17:16 -0700 (PDT) In-Reply-To: References: <868vqt0xuc.fsf@gmail.com> <1313663436600-4711635.post@n5.nabble.com> <86hb5euofp.fsf@gmail.com> <20110823175133.GK18091@acme.spoerlein.net> Date: Sat, 29 Oct 2011 23:17:16 -0500 Message-ID: From: Zhihao Yuan To: Test Rat , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: [nvi-iconv]Call for test 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 Oct 2011 04:17:19 -0000 Hi, I uploaded a revision, https://github.com/downloads/lichray/nvi2/nvi2-freebsd-2011-10-28.diff.gz ** This patch works for cvs/svn/git, but you have to remove usr.bin/vi/port.h by hand. ** In this version, I hacked the CJK part. Now all EUC-compatible encodings are being regarded as GB18030. Note! This change only affects how the text are being displayed. It has nothing to do with the actual encoding. The benefits are: 1. GB18030 works with libncursesw, but some other CJK encodings may not;. 2. AFAIK, GB18030 (Unicode 4.1) covers all CJK charsets, so it's good for mixed-lingual editing. Affected LC_CTYPE in FreeBSD: ko_KR.CP949, ko_KR.eucKR ja_JP.eucJP zh_CN.GB2312, zh_CN.GBK, zh_CN.eucCN If you any locale above (especially for Japanese, Korean users), please help me test whether the CJK text (in any kind of encodings) are being handled correctly. Thanks. -- Zhihao Yuan, nickname lichray The best way to predict the future is to invent it. ___________________________________________________ 4BSD -- http://4bsd.biz/ From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 14:55:14 2011 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 822C6106566B; Sun, 30 Oct 2011 14:55:14 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 49CA78FC15; Sun, 30 Oct 2011 14:55:14 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:504f:9791:43c0:21ab]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 7BE214AC1C; Sun, 30 Oct 2011 18:55:01 +0400 (MSK) Date: Sun, 30 Oct 2011 18:54:51 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <43470728.20111030185451@serebryakov.spb.ru> To: current@freebsd.org, hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Subject: In-kernel API for tasks, which could wait? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2011 14:55:14 -0000 Hello, Current. It was explained to me, that all three GEOM threads (up, down and ctl) could not execute code, which should sleep. It looks sound for up and down, but not for ctl, but it is so now. So, I have question: what should I do if I need to perofrm ONE action, which could block for some time (for example, open file or create ALQ)? I could create thread for this. But it looks strange and too heavy: create= thread to call one function once. Maybe, kernel has some API to postpone such task to one, always-running idle thread? --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 15:03:44 2011 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 0F3B1106568D; Sun, 30 Oct 2011 15:03:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 801D68FC1C; Sun, 30 Oct 2011 15:03:43 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9UF3dqn047709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 30 Oct 2011 17:03:39 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id p9UF3dM5019112; Sun, 30 Oct 2011 17:03:39 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id p9UF3dld019111; Sun, 30 Oct 2011 17:03:39 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 30 Oct 2011 17:03:39 +0200 From: Kostik Belousov To: Lev Serebryakov Message-ID: <20111030150339.GP50300@deviant.kiev.zoral.com.ua> References: <43470728.20111030185451@serebryakov.spb.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6B4omjoolujX8zOn" Content-Disposition: inline In-Reply-To: <43470728.20111030185451@serebryakov.spb.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 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 Cc: hackers@freebsd.org, current@freebsd.org Subject: Re: In-kernel API for tasks, which could wait? 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 Oct 2011 15:03:44 -0000 --6B4omjoolujX8zOn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 30, 2011 at 06:54:51PM +0400, Lev Serebryakov wrote: > So, I have question: what should I do if I need to perofrm ONE > action, which could block for some time (for example, open file or > create ALQ)? >=20 > I could create thread for this. But it looks strange and too heavy: crea= te thread > to call one function once. >=20 > Maybe, kernel has some API to postpone such task to one, > always-running idle thread? See taskqueue(9). On the other hand, waiting for the enqueued task to finish is itself the sleepable action. --6B4omjoolujX8zOn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6tZ0sACgkQC3+MBN1Mb4guAgCfcYfAru4Fg3QD3rJ4Ww0Zo+Dn RS0AoNfmqRCpOFfzLfD4lfF4c2dftR3x =oMrN -----END PGP SIGNATURE----- --6B4omjoolujX8zOn-- From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 15:11:41 2011 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 B1B68106564A; Sun, 30 Oct 2011 15:11:41 +0000 (UTC) (envelope-from lev@freebsd.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 779648FC16; Sun, 30 Oct 2011 15:11:41 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:504f:9791:43c0:21ab]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 83D054AC1C; Sun, 30 Oct 2011 19:11:40 +0400 (MSK) Date: Sun, 30 Oct 2011 19:11:31 +0400 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <435960310.20111030191131@serebryakov.spb.ru> To: Kostik Belousov In-Reply-To: <20111030150339.GP50300@deviant.kiev.zoral.com.ua> References: <43470728.20111030185451@serebryakov.spb.ru> <20111030150339.GP50300@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org, current@freebsd.org Subject: Re: In-kernel API for tasks, which could wait? 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 Oct 2011 15:11:41 -0000 Hello, Kostik. You wrote 30 =EE=EA=F2=FF=E1=F0=FF 2011 =E3., 19:03:39: > See taskqueue(9). On the other hand, waiting for the enqueued task to > finish is itself the sleepable action. I'll not wait for finishing. Task will put result to volatile atomic field, and it's all.=20 --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 15:59:57 2011 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 8EED8106566B for ; Sun, 30 Oct 2011 15:59:56 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 566F28FC0C for ; Sun, 30 Oct 2011 15:59:56 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:504f:9791:43c0:21ab]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id F408B4AC2D for ; Sun, 30 Oct 2011 19:59:54 +0400 (MSK) Date: Sun, 30 Oct 2011 19:59:45 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <253745271.20111030195945@serebryakov.spb.ru> To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Subject: How to express inter-directory dependencies in infrastructure? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2011 15:59:57 -0000 Hello, Hackers. How to express inter-directory dependencies in infrastructure? I have project, which has two subdirectories: "lib" and "bin". Top-level Makefile is simple one, looks like this: --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 16:02:01 2011 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 9940D1065670 for ; Sun, 30 Oct 2011 16:02:01 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 60A458FC19 for ; Sun, 30 Oct 2011 16:02:01 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:504f:9791:43c0:21ab]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 5619E4AC2D for ; Sun, 30 Oct 2011 20:02:00 +0400 (MSK) Date: Sun, 30 Oct 2011 20:01:50 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <627176903.20111030200150@serebryakov.spb.ru> To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Subject: How to express inter-directory dependencies in infrastructure? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2011 16:02:01 -0000 Hello, Hackers. (SORRY FOR SENDING INCOMPLETE MESSAGE) How to express inter-directory dependencies in infrastructure? I have project, which has two subdirectories: "lib" and "bin". Top-level Makefile is simple one, looks like this: =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 SUBDIR=3D lib \ bin .include =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 "lib" subdirectory has Makefile with "" included, and "bin" -- with included. But how could I express, that PROG in bin depends on LIB from lib, to cause rebuilding of PROG when LIB is changed (when I call "make" on top level)? --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 16:07:10 2011 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 54E5B106564A for ; Sun, 30 Oct 2011 16:07:10 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1CA728FC14 for ; Sun, 30 Oct 2011 16:07:10 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:504f:9791:43c0:21ab]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 5BA754AC2D for ; Sun, 30 Oct 2011 20:07:09 +0400 (MSK) Date: Sun, 30 Oct 2011 20:06:59 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1598895785.20111030200659@serebryakov.spb.ru> To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Subject: How to remopve "volatile" qualifier from pointer without warning from gcc? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2011 16:07:10 -0000 Hello, Hackers. I need to pass "volatile void *" to API function, which takes "void*". gcc (on FreeBSD 8.2) emits warning, and as in FreeBSD-styed code warnings are treated as errors, program could not be built. Manual casting gives warning, too... --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 16:11:45 2011 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 59800106564A; Sun, 30 Oct 2011 16:11:45 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 06A138FC0C; Sun, 30 Oct 2011 16:11:44 +0000 (UTC) Received: by gyb11 with SMTP id 11so759633gyb.13 for ; Sun, 30 Oct 2011 09:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=XqmjsD/KYA8l0zOLVC3K+CkOsudDZFm+9CAQewL+H+Q=; b=g1bbk6xpHROCVZOLvTy539PQXyhmF5TFgnhsJchB/qpO8VKAyaVRd45O1iZSc/kG9+ QMrv0X6z2Xf7bfk11jtq/Hb2JmXweZ2ziSvBtx4HWAFCdKZvvM4hh6UgKStGZobM2Ye9 mAR4fay207l7pP/1M6w4Avm/hwjVSe/Q9MuY4= MIME-Version: 1.0 Received: by 10.68.15.232 with SMTP id a8mr17443518pbd.129.1319991103773; Sun, 30 Oct 2011 09:11:43 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.57.40 with HTTP; Sun, 30 Oct 2011 09:11:43 -0700 (PDT) In-Reply-To: <627176903.20111030200150@serebryakov.spb.ru> References: <627176903.20111030200150@serebryakov.spb.ru> Date: Sun, 30 Oct 2011 09:11:43 -0700 X-Google-Sender-Auth: 4BvsuPQzYUxh9UkaKea9ijxjCw4 Message-ID: From: mdf@FreeBSD.org To: lev@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: How to express inter-directory dependencies in infrastructure? 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 Oct 2011 16:11:45 -0000 2011/10/30 Lev Serebryakov : > Hello, Hackers. > > =A0(SORRY FOR SENDING INCOMPLETE MESSAGE) > > =A0How to express inter-directory dependencies in infrastructu= re? > > =A0I have project, which has two subdirectories: "lib" and "bin". > =A0Top-level Makefile is simple one, looks like this: > > =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 > SUBDIR=3D lib \ > =A0 =A0 =A0 =A0bin > > .include > =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 > > =A0"lib" subdirectory has Makefile with "" included, and > =A0"bin" -- with included. > > =A0But how could I express, that PROG in bin depends on LIB from lib, to > cause rebuilding of PROG when LIB is changed (when I call "make" on > top level)? Normally I'd expect the dependency to be handled by make depend; that is, the source for the binary should be #including header files from the library. If the interfaces change, make depend will handle this. I guess the problem comes if you are using static linking and just implementation details internal to the library change. There is a DPADD makefile variable that seems to be used; I'm not sure though if this handles the type of dependency you're wanting. Cheers, matthew From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 16:12:55 2011 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 450E4106564A; Sun, 30 Oct 2011 16:12:55 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 05AE08FC1D; Sun, 30 Oct 2011 16:12:54 +0000 (UTC) Received: by iaky10 with SMTP id y10so9443270iak.13 for ; Sun, 30 Oct 2011 09:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Lv/xW8sPiTB7xklWHOlQegs4SsYtjzlAtmfaJPH+cko=; b=e/aOiP40s5cEKIM4loR2ide9LQT0UjwmZG4RW6BnvzPnfzUgI5MWI5y51rmpONXJmn BROBaOy6N7gatClgIWDIw3rlcE5ZgO8dHO5kJpZqMfFyJ0+PEGMz++QrUDuJqYB+gK2O RJrCAMtLLvXL2eTGkdNl0iHtJnGz6+vrypZG0= MIME-Version: 1.0 Received: by 10.68.29.101 with SMTP id j5mr17280446pbh.61.1319991173965; Sun, 30 Oct 2011 09:12:53 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.57.40 with HTTP; Sun, 30 Oct 2011 09:12:53 -0700 (PDT) In-Reply-To: <1598895785.20111030200659@serebryakov.spb.ru> References: <1598895785.20111030200659@serebryakov.spb.ru> Date: Sun, 30 Oct 2011 09:12:53 -0700 X-Google-Sender-Auth: hbmWy_xgae3KAOuz82nKFa4fiog Message-ID: From: mdf@FreeBSD.org To: lev@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: How to remopve "volatile" qualifier from pointer without warning from gcc? 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 Oct 2011 16:12:55 -0000 2011/10/30 Lev Serebryakov : > Hello, Hackers. > > =A0I need to pass "volatile void *" to API function, which takes > "void*". gcc (on FreeBSD 8.2) emits warning, and as in FreeBSD-styed > code warnings are treated as errors, program could not be built. > > =A0Manual casting gives warning, too... See the __DEVOLATILE() hack that will do sufficient casting to silence the compiler. As with any compiler warning, silencing it incorrectly comes with a risk... Cheers, matthew From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 09:49:53 2011 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 7870F1065677; Mon, 31 Oct 2011 09:49:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 0EF208FC22; Mon, 31 Oct 2011 09:49:52 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9V9nmeu024270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 Oct 2011 11:49:48 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id p9V9nmQR022656; Mon, 31 Oct 2011 11:49:48 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id p9V9nmw1022655; Mon, 31 Oct 2011 11:49:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 31 Oct 2011 11:49:48 +0200 From: Kostik Belousov To: Mikolaj Golub Message-ID: <20111031094948.GB50300@deviant.kiev.zoral.com.ua> References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HJyXgSO8LK/Fa3pJ" Content-Disposition: inline In-Reply-To: <86aa8k2im0.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 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 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 31 Oct 2011 09:49:53 -0000 --HJyXgSO8LK/Fa3pJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 29, 2011 at 01:32:39PM +0300, Mikolaj Golub wrote: >=20 > On Tue, 25 Oct 2011 11:24:51 +0300 Kostik Belousov wrote: >=20 > KB> On Tue, Oct 25, 2011 at 12:13:10AM +0300, Mikolaj Golub wrote: > >>=20 > >> On Sun, 16 Oct 2011 20:10:05 +0300 Kostik Belousov wrote: > >>=20 > >> KB> In my opinion, the way to implement the feature is to (re)use > >> KB> linprocfs_doargv() and provide another kern.proc sysctl to retri= eve the > >> KB> argv and env vectors. Then, ps(1) and procstat(1) can use it, as= well as > >> KB> procfs and linprocfs inside the kernel. > >>=20 > >> Thanks! I am testing a patch (without auxv vector so far) and have so= me > >> questions. > >>=20 > >> Original ps -e returns environment only for user owned processes (the= access is > >> restricted by the permissions of /proc/pid/mem file). My kern.proc.en= v sysctl > >> does not have such a restriction. I suppose I should add it? What fun= ction I > >> could use for this? > >>=20 > >> BTW, linprocfs allows to read other user's environment. > KB> linprocfs uses p_cansee() to check the permissions. There are sysctls > KB> security.bsd.see_other_{ug}ids that control the behaviour. >=20 > KB> I believe that the new sysctl shall use the same check. >=20 > >>=20 > >> KB> While you are at the code, it would be useful to also export the= auxv vector, > >> KB> which is immediately before env. > >>=20 > >> It looks I can find the location of auxv but what about the size? Or = do you > >> propose to extend struct ps_strings to store location and size of aux= v? I > >> could do this way... >=20 > KB> No, extending ps_strings is not needed and it is too radical change. > KB> The auxv vector must end by the AT_NULL aux entry. You can also arti= ficially > KB> limit the amount of read aux vectors to, say, 256, which is much mor= e then > KB> it is currently defined. >=20 > What do you think about the attached patch? This is a kernel > part. COMPAT_FREEBSD32 has not been tested after the last update (just ch= ecked > that it compiles): it looks I will not have access to amd64 box for testi= ng > during the weekend. I will test it after the weekend. >=20 > Both kernel and userland parts are available here: >=20 > http://people.freebsd.org/~trociny/env.sys.patch > http://people.freebsd.org/~trociny/env.user.patch >=20 > Currently there is an issue with procstat -x: if one tried to run it on 6= 4 bit > for a 32 bit process it would not detect this so would output a garbage. = Could > somebody recommend a way how to get this info about a process from userle= nd? I think it is better to use sys/elf.h over the machine/elf.h. Please change the comment for PROC_AUXV_MAX to "Safety limit on auxv size". Also, it worth adding a comment saying that we are reading aux vectors twic= e, first to get a size, second time to fetch a content, for simplicity. When reading aux vector, if the PROC_AUXV_MAX entries are iterated over, and we still not reached AT_NULL, the return error is 0. Was it intended ? For PROC_ARG and PROC_ENV, you blindly trust the read values of the arg and env vector sizes. This can easily cause kernel panics due to unability to malloc the requested memory. I recommend to put some clump, and twice of (PATH_MAX + ARG_MAX) is probably enough (see kern_exec.c, in particular, exec_alloc_args). Also, you might use the swappable memory for the strings as well, in the style of exec_alloc_args(). I suspect this is my bug: Reading the GET_PS_STRINGS_CHUNK_SZ may validly return EFAULT if the string is shorter than the chunk and aligned at the end of the page, assuming the next page is not mapped. There should be a fallback to fubyte() read loop. I remember that copyinstr() was unsuitable. The checks for P_WEXIT in the linprocfs routines look strange. Since you are unlocking the process right after the check, it does not make sense. In fact, the checks are not needed, I believe, since pseudofs already did the hold (see e.g. pfs_read and pfs_visible). --HJyXgSO8LK/Fa3pJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6ubzsACgkQC3+MBN1Mb4gVigCdF8jhJkg9Qny7tupR+99gOcQE Tv0AmQGA4X6yudpdSOPrvwgfqO36ndPa =ftBy -----END PGP SIGNATURE----- --HJyXgSO8LK/Fa3pJ-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 10:54:50 2011 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 33E501065674; Mon, 31 Oct 2011 10:54:50 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8822C8FC17; Mon, 31 Oct 2011 10:54:49 +0000 (UTC) Received: by eyd10 with SMTP id 10so6579927eyd.13 for ; Mon, 31 Oct 2011 03:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=XTtYaf5TlU/6ocdyl7R5NtkbGmya5kGVQ4j3CwMrA+I=; b=aLSWvZ+76gMwIFYJxEznm8IlYCMfPFm8vYZ+Y6720x2yCRNc7PK+Lu8doVyxV+PlIR X7dongi4iG/uAKqeSTMYVyAVHPcwVoHb48ScnDfmDm1YqTr9G4vjz7Umakc09yfFqY/B AuKKSuMTPXlwEHNzKd8WrOxgXBS6nUPiWJhDc= Received: by 10.213.29.193 with SMTP id r1mr1173876ebc.94.1320058488214; Mon, 31 Oct 2011 03:54:48 -0700 (PDT) Received: from localhost ([94.27.39.186]) by mx.google.com with ESMTPS id v3sm49922447eej.7.2011.10.31.03.54.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 31 Oct 2011 03:54:44 -0700 (PDT) From: Mikolaj Golub To: Kostik Belousov Organization: TOA Ukraine References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> Sender: Mikolaj Golub Date: Mon, 31 Oct 2011 12:54:42 +0200 In-Reply-To: <20111031094948.GB50300@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 31 Oct 2011 11:49:48 +0200") Message-ID: <86ty6pe8i5.fsf@in138.ua3> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 31 Oct 2011 10:54:50 -0000 On Mon, 31 Oct 2011 11:49:48 +0200 Kostik Belousov wrote: KB> On Sat, Oct 29, 2011 at 01:32:39PM +0300, Mikolaj Golub wrote: >> >> What do you think about the attached patch? This is a kernel >> part. COMPAT_FREEBSD32 has not been tested after the last update (just checked >> that it compiles): it looks I will not have access to amd64 box for testing >> during the weekend. I will test it after the weekend. >> >> Both kernel and userland parts are available here: >> >> http://people.freebsd.org/~trociny/env.sys.patch >> http://people.freebsd.org/~trociny/env.user.patch >> >> Currently there is an issue with procstat -x: if one tried to run it on 64 bit >> for a 32 bit process it would not detect this so would output a garbage. Could >> somebody recommend a way how to get this info about a process from userlend? KB> I think it is better to use sys/elf.h over the machine/elf.h. KB> Please change the comment for PROC_AUXV_MAX to "Safety limit on auxv size". KB> Also, it worth adding a comment saying that we are reading aux vectors twice, KB> first to get a size, second time to fetch a content, for simplicity. KB> When reading aux vector, if the PROC_AUXV_MAX entries are iterated over, KB> and we still not reached AT_NULL, the return error is 0. Was it intended ? According to kern_exec.c it is possible that a process doesn't have auxv at all. I don't know a way how to detect this. So because PROC_AUXV_MAX is much larger than expected amount of aux entries and we have not reached AT_NULL it is most likely the process doesn't have auxv and 0 length array (without error) is returned. If you think I should return a error in this situation, I can add this. Please tell me the error code I should return :-). Also, may be there is a sane way to check on auxv existence? KB> For PROC_ARG and PROC_ENV, you blindly trust the read values of the arg and KB> env vector sizes. This can easily cause kernel panics due to unability to KB> malloc the requested memory. I recommend to put some clump, and twice KB> of (PATH_MAX + ARG_MAX) is probably enough (see kern_exec.c, in particular, KB> exec_alloc_args). Also, you might use the swappable memory for the strings KB> as well, in the style of exec_alloc_args(). KB> I suspect this is my bug: Reading the GET_PS_STRINGS_CHUNK_SZ may validly KB> return EFAULT if the string is shorter than the chunk and aligned at KB> the end of the page, assuming the next page is not mapped. There should KB> be a fallback to fubyte() read loop. I remember that copyinstr() was KB> unsuitable. KB> The checks for P_WEXIT in the linprocfs routines look strange. Since KB> you are unlocking the process right after the check, it does not make KB> sense. In fact, the checks are not needed, I believe, since pseudofs KB> already did the hold (see e.g. pfs_read and pfs_visible). Ah, right. Unintentionally added when was adding the P_SYSTEM check. Thank you for all your comments. I will do this. -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 11:06:33 2011 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 4DB261065673; Mon, 31 Oct 2011 11:06:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id DDEAB8FC23; Mon, 31 Oct 2011 11:06:32 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9VB6T3R030590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 Oct 2011 13:06:29 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id p9VB6SqM023207; Mon, 31 Oct 2011 13:06:28 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id p9VB6Sbk023206; Mon, 31 Oct 2011 13:06:28 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 31 Oct 2011 13:06:28 +0200 From: Kostik Belousov To: Mikolaj Golub Message-ID: <20111031110628.GH50300@deviant.kiev.zoral.com.ua> References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> <86ty6pe8i5.fsf@in138.ua3> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fH3c7fNNmU5o3o+3" Content-Disposition: inline In-Reply-To: <86ty6pe8i5.fsf@in138.ua3> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 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 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 31 Oct 2011 11:06:33 -0000 --fH3c7fNNmU5o3o+3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 31, 2011 at 12:54:42PM +0200, Mikolaj Golub wrote: >=20 > On Mon, 31 Oct 2011 11:49:48 +0200 Kostik Belousov wrote: >=20 > KB> On Sat, Oct 29, 2011 at 01:32:39PM +0300, Mikolaj Golub wrote: > >>=20 > >> What do you think about the attached patch? This is a kernel > >> part. COMPAT_FREEBSD32 has not been tested after the last update (jus= t checked > >> that it compiles): it looks I will not have access to amd64 box for t= esting > >> during the weekend. I will test it after the weekend. > >>=20 > >> Both kernel and userland parts are available here: > >>=20 > >> http://people.freebsd.org/~trociny/env.sys.patch > >> http://people.freebsd.org/~trociny/env.user.patch > >>=20 > >> Currently there is an issue with procstat -x: if one tried to run it = on 64 bit > >> for a 32 bit process it would not detect this so would output a garba= ge. Could > >> somebody recommend a way how to get this info about a process from us= erlend? >=20 > KB> I think it is better to use sys/elf.h over the machine/elf.h. >=20 > KB> Please change the comment for PROC_AUXV_MAX to "Safety limit on auxv= size". > KB> Also, it worth adding a comment saying that we are reading aux vecto= rs twice, > KB> first to get a size, second time to fetch a content, for simplicity. >=20 > KB> When reading aux vector, if the PROC_AUXV_MAX entries are iterated o= ver, > KB> and we still not reached AT_NULL, the return error is 0. Was it inte= nded ? >=20 > According to kern_exec.c it is possible that a process doesn't have auxv = at > all. I don't know a way how to detect this. So because PROC_AUXV_MAX is m= uch > larger than expected amount of aux entries and we have not reached AT_NUL= L it > is most likely the process doesn't have auxv and 0 length array (without > error) is returned.=20 >=20 > If you think I should return a error in this situation, I can add this. P= lease > tell me the error code I should return :-). >=20 > Also, may be there is a sane way to check on auxv existence? Hm. Even if the process ABI mandates the existence of auxv (i.e. the executing binary is ELF), the process could still cleared or mangled the corresponding stack page. I propose to designate some specific error code for the case of unparseable auxv region, ENOEXEC is not worse then any other. Also, please add the explanation you provided as a comment. --fH3c7fNNmU5o3o+3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6ugTQACgkQC3+MBN1Mb4ibOgCdGulRhlahQm+Zq+NDD3tbS6Fu lcYAnjvKb6HNjRbKKofoI0IUl+vHXwqf =GtYO -----END PGP SIGNATURE----- --fH3c7fNNmU5o3o+3-- From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 12:59:32 2011 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 8EE54106566B; Mon, 31 Oct 2011 12:59:32 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5D9938FC0A; Mon, 31 Oct 2011 12:59:32 +0000 (UTC) Received: by pzk4 with SMTP id 4so37712291pzk.3 for ; Mon, 31 Oct 2011 05:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=DEL+iGGniTInrwO4WrxDwRNRQPmeytlTyqvkhjNqJiE=; b=PF/WwqYkM8Q+NBRI+QEsWMhExkjPp+jvrDD3e+n0u+nPM/wflyR8jvObCNNld7ipLz 2mzi8PdD+D+/Fz/kGnaaXio2NTvtIG+rfN1qpdw0qWR472xZ0xWy+mMMsIkTPbfn6YL7 yM4DPxkwO+VUTQnZK861E8dsETMId8qQl13ck= MIME-Version: 1.0 Received: by 10.68.28.4 with SMTP id x4mr23564371pbg.56.1320065971333; Mon, 31 Oct 2011 05:59:31 -0700 (PDT) Received: by 10.142.57.6 with HTTP; Mon, 31 Oct 2011 05:59:31 -0700 (PDT) In-Reply-To: <4EAA3FBC.3090907@rice.edu> References: <20111006160159.GQ1511@deviant.kiev.zoral.com.ua> <4E8FF4B8.7010300@rice.edu> <4EA747B5.9040304@rice.edu> <4EAA3FBC.3090907@rice.edu> Date: Mon, 31 Oct 2011 13:59:31 +0100 Message-ID: From: Svatopluk Kraus To: Alan Cox Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: alc@freebsd.org, Wojciech Puchar , Kostik Belousov , hackers@freebsd.org, Grzegorz Kulewski Subject: Re: mmap performance and memory use 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, 31 Oct 2011 12:59:32 -0000 On Fri, Oct 28, 2011 at 7:38 AM, Alan Cox wrote: > On 10/26/2011 06:23, Svatopluk Kraus wrote: >> >> Hi, >> >> well, I'm working on new port (arm11 mpcore) and pmap_enter_object() >> is what I'm debugging rigth now. And I did not find any way in >> userland how to force kernel to call pmap_enter_object() which makes >> SUPERPAGE mapping without promotion. I tried to call mmap() with >> MAP_PREFAULT_READ without success. I tried to call madvise() with >> MADV_WILLNEED without success too. >> > > mmap() should call pmap_enter_object() if MAP_PREFAULT_READ was specified= . > =A0I'm surprised to hear that it's not happening for you. Yes, it's not happening for me really. mmap() with MAP_PREFAULT_READ case: ---------------------------------------------------------------- vm_mmap() in sys/vm/vm_mmap.c (r225617) line 1501 - if MAP_ANON then docow =3D 0 line 1525 - vm_map_find() is called with zeroed docow It's propagated down the calling stack, so even vm_map_pmap_enter() is not called in vm_map_insert(). Most likely, this is correct. (Anonymous object -> no physical memory allocation in advance -> no SUPERPAGE mapping without promotion.) madvise() with MADV_WILLNEED case: ---------------------------------------------------------- vm_map_pmap_enter() in sys/vm/vm_map.c (r223825) line 1814 - vm_page_find_least() is called During madvise(), vm_map_pmap_enter() is called. However, in the call, vm_page_find_least() returns NULL. It returns NULL, if no page is allocated in object with pindex greater or equal to the parameter pindex. The following loop after the call says that if no page is allocated for SUPERPAGE (i.e. for given region), pmap_enter_object() is not called and this is correct. >> Moreover, the SUPERPAGE mapping is made readonly firstly. So, even if >> I have SUPERPAGE mapping without promotion, the mapping is demoted >> after first write, and promoted again after all underlying pages are >> accessed by write. There is 4K page table saving no longer. >> > > Yes, that is all true. =A0It is possible to change things so that the pag= e > table pages are reclaimed after a time, and not kept around indefinitely. > =A0However, this not high on my personal priority list. =A0Before that, i= t is > more likely that I will add an option to avoid the demotion on write, if = we > don't have to copy the entire superpage to do so. Well, I just wanted to remark that there is no 4K page table saving now. However, there is still big TLB entries saving with SUPERPAGE promotions. I'm not pushing you to do anything. I understand that physical pages allocation in advance is not good idea and it goes against great copy on write feature. However, something like MAP_PREFAULT_WRITE on MAP_ANON, which allocates all physical pages in advance and does SUPERPAGE mapping without promotion sounds like a good-but-really-specific feature, which can be utilized sometimes. Nevertheless, IMHO, it's not worth to do such specific feature. Svata From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 07:07:20 2011 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 242DA106566B; Tue, 1 Nov 2011 07:07:20 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7E7298FC13; Tue, 1 Nov 2011 07:07:19 +0000 (UTC) Received: by faar19 with SMTP id r19so8914218faa.13 for ; Tue, 01 Nov 2011 00:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=KcLrWKLigJNtPhFhJFQIoKzyGnbi/Aajn66+NJ8R60E=; b=E+uPUzv6aN3yabpB+uY4fxFrjasGM/3HuOD7yJ6K0C02sw7SD+l1wFS92d+42BvNsT 2kGRj5t5uT3CuQHg4cZyHqMfHYaEvV1/+IwLLlCwr6+y7fDS5GKWJcVmtMN8dpqTneF0 1VxLODhB9E8EqxyWHQqycSQkfOhbclPmg5YzQ= Received: by 10.223.4.215 with SMTP id 23mr35033212fas.8.1320131238370; Tue, 01 Nov 2011 00:07:18 -0700 (PDT) Received: from localhost ([94.27.39.186]) by mx.google.com with ESMTPS id y17sm42925297faa.22.2011.11.01.00.07.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Nov 2011 00:07:13 -0700 (PDT) From: Mikolaj Golub To: Kostik Belousov Organization: TOA Ukraine References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> Sender: Mikolaj Golub Date: Tue, 01 Nov 2011 09:07:11 +0200 In-Reply-To: <20111031094948.GB50300@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 31 Oct 2011 11:49:48 +0200") Message-ID: <86boswjp7k.fsf@in138.ua3> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 01 Nov 2011 07:07:20 -0000 On Mon, 31 Oct 2011 11:49:48 +0200 Kostik Belousov wrote: KB> For PROC_ARG and PROC_ENV, you blindly trust the read values of the arg and KB> env vector sizes. This can easily cause kernel panics due to unability to KB> malloc the requested memory. I recommend to put some clump, and twice KB> of (PATH_MAX + ARG_MAX) is probably enough (see kern_exec.c, in particular, KB> exec_alloc_args). Also, you might use the swappable memory for the strings KB> as well, in the style of exec_alloc_args(). After looking at it more closely, I am not sure if I need to use exec_alloc_args. I malloc explicitly only for array vector (proc_vector). And actually it should be much smaller than 2 * (PATH_MAX + ARG_MAX). Currently in linprocfs the limit is 512 entries: #define MAX_ARGV_STR 512 /* Max number of argv-like strings */ The same limit is in libkvm: /* * Check that there aren't an unreasonable number of arguments, * and that the address is in user space. Special test for * VM_MIN_ADDRESS as it evaluates to zero, but is not a simple zero * constant for some archs. We cannot use the pre-processor here and * for some archs the compiler would trigger a signedness warning. */ if (narg > 512 || addr + 1 < VM_MIN_ADDRESS + 1 || addr >= VM_MAXUSER_ADDRESS) return (0); (BTW, may be the VM_MIN_ADDRESS - VM_MAXUSER_ADDRESS is worth adding in my code too?) So it looks like I should use the same limit (512 * sizeof(char *)) for the allocated array. I could use exec_alloc_args() for the allocation but it would reqire some changes: I would have to free using kmem_free_wakeup(), which requires size of the region, while I return the number of entries. So I'd rather not use exec_alloc_args() for vector allocation because the benefit is not significant here. For strings I use sbuf and set it up using sbuf_new_for_sysctl. I could set it up manually as SBUF_FIXEDLEN allocating buf (up to 2 * (PATH_MAX + ARG_MAX)) with exec_alloc_args() but this would complicate things a little. Do you think it is worth doing? -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 10:55:40 2011 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 2240F106564A; Tue, 1 Nov 2011 10:55:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id B0F728FC0A; Tue, 1 Nov 2011 10:55:39 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pA1AtYEk063355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Nov 2011 12:55:34 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pA1AtYWZ028340; Tue, 1 Nov 2011 12:55:34 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pA1AtYWt028339; Tue, 1 Nov 2011 12:55:34 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 1 Nov 2011 12:55:34 +0200 From: Kostik Belousov To: Mikolaj Golub Message-ID: <20111101105534.GT50300@deviant.kiev.zoral.com.ua> References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> <86boswjp7k.fsf@in138.ua3> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a0dfbevZYcQh5kCn" Content-Disposition: inline In-Reply-To: <86boswjp7k.fsf@in138.ua3> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 01 Nov 2011 10:55:40 -0000 --a0dfbevZYcQh5kCn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 01, 2011 at 09:07:11AM +0200, Mikolaj Golub wrote: >=20 > On Mon, 31 Oct 2011 11:49:48 +0200 Kostik Belousov wrote: >=20 > KB> For PROC_ARG and PROC_ENV, you blindly trust the read values of the = arg and > KB> env vector sizes. This can easily cause kernel panics due to unabili= ty to > KB> malloc the requested memory. I recommend to put some clump, and twice > KB> of (PATH_MAX + ARG_MAX) is probably enough (see kern_exec.c, in part= icular, > KB> exec_alloc_args). Also, you might use the swappable memory for the s= trings > KB> as well, in the style of exec_alloc_args(). >=20 > After looking at it more closely, I am not sure if I need to use > exec_alloc_args. I malloc explicitly only for array vector (proc_vector).= And > actually it should be much smaller than 2 * (PATH_MAX + ARG_MAX). Current= ly in > linprocfs the limit is 512 entries: >=20 > #define MAX_ARGV_STR 512 /* Max number of argv-like string= s */ >=20 > The same limit is in libkvm: >=20 > /* > * Check that there aren't an unreasonable number of arguments, > * and that the address is in user space. Special test for > * VM_MIN_ADDRESS as it evaluates to zero, but is not a simple ze= ro > * constant for some archs. We cannot use the pre-processor here= and > * for some archs the compiler would trigger a signedness warning. > */ > if (narg > 512 || addr + 1 < VM_MIN_ADDRESS + 1 || addr >=3D VM_M= AXUSER_ADDRESS) > return (0); >=20 > (BTW, may be the VM_MIN_ADDRESS - VM_MAXUSER_ADDRESS is worth adding in my > code too?) >=20 > So it looks like I should use the same limit (512 * sizeof(char *)) for t= he > allocated array. I could use exec_alloc_args() for the allocation but it = would > reqire some changes: I would have to free using kmem_free_wakeup(), which > requires size of the region, while I return the number of entries. So I'd > rather not use exec_alloc_args() for vector allocation because the benefi= t is > not significant here. >=20 > For strings I use sbuf and set it up using sbuf_new_for_sysctl. I could s= et it > up manually as SBUF_FIXEDLEN allocating buf (up to 2 * (PATH_MAX + ARG_MA= X)) > with exec_alloc_args() but this would complicate things a little. Do you = think > it is worth doing? I mean using the swappable memory for strings, i.e. for the data you are currently store in sbuf. It indeed may be tricky, it was only an idea. --a0dfbevZYcQh5kCn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6v0CYACgkQC3+MBN1Mb4jNzgCghfAuh6dws+2TLXLFotDUIAXb z2IAnA9ZieBI7GugXFeqZcXz7olsr1G1 =fEmU -----END PGP SIGNATURE----- --a0dfbevZYcQh5kCn-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 23:18:01 2011 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 199DA106564A for ; Tue, 1 Nov 2011 23:18:01 +0000 (UTC) (envelope-from lthomas_lists@lthomas.net) Received: from oproxy4-pub.bluehost.com (oproxy4.bluehost.com [IPv6:2605:dc00:100:2::a4]) by mx1.freebsd.org (Postfix) with SMTP id D35428FC0C for ; Tue, 1 Nov 2011 23:18:00 +0000 (UTC) Received: (qmail 3849 invoked by uid 0); 1 Nov 2011 23:18:00 -0000 Received: from unknown (HELO fast21.fastdomain.com) (74.220.199.21) by cpoproxy1.bluehost.com with SMTP; 1 Nov 2011 23:18:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lthomas.net; s=default; h=Message-ID:Subject:To:From:Date:Content-Type:MIME-Version; bh=W3fViHDX68xtT3Cr1jEcT3P00nUYo9TkycwytDGG1y0=; b=XtOQ6kqMN5QJ5Y/dd23Kdno2qNUx9YH9B59GD5LiCZerOHiGjDc3C+vnioraWL4yqWHE8witD1FNkb18CsmGoPUQcLnnWQLbHznygUEWiRQXmvMfEe3Y9ndr/x5kYDrN; Received: from localhost ([127.0.0.1] helo=fast21.fastdomain.com) by fast21.fastdomain.com with esmtpa (Exim 4.76) (envelope-from ) id 1RLNai-0002Bs-EE for freebsd-hackers@freebsd.org; Tue, 01 Nov 2011 17:18:00 -0600 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_3887e89940a1d83ef9282fe1a618aaa0" Date: Tue, 01 Nov 2011 17:18:00 -0600 From: Lee Thomas To: FreeBSD Hackers Message-ID: X-Sender: lthomas_lists@lthomas.net User-Agent: Roundcube Webmail/0.5.4 X-Identified-User: {3486:fast21.fastdomain.com:lthomasn:lthomas.net} {sentby:smtp auth 127.0.0.1 authed with lthomas_lists@lthomas.net} Subject: Patch for PR ports/157342: devel/gdb (Invalid selected thread) 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, 01 Nov 2011 23:18:01 -0000 --=_3887e89940a1d83ef9282fe1a618aaa0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8; format=flowed Hello, everyone. I believe the following (and attached) patch to devel/gdb fixes PR ports/157342: "devel/gdb: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)" It works for me for the gdb from ports (7.3.1) on FreeBSD 9.0-RC1 amd64, but I don't have any other machines to test it on. Could someone please A) review this patch, B) test it, and/or C) tell me who to send it to / what the correct procedure is for getting it reviewed and/or applied? Thank you for your help. Regards, Lee Thomas --- /freebsd_ports/devel/gdb/files/fbsd-threads.c 2011-10-29 13:04:09.000000000 -0400 +++ /gdb_threads_fix/devel/gdb/files/fbsd-threads.c 2011-10-29 16:53:16.000000000 -0400 @@ -733,11 +733,15 @@ if (ourstatus->value.sig == TARGET_SIGNAL_TRAP) check_event(ret); /* this is a hack, if an event won't cause gdb to stop, for example, - SIGARLM, gdb resumes the process immediatly without setting + SIGALRM, gdb resumes the process immediatly without setting inferior_ptid to the new thread returned here, this is a bug because inferior_ptid may already not exist there, and passing - a none existing thread to fbsd_thread_resume causes error. */ - if (!fbsd_thread_alive (ops, inferior_ptid)) + a non-existing thread to fbsd_thread_resume causes error. However, + if the exiting thread is the currently selected thread, + then that is handled later in handle_inferior_event(), and we must + not delete the currently selected thread. + */ + if (!fbsd_thread_alive (ops, inferior_ptid) && !ptid_equal(inferior_ptid, ret)) { delete_thread (inferior_ptid); inferior_ptid = ret; --=_3887e89940a1d83ef9282fe1a618aaa0 Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name=gdb_fix.diff Content-Disposition: attachment; filename=gdb_fix.diff LS0tIC9mcmVlYnNkX3BvcnRzL2RldmVsL2dkYi9maWxlcy9mYnNkLXRocmVhZHMuYwkyMDExLTEw LTI5IDEzOjA0OjA5LjAwMDAwMDAwMCAtMDQwMAorKysgL2dkYl90aHJlYWRzX2ZpeC9kZXZlbC9n ZGIvZmlsZXMvZmJzZC10aHJlYWRzLmMJMjAxMS0xMC0yOSAxNjo1MzoxNi4wMDAwMDAwMDAgLTA0 MDAKQEAgLTczMywxMSArNzMzLDE1IEBACiAgICAgICBpZiAob3Vyc3RhdHVzLT52YWx1ZS5zaWcg PT0gVEFSR0VUX1NJR05BTF9UUkFQKQogICAgICAgICBjaGVja19ldmVudChyZXQpOwogICAgICAg LyogdGhpcyBpcyBhIGhhY2ssIGlmIGFuIGV2ZW50IHdvbid0IGNhdXNlIGdkYiB0byBzdG9wLCBm b3IgZXhhbXBsZSwKLSAgICAgICAgIFNJR0FSTE0sIGdkYiByZXN1bWVzIHRoZSBwcm9jZXNzIGlt bWVkaWF0bHkgd2l0aG91dCBzZXR0aW5nCisgICAgICAgICBTSUdBTFJNLCBnZGIgcmVzdW1lcyB0 aGUgcHJvY2VzcyBpbW1lZGlhdGx5IHdpdGhvdXQgc2V0dGluZwogICAgICAgICAgaW5mZXJpb3Jf cHRpZCB0byB0aGUgbmV3IHRocmVhZCByZXR1cm5lZCBoZXJlLCB0aGlzIGlzIGEgYnVnCiAgICAg ICAgICBiZWNhdXNlIGluZmVyaW9yX3B0aWQgbWF5IGFscmVhZHkgbm90IGV4aXN0IHRoZXJlLCBh bmQgcGFzc2luZwotICAgICAgICAgYSBub25lIGV4aXN0aW5nIHRocmVhZCB0byBmYnNkX3RocmVh ZF9yZXN1bWUgY2F1c2VzIGVycm9yLiAqLwotICAgICAgaWYgKCFmYnNkX3RocmVhZF9hbGl2ZSAo b3BzLCBpbmZlcmlvcl9wdGlkKSkKKyAgICAgICAgIGEgbm9uLWV4aXN0aW5nIHRocmVhZCB0byBm YnNkX3RocmVhZF9yZXN1bWUgY2F1c2VzIGVycm9yLiBIb3dldmVyLAorICAgICAgICAgaWYgdGhl IGV4aXRpbmcgdGhyZWFkIGlzIHRoZSBjdXJyZW50bHkgc2VsZWN0ZWQgdGhyZWFkLAorICAgICAg ICAgdGhlbiB0aGF0IGlzIGhhbmRsZWQgbGF0ZXIgaW4gaGFuZGxlX2luZmVyaW9yX2V2ZW50KCks IGFuZCB3ZSBtdXN0CisgICAgICAgICBub3QgZGVsZXRlIHRoZSBjdXJyZW50bHkgc2VsZWN0ZWQg dGhyZWFkLiAKKyAgICAgICovCisgICAgICBpZiAoIWZic2RfdGhyZWFkX2FsaXZlIChvcHMsIGlu ZmVyaW9yX3B0aWQpICYmICFwdGlkX2VxdWFsKGluZmVyaW9yX3B0aWQsIHJldCkpCiAgICAgICAg IHsKICAgICAgICAgICBkZWxldGVfdGhyZWFkIChpbmZlcmlvcl9wdGlkKTsKICAgICAgICAgICBp bmZlcmlvcl9wdGlkID0gcmV0Owo= --=_3887e89940a1d83ef9282fe1a618aaa0-- From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 10:33:16 2011 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 ED38C1065674 for ; Wed, 2 Nov 2011 10:33:16 +0000 (UTC) (envelope-from luca.pizzamiglio@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id ABCFC8FC1F for ; Wed, 2 Nov 2011 10:33:16 +0000 (UTC) Received: by qadz32 with SMTP id z32so12936qad.13 for ; Wed, 02 Nov 2011 03:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=N2EIdndSKM7b9NO5UUmLlXUE5d3Gx4Hs154R0N0L2Ic=; b=IdXDsm5HK4Wpmu76i6uycQe6gnxov//9hanIyTb2YGqgxVBOz9XmM5YGfhSFHpFB0e PGWhQywF8Tjqwn7oujHFrl+hAnWE+Rahj3Rkw3f/iJaSAen0y5hF9R+RxX8+tUbPXIqI UhNly5sxajehFMYAx245OYRa999CQGPRgVtuw= Received: by 10.224.173.195 with SMTP id q3mr1674095qaz.21.1320228103093; Wed, 02 Nov 2011 03:01:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.46.19 with HTTP; Wed, 2 Nov 2011 03:01:22 -0700 (PDT) From: Luca Pizzamiglio Date: Wed, 2 Nov 2011 11:01:22 +0100 Message-ID: To: Lee Thomas Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Hackers Subject: Re: Patch for PR ports/157342: devel/gdb (Invalid selected thread) 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, 02 Nov 2011 10:33:17 -0000 Hi Lee, On devel/gdb 7.3.1 there is big stability problem with threaded application. I experimented several segmentation faults using gdb 3.7.1 ports/162093 it's my mantainer-update PR to solve this issue and it closes the ports/157342 too. You could already try it! Regards Luca Pizzamiglio From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 12:22:08 2011 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 8A810106566C for ; Wed, 2 Nov 2011 12:22:08 +0000 (UTC) (envelope-from lthomas_lists@lthomas.net) Received: from oproxy3-pub.bluehost.com (oproxy3.bluehost.com [IPv6:2605:dc00:100:2::a3]) by mx1.freebsd.org (Postfix) with SMTP id 3E01C8FC08 for ; Wed, 2 Nov 2011 12:22:08 +0000 (UTC) Received: (qmail 31489 invoked by uid 0); 2 Nov 2011 12:22:08 -0000 Received: from unknown (HELO fast21.fastdomain.com) (74.220.199.21) by oproxy3.bluehost.com with SMTP; 2 Nov 2011 12:22:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lthomas.net; s=default; h=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version; bh=152jUIy98sD4094DumUBuiBv4rhJYULxi3O7IX4tqRU=; b=PMKgRVVKX7PcpNxScoMaXBCioNhWJWeivIUuBp03HEe9oBaaJ/YsIrLp5tJTlnfXz1xq2b0NI94jDPR944N6Z9pbVYmjGeS3uWKQd6nRf1xiU2Z5wzgTWuFphfuX5Eko; Received: from localhost ([127.0.0.1] helo=www.lthomas.net) by fast21.fastdomain.com with esmtpa (Exim 4.76) (envelope-from ) id 1RLZpX-0004vB-Pk; Wed, 02 Nov 2011 06:22:07 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 02 Nov 2011 06:22:07 -0600 From: Lee Thomas To: Luca Pizzamiglio In-Reply-To: References: Message-ID: <733c3f271bba27a17d891dd0b68b3010@lthomas.net> X-Sender: lthomas_lists@lthomas.net User-Agent: Roundcube Webmail/0.5.4 X-Identified-User: {3486:fast21.fastdomain.com:lthomasn:lthomas.net} {sentby:smtp auth 127.0.0.1 authed with lthomas_lists@lthomas.net} Cc: FreeBSD Hackers Subject: Re: Patch for PR ports/157342: devel/gdb (Invalid selected thread) 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, 02 Nov 2011 12:22:08 -0000 Excellent! Thanks for fixing that. Lee Thomas On Wed, 2 Nov 2011 11:01:22 +0100, Luca Pizzamiglio wrote: > Hi Lee, > > On devel/gdb 7.3.1 there is big stability problem with threaded > application. > I experimented several segmentation faults using gdb 3.7.1 > > ports/162093 it's my mantainer-update PR to solve this issue and it > closes the ports/157342 too. > > You could already try it! > > Regards > > Luca Pizzamiglio From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:22:14 2011 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 85AD3106566B for ; Wed, 2 Nov 2011 20:22:14 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4363B8FC0C for ; Wed, 2 Nov 2011 20:22:13 +0000 (UTC) Received: by qyg14 with SMTP id 14so778641qyg.13 for ; Wed, 02 Nov 2011 13:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=h9k1mxEaKy/afygU9Nsvtah+l1pGmE3o3atkt5LIzu4=; b=sY1uj+DOtlyPyRKrFbePqg9h52bsLNBCSVHpWcn7c8SOdh6wO/ZGS/ZSwzlqm06GIj rxnZ8O+29Ldz0d9gEX2f/ZE21ketqGOBP7ZV/z4xLp1ZMOQOb0ESlIP3nj0/j5qtbX1Z YQ7QXvyxrncjkQhOtoh3HAB3H++eOzF4Vulak= MIME-Version: 1.0 Received: by 10.229.47.137 with SMTP id n9mr286172qcf.137.1320263789534; Wed, 02 Nov 2011 12:56:29 -0700 (PDT) Received: by 10.229.231.203 with HTTP; Wed, 2 Nov 2011 12:56:29 -0700 (PDT) Date: Wed, 2 Nov 2011 12:56:29 -0700 Message-ID: From: Navdeep Parhar To: FreeBSD Hackers Content-Type: multipart/mixed; boundary=0016364183ad2f5ff804b0c5de25 Subject: incorrect parent refcounting in subr_firmware.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: Wed, 02 Nov 2011 20:22:14 -0000 --0016364183ad2f5ff804b0c5de25 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I built a KLD with multiple firmware images, as shown here: KMOD=3Dfoo FIRMWS=3D foo.bin:foo:1.0.0.0 FIRMWS+=3Dbar.bin:bar:1.0.0.0 FIRMWS+=3D ... .include "foo" is the parent firmware and a firmware_get(foo) can autoload the KLD. =A0"bar" and the rest are available only if the KLD is loaded (by whatever means). =A0This is reasonable and works as expected. =A0But if I just get and then put "foo" back, the KLD is not unloaded automatically. The problem is that a reference is placed on the parent firmware when the other firmwares are registered (during module load). =A0I think this reference should be placed during firmware_get on the child. What do people think about the attached patch? =A0It fixes things for me. Regards, Navdeep --0016364183ad2f5ff804b0c5de25 Content-Type: application/octet-stream; name="fw.diff" Content-Disposition: attachment; filename="fw.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_guiqvwoa0 ZGlmZiAtLWdpdCBhL3N5cy9rZXJuL3N1YnJfZmlybXdhcmUuYyBiL3N5cy9rZXJuL3N1YnJfZmly bXdhcmUuYwotLS0gYS9zeXMva2Vybi9zdWJyX2Zpcm13YXJlLmMKKysrIGIvc3lzL2tlcm4vc3Vi cl9maXJtd2FyZS5jCkBAIC0xOTgsMTAgKzE5OCw4IEBACiAJZnJwLT5mdy5kYXRhID0gZGF0YTsK IAlmcnAtPmZ3LmRhdGFzaXplID0gZGF0YXNpemU7CiAJZnJwLT5mdy52ZXJzaW9uID0gdmVyc2lv bjsKLQlpZiAocGFyZW50ICE9IE5VTEwpIHsKKwlpZiAocGFyZW50ICE9IE5VTEwpCiAJCWZycC0+ cGFyZW50ID0gUFJJVl9GVyhwYXJlbnQpOwotCQlmcnAtPnBhcmVudC0+cmVmY250Kys7Ci0JfQog CW10eF91bmxvY2soJmZpcm13YXJlX210eCk7CiAJaWYgKGJvb3R2ZXJib3NlKQogCQlwcmludGYo ImZpcm13YXJlOiAnJXMnIHZlcnNpb24gJXU6ICV6dSBieXRlcyBsb2FkZWQgYXQgJXBcbiIsCkBA IC0yMzUsOCArMjMzLDYgQEAKIAl9ICBlbHNlIHsKIAkJbGlua2VyX2ZpbGVfdCB4ID0gZnAtPmZp bGU7CS8qIHNhdmUgdmFsdWUgKi8KIAotCQlpZiAoZnAtPnBhcmVudCAhPSBOVUxMKQkvKiByZWxl YXNlIHBhcmVudCByZWZlcmVuY2UgKi8KLQkJCWZwLT5wYXJlbnQtPnJlZmNudC0tOwogCQkvKgog CQkgKiBDbGVhciB0aGUgd2hvbGUgZW50cnkgd2l0aCBiemVybyB0byBtYWtlIHN1cmUgd2UKIAkJ ICogZG8gbm90IGZvcmdldCBhbnl0aGluZy4gVGhlbiByZXN0b3JlICdmaWxlJyB3aGljaCBpcwpA QCAtMzQxLDYgKzMzNyw4IEBACiAJCXJldHVybiBOVUxMOwogCX0KIGZvdW5kOgkJCQkvKiBjb21t b24gZXhpdCBwb2ludCBvbiBzdWNjZXNzICovCisJaWYgKGZwLT5yZWZjbnQgPT0gMCAmJiBmcC0+ cGFyZW50ICE9IE5VTEwpCisJCWZwLT5wYXJlbnQtPnJlZmNudCsrOwogCWZwLT5yZWZjbnQrKzsK IAltdHhfdW5sb2NrKCZmaXJtd2FyZV9tdHgpOwogCXJldHVybiAmZnAtPmZ3OwpAQCAtMzYzLDYg KzM2MSw4IEBACiAJbXR4X2xvY2soJmZpcm13YXJlX210eCk7CiAJZnAtPnJlZmNudC0tOwogCWlm IChmcC0+cmVmY250ID09IDApIHsKKwkJaWYgKGZwLT5wYXJlbnQgIT0gTlVMTCkKKwkJCWZwLT5w YXJlbnQtPnJlZmNudC0tOwogCQlpZiAoZmxhZ3MgJiBGSVJNV0FSRV9VTkxPQUQpCiAJCQlmcC0+ ZmxhZ3MgfD0gRldfVU5MT0FEOwogCQlpZiAoZnAtPmZpbGUpCg== --0016364183ad2f5ff804b0c5de25-- From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:30:20 2011 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 E45DC106566C for ; Wed, 2 Nov 2011 20:30:20 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 84FFA8FC17 for ; Wed, 2 Nov 2011 20:30:20 +0000 (UTC) Received: by faar19 with SMTP id r19so1222425faa.13 for ; Wed, 02 Nov 2011 13:30:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.61.138 with SMTP id t10mr10767433fah.20.1320265731939; Wed, 02 Nov 2011 13:28:51 -0700 (PDT) Received: by 10.223.96.133 with HTTP; Wed, 2 Nov 2011 13:28:51 -0700 (PDT) X-Originating-IP: [216.223.13.130] Date: Wed, 2 Nov 2011 16:28:51 -0400 Message-ID: From: Mark Saad To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: What is going on with ash / sh 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, 02 Nov 2011 20:30:21 -0000 Hackers What is going on here, if I run the following shell script, what is the expected output . The script is named xxx #!/bin/sh ps -ax | grep -v grep | grep xxx Here is what I see # sh xxx 88318 p0 S+ 0:00.00 sh xxx 88320 p0 R+ 0:00.00 sh xxx 88321 p0 R+ 0:00.00 sh xxx Can someone explain this ? -- mark saad | nonesuch@longcount.org From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:36:01 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 5DD10106567B for ; Wed, 2 Nov 2011 20:36:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 4177714E239; Wed, 2 Nov 2011 20:35:29 +0000 (UTC) Message-ID: <4EB1A990.7080001@FreeBSD.org> Date: Wed, 02 Nov 2011 13:35:28 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Mark Saad References: In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh 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, 02 Nov 2011 20:36:01 -0000 On 11/02/2011 13:28, Mark Saad wrote: > Hackers > What is going on here, if I run the following shell script, what is > the expected output . The script is named xxx > > #!/bin/sh > ps -ax | grep -v grep | grep xxx > > Here is what I see > > > # sh xxx > 88318 p0 S+ 0:00.00 sh xxx > 88320 p0 R+ 0:00.00 sh xxx > 88321 p0 R+ 0:00.00 sh xxx > > > Can someone explain this ? I only see one. What happens if you run this on the command line? -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:37:08 2011 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 8ADBD1065679 for ; Wed, 2 Nov 2011 20:37:08 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE548FC1C for ; Wed, 2 Nov 2011 20:37:07 +0000 (UTC) Received: by wyg36 with SMTP id 36so755721wyg.13 for ; Wed, 02 Nov 2011 13:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=3RrzEsEcHo+B49sP0DMZYvkHO95lIpv6hU8VmVUWyTM=; b=BtK6yXkMb+t+hx32XNOJ2ww/b+tpzak1IpGQdUD0toAypWuzVSTUgJmvFKMBUSN07v zQe/zonxEjXMcSzdP4AlkoMuQy8Ey61BhzODuG0UrBohSut8p0ZXKKkmwC36nBIRwb8W Uw+Uy+1A6un8BMukZ3Hu/qR3rjdgly8rBoiUM= MIME-Version: 1.0 Received: by 10.216.133.155 with SMTP id q27mr698711wei.101.1320266226918; Wed, 02 Nov 2011 13:37:06 -0700 (PDT) Received: by 10.180.8.34 with HTTP; Wed, 2 Nov 2011 13:37:06 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Nov 2011 16:37:06 -0400 Message-ID: From: Ryan Stone To: Mark Saad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh 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, 02 Nov 2011 20:37:08 -0000 On Wed, Nov 2, 2011 at 4:28 PM, Mark Saad wrote: > Hackers > =A0What is going on here, if I run the following shell script, what is > the expected output . The script is named xxx > > #!/bin/sh > ps -ax | grep -v grep | grep xxx > > Here is what I see > > > =A0# sh xxx > 88318 =A0p0 =A0S+ =A0 =A0 0:00.00 sh xxx > 88320 =A0p0 =A0R+ =A0 =A0 0:00.00 sh xxx > 88321 =A0p0 =A0R+ =A0 =A0 0:00.00 sh xxx > > > Can someone explain this ? ps is happening to run after sh has forked off the two grep processes but before they exec'ed grep? From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:37:32 2011 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 A9D1C1065688 for ; Wed, 2 Nov 2011 20:37:32 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 315BD8FC08 for ; Wed, 2 Nov 2011 20:37:31 +0000 (UTC) Received: by bkbzs2 with SMTP id zs2so732100bkb.13 for ; Wed, 02 Nov 2011 13:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ZtAbKqSUZYxKwnjlvI3j0OI1evY6hdIFLmr2wBjpdcU=; b=XeJ8xwyTF20G0h8B1XVhRqC1I7+kcRU+t+QGmf9N7Ox6dXiPKmwX9DGqCSfqpEHORX 0IbfeJiOdFHW0S6r6hucxm1DnIJXkg/YLMN0LQZ767tNnSSWvwxQar1T8geAbCdRew4U /payPdA/5xSkfVs8G1/Uusny/+uHsYss1u4t0= MIME-Version: 1.0 Received: by 10.182.7.100 with SMTP id i4mr1196168oba.66.1320266250559; Wed, 02 Nov 2011 13:37:30 -0700 (PDT) Received: by 10.182.122.33 with HTTP; Wed, 2 Nov 2011 13:37:30 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Nov 2011 13:37:30 -0700 Message-ID: From: Garrett Cooper To: Mark Saad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh 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, 02 Nov 2011 20:37:32 -0000 On Wed, Nov 2, 2011 at 1:28 PM, Mark Saad wrote: > Hackers > =A0What is going on here, if I run the following shell script, what is > the expected output . The script is named xxx > > #!/bin/sh > ps -ax | grep -v grep | grep xxx > > Here is what I see > > > =A0# sh xxx > 88318 =A0p0 =A0S+ =A0 =A0 0:00.00 sh xxx > 88320 =A0p0 =A0R+ =A0 =A0 0:00.00 sh xxx > 88321 =A0p0 =A0R+ =A0 =A0 0:00.00 sh xxx No idea. jobs isn't a shell builtin so you can't verify what jobs are currently running via the shell if there are any. What version of FreeBSD are you using and what do your $ENV and .profile files look like? Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:38:35 2011 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 62A0B106566B for ; Wed, 2 Nov 2011 20:38:35 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD7C8FC2C for ; Wed, 2 Nov 2011 20:38:34 +0000 (UTC) Received: by vcbfk26 with SMTP id fk26so833137vcb.13 for ; Wed, 02 Nov 2011 13:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ycejI3Jca0MoIwuKW9y06WC57KdYsZZtiqVJ+Zq0YqE=; b=IlggqTVtfIGLSfRn/CFAJ8kmDvkMKVs/d0a2SUKh/3tyLTVv2M+hwrYN401Gu2gjYT /NzkK9z73u2adoYcc+d+e2zrVTjYFhNWXrGtzrFIt8KhsEfea9o18S0puMmIEy+Tc5gG IeISqD4r4DzzMaNMzfjkPg6UAPospglQhCh/s= MIME-Version: 1.0 Received: by 10.182.31.43 with SMTP id x11mr1222440obh.26.1320266314331; Wed, 02 Nov 2011 13:38:34 -0700 (PDT) Received: by 10.182.122.33 with HTTP; Wed, 2 Nov 2011 13:38:34 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Nov 2011 13:38:34 -0700 Message-ID: From: Garrett Cooper To: Mark Saad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh 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, 02 Nov 2011 20:38:35 -0000 On Wed, Nov 2, 2011 at 1:37 PM, Garrett Cooper wrote: > On Wed, Nov 2, 2011 at 1:28 PM, Mark Saad wrote: >> Hackers >> =A0What is going on here, if I run the following shell script, what is >> the expected output . The script is named xxx >> >> #!/bin/sh >> ps -ax | grep -v grep | grep xxx >> >> Here is what I see >> >> >> =A0# sh xxx >> 88318 =A0p0 =A0S+ =A0 =A0 0:00.00 sh xxx >> 88320 =A0p0 =A0R+ =A0 =A0 0:00.00 sh xxx >> 88321 =A0p0 =A0R+ =A0 =A0 0:00.00 sh xxx > > =A0 =A0No idea. jobs isn't a shell builtin so you can't verify what jobs > are currently running via the shell if there are any. What version of > FreeBSD are you using and what do your $ENV and .profile files look > like? Also, psauxww | grep -v grep | grep xxx would help. I would wait for a reply from Jilles, because it might be creating a subshell for each instance. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:40:07 2011 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 6B13C106566C for ; Wed, 2 Nov 2011 20:40:07 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 1BDB88FC23 for ; Wed, 2 Nov 2011 20:40:06 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id pA2Ke3p0074841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 2 Nov 2011 15:40:03 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id pA2Ke301091629 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 2 Nov 2011 15:40:03 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id pA2Ke38j091628; Wed, 2 Nov 2011 15:40:03 -0500 (CDT) (envelope-from dan) Date: Wed, 2 Nov 2011 15:40:03 -0500 From: Dan Nelson To: Mark Saad Message-ID: <20111102204002.GT93709@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.2 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Wed, 02 Nov 2011 15:40:03 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh 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, 02 Nov 2011 20:40:07 -0000 In the last episode (Nov 02), Mark Saad said: > Hackers > What is going on here, if I run the following shell script, what is > the expected output . The script is named xxx > > #!/bin/sh > ps -ax | grep -v grep | grep xxx > > Here is what I see > > # sh xxx > 88318 p0 S+ 0:00.00 sh xxx > 88320 p0 R+ 0:00.00 sh xxx > 88321 p0 R+ 0:00.00 sh xxx > > Can someone explain this ? What does your script do? If it contains subshells or pipelines, the main process will fork child processes to handle those. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:44:16 2011 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 E110E1065672 for ; Wed, 2 Nov 2011 20:44:15 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7201D8FC08 for ; Wed, 2 Nov 2011 20:44:15 +0000 (UTC) Received: by eyd10 with SMTP id 10so767017eyd.13 for ; Wed, 02 Nov 2011 13:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=O6Dm0cfN+B1wszV7wUvw5LhECO3FfThJaDSGOF3S6IY=; b=LXrxRAtmonWIYT6n9D/3pPhRnDzrqbtusy/vi0zfCTniyaWPTmctjBTezCqX9iIM90 0tETmQKNhMNuJYHIRGAdlh56pKNv51WHlkT9WjSy+iElJVDLPSy3haSFC2iO4vCyiweJ qdkbHiYZ54mNyjDlP8WF88nrp3v3hlBPiS7cI= MIME-Version: 1.0 Received: by 10.182.73.67 with SMTP id j3mr1212290obv.46.1320266654201; Wed, 02 Nov 2011 13:44:14 -0700 (PDT) Received: by 10.182.122.33 with HTTP; Wed, 2 Nov 2011 13:44:14 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Nov 2011 13:44:14 -0700 Message-ID: From: Garrett Cooper To: Navdeep Parhar Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers Subject: Re: incorrect parent refcounting in subr_firmware.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: Wed, 02 Nov 2011 20:44:17 -0000 On Wed, Nov 2, 2011 at 12:56 PM, Navdeep Parhar wrote: > I built a KLD with multiple firmware images, as shown here: > > KMOD=3Dfoo > FIRMWS=3D foo.bin:foo:1.0.0.0 > FIRMWS+=3Dbar.bin:bar:1.0.0.0 > FIRMWS+=3D ... > .include > > "foo" is the parent firmware and a firmware_get(foo) can autoload the > KLD. =A0"bar" and the rest are available only if the KLD is loaded (by > whatever means). =A0This is reasonable and works as expected. =A0But if I > just get and then put "foo" back, the KLD is not unloaded automatically. > > The problem is that a reference is placed on the parent firmware when > the other firmwares are registered (during module load). =A0I think this > reference should be placed during firmware_get on the child. > > What do people think about the attached patch? =A0It fixes things for me. It might be a generic problem; here's a similar (not exactly the same) issue: http://lists.freebsd.org/pipermail/freebsd-hackers/2010-August= /032714.html . Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:45:53 2011 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 AD0CA10657A7 for ; Wed, 2 Nov 2011 20:45:53 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 711BE8FC18 for ; Wed, 2 Nov 2011 20:45:53 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id pA2Kjqh5075348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 2 Nov 2011 15:45:52 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id pA2KjqhZ020471 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 2 Nov 2011 15:45:52 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id pA2Kjq9l020469; Wed, 2 Nov 2011 15:45:52 -0500 (CDT) (envelope-from dan) Date: Wed, 2 Nov 2011 15:45:51 -0500 From: Dan Nelson To: Mark Saad Message-ID: <20111102204551.GU93709@dan.emsphone.com> References: <20111102204002.GT93709@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111102204002.GT93709@dan.emsphone.com> X-OS: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.2 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Wed, 02 Nov 2011 15:45:52 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh 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, 02 Nov 2011 20:45:53 -0000 In the last episode (Nov 02), Dan Nelson said: > In the last episode (Nov 02), Mark Saad said: > > Hackers > > What is going on here, if I run the following shell script, what is > > the expected output . The script is named xxx > > > > #!/bin/sh > > ps -ax | grep -v grep | grep xxx > > > > Here is what I see > > > > # sh xxx > > 88318 p0 S+ 0:00.00 sh xxx > > 88320 p0 R+ 0:00.00 sh xxx > > 88321 p0 R+ 0:00.00 sh xxx > > > > Can someone explain this ? > > What does your script do? If it contains subshells or pipelines, the main > process will fork child processes to handle those. Sorry; I misread your original post. Yes, that script forks off two subshells to handle the pipeline, and the ps command caught the state where the subshells had been created but had not yet exec'ed their grep commands. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 21:14:40 2011 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 5A2FB1065675 for ; Wed, 2 Nov 2011 21:14:40 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1068FC19 for ; Wed, 2 Nov 2011 21:14:39 +0000 (UTC) Received: by qadz32 with SMTP id z32so810484qad.13 for ; Wed, 02 Nov 2011 14:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=0KthHb5ldAjhNBis1LyXJNsZaoyC8XpHJVbeosXHnss=; b=ATU4HreiAO9R1NBklP/5kAT9ly5NW58xFthK55/FQvkQE6oFspSNzUwvNKWzpxT78a W4AtlR7MXX/HhwPUUmHSf2c7rv76CQKb0RBgpYxUNcLdATEYuWg010n+aT5z8WESWZnH oGXqtfAGz4QYtoaHrn8RV0diydyt+ZGGg9ti8= MIME-Version: 1.0 Received: by 10.229.47.137 with SMTP id n9mr314056qcf.137.1320268478214; Wed, 02 Nov 2011 14:14:38 -0700 (PDT) Received: by 10.229.231.203 with HTTP; Wed, 2 Nov 2011 14:14:38 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Nov 2011 14:14:38 -0700 Message-ID: From: Navdeep Parhar To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers Subject: Re: incorrect parent refcounting in subr_firmware.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: Wed, 02 Nov 2011 21:14:40 -0000 On Wed, Nov 2, 2011 at 1:44 PM, Garrett Cooper wrote: > On Wed, Nov 2, 2011 at 12:56 PM, Navdeep Parhar wrote= : >> I built a KLD with multiple firmware images, as shown here: >> >> KMOD=3Dfoo >> FIRMWS=3D foo.bin:foo:1.0.0.0 >> FIRMWS+=3Dbar.bin:bar:1.0.0.0 >> FIRMWS+=3D ... >> .include >> >> "foo" is the parent firmware and a firmware_get(foo) can autoload the >> KLD. =A0"bar" and the rest are available only if the KLD is loaded (by >> whatever means). =A0This is reasonable and works as expected. =A0But if = I >> just get and then put "foo" back, the KLD is not unloaded automatically. >> >> The problem is that a reference is placed on the parent firmware when >> the other firmwares are registered (during module load). =A0I think this >> reference should be placed during firmware_get on the child. >> >> What do people think about the attached patch? =A0It fixes things for me= . > > =A0 =A0It might be a generic problem; here's a similar (not exactly the > same) issue: http://lists.freebsd.org/pipermail/freebsd-hackers/2010-Augu= st/032714.html That seems to be an entirely different issue. My problem is with the way a "parent" firmware is reference counted. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 21:27:45 2011 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 A08B4106566B; Wed, 2 Nov 2011 21:27:45 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 022858FC0A; Wed, 2 Nov 2011 21:27:44 +0000 (UTC) Received: by faar19 with SMTP id r19so1288377faa.13 for ; Wed, 02 Nov 2011 14:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=vLxVFL8Ng7fzciOQiDS7McpEcsrBkAAELZrYT/gjPh8=; b=MmsQ/8lTWsYAawc7RZvTHtBRdlItseB4MyLxIpL6JtqmS3YD6Sx8GsofTQocdGYLUK 6bhGsHf9vDc9r0wor5xd/tofKvUa1TbNYawdXMfzm2kRK7Z4wLQu40yPk40zdefHYDTG HPrzB/3mr3oFxkliIwpglE1WXMHukN9dSQ3DU= Received: by 10.223.92.135 with SMTP id r7mr11470385fam.35.1320269263892; Wed, 02 Nov 2011 14:27:43 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id a26sm7886607fac.2.2011.11.02.14.27.39 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Nov 2011 14:27:40 -0700 (PDT) From: Mikolaj Golub To: Kostik Belousov References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> X-Comment-To: Kostik Belousov Sender: Mikolaj Golub Date: Wed, 02 Nov 2011 23:27:37 +0200 In-Reply-To: <20111031094948.GB50300@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 31 Oct 2011 11:49:48 +0200") Message-ID: <86vcr21agm.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 02 Nov 2011 21:27:45 -0000 --=-=-= On Mon, 31 Oct 2011 11:49:48 +0200 Kostik Belousov wrote: KB> I think it is better to use sys/elf.h over the machine/elf.h. KB> Please change the comment for PROC_AUXV_MAX to "Safety limit on auxv size". KB> Also, it worth adding a comment saying that we are reading aux vectors twice, KB> first to get a size, second time to fetch a content, for simplicity. KB> When reading aux vector, if the PROC_AUXV_MAX entries are iterated over, KB> and we still not reached AT_NULL, the return error is 0. Was it intended ? KB> For PROC_ARG and PROC_ENV, you blindly trust the read values of the arg and KB> env vector sizes. This can easily cause kernel panics due to unability to KB> malloc the requested memory. I recommend to put some clump, and twice KB> of (PATH_MAX + ARG_MAX) is probably enough (see kern_exec.c, in particular, KB> exec_alloc_args). Also, you might use the swappable memory for the strings KB> as well, in the style of exec_alloc_args(). KB> I suspect this is my bug: Reading the GET_PS_STRINGS_CHUNK_SZ may validly KB> return EFAULT if the string is shorter than the chunk and aligned at KB> the end of the page, assuming the next page is not mapped. There should KB> be a fallback to fubyte() read loop. I remember that copyinstr() was KB> unsuitable. KB> The checks for P_WEXIT in the linprocfs routines look strange. Since KB> you are unlocking the process right after the check, it does not make KB> sense. In fact, the checks are not needed, I believe, since pseudofs KB> already did the hold (see e.g. pfs_read and pfs_visible). Here is an updated version of the patch. Also available at http://people.freebsd.org/~trociny/env.sys.1.patch I decided to use the same constant (PROC_VECTOR_MAX) for limiting both the number of arg or env strings and the numbex of aux vectors. Also I decided not to play with exec_alloc_args :-). -- Mikolaj Golub --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=env.sys.1.patch diff --git a/sys/sys/proc.h b/sys/sys/proc.h index fb97913..4949f98 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -168,6 +168,7 @@ struct p_sched; struct proc; struct procdesc; struct racct; +struct sbuf; struct sleepqueue; struct td_sched; struct thread; @@ -843,6 +844,10 @@ int p_canwait(struct thread *td, struct proc *p); struct pargs *pargs_alloc(int len); void pargs_drop(struct pargs *pa); void pargs_hold(struct pargs *pa); +int proc_getargv(struct thread *td, struct proc *p, struct sbuf *sb, + size_t nchr); +int proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb, + size_t nchr); void procinit(void); void proc_linkup0(struct proc *p, struct thread *td); void proc_linkup(struct proc *p, struct thread *td); diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 1e879f5..99ea342 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -559,6 +559,8 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; ); #define KERN_PROC_VMMAP 32 /* VM map entries for process */ #define KERN_PROC_FILEDESC 33 /* File descriptors for process */ #define KERN_PROC_GROUPS 34 /* process groups */ +#define KERN_PROC_ENV 35 /* get environment */ +#define KERN_PROC_AUXV 36 /* get ELF auxiliary vector */ /* * KERN_IPC identifiers diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 998e7ca..cc7c746 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -49,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -75,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef COMPAT_FREEBSD32 @@ -1356,6 +1360,290 @@ pargs_drop(struct pargs *pa) pargs_free(pa); } +static int +proc_read_mem(struct thread *td, struct proc *p, vm_offset_t offset, void* buf, + size_t len) +{ + struct iovec iov; + struct uio uio; + + iov.iov_base = (caddr_t)buf; + iov.iov_len = len; + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + uio.uio_offset = offset; + uio.uio_resid = (ssize_t)len; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_READ; + uio.uio_td = td; + + return (proc_rwmem(p, &uio)); +} + +static int +proc_read_string(struct thread *td, struct proc *p, const char *sptr, char *buf, + size_t len) +{ + size_t i; + int error, c; + + error = proc_read_mem(td, p, (vm_offset_t)sptr, buf, len); + /* + * Reading the chunk may validly return EFAULT if the string is shorter + * than the chunk and is aligned at the end of the page, assuming the + * next page is not mapped. So if EFAULT is returned do a fallback to + * fubyte() read loop. + */ + if (error == EFAULT) { + for (i = 0; i < len; i++) { + c = fubyte(sptr + i); + if (c < 0) + return (EFAULT); + buf[i] = (char)c; + if (c == '\0') + break; + } + error = 0; + } + return error; +} + +#define PROC_VECTOR_MAX 512 /* Safety limit on argv-like vector size. */ + +enum proc_vector_type { + PROC_ARG, + PROC_ENV, + PROC_AUX, +}; + +#ifdef COMPAT_FREEBSD32 +static int +get_proc_vector32(struct thread *td, struct proc *p, char ***proc_vectorp, + size_t *vsizep, enum proc_vector_type type) +{ + struct freebsd32_ps_strings pss; + Elf32_Auxinfo aux; + vm_offset_t vptr, ptr; + uint32_t *proc_vector32; + char **proc_vector; + size_t vsize, size; + int i, error; + + error = proc_read_mem(td, p, (vm_offset_t)(p->p_sysent->sv_psstrings), + &pss, sizeof(pss)); + if (error != 0) + return (error); + switch (type) { + case PROC_ARG: + vptr = (vm_offset_t)PTRIN(pss.ps_argvstr); + break; + case PROC_ENV: + vptr = (vm_offset_t)PTRIN(pss.ps_envstr); + break; + case PROC_AUX: + vptr = (vm_offset_t)PTRIN(pss.ps_envstr) + + (pss.ps_nenvstr + 1) * sizeof(int32_t); + break; + default: + KASSERT(0, ("Wrong proc vector type: %d", type)); + } + if (vptr + 1 < VM_MIN_ADDRESS + 1 || vptr >= VM_MAXUSER_ADDRESS) + return (ENOEXEC); + switch (type) { + case PROC_ARG: + vsize = pss.ps_nargvstr; + size = vsize * sizeof(int32_t); + break; + case PROC_ENV: + vsize = pss.ps_nenvstr; + size = vsize * sizeof(int32_t); + break; + case PROC_AUX: + for (ptr = vptr, i = 0; i < PROC_VECTOR_MAX; i++) { + error = proc_read_mem(td, p, ptr, &aux, sizeof(aux)); + if (error != 0) + return (error); + if (aux.a_type == AT_NULL) + break; + ptr += sizeof(aux); + } + vsize = i + 1; + size = vsize * sizeof(aux); + break; + default: + KASSERT(0, ("Wrong proc vector type: %d", type)); + } + if (vsize > PROC_VECTOR_MAX) + return (ENOEXEC); + proc_vector32 = malloc(size, M_TEMP, M_WAITOK); + error = proc_read_mem(td, p, vptr, proc_vector32, size); + if (error != 0) + goto done; + if (type == PROC_AUX) { + *proc_vectorp = (char **)proc_vector32; + *vsizep = vsize; + return (0); + } + proc_vector = malloc(vsize * sizeof(char *), M_TEMP, M_WAITOK); + for (i = 0; i < (int)vsize; i++) + proc_vector[i] = PTRIN(proc_vector32[i]); + *proc_vectorp = proc_vector; + *vsizep = vsize; +done: + free(proc_vector32, M_TEMP); + return (error); +} +#endif + +static int +get_proc_vector(struct thread *td, struct proc *p, char ***proc_vectorp, + size_t *vsizep, enum proc_vector_type type) +{ + struct ps_strings pss; + Elf_Auxinfo aux; + vm_offset_t vptr, ptr; + char **proc_vector; + size_t vsize, size; + int error, i; + +#ifdef COMPAT_FREEBSD32 + if (SV_PROC_FLAG(p, SV_ILP32) != 0) + return (get_proc_vector32(td, p, proc_vectorp, vsizep, type)); +#endif + error = proc_read_mem(td, p, (vm_offset_t)(p->p_sysent->sv_psstrings), + &pss, sizeof(pss)); + if (error != 0) + return (error); + switch (type) { + case PROC_ARG: + vptr = (vm_offset_t)pss.ps_argvstr; + break; + case PROC_ENV: + vptr = (vm_offset_t)pss.ps_envstr; + break; + case PROC_AUX: + /* + * The aux array is just above env array on the stack. + */ + vptr = (vm_offset_t)pss.ps_envstr + (pss.ps_nenvstr + 1) + * sizeof(char *); + break; + default: + KASSERT(0, ("Wrong proc vector type: %d", type)); + } + /* + * Check that that the address is in user space. + */ + if (vptr + 1 < VM_MIN_ADDRESS + 1 || vptr >= VM_MAXUSER_ADDRESS) + return (ENOEXEC); + switch (type) { + case PROC_ARG: + vsize = pss.ps_nargvstr; + size = vsize * sizeof(char *); + break; + case PROC_ENV: + vsize = pss.ps_nenvstr; + size = vsize * sizeof(char *); + break; + case PROC_AUX: + /* We count the array size reading the aux vectors from the + * stack until AT_NULL vector is returned. So (to keep the code + * simple) we read the process stack twice: the first time here + * to find the size and the second time when copying the vectors + * to the allocated proc_vector. + * + * If the PROC_VECTOR_MAX entries are iterated over, and we + * not reach AT_NULL, it is most likely we are reading wrong + * data: either the process doesn't have auxv array or data has + * been modified. In this case the error will be returned. + */ + for (ptr = vptr, i = 0; i < PROC_VECTOR_MAX; i++) { + error = proc_read_mem(td, p, ptr, &aux, sizeof(aux)); + if (error != 0) + return (error); + if (aux.a_type == AT_NULL) + break; + ptr += sizeof(aux); + } + vsize = i + 1; + size = vsize * sizeof(aux); + break; + default: + KASSERT(0, ("Wrong proc vector type: %d", type)); + } + /* + * Check that there aren't an unreasonable number of entries. + */ + if (vsize > PROC_VECTOR_MAX) + return (ENOEXEC); + proc_vector = malloc(size, M_TEMP, M_WAITOK); + if (proc_vector == NULL) + return (ENOMEM); + error = proc_read_mem(td, p, vptr, proc_vector, size); + if (error != 0) { + free(proc_vector, M_TEMP); + return (error); + } + *proc_vectorp = proc_vector; + *vsizep = vsize; + + return (0); +} + +#define GET_PS_STRINGS_CHUNK_SZ 256 /* Chunk size (bytes) for ps_strings operations. */ + +static int +get_ps_strings(struct thread *td, struct proc *p, struct sbuf *sb, + enum proc_vector_type type, size_t nchr) +{ + size_t done, len, vsize; + int error, i; + char **proc_vector, *sptr; + char pss_string[GET_PS_STRINGS_CHUNK_SZ]; + + /* + * We are not going to read more than 2 * (PATH_MAX + ARG_MAX) bytes. + */ + if (nchr > 2 * (PATH_MAX + ARG_MAX)) + nchr = 2 * (PATH_MAX + ARG_MAX); + + error = get_proc_vector(td, p, &proc_vector, &vsize, type); + if (error != 0) + return (error); + for (done = 0, i = 0; i < (int)vsize && done < nchr; i++) { + for (sptr = proc_vector[i]; ; sptr += GET_PS_STRINGS_CHUNK_SZ) { + error = proc_read_string(td, p, sptr, pss_string, + sizeof(pss_string)); + if (error != 0) + goto done; + len = strnlen(pss_string, GET_PS_STRINGS_CHUNK_SZ); + if (done + len >= nchr) + len = nchr - done - 1; + sbuf_bcat(sb, pss_string, len); + if (len != GET_PS_STRINGS_CHUNK_SZ) + break; + done += GET_PS_STRINGS_CHUNK_SZ; + } + sbuf_bcat(sb, "", 1); + done += len + 1; + } +done: + free(proc_vector, M_TEMP); + return (error); +} + +int +proc_getargv(struct thread *td, struct proc *p, struct sbuf *sb, size_t nchr) +{ + return (get_ps_strings(curthread, p, sb, PROC_ARG, nchr)); +} + +int +proc_getenvv(struct thread *td, struct proc *p, struct sbuf *sb, size_t nchr) +{ + return (get_ps_strings(curthread, p, sb, PROC_ENV, nchr)); +} + /* * This sysctl allows a process to retrieve the argument list or process * title for another process without groping around in the address space @@ -1369,7 +1657,8 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS) u_int namelen = arg2; struct pargs *newpa, *pa; struct proc *p; - int error = 0; + struct sbuf sb; + int error = 0, error2; if (namelen != 1) return (EINVAL); @@ -1389,11 +1678,24 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS) } pa = p->p_args; - pargs_hold(pa); - PROC_UNLOCK(p); - if (pa != NULL) + if (pa != NULL) { + pargs_hold(pa); + PROC_UNLOCK(p); error = SYSCTL_OUT(req, pa->ar_args, pa->ar_length); - pargs_drop(pa); + pargs_drop(pa); + } else if ((p->p_flag & (P_WEXIT | P_SYSTEM)) == 0) { + _PHOLD(p); + PROC_UNLOCK(p); + sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req); + error = proc_getargv(curthread, p, &sb, req->oldlen); + error2 = sbuf_finish(&sb); + PRELE(p); + sbuf_delete(&sb); + if (error == 0 && error2 != 0) + error = error2; + } else { + PROC_UNLOCK(p); + } if (error != 0 || req->newptr == NULL) return (error); @@ -1414,6 +1716,95 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS) } /* + * This sysctl allows a process to retrieve environment of another process. + */ +static int +sysctl_kern_proc_env(SYSCTL_HANDLER_ARGS) +{ + int *name = (int*) arg1; + u_int namelen = arg2; + struct proc *p; + struct sbuf sb; + int error, error2; + + if (namelen != 1) + return (EINVAL); + + p = pfind((pid_t)name[0]); + if (p == NULL) + return (ESRCH); + if (p->p_flag & P_WEXIT) { + PROC_UNLOCK(p); + return (ESRCH); + } + if ((error = p_candebug(curthread, p)) != 0) { + PROC_UNLOCK(p); + return (error); + } + if (p->p_flag & P_SYSTEM) { + PROC_UNLOCK(p); + return (0); + } + _PHOLD(p); + PROC_UNLOCK(p); + sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req); + error = proc_getenvv(curthread, p, &sb, req->oldlen); + error2 = sbuf_finish(&sb); + PRELE(p); + sbuf_delete(&sb); + return (error != 0 ? error : error2); +} + +/* + * This sysctl allows a process to retrieve ELF auxiliary vector of + * another process. + */ +static int +sysctl_kern_proc_auxv(SYSCTL_HANDLER_ARGS) +{ + int *name = (int*) arg1; + u_int namelen = arg2; + struct proc *p; + size_t vsize; + char **auxv; + int error; + + if (namelen != 1) + return (EINVAL); + + p = pfind((pid_t)name[0]); + if (p == NULL) + return (ESRCH); + if (p->p_flag & P_WEXIT) { + PROC_UNLOCK(p); + return (ESRCH); + } + if ((error = p_cansee(curthread, p)) != 0) { + PROC_UNLOCK(p); + return (error); + } + if (p->p_flag & P_SYSTEM) { + PROC_UNLOCK(p); + return (0); + } + _PHOLD(p); + PROC_UNLOCK(p); + error = get_proc_vector(curthread, p, &auxv, &vsize, PROC_AUX); + PRELE(p); + if (error == 0) { +#ifdef COMPAT_FREEBSD32 + if (SV_PROC_FLAG(p, SV_ILP32) != 0) + error = SYSCTL_OUT(req, auxv, vsize * + sizeof(Elf32_Auxinfo)); + else +#endif + error = SYSCTL_OUT(req, auxv, vsize * sizeof(Elf_Auxinfo)); + free(auxv, M_TEMP); + } + return (error); +} + +/* * This sysctl allows a process to retrieve the path of the executable for * itself or another process. */ @@ -2026,6 +2417,14 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC_ARGS, args, CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_args, "Process argument list"); +static SYSCTL_NODE(_kern_proc, KERN_PROC_ENV, env, + CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, + sysctl_kern_proc_env, "Process environment"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_AUXV, auxv, + CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, + sysctl_kern_proc_auxv, "Process ELF auxiliary vector"); + static SYSCTL_NODE(_kern_proc, KERN_PROC_PATHNAME, pathname, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_kern_proc_pathname, "Process executable path"); diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 8832d3d..12e7664 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -919,150 +919,6 @@ linprocfs_doprocroot(PFS_FILL_ARGS) return (0); } -#define MAX_ARGV_STR 512 /* Max number of argv-like strings */ -#define UIO_CHUNK_SZ 256 /* Max chunk size (bytes) for uiomove */ - -static int -linprocfs_doargv(struct thread *td, struct proc *p, struct sbuf *sb, - void (*resolver)(const struct ps_strings, u_long *, int *)) -{ - struct iovec iov; - struct uio tmp_uio; - struct ps_strings pss; - int ret, i, n_elements, elm_len; - u_long addr, pbegin; - char **env_vector, *envp; - char env_string[UIO_CHUNK_SZ]; -#ifdef COMPAT_FREEBSD32 - struct freebsd32_ps_strings pss32; - uint32_t *env_vector32; -#endif - -#define UIO_HELPER(uio, iov, base, len, cnt, offset, sz, flg, rw, td) \ -do { \ - iov.iov_base = (caddr_t)(base); \ - iov.iov_len = (len); \ - uio.uio_iov = &(iov); \ - uio.uio_iovcnt = (cnt); \ - uio.uio_offset = (off_t)(offset); \ - uio.uio_resid = (sz); \ - uio.uio_segflg = (flg); \ - uio.uio_rw = (rw); \ - uio.uio_td = (td); \ -} while (0) - - env_vector = malloc(sizeof(char *) * MAX_ARGV_STR, M_TEMP, M_WAITOK); - -#ifdef COMPAT_FREEBSD32 - env_vector32 = NULL; - if (SV_PROC_FLAG(p, SV_ILP32) != 0) { - env_vector32 = malloc(sizeof(*env_vector32) * MAX_ARGV_STR, - M_TEMP, M_WAITOK); - elm_len = sizeof(int32_t); - envp = (char *)env_vector32; - - UIO_HELPER(tmp_uio, iov, &pss32, sizeof(pss32), 1, - (off_t)(p->p_sysent->sv_psstrings), - sizeof(pss32), UIO_SYSSPACE, UIO_READ, td); - ret = proc_rwmem(p, &tmp_uio); - if (ret != 0) - goto done; - pss.ps_argvstr = PTRIN(pss32.ps_argvstr); - pss.ps_nargvstr = pss32.ps_nargvstr; - pss.ps_envstr = PTRIN(pss32.ps_envstr); - pss.ps_nenvstr = pss32.ps_nenvstr; - } else { -#endif - elm_len = sizeof(char *); - envp = (char *)env_vector; - - UIO_HELPER(tmp_uio, iov, &pss, sizeof(pss), 1, - (off_t)(p->p_sysent->sv_psstrings), - sizeof(pss), UIO_SYSSPACE, UIO_READ, td); - ret = proc_rwmem(p, &tmp_uio); - if (ret != 0) - goto done; -#ifdef COMPAT_FREEBSD32 - } -#endif - - /* Get the array address and the number of elements */ - resolver(pss, &addr, &n_elements); - - /* Consistent with lib/libkvm/kvm_proc.c */ - if (n_elements > MAX_ARGV_STR) { - ret = E2BIG; - goto done; - } - - UIO_HELPER(tmp_uio, iov, envp, n_elements * elm_len, 1, - (vm_offset_t)(addr), iov.iov_len, UIO_SYSSPACE, UIO_READ, td); - ret = proc_rwmem(p, &tmp_uio); - if (ret != 0) - goto done; -#ifdef COMPAT_FREEBSD32 - if (env_vector32 != NULL) { - for (i = 0; i < n_elements; i++) - env_vector[i] = PTRIN(env_vector32[i]); - } -#endif - - /* Now we can iterate through the list of strings */ - for (i = 0; i < n_elements; i++) { - pbegin = (vm_offset_t)env_vector[i]; - for (;;) { - UIO_HELPER(tmp_uio, iov, env_string, sizeof(env_string), - 1, pbegin, iov.iov_len, UIO_SYSSPACE, UIO_READ, td); - ret = proc_rwmem(p, &tmp_uio); - if (ret != 0) - goto done; - - if (!strvalid(env_string, UIO_CHUNK_SZ)) { - /* - * We didn't find the end of the string. - * Add the string to the buffer and move - * the pointer. But do not allow strings - * of unlimited length. - */ - sbuf_bcat(sb, env_string, UIO_CHUNK_SZ); - if (sbuf_len(sb) >= ARG_MAX) { - ret = E2BIG; - goto done; - } - pbegin += UIO_CHUNK_SZ; - } else { - sbuf_cat(sb, env_string); - break; - } - } - sbuf_bcat(sb, "", 1); - } -#undef UIO_HELPER - -done: - free(env_vector, M_TEMP); -#ifdef COMPAT_FREEBSD32 - free(env_vector32, M_TEMP); -#endif - return (ret); -} - -static void -ps_string_argv(const struct ps_strings ps, u_long *addr, int *n) -{ - - *addr = (u_long) ps.ps_argvstr; - *n = ps.ps_nargvstr; -} - -static void -ps_string_env(const struct ps_strings ps, u_long *addr, int *n) -{ - - *addr = (u_long) ps.ps_envstr; - *n = ps.ps_nenvstr; -} - /* * Filler function for proc/pid/cmdline */ @@ -1090,9 +946,15 @@ linprocfs_doproccmdline(PFS_FILL_ARGS) PROC_UNLOCK(p); return (0); } + + if ((p->p_flag & P_SYSTEM) != 0) { + PROC_UNLOCK(p); + return (0); + } + PROC_UNLOCK(p); - ret = linprocfs_doargv(td, p, sb, ps_string_argv); + ret = proc_getargv(td, p, sb, ARG_MAX); return (ret); } @@ -1118,9 +980,15 @@ linprocfs_doprocenviron(PFS_FILL_ARGS) PROC_UNLOCK(p); return (0); } + + if ((p->p_flag & P_SYSTEM) != 0) { + PROC_UNLOCK(p); + return (0); + } + PROC_UNLOCK(p); - ret = linprocfs_doargv(td, p, sb, ps_string_env); + ret = proc_getenvv(td, p, sb, ARG_MAX); return (ret); } --=-=-=-- From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 23:56:07 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 64DD3106566C; Wed, 2 Nov 2011 23:56:07 +0000 (UTC) Date: Wed, 2 Nov 2011 23:56:07 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20111102235607.GA61095@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: question regarding style(9) and field initialisers in structs 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, 02 Nov 2011 23:56:07 -0000 i sent the following message to freebsd-quaestions@ and got no answer. mybe it is better suited for freebsd-hackers@. hi there, i found hundreds of the following cases in the FreeBSD src: [...] struct periph_driver { periph_init_func_t init; char *driver_name; TAILQ_HEAD(,cam_periph) units; u_int generation; u_int flags; #define CAM_PERIPH_DRV_EARLY 0x01 }; [...] static struct periph_driver dadriver = { dainit, "da", TAILQ_HEAD_INITIALIZER(dadriver.units), /* generation */ 0 }; ...is it proper programming practice to forget about the last field, if it would have been initialised to 0? cheers. alex From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 00:42:48 2011 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 0B80D106564A for ; Thu, 3 Nov 2011 00:42:48 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id C07DA8FC0A for ; Thu, 3 Nov 2011 00:42:47 +0000 (UTC) Received: by ywt32 with SMTP id 32so983924ywt.13 for ; Wed, 02 Nov 2011 17:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5VH+94CoHAqH3NkM9K2YLqAKqsF992qu1viIwDU/PqY=; b=cXAp5iJ6S4RXmGm5cEJdaKEY+sDjLHeaT+K7k2133SUcS1nMUyQ1/wulDvkhWhjUGH rOEy5TbVnZ+mxb/Y4poCE8nLdA4Xpvde22ZXQezk66oVgLOwgNQfxo5nOsuF4/8uwa6m 9E0u1IjFy8N+0+UdTgmZ96azHGzS2rLDwe8co= MIME-Version: 1.0 Received: by 10.68.72.33 with SMTP id a1mr8079581pbv.44.1320280966476; Wed, 02 Nov 2011 17:42:46 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.57.40 with HTTP; Wed, 2 Nov 2011 17:42:46 -0700 (PDT) In-Reply-To: <20111102235607.GA61095@freebsd.org> References: <20111102235607.GA61095@freebsd.org> Date: Wed, 2 Nov 2011 17:42:46 -0700 X-Google-Sender-Auth: a0by_CVEovNSY5IcOTHGyK8ga3g Message-ID: From: mdf@FreeBSD.org To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: question regarding style(9) and field initialisers in structs 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, 03 Nov 2011 00:42:48 -0000 On Wed, Nov 2, 2011 at 4:56 PM, Alexander Best wrote: > i sent the following message to freebsd-quaestions@ and got no answer. my= be it > is better suited for freebsd-hackers@. > > hi there, > > i found hundreds of the following cases in the FreeBSD src: > > [...] > struct periph_driver { > =A0 =A0 =A0 =A0periph_init_func_t =A0 =A0 =A0init; > =A0 =A0 =A0 =A0char =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*driver_name; > =A0 =A0 =A0 =A0TAILQ_HEAD(,cam_periph) units; > =A0 =A0 =A0 =A0u_int =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 generation; > =A0 =A0 =A0 =A0u_int =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 flags; > =A0 =A0 =A0 =A0#define CAM_PERIPH_DRV_EARLY =A0 =A00x01 > }; > [...] > static struct periph_driver dadriver =3D > { > =A0 =A0 =A0 =A0dainit, "da", > =A0 =A0 =A0 =A0TAILQ_HEAD_INITIALIZER(dadriver.units), /* generation */ 0 > }; > > ...is it proper programming practice to forget about the last field, if i= t > would have been initialised to 0? It's more likely that, in this instance, the field was added after the initializer. Without named initializers, all fields until the last non-zero one need to be explicitly present. style(9) doesn't address it, having been written too long ago, but IMO initializations in a C translation unit [1] should use C99's named initializer feature, to protect against future member re-ordering. And it would be style(9) compliant to leave out any field whose initial value is zero (though sometimes it's good to list it anyways to make it clear that 0 was the desired value). [1] Note that C++ doesn't support C99's named initializer syntax (even in C++0x, which is a bit silly), so any struct initializers in a header file like must use old-style, since FreeBSD should continue to support writing kernel modules in C++. Cheers, matthew From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 05:18:25 2011 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 92916106564A for ; Thu, 3 Nov 2011 05:18:25 +0000 (UTC) (envelope-from Deepak.Gupta2@citrix.com) Received: from SMTP.CITRIX.COM.AU (smtp.citrix.com.au [203.166.19.134]) by mx1.freebsd.org (Postfix) with ESMTP id A5FDE8FC08 for ; Thu, 3 Nov 2011 05:18:24 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.69,447,1315180800"; d="scan'208,217";a="9190347" Received: from banpmailmx02.citrite.net ([10.103.128.74]) by SYDPIPO01.CITRIX.COM.AU with ESMTP/TLS/RC4-MD5; 03 Nov 2011 05:08:20 +0000 Received: from BANPMAILBOX01.citrite.net ([10.103.128.72]) by BANPMAILMX02.citrite.net ([10.103.128.74]) with mapi; Thu, 3 Nov 2011 10:37:58 +0530 From: Deepak Gupta To: "freebsd-hackers@freebsd.org" Date: Thu, 3 Nov 2011 10:37:57 +0530 Thread-Topic: sleep/select call in a thread doesn't return if system date is changed Thread-Index: AcyZ5HCtkcZS3JTKTx+2hzFqSZFn1AAAg3zQ Message-ID: <64FB1554ABC9B44FAA773FBD6CB889C2E1CB205ADA@BANPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 03 Nov 2011 11:11:54 +0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: RE: sleep/select call in a thread doesn't return if system date is changed 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, 03 Nov 2011 05:18:25 -0000 From: Deepak Gupta Sent: Thursday, November 03, 2011 10:37 AM To: 'freebsd-hackers@freebsd.org.' Subject: sleep/select call in a thread doesn't return if system date is cha= nged I have already checked these two very old messages from 2005 archive http://lists.freebsd.org/pipermail/freebsd-hackers/2005-Feb= ruary/010498.html http://lists.freebsd.org/pipermail/freebsd-hackers/2005-February/010482.htm= l but I'm surprised to see the same behavior still after 6 years in 6.3 relea= se. Has anybody else also faced this anomaly? Following is output of "uname -a" on my system "FreeBSD Freebsd_31.203 6.3-RELEASE FreeBSD 6.3-RELEASE #0:= Wed Jan 16 01:43:02 UTC 2008 root@palmer.cse.buffalo.edu:/usr/obj/usr/= src/sys/SMP a= md64" Following is the source code I'm testing: #include #include #include void *task(void *argument) { struct timeval tv; tv.tv_sec =3D 4; tv.tv_usec =3D 0; int rc; while(1) { tv.tv_sec =3D 5; tv.tv_usec =3D 0; printf("sleeping for 5 secs\n"); rc =3D select(0, NULL, NULL, NULL, &tv); printf("Woke up after 5 sec\n"); } } int main(void) { pthread_t thread; int rc; rc =3D pthread_create(&thread, NULL, task, (void *) NULL); rc =3D pthread_join(thread, NULL); } Upon execution the program keeps printing "sleeping for 5 secs" followed by= "Woke up after 5 sec". As soon as I set the system date to a back date, ev= en if few hours back, the loop sticks at "sleeping for 5 secs" forever unle= ss I resume the system date. When I resume the system date to current date = the program also resumes to normal execution!!! I'm sure that FreeBSD will still not be living with such a big anomaly and = there is something amiss in my program itself. Please help me to figure out= whats wrong in this. Thanks Deepak From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 09:22:25 2011 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 34DEC106564A for ; Thu, 3 Nov 2011 09:22:25 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) by mx1.freebsd.org (Postfix) with ESMTP id BA90B8FC08 for ; Thu, 3 Nov 2011 09:22:24 +0000 (UTC) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mail.0x20.net (Postfix) with ESMTP id 8B0ED6A61CD for ; Thu, 3 Nov 2011 10:22:23 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.0x20.net Received: from mail.0x20.net ([217.69.76.211]) by mail.0x20.net (mail.0x20.net [217.69.76.211]) (amavisd-new, port 10024) with ESMTP id wSd3GY3iEq8T for ; Thu, 3 Nov 2011 10:22:23 +0100 (CET) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 416EC6A6016 for ; Thu, 3 Nov 2011 10:22:23 +0100 (CET) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.4/8.14.4) with ESMTP id pA39MNo3017328 for ; Thu, 3 Nov 2011 10:22:23 +0100 (CET) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.4/8.14.4/Submit) id pA39MMTg015939 for hackers@freebsd.org; Thu, 3 Nov 2011 10:22:22 +0100 (CET) (envelope-from lars) Date: Thu, 3 Nov 2011 10:22:22 +0100 From: Lars Engels To: hackers@freebsd.org Message-ID: <20111103092222.GN37036@e-new.0x20.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="95CBLwa+io9O2zXc" Content-Disposition: inline X-Editor: VIM - Vi IMproved 7.3 X-Operation-System: FreeBSD 8.2-RELEASE-p3 User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Thu, 03 Nov 2011 11:37:00 +0000 Cc: Subject: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 09:22:25 -0000 --95CBLwa+io9O2zXc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi Hackers, maybe you've heard of the upcoming Raspberry Pi, a credit card sized ARM computer which is about to get sold for 25$ - 35$ from december on. http://www.raspberrypi.org/archives/302 Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details The first charge will be 10,000 pieces, so there's a fair chance that one can actually buy a board. If someone is willing to port FreeBSD to the Raspberry, I'd try to get one of the boards and send it to the porter. Cheers Lars --95CBLwa+io9O2zXc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6yXU4ACgkQKc512sD3afhMQwCfQ0Y1sRVDV8loGe+Hz1CXxA15 K1UAoJZbto9XoNWyEoT6kU/B7n/UKpo/ =swPi -----END PGP SIGNATURE----- --95CBLwa+io9O2zXc-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 14:09:33 2011 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 537231065670 for ; Thu, 3 Nov 2011 14:09:33 +0000 (UTC) (envelope-from richo@psych0tik.net) Received: from bedford.accountservergroup.com (bedford.accountservergroup.com [50.22.11.19]) by mx1.freebsd.org (Postfix) with ESMTP id 2CFB98FC0A for ; Thu, 3 Nov 2011 14:09:32 +0000 (UTC) Received: from ppp118-209-16-75.lns20.mel4.internode.on.net ([118.209.16.75] helo=vesper.psych0tik.net) by bedford.accountservergroup.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1RLxCs-0005JS-Mp; Thu, 03 Nov 2011 08:19:47 -0500 Date: Fri, 4 Nov 2011 00:19:38 +1100 From: richo To: Lars Engels Message-ID: <20111103131938.GA10680@vesper.psych0tik.net> References: <20111103092222.GN37036@e-new.0x20.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <20111103092222.GN37036@e-new.0x20.net> X-PGP-Key: http://natalya.psych0tik.net/~richo/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bedford.accountservergroup.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - psych0tik.net X-Source: X-Source-Args: X-Source-Dir: Cc: hackers@freebsd.org Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 14:09:33 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On 03/11/11 10:22 +0100, Lars Engels wrote: >Hi Hackers, > >maybe you've heard of the upcoming Raspberry Pi, a credit card sized ARM >computer which is about to get sold for 25$ - 35$ from december on. > >http://www.raspberrypi.org/archives/302 > >Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details > >The first charge will be 10,000 pieces, so there's a fair chance that >one can actually buy a board. > >If someone is willing to port FreeBSD to the Raspberry, I'd try to get >one of the boards and send it to the porter. > >Cheers >Lars I am planning to attempt a port, however I'm very new to kernel development/FreeBSD and would not feel right about accepting hardware for a project I'm not sure I have the skills to finish. To that end I'll be buying boards on release date, but would be interested in working with anyone else who is attempting it. cheers richo -- richo || Today's excuse: static from plastic slide rules --DocE+STaALJfprDB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJOspTqAAoJEIKiWz6J5yQVfR4IAKfJdbnnT8z7HuQKPyT5vyRz WsCzyU/ze499nRIOE0XaDh+/N+0bItKoCs8wgOmpk/dOrXbCwFDfL7ZduNGNJHpa mQeXonW409yTvKFqlMnXKIIZZCLhWjG0fqcEDvtZ5b6JP+lHEU07AHmZmHCLGn6k 4uMpvR4dcXBs3936ljpYRBSQ3V0IsUHNuaqPJgwRxZUCQpW0v4jZz+HfuufLSZrQ 4BLF+DuIYfAQo6sbGHTCYonbexPOzdkNTKT7kdw9+F2Z+ILgRZ/AYOTOXt4HcpHp PMzUfAvkxNYK/GHO4Sx95Inr4h0b7cBH6UIy+qGWUXzNteQt2BbMuoEMvgyly5U= =VhzH -----END PGP SIGNATURE----- --DocE+STaALJfprDB-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 14:30:38 2011 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 5FDEB106566C for ; Thu, 3 Nov 2011 14:30:38 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1C38FC17 for ; Thu, 3 Nov 2011 14:30:37 +0000 (UTC) Received: from [192.168.99.1] (helo=terran.dlink.ua) by dlink.ua with smtp (Exim 4.63) (envelope-from ) id 1RLxkd-00069N-9k; Thu, 03 Nov 2011 15:54:40 +0200 Date: Thu, 3 Nov 2011 15:58:02 +0200 From: Aleksandr Rybalko To: Lars Engels Message-Id: <20111103155802.7bfc1df0.ray@freebsd.org> In-Reply-To: <20111103092222.GN37036@e-new.0x20.net> References: <20111103092222.GN37036@e-new.0x20.net> Organization: FreeBSD Project X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 14:30:38 -0000 On Thu, 3 Nov 2011 10:22:22 +0100 Lars Engels wrote: >> Hi Hackers, >> >> maybe you've heard of the upcoming Raspberry Pi, a credit card sized >> ARM computer which is about to get sold for 25$ - 35$ from december >> on. >> >> http://www.raspberrypi.org/archives/302 >> >> Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details >> >> The first charge will be 10,000 pieces, so there's a fair chance that >> one can actually buy a board. >> >> If someone is willing to port FreeBSD to the Raspberry, I'd try to >> get one of the boards and send it to the porter. >> >> Cheers >> Lars Hi Lars, I seen info about Raspberry Pi, this is very nice hardware. It will be fun to port FreeBSD on it, since I already have experience with Broadcom SoC's. But device have undocumented parts, so writing driver for it maybe impossible or very hard (through a lot of RE). Anyway, it would be nice to play with it. WBW -- Aleksandr Rybalko From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 15:12:37 2011 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 AAC07106564A for ; Thu, 3 Nov 2011 15:12:37 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 1A14F8FC18 for ; Thu, 3 Nov 2011 15:12:36 +0000 (UTC) Received: by wwp14 with SMTP id 14so2097392wwp.31 for ; Thu, 03 Nov 2011 08:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PB6mvuCtWc8kKdD7/4Ls4v2eA2Fa+tnSprYjfMv2S1I=; b=hLDLUYKa4gKhQepzwhjEa57ciQNTD95mGJ40r+dAQQePH0G73IukmqQ6Ei6o/woog7 FdK/HmJdWpj50GPUIiDIHcnDA5cGlJOA1moZcsDR969+ayyTsM7Y7VOb8EmKERVwPjWo vKCbQscQgqWL/Ax9CM/NxtNpswKGtugD+FG1Q= MIME-Version: 1.0 Received: by 10.227.198.77 with SMTP id en13mr12296348wbb.28.1320333155852; Thu, 03 Nov 2011 08:12:35 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Thu, 3 Nov 2011 08:12:35 -0700 (PDT) In-Reply-To: <20111103155802.7bfc1df0.ray@freebsd.org> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> Date: Thu, 3 Nov 2011 11:12:35 -0400 Message-ID: From: Arnaud Lacombe To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 15:12:37 -0000 Hi, On Thu, Nov 3, 2011 at 9:58 AM, Aleksandr Rybalko wrote: > On Thu, 3 Nov 2011 10:22:22 +0100 > Lars Engels wrote: > >>> Hi Hackers, >>> >>> maybe you've heard of the upcoming Raspberry Pi, a credit card sized >>> ARM computer which is about to get sold for 25$ - 35$ from december >>> on. >>> >>> http://www.raspberrypi.org/archives/302 >>> >>> Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details >>> >>> The first charge will be 10,000 pieces, so there's a fair chance that >>> one can actually buy a board. >>> >>> If someone is willing to port FreeBSD to the Raspberry, I'd try to >>> get one of the boards and send it to the porter. >>> >>> Cheers >>> Lars > > Hi Lars, > > I seen info about Raspberry Pi, this is very nice hardware. > Are you kidding ? ARM11 is a 10 year old core, not much to be really proud with. The only interesting thing about the Pi is its price tag, but as you point out, if we don't have datasheets upfront, it's not going to be much than a $25 paper-weight. Btw, do FreeBSD provide any KPI for hardware video "accelerator" ? AFAIK, we do not even have such framework for crypto accelerator, so I serious doubt there is any for video :/ - Arnaud > It will be > fun to port FreeBSD on it, since I already have experience with > Broadcom SoC's. But device have undocumented parts, so writing driver > for it maybe impossible or very hard (through a lot of RE). > > Anyway, it would be nice to play with it. > > WBW > -- > Aleksandr Rybalko > _______________________________________________ > 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 Thu Nov 3 15:28:20 2011 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 EB365106568B for ; Thu, 3 Nov 2011 15:28:20 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 835E08FC18 for ; Thu, 3 Nov 2011 15:28:20 +0000 (UTC) Received: by faar19 with SMTP id r19so2471280faa.13 for ; Thu, 03 Nov 2011 08:28:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.7.14 with SMTP id b14mr17727661fab.10.1320334099500; Thu, 03 Nov 2011 08:28:19 -0700 (PDT) Received: by 10.223.96.133 with HTTP; Thu, 3 Nov 2011 08:28:19 -0700 (PDT) X-Originating-IP: [68.239.250.164] In-Reply-To: <4EB1A990.7080001@FreeBSD.org> References: <4EB1A990.7080001@FreeBSD.org> Date: Thu, 3 Nov 2011 11:28:19 -0400 Message-ID: From: Mark Saad To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: What is going on with ash / sh 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, 03 Nov 2011 15:28:21 -0000 On Wed, Nov 2, 2011 at 4:35 PM, Doug Barton wrote: > On 11/02/2011 13:28, Mark Saad wrote: >> Hackers >> =C2=A0What is going on here, if I run the following shell script, what i= s >> the expected output . The script is named xxx >> >> #!/bin/sh >> ps -ax | grep -v grep | grep xxx >> >> Here is what I see >> >> >> =C2=A0# sh xxx >> 88318 =C2=A0p0 =C2=A0S+ =C2=A0 =C2=A0 0:00.00 sh xxx >> 88320 =C2=A0p0 =C2=A0R+ =C2=A0 =C2=A0 0:00.00 sh xxx >> 88321 =C2=A0p0 =C2=A0R+ =C2=A0 =C2=A0 0:00.00 sh xxx >> >> >> Can someone explain this ? > > I only see one. What happens if you run this on the command line? > > if you run it from the command line you only see on process. > > -- > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"We could put the = whole Internet into a book." > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"Too practical." > > =C2=A0 =C2=A0 =C2=A0 =C2=A0Breadth of IT experience, and depth of knowled= ge in the DNS. > =C2=A0 =C2=A0 =C2=A0 =C2=A0Yours for the right price. =C2=A0:) =C2=A0http= ://SupersetSolutions.com/ > > --=20 mark saad | nonesuch@longcount.org From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 15:31:30 2011 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 65CF0106564A for ; Thu, 3 Nov 2011 15:31:30 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id EE9548FC19 for ; Thu, 3 Nov 2011 15:31:29 +0000 (UTC) Received: by faar19 with SMTP id r19so2477489faa.13 for ; Thu, 03 Nov 2011 08:31:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.14.3 with SMTP id e3mr17636279faa.25.1320334288774; Thu, 03 Nov 2011 08:31:28 -0700 (PDT) Received: by 10.223.96.133 with HTTP; Thu, 3 Nov 2011 08:31:28 -0700 (PDT) X-Originating-IP: [68.239.250.164] In-Reply-To: References: Date: Thu, 3 Nov 2011 11:31:28 -0400 Message-ID: From: Mark Saad To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh 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, 03 Nov 2011 15:31:30 -0000 On Wed, Nov 2, 2011 at 4:37 PM, Garrett Cooper wrote: > On Wed, Nov 2, 2011 at 1:28 PM, Mark Saad wrote: >> Hackers >> =C2=A0What is going on here, if I run the following shell script, what i= s >> the expected output . The script is named xxx >> >> #!/bin/sh >> ps -ax | grep -v grep | grep xxx >> >> Here is what I see >> >> >> =C2=A0# sh xxx >> 88318 =C2=A0p0 =C2=A0S+ =C2=A0 =C2=A0 0:00.00 sh xxx >> 88320 =C2=A0p0 =C2=A0R+ =C2=A0 =C2=A0 0:00.00 sh xxx >> 88321 =C2=A0p0 =C2=A0R+ =C2=A0 =C2=A0 0:00.00 sh xxx > > =C2=A0 =C2=A0No idea. jobs isn't a shell builtin so you can't verify what= jobs > are currently running via the shell if there are any. What version of > FreeBSD are you using and what do your $ENV and .profile files look > like? > Thanks, > -Garrett > I ran this test on 7.3-RELEASE and 8.2-RELEASE and I do not have anything weird in my .profiles or env. This is on a fresh install of each os. --=20 mark saad | nonesuch@longcount.org From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 15:33:27 2011 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 5A3391065672; Thu, 3 Nov 2011 15:33:27 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id B8ACF8FC17; Thu, 3 Nov 2011 15:33:26 +0000 (UTC) Received: by wwp14 with SMTP id 14so2133053wwp.31 for ; Thu, 03 Nov 2011 08:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=TOFsYhm7ItKpSyC8iyBb3OzhN6g+MDjs9ukxx2NaqDY=; b=qkTZwNUoZX5i1FL6+YwWkuifpdZNzLRgpZV/8tPO7IHJKeBx8LU19zlu+qsN/HixZ2 ENdt2ur8lO1uKdGAMfZfLsVWOSW9q0i/L5k6jlsctPVJQcQ7uJ6SGn58AJp1mlRnIwcs FPbNszaSGgTllbPRORkwFodiQKX2NKJU9F0XM= MIME-Version: 1.0 Received: by 10.227.60.143 with SMTP id p15mr12618842wbh.28.1320334405466; Thu, 03 Nov 2011 08:33:25 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Thu, 3 Nov 2011 08:33:25 -0700 (PDT) In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> Date: Thu, 3 Nov 2011 11:33:25 -0400 Message-ID: From: Arnaud Lacombe To: Nate Dobbs Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 15:33:27 -0000 Hi, [Please do not top-post.] On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs wr= ote: > 10 year old core or not, the ARM is the worlds most widely used processor= ; > Please read what I said correctly, I said "this ARM11 is obsolete" (even if still used, for sure) and "FreeBSD lacks critical KPI". Concerning the first point; you want a nice ARM core ? take the PandaBoard, CortexA9, dual-core, DDR2. However, porting FreeBSD on this chip will be way more difficult, and nobody will do the work is the next year or two (my guess). Concerning the second point, Unix may be 43 years old, you surely do not want to run 4.3BSD on the latest NUMA system, and expect optimum platform usage. Someone has to make the damn code do the job. Even as of FreeBSD 9.0, we won't even have complete NUMA support. I'm taking here about a *mainstream* system architecture, not even a deeply embedded and integrated system. - Arnaud > On Thu, Nov 3, 2011 at 11:12 AM, Arnaud Lacombe wrot= e: >> >> Hi, >> >> On Thu, Nov 3, 2011 at 9:58 AM, Aleksandr Rybalko wrot= e: >> > On Thu, 3 Nov 2011 10:22:22 +0100 >> > Lars Engels wrote: >> > >> >>> Hi Hackers, >> >>> >> >>> maybe you've heard of the upcoming Raspberry Pi, a credit card sized >> >>> ARM computer which is about to get sold for 25$ - 35$ from december >> >>> on. >> >>> >> >>> http://www.raspberrypi.org/archives/302 >> >>> >> >>> Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Detail= s >> >>> >> >>> The first charge will be 10,000 pieces, so there's a fair chance tha= t >> >>> one can actually buy a board. >> >>> >> >>> If someone is willing to port FreeBSD to the Raspberry, I'd try to >> >>> get one of the boards and send it to the porter. >> >>> >> >>> Cheers >> >>> Lars >> > >> > Hi Lars, >> > >> > I seen info about Raspberry Pi, this is very nice hardware. >> > >> Are you kidding ? >> >> ARM11 is a 10 year old core, not much to be really proud with. The >> only interesting thing about the Pi is its price tag, but as you point >> out, if we don't have datasheets upfront, it's not going to be much >> than a $25 paper-weight. >> >> Btw, do FreeBSD provide any KPI for hardware video "accelerator" ? >> AFAIK, we do not even have such framework for crypto accelerator, so I >> serious doubt there is any for video :/ >> >> =A0- Arnaud >> >> > It will be >> > fun to port FreeBSD on it, since I already have experience with >> > Broadcom SoC's. But device have undocumented parts, so writing driver >> > for it maybe impossible or very hard (through a lot of RE). >> > >> > Anyway, it would be nice to play with it. >> > >> > WBW >> > -- >> > Aleksandr Rybalko >> > _______________________________________________ >> > freebsd-hackers@freebsd.org mailing list >> > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> > To unsubscribe, send any mail to >> > "freebsd-hackers-unsubscribe@freebsd.org" >> > >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g" > > > > -- > Cheers, > > Nate Dobbs RHCE > From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 15:50:46 2011 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 BD041106564A; Thu, 3 Nov 2011 15:50:46 +0000 (UTC) (envelope-from misconfiguration@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1F75A8FC16; Thu, 3 Nov 2011 15:50:45 +0000 (UTC) Received: by wyg36 with SMTP id 36so1879352wyg.13 for ; Thu, 03 Nov 2011 08:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=aBW2hJw9CKGlW/lWzrR9J/LrYQ+aU+hCrfwhjLEQItM=; b=iqxbmrm7FgTdVqyACV6GGluGqQOO3Pu8OQHH8Sfz7pxb/8L7xCImYHOS6WeAGV/Yau VTgJSDBbJjDcChi/xIeHFdY1o7FwS/ovw/J5Zbf3885iCwooK5GuGKXz+7uIu4TPmo2x EJytTq9/zp0sDO4L+xg2oWgk8OU0sO+t9kwz8= MIME-Version: 1.0 Received: by 10.216.208.169 with SMTP id q41mr7627598weo.64.1320333619285; Thu, 03 Nov 2011 08:20:19 -0700 (PDT) Received: by 10.180.7.193 with HTTP; Thu, 3 Nov 2011 08:20:18 -0700 (PDT) In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> Date: Thu, 3 Nov 2011 11:20:18 -0400 Message-ID: From: Nate Dobbs To: Arnaud Lacombe Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 15:50:46 -0000 10 year old core or not, the ARM is the worlds most widely used processor; Unix is 43 years old does this make the Operating System obsolete? On Thu, Nov 3, 2011 at 11:12 AM, Arnaud Lacombe wrote: > Hi, > > On Thu, Nov 3, 2011 at 9:58 AM, Aleksandr Rybalko wrote: > > On Thu, 3 Nov 2011 10:22:22 +0100 > > Lars Engels wrote: > > > >>> Hi Hackers, > >>> > >>> maybe you've heard of the upcoming Raspberry Pi, a credit card sized > >>> ARM computer which is about to get sold for 25$ - 35$ from december > >>> on. > >>> > >>> http://www.raspberrypi.org/archives/302 > >>> > >>> Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details > >>> > >>> The first charge will be 10,000 pieces, so there's a fair chance that > >>> one can actually buy a board. > >>> > >>> If someone is willing to port FreeBSD to the Raspberry, I'd try to > >>> get one of the boards and send it to the porter. > >>> > >>> Cheers > >>> Lars > > > > Hi Lars, > > > > I seen info about Raspberry Pi, this is very nice hardware. > > > Are you kidding ? > > ARM11 is a 10 year old core, not much to be really proud with. The > only interesting thing about the Pi is its price tag, but as you point > out, if we don't have datasheets upfront, it's not going to be much > than a $25 paper-weight. > > Btw, do FreeBSD provide any KPI for hardware video "accelerator" ? > AFAIK, we do not even have such framework for crypto accelerator, so I > serious doubt there is any for video :/ > > - Arnaud > > > It will be > > fun to port FreeBSD on it, since I already have experience with > > Broadcom SoC's. But device have undocumented parts, so writing driver > > for it maybe impossible or very hard (through a lot of RE). > > > > Anyway, it would be nice to play with it. > > > > WBW > > -- > > Aleksandr Rybalko > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to " > freebsd-hackers-unsubscribe@freebsd.org" > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Cheers, Nate Dobbs RHCE From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 16:34:14 2011 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 7AD861065673; Thu, 3 Nov 2011 16:34:14 +0000 (UTC) (envelope-from bryan@bryanhinton.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2439B8FC18; Thu, 3 Nov 2011 16:34:13 +0000 (UTC) Received: by ggnk3 with SMTP id k3so97085ggn.13 for ; Thu, 03 Nov 2011 09:34:13 -0700 (PDT) Received: by 10.236.195.4 with SMTP id o4mr14868189yhn.6.1320336166513; Thu, 03 Nov 2011 09:02:46 -0700 (PDT) Received: from [10.3.9.125] (cpe-72-190-90-102.tx.res.rr.com. [72.190.90.102]) by mx.google.com with ESMTPS id z28sm10061849yhl.4.2011.11.03.09.02.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Nov 2011 09:02:45 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/signed; boundary="Apple-Mail=_C47FF6F3-D674-41EF-BB27-ECC8C7C4B67A"; protocol="application/pkcs7-signature"; micalg=sha1 From: "Bryan R. Hinton" In-Reply-To: Date: Thu, 3 Nov 2011 11:03:34 -0500 Message-Id: <15565BBB-4669-42D2-8DCB-6B74B47DCBDF@bryanhinton.com> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> To: Nate Dobbs X-Mailer: Apple Mail (2.1251.1) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Aleksandr Rybalko , hackers@freebsd.org, Lars Engels , Arnaud Lacombe Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 16:34:14 -0000 --Apple-Mail=_C47FF6F3-D674-41EF-BB27-ECC8C7C4B67A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 I would be interested in helping out with this. Bryan On Nov 3, 2011, at 10:20 AM, Nate Dobbs wrote: > 10 year old core or not, the ARM is the worlds most widely used processor; > Unix is 43 years old does this make the Operating System obsolete? > > On Thu, Nov 3, 2011 at 11:12 AM, Arnaud Lacombe wrote: > >> Hi, >> >> On Thu, Nov 3, 2011 at 9:58 AM, Aleksandr Rybalko wrote: >>> On Thu, 3 Nov 2011 10:22:22 +0100 >>> Lars Engels wrote: >>> >>>>> Hi Hackers, >>>>> >>>>> maybe you've heard of the upcoming Raspberry Pi, a credit card sized >>>>> ARM computer which is about to get sold for 25$ - 35$ from december >>>>> on. >>>>> >>>>> http://www.raspberrypi.org/archives/302 >>>>> >>>>> Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details >>>>> >>>>> The first charge will be 10,000 pieces, so there's a fair chance that >>>>> one can actually buy a board. >>>>> >>>>> If someone is willing to port FreeBSD to the Raspberry, I'd try to >>>>> get one of the boards and send it to the porter. >>>>> >>>>> Cheers >>>>> Lars >>> >>> Hi Lars, >>> >>> I seen info about Raspberry Pi, this is very nice hardware. >>> >> Are you kidding ? >> >> ARM11 is a 10 year old core, not much to be really proud with. The >> only interesting thing about the Pi is its price tag, but as you point >> out, if we don't have datasheets upfront, it's not going to be much >> than a $25 paper-weight. >> >> Btw, do FreeBSD provide any KPI for hardware video "accelerator" ? >> AFAIK, we do not even have such framework for crypto accelerator, so I >> serious doubt there is any for video :/ >> >> - Arnaud >> >>> It will be >>> fun to port FreeBSD on it, since I already have experience with >>> Broadcom SoC's. But device have undocumented parts, so writing driver >>> for it maybe impossible or very hard (through a lot of RE). >>> >>> Anyway, it would be nice to play with it. >>> >>> WBW >>> -- >>> Aleksandr Rybalko >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to " >> freebsd-hackers-unsubscribe@freebsd.org" >>> >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >> > > > > -- > Cheers, > > Nate Dobbs RHCE > _______________________________________________ > 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" --Apple-Mail=_C47FF6F3-D674-41EF-BB27-ECC8C7C4B67A-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 19:11:56 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id D408A1065674 for ; Thu, 3 Nov 2011 19:11:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 5844A14DED7; Thu, 3 Nov 2011 19:11:56 +0000 (UTC) Message-ID: <4EB2E77B.1010903@FreeBSD.org> Date: Thu, 03 Nov 2011 12:11:55 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Deepak Gupta References: <64FB1554ABC9B44FAA773FBD6CB889C2E1CB205ADA@BANPMAILBOX01.citrite.net> In-Reply-To: <64FB1554ABC9B44FAA773FBD6CB889C2E1CB205ADA@BANPMAILBOX01.citrite.net> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" Subject: Re: sleep/select call in a thread doesn't return if system date is changed 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, 03 Nov 2011 19:11:56 -0000 On 11/02/2011 22:07, Deepak Gupta wrote: > 6.3 release ... is well past EOL. You'd want to run your tests with something more recent ... ideally with 9.0-RC1, or at minimum 8-stable. -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 19:29:57 2011 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 CCEE91065670 for ; Thu, 3 Nov 2011 19:29:57 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 552498FC0C for ; Thu, 3 Nov 2011 19:29:56 +0000 (UTC) Received: from 241-170-133-95.pool.ukrtel.net ([95.133.170.241] helo=rnote.ddteam.net) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1RM2z4-00088o-WE; Thu, 03 Nov 2011 21:29:55 +0200 Date: Thu, 3 Nov 2011 21:29:47 +0200 From: Aleksandr Rybalko To: Arnaud Lacombe Message-Id: <20111103212947.66bbf646.ray@freebsd.org> In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 19:29:58 -0000 On Thu, 3 Nov 2011 11:12:35 -0400 Arnaud Lacombe wrote: > Hi, > > On Thu, Nov 3, 2011 at 9:58 AM, Aleksandr Rybalko > wrote: > > On Thu, 3 Nov 2011 10:22:22 +0100 > > Lars Engels wrote: > > > >>> Hi Hackers, > >>> > >>> maybe you've heard of the upcoming Raspberry Pi, a credit card > >>> sized ARM computer which is about to get sold for 25$ - 35$ from > >>> december on. > >>> > >>> http://www.raspberrypi.org/archives/302 > >>> > >>> Hardware details: > >>> http://elinux.org/RaspberryPiBoard#Hardware_Details > >>> > >>> The first charge will be 10,000 pieces, so there's a fair chance > >>> that one can actually buy a board. > >>> > >>> If someone is willing to port FreeBSD to the Raspberry, I'd try to > >>> get one of the boards and send it to the porter. > >>> > >>> Cheers > >>> Lars > > > > Hi Lars, > > > > I seen info about Raspberry Pi, this is very nice hardware. > > > Are you kidding ? Every time when i see "Mail From: Arnaud Lacombe" i have bad feeling, I'm alone with that feeling? Sorry Arnaud, now I really kidding. :) Please, stop broadcast demotivation for peoples to not do something. This is your opinion, and we respect your opinion. But as many hackers already said: hackers don't doing something what is modern or required by market, hackers doing things that they like. > > ARM11 is a 10 year old core, not much to be really proud with. The > only interesting thing about the Pi is its price tag, but as you point > out, if we don't have datasheets upfront, it's not going to be much > than a $25 paper-weight. i486 CPU - released 22 years ago, but many peoples found Soekris as very useful device. MIPS R24K - 8 years old, but it widely used in SOHO embedded systems. > > Btw, do FreeBSD provide any KPI for hardware video "accelerator" ? > AFAIK, we do not even have such framework for crypto accelerator, so I > serious doubt there is any for video :/ We have some limitations to not implement that? > > - Arnaud > > > It will be > > fun to port FreeBSD on it, since I already have experience with > > Broadcom SoC's. But device have undocumented parts, so writing > > driver for it maybe impossible or very hard (through a lot of RE). > > > > Anyway, it would be nice to play with it. > > > > WBW > > -- > > Aleksandr Rybalko > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to > > "freebsd-hackers-unsubscribe@freebsd.org" > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" WBW -- Aleksandr Rybalko From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 21:45:40 2011 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 7224C106566C for ; Thu, 3 Nov 2011 21:45:40 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id D08BD8FC0A for ; Thu, 3 Nov 2011 21:45:39 +0000 (UTC) Received: by wwp14 with SMTP id 14so2666247wwp.31 for ; Thu, 03 Nov 2011 14:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=SyQ2Jvk4lU8/oL86OkOS6BTY2Ux+tHjFpgdG57bgIvY=; b=Bq0Wn0T5NuZG5hmCHhmykPtYyfDcKOjbqpz8SOtUAKG+Q3HMCGZ7V4UmgQYZtnAncC 7WWm2GdPNXJd4n1LfQe0mvg1eJG/eXFzbekEOsuJMqECCmNdSQxuQw9wxAMX6Q+PRe29 cMRoQSwg696dUqi02GBqozGrcuECAhILKA9Oo= MIME-Version: 1.0 Received: by 10.180.74.141 with SMTP id t13mr55524wiv.68.1320356738419; Thu, 03 Nov 2011 14:45:38 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Thu, 3 Nov 2011 14:45:38 -0700 (PDT) In-Reply-To: <20111103131938.GA10680@vesper.psych0tik.net> References: <20111103092222.GN37036@e-new.0x20.net> <20111103131938.GA10680@vesper.psych0tik.net> Date: Thu, 3 Nov 2011 17:45:38 -0400 Message-ID: From: Arnaud Lacombe To: richo Content-Type: text/plain; charset=ISO-8859-1 Cc: hackers@freebsd.org, Lars Engels , cognet@freebsd.org, gber@freebsd.org Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 21:45:40 -0000 Hi, [added gber@ and cognet@ to the Cc: list] On Thu, Nov 3, 2011 at 9:19 AM, richo wrote: > On 03/11/11 10:22 +0100, Lars Engels wrote: >> >> Hi Hackers, >> >> maybe you've heard of the upcoming Raspberry Pi, a credit card sized ARM >> computer which is about to get sold for 25$ - 35$ from december on. >> >> http://www.raspberrypi.org/archives/302 >> >> Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details >> >> The first charge will be 10,000 pieces, so there's a fair chance that >> one can actually buy a board. >> >> If someone is willing to port FreeBSD to the Raspberry, I'd try to get >> one of the boards and send it to the porter. >> >> Cheers >> Lars > > I am planning to attempt a port, however I'm very new to kernel > development/FreeBSD and would not feel right about accepting hardware for a > project I'm not sure I have the skills to finish. > > To that end I'll be buying boards on release date, but would be interested > in working with anyone else who is attempting it. > You certainly want to get in touch with gber@freebsd.org and cognet@freebsd.org, as well as getting familiar with the code in `sys/arm/', especially the one in the `projects/armv6' branch in the p4 repository and the various TRM you could find on the ARM11 core from ARM Ltd. gber@, cognet@, what is the status of the code in the p4 repository ? - Arnaud From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 22:41:51 2011 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 081731065670 for ; Thu, 3 Nov 2011 22:41:51 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from fallbackmx06.syd.optusnet.com.au (fallbackmx06.syd.optusnet.com.au [211.29.132.8]) by mx1.freebsd.org (Postfix) with ESMTP id CE57D8FC13 for ; Thu, 3 Nov 2011 22:41:49 +0000 (UTC) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by fallbackmx06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pA3IwEL8013387 for ; Fri, 4 Nov 2011 05:58:14 +1100 Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pA3Iw4bE008133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Nov 2011 05:58:05 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.5/8.14.4) with ESMTP id pA3Iw3aH023028; Fri, 4 Nov 2011 05:58:03 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.5/8.14.4/Submit) id pA3Iw3Hh023027; Fri, 4 Nov 2011 05:58:03 +1100 (EST) (envelope-from peter) Date: Fri, 4 Nov 2011 05:58:02 +1100 From: Peter Jeremy To: Lars Engels Message-ID: <20111103185802.GA49259@server.vk2pj.dyndns.org> References: <20111103092222.GN37036@e-new.0x20.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: <20111103092222.GN37036@e-new.0x20.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: hackers@freebsd.org Subject: Re: Porting FreeBSD to Raspberry Pi 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, 03 Nov 2011 22:41:51 -0000 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Nov-03 10:22:22 +0100, Lars Engels wrote: >http://www.raspberrypi.org/archives/302 =2E.. >If someone is willing to port FreeBSD to the Raspberry, I'd try to get >one of the boards and send it to the porter. Whilst FreeBSD on the Raspberry Pi would be attractive, I'm not sure how practical it would be. http://www.raspberrypi.org/archives/28 makes it fairly clear that the multimedia side will be all closed source and relevant datasheets will not be available. --=20 Peter Jeremy --45Z9DzgjV8m4Oswq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6y5DoACgkQ/opHv/APuIfl6ACeLFzpKWsikxjn1KsBlSqZG8Ew mLAAoIFGu1jxTz7QacY026EJntFHRU0h =VUSb -----END PGP SIGNATURE----- --45Z9DzgjV8m4Oswq-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 00:40:12 2011 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 3F4DA1065672 for ; Fri, 4 Nov 2011 00:40:12 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id 05CA58FC18 for ; Fri, 4 Nov 2011 00:40:11 +0000 (UTC) Received: from dereel.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id 0533A3BAD5; Fri, 4 Nov 2011 00:40:10 +0000 (UTC) Received: by dereel.lemis.com (Postfix, from userid 1004) id 7EB3FDADC6; Fri, 4 Nov 2011 11:40:07 +1100 (EST) Date: Fri, 4 Nov 2011 11:40:07 +1100 From: Greg 'groggy' Lehey To: Arnaud Lacombe Message-ID: <20111104004007.GA74831@dereel.lemis.com> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: Nate Dobbs , Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 00:40:12 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thursday, 3 November 2011 at 11:33:25 -0400, Arnaud Lacombe wrote: > [Please do not top-post.] Please trim messages. > On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs wrote: >> 10 year old core or not, the ARM is the worlds most widely used processor; >> > Please read what I said correctly, I said "this ARM11 is obsolete" > (even if still used, for sure) ... Clearly price is an issue for this device. What's so bad about ARM11 that it shouldn't be used? Greg -- Sent from my desktop computer Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk6zNGcACgkQIubykFB6QiNGLACaA0/16fAmE0spHwS6r1H8Ksqk cZUAoKDGCcr7RPkA7OM2gNEY/zvdmra/ =5RoQ -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 01:05:57 2011 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 A9F3D106564A; Fri, 4 Nov 2011 01:05:57 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 10E998FC1B; Fri, 4 Nov 2011 01:05:56 +0000 (UTC) Received: by wyg36 with SMTP id 36so2503400wyg.13 for ; Thu, 03 Nov 2011 18:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=b5o1WW46LGFH/zxDOkMOyStjsw7W6CIMQldZBofJwPk=; b=r9/HVtQmVkOakh6yAy1ArMb03p+gi/EnssWwApZ2koqnj67jWJzwUsVQt9DjNeq4kS wIx43MgQklD5jDpdYaC11pQ41x++2/XhUSsfqA2kGYHGUXd14EWUxPXDfEojc9jXAwSB 0ImTCNu3LkhrNXwBr1PqZ2nvfTp/Im8NjPrrk= MIME-Version: 1.0 Received: by 10.227.60.143 with SMTP id p15mr15009737wbh.28.1320368755594; Thu, 03 Nov 2011 18:05:55 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Thu, 3 Nov 2011 18:05:54 -0700 (PDT) In-Reply-To: <20111104004007.GA74831@dereel.lemis.com> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> Date: Thu, 3 Nov 2011 21:05:54 -0400 Message-ID: From: Arnaud Lacombe To: "Greg 'groggy' Lehey" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Nate Dobbs , Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 01:05:57 -0000 Hi, On Thu, Nov 3, 2011 at 8:40 PM, Greg 'groggy' Lehey wrot= e: > On Thursday, =A03 November 2011 at 11:33:25 -0400, Arnaud Lacombe wrote: >> [Please do not top-post.] > > Please trim messages. > >> On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs = wrote: >>> 10 year old core or not, the ARM is the worlds most widely used process= or; >>> >> Please read what I said correctly, I said "this ARM11 is obsolete" >> (even if still used, for sure) ... > > Clearly price is an issue for this device. =A0What's so bad about ARM11 > that it shouldn't be used? > If you read my original comment, I did point out the $25 price tag was pretty much the only interesting thing. Now, what it has been designed for, multimedia, is going to be handled by a closed-source binary blob without datasheet, so let me turn back the question: what do you expect doing with it ? >From my point of view, I would be more interested into bringing up FreeBSD on ARMv7 (ie. Cortex A[89]), rather than any previous, but the effort is clearly not the same. - Arnaud From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 01:56:02 2011 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 95F621065678; Fri, 4 Nov 2011 01:56:02 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id 616FC8FC23; Fri, 4 Nov 2011 01:56:02 +0000 (UTC) Received: from dereel.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id B4D3A3BAF9; Fri, 4 Nov 2011 01:56:00 +0000 (UTC) Received: by dereel.lemis.com (Postfix, from userid 1004) id 4C062DADC6; Fri, 4 Nov 2011 12:55:59 +1100 (EST) Date: Fri, 4 Nov 2011 12:55:59 +1100 From: Greg 'groggy' Lehey To: Arnaud Lacombe Message-ID: <20111104015559.GE74831@dereel.lemis.com> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u5E4XgoOPWr4PD9E" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: Nate Dobbs , Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 01:56:02 -0000 --u5E4XgoOPWr4PD9E Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thursday, 3 November 2011 at 21:05:54 -0400, Arnaud Lacombe wrote: > On Thu, Nov 3, 2011 at 8:40 PM, Greg 'groggy' Lehey wr= ote: >> On Thursday, =A03 November 2011 at 11:33:25 -0400, Arnaud Lacombe wrote: >>> On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs wrote: >>>> 10 year old core or not, the ARM is the worlds most widely used proces= sor; >>>> >>> Please read what I said correctly, I said "this ARM11 is obsolete" >>> (even if still used, for sure) ... >> >> Clearly price is an issue for this device. =A0What's so bad about ARM11 >> that it shouldn't be used? >> > If you read my original comment, I did point out the $25 price tag was > pretty much the only interesting thing. Now, what it has been designed > for, multimedia, is going to be handled by a closed-source binary blob > without datasheet, so let me turn back the question: what do you > expect doing with it ? That's not turning back the question; that's a separate question. But it's a good one. I don't really see it as a multimedia device. My interest would be in little embedded agents in different parts of the house, for things like measuring temperatures. I'm sure lots of other applications will come to mind. And yes, I'll probably use the supplied Linux port. But if a FreeBSD alternative becomes available, I'd certainly prefer that. Greg -- Sent from my desktop computer Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua --u5E4XgoOPWr4PD9E Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk6zRi8ACgkQIubykFB6QiMtrwCfSGYKQWAFKgltYAmpEnuzXb0+ 6+4An1mZJRU0A5OQCO4KoXmtYiJJZrC8 =0L7t -----END PGP SIGNATURE----- --u5E4XgoOPWr4PD9E-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 02:05:46 2011 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 2BBA8106566B; Fri, 4 Nov 2011 02:05:46 +0000 (UTC) (envelope-from misconfiguration@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7BDAC8FC12; Fri, 4 Nov 2011 02:05:44 +0000 (UTC) Received: by wyg36 with SMTP id 36so2544439wyg.13 for ; Thu, 03 Nov 2011 19:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FgrpUJXEPNEjIn+LFXJquQb84zPOEz4QjmEbGmHA0xA=; b=Tz6jkN5YsW63GJng83iwYPisT2js9YEP0lDZykWQxK95NwYRCouGVvzbB5suPGysSl YDDAknjwDoMBZ7pSIVg33UPRkn5RAkXMY8su1ULsshrmv0PWR7y2gVY/CzDyOuWpRFug XSsoDIVsMDBH0oOyvdag1NQs4LllaWFcgCKP4= MIME-Version: 1.0 Received: by 10.180.92.163 with SMTP id cn3mr184446wib.26.1320372344176; Thu, 03 Nov 2011 19:05:44 -0700 (PDT) Received: by 10.180.7.193 with HTTP; Thu, 3 Nov 2011 19:05:44 -0700 (PDT) In-Reply-To: <20111104015559.GE74831@dereel.lemis.com> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> Date: Thu, 3 Nov 2011 22:05:44 -0400 Message-ID: From: Nate Dobbs To: "Greg 'groggy' Lehey" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Aleksandr Rybalko , hackers@freebsd.org, Lars Engels , Arnaud Lacombe Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 02:05:46 -0000 On Thu, Nov 3, 2011 at 9:55 PM, Greg 'groggy' Lehey wrote: > On Thursday, 3 November 2011 at 21:05:54 -0400, Arnaud Lacombe wrote: > > On Thu, Nov 3, 2011 at 8:40 PM, Greg 'groggy' Lehey > wrote: > >> On Thursday, 3 November 2011 at 11:33:25 -0400, Arnaud Lacombe wrote: > >>> On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs < > misconfiguration@gmail.com> wrote: > >>>> 10 year old core or not, the ARM is the worlds most widely used > processor; > >>>> > >>> Please read what I said correctly, I said "this ARM11 is obsolete" > >>> (even if still used, for sure) ... > >> > >> Clearly price is an issue for this device. What's so bad about ARM11 > >> that it shouldn't be used? > >> > > If you read my original comment, I did point out the $25 price tag was > > pretty much the only interesting thing. Now, what it has been designed > > for, multimedia, is going to be handled by a closed-source binary blob > > without datasheet, so let me turn back the question: what do you > > expect doing with it ? > > That's not turning back the question; that's a separate question. But > it's a good one. I don't really see it as a multimedia device. My > interest would be in little embedded agents in different parts of the > house, for things like measuring temperatures. I'm sure lots of other > applications will come to mind. > > And yes, I'll probably use the supplied Linux port. But if a FreeBSD > alternative becomes available, I'd certainly prefer that. > > Greg > -- > Sent from my desktop computer > Finger grog@FreeBSD.org for PGP public key. > See complete headers for address and phone numbers. > This message is digitally signed. If your Microsoft MUA reports > problems, please read http://tinyurl.com/broken-mua > I agree with groggy, something I'd personally use it for is a small SSH server to allow a pinhole into my home network. It would serve as a very good replacement for the mac mini that's sitting in my DMZ simply handling connections for my SSH tunnel so I can bypass the proxy at work. Power savings would be significant and it would be plenty powerful to handle this task. A small webcam server comes to mind as well; there could be plenty of useful things I could think of outside the realm of multimedia. JMHO -- Cheers, Nate Dobbs RHCE From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 02:30:21 2011 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 E340B106564A; Fri, 4 Nov 2011 02:30:20 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 193758FC14; Fri, 4 Nov 2011 02:30:19 +0000 (UTC) Received: by wwp14 with SMTP id 14so2918692wwp.31 for ; Thu, 03 Nov 2011 19:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=eyPktm22yjwewDQ0V7hiJE2f+pyjz2JEeCSYgeP/tFQ=; b=lGGzbXiac6hDWb7TOTmpC6wP8ArdIqRA7lWFvLm/tC2j/LTEq6ZqWxJpEcc8UlBXxS cpBk7lx+zvJsZmSxjJq2ghnOEPJiiXmKYkU5jorjRkJ7rHEWILtpNLHarccV8PZOIiHb ZboKnZ8S0EfTToJD8WD3F1zinmbDwFUuS87iE= MIME-Version: 1.0 Received: by 10.216.30.206 with SMTP id k56mr214963wea.98.1320373818904; Thu, 03 Nov 2011 19:30:18 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Thu, 3 Nov 2011 19:30:18 -0700 (PDT) In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> Date: Thu, 3 Nov 2011 22:30:18 -0400 Message-ID: From: Arnaud Lacombe To: Nate Dobbs Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Greg 'groggy' Lehey , Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 02:30:21 -0000 Hi, On Thu, Nov 3, 2011 at 10:05 PM, Nate Dobbs wr= ote: > On Thu, Nov 3, 2011 at 9:55 PM, Greg 'groggy' Lehey > wrote: >> >> On Thursday, =A03 November 2011 at 21:05:54 -0400, Arnaud Lacombe wrote: >> > On Thu, Nov 3, 2011 at 8:40 PM, Greg 'groggy' Lehey >> > wrote: >> >> On Thursday, =A03 November 2011 at 11:33:25 -0400, Arnaud Lacombe wro= te: >> >>> On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs >> >>> wrote: >> >>>> 10 year old core or not, the ARM is the worlds most widely used >> >>>> processor; >> >>>> >> >>> Please read what I said correctly, I said "this ARM11 is obsolete" >> >>> (even if still used, for sure) ... >> >> >> >> Clearly price is an issue for this device. =A0What's so bad about ARM= 11 >> >> that it shouldn't be used? >> >> >> > If you read my original comment, I did point out the $25 price tag was >> > pretty much the only interesting thing. Now, what it has been designed >> > for, multimedia, is going to be handled by a closed-source binary blob >> > without datasheet, so let me turn back the question: what do you >> > expect doing with it ? >> >> That's not turning back the question; that's a separate question. =A0But >> it's a good one. =A0I don't really see it as a multimedia device. =A0My >> interest would be in little embedded agents in different parts of the >> house, for things like measuring temperatures. =A0I'm sure lots of other >> applications will come to mind. >> >> And yes, I'll probably use the supplied Linux port. =A0But if a FreeBSD >> alternative becomes available, I'd certainly prefer that. >> >> Greg >> -- >> Sent from my desktop computer >> Finger grog@FreeBSD.org for PGP public key. >> See complete headers for address and phone numbers. >> This message is digitally signed. =A0If your Microsoft MUA reports >> problems, please read http://tinyurl.com/broken-mua > > I agree with groggy, something I'd personally use it for is a small SSH > server to allow a pinhole into my home network. It would serve as a very > good replacement for the mac mini that's sitting in my DMZ simply handlin= g > connections for my SSH tunnel so I can bypass the proxy at work. > > Power savings would be significant and it would be plenty powerful to han= dle > this task. A small webcam server comes to mind as well; there could be > plenty of useful things I could think of outside the realm of multimedia. > you certainly want: http://beagleboard.org/bone $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not expect being able to run FreeBSD on it before a few years :) - Arnaud > JMHO > > > > -- > Cheers, > > Nate Dobbs RHCE > From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 02:42:42 2011 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 432E5106566C; Fri, 4 Nov 2011 02:42:42 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 6749E8FC08; Fri, 4 Nov 2011 02:42:41 +0000 (UTC) Received: from [127.0.0.1] (kevlo@kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.3/8.14.3) with ESMTP id pA42TlFQ021952; Fri, 4 Nov 2011 10:29:47 +0800 (CST) Message-ID: <1320373787.2329.1.camel@nsl> From: Kevin Lo To: Arnaud Lacombe Date: Fri, 04 Nov 2011 10:29:47 +0800 In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.0- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Cc: Greg 'groggy' Lehey , Nate Dobbs , Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 02:42:42 -0000 Arnaud Lacombe wrote: > Hi, > > On Thu, Nov 3, 2011 at 8:40 PM, Greg 'groggy' Lehey wrote: > > On Thursday, 3 November 2011 at 11:33:25 -0400, Arnaud Lacombe wrote: > >> [Please do not top-post.] > > > > Please trim messages. > > > >> On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs wrote: > >>> 10 year old core or not, the ARM is the worlds most widely used processor; > >>> > >> Please read what I said correctly, I said "this ARM11 is obsolete" > >> (even if still used, for sure) ... > > > > Clearly price is an issue for this device. What's so bad about ARM11 > > that it shouldn't be used? > > > If you read my original comment, I did point out the $25 price tag was > pretty much the only interesting thing. Now, what it has been designed > for, multimedia, is going to be handled by a closed-source binary blob > without datasheet, so let me turn back the question: what do you > expect doing with it ? Agreed. I'll always prefer a $150 device with useful documentation over a $25 toy which may or may not work depending upon the phase of the moon. > >From my point of view, I would be more interested into bringing up > FreeBSD on ARMv7 (ie. Cortex A[89]), rather than any previous, but the > effort is clearly not the same. > > - Arnaud Kevin From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 02:51:54 2011 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 15EF8106564A; Fri, 4 Nov 2011 02:51:54 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 539C58FC13; Fri, 4 Nov 2011 02:51:52 +0000 (UTC) Received: by wyg36 with SMTP id 36so2574259wyg.13 for ; Thu, 03 Nov 2011 19:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=QyzPzAwZXPHo5hZJ236WjHvRKQ5WB1Vh0uIE06Ghaqk=; b=WvUUUVJyUBG0CSKmS5LX3tumAvHaEENaMCCseLNM5A/5g9ArcFrlBLBG5yyw7lO7kI OKeYGG4ZrLeylZZMYfffR1viEKgdQpKhEaPzNBHHRGvU3H7PFUyMxpingkgAKPaDviN5 ijopFiVFna6178XD2w3POgagSwqemFCunPAyY= MIME-Version: 1.0 Received: by 10.227.203.198 with SMTP id fj6mr15364279wbb.24.1320375112065; Thu, 03 Nov 2011 19:51:52 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Thu, 3 Nov 2011 19:51:52 -0700 (PDT) Date: Thu, 3 Nov 2011 22:51:52 -0400 Message-ID: From: Arnaud Lacombe To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Greg 'groggy' Lehey , Nate Dobbs , Aleksandr Rybalko , Ben Gray Subject: FreeBSD on ARM Cortex board [Was: Porting FreeBSD to Raspberry Pi] 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, 04 Nov 2011 02:51:54 -0000 Hi, [Starting a new thread, added Ben Gray to the Cc: list] On Thu, Nov 3, 2011 at 10:30 PM, Arnaud Lacombe wrote: > Hi, > > On Thu, Nov 3, 2011 at 10:05 PM, Nate Dobbs = wrote: >> On Thu, Nov 3, 2011 at 9:55 PM, Greg 'groggy' Lehey >> wrote: >>> >>> On Thursday, =A03 November 2011 at 21:05:54 -0400, Arnaud Lacombe wrote= : >>> > On Thu, Nov 3, 2011 at 8:40 PM, Greg 'groggy' Lehey >>> > wrote: >>> >> On Thursday, =A03 November 2011 at 11:33:25 -0400, Arnaud Lacombe wr= ote: >>> >>> On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs >>> >>> wrote: >>> >>>> 10 year old core or not, the ARM is the worlds most widely used >>> >>>> processor; >>> >>>> >>> >>> Please read what I said correctly, I said "this ARM11 is obsolete" >>> >>> (even if still used, for sure) ... >>> >> >>> >> Clearly price is an issue for this device. =A0What's so bad about AR= M11 >>> >> that it shouldn't be used? >>> >> >>> > If you read my original comment, I did point out the $25 price tag wa= s >>> > pretty much the only interesting thing. Now, what it has been designe= d >>> > for, multimedia, is going to be handled by a closed-source binary blo= b >>> > without datasheet, so let me turn back the question: what do you >>> > expect doing with it ? >>> >>> That's not turning back the question; that's a separate question. =A0Bu= t >>> it's a good one. =A0I don't really see it as a multimedia device. =A0My >>> interest would be in little embedded agents in different parts of the >>> house, for things like measuring temperatures. =A0I'm sure lots of othe= r >>> applications will come to mind. >>> >>> And yes, I'll probably use the supplied Linux port. =A0But if a FreeBSD >>> alternative becomes available, I'd certainly prefer that. >>> >>> Greg >>> -- >>> Sent from my desktop computer >>> Finger grog@FreeBSD.org for PGP public key. >>> See complete headers for address and phone numbers. >>> This message is digitally signed. =A0If your Microsoft MUA reports >>> problems, please read http://tinyurl.com/broken-mua >> >> I agree with groggy, something I'd personally use it for is a small SSH >> server to allow a pinhole into my home network. It would serve as a very >> good replacement for the mac mini that's sitting in my DMZ simply handli= ng >> connections for my SSH tunnel so I can bypass the proxy at work. >> >> Power savings would be significant and it would be plenty powerful to ha= ndle >> this task. A small webcam server comes to mind as well; there could be >> plenty of useful things I could think of outside the realm of multimedia= . >> > you certainly want: > > http://beagleboard.org/bone > > $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not expect > being able to run FreeBSD on it before a few years :) > actually, some initial work has been started by Ben Gray: http://code.google.com/p/beagleboard-freebsd/ and https://gitorious.org/+freebsd-omap-team/freebsd/freebsd-omap/ - Arnaud From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 05:24:09 2011 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 ADEB8106566B for ; Fri, 4 Nov 2011 05:24:09 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id ACD2F8FC0A for ; Fri, 4 Nov 2011 05:24:08 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id pA45A8j3049549; Fri, 4 Nov 2011 05:10:08 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.119] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id 86febdfav2wucaipvbucaydwww; Fri, 04 Nov 2011 05:10:07 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: Date: Thu, 3 Nov 2011 22:10:06 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Mark Saad X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh 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, 04 Nov 2011 05:24:09 -0000 On Nov 2, 2011, at 1:28 PM, Mark Saad wrote: > Hackers > What is going on here, if I run the following shell script, what is > the expected output . The script is named xxx >=20 > #!/bin/sh > ps -ax | grep -v grep | grep xxx >=20 > Here is what I see >=20 > # sh xxx > 88318 p0 S+ 0:00.00 sh xxx > 88320 p0 R+ 0:00.00 sh xxx > 88321 p0 R+ 0:00.00 sh xxx >=20 > Can someone explain this ? Here's my understanding: * 'sh xxx' starts (process 88318); let's call this the "parent" = process. * It reads and parses the command line 'ps -ax | grep -v grep | grep = xxx' * The parent process forks a copy of itself for the last 'grep xxx'. * The fork returns to the parent, the child (pid 88320) is scheduled = to run later * The parent forks a copy of itself for the 'grep -v grep' * The fork returns to the parent, the child (pid 88321) is scheduled = to run later * The parent runs 'ps -ax', which captures three copies of "sh xxx" = (the parent which is waiting on 'ps -ax' to finish, and the two children = that have not had a chance to run; note that the two children are both = in state 'R' which means they'll run as soon as they get a chance, while = the parent process is 'S'leeping waiting for 'ps -ax' to finish) * The two children (which started as copies of 'sh xxx') finally get = a chance to run and convert themselves into the respective grep commands = (via the exec() system call). The "expected output" is anywhere from one to three copies of 'sh xxx' = and maybe a copy of 'grep xxx', depending on what shell you're using, = how the shell parses the command line, the order in which it spawns = children, and whether the fork returns to the parent or child first. = The number of processors can also impact exactly when the child 'sh xxx' = processes get a chance to call exec(2). Tim From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 10:13:53 2011 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 556241065673; Fri, 4 Nov 2011 10:13:53 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 0A7F38FC15; Fri, 4 Nov 2011 10:13:52 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:78af:244a:397b:8de1]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 11C444AC1C; Fri, 4 Nov 2011 13:56:30 +0400 (MSK) Date: Fri, 4 Nov 2011 13:56:10 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1101963570.20111104135610@serebryakov.spb.ru> To: Arnaud Lacombe In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Nate Dobbs , Greg 'groggy' Lehey , Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2011 10:13:53 -0000 Hello, Arnaud. You wrote 4 =ED=EE=FF=E1=F0=FF 2011 =E3., 6:30:18: > $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not expect > being able to run FreeBSD on it before a few years :) What is so special about A8? We have some ARM code in tree, is Cortex SO different from previous architectures? As far as I understand, main problem in such platforms is different perefireal devices on each next chop and board, which doesn't have "common denominator" like PCI bus or other standard pieces, which helps a lot on PC (x86, amd64) architecture. BTW, we have infrastructure for crypto accelerators ;-) And what about NUMA... I know only one (almost-general-purpose) OS, which has full support for NUMA. It is Sun^WOracle Solaris. Ant it does it very well (not to forget about boxes like SunFire 25K with 72 2-core sockets at, as fa as I remember, 18 processor-memory boards). I participated in project, which added NUMA support to Sun JVM HotSpot, and Solaris was only one which gives us all needed information -- nor Linux nor Windows either had not needed API two years ago, and as far as I know, there is no big changes in this area for them (but I could be wrong). So, I cannot say, that FreeBSD is seriously behind the pack in NUMA suppor= t. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 10:55:48 2011 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 0F042106564A for ; Fri, 4 Nov 2011 10:55:48 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id BFD598FC12 for ; Fri, 4 Nov 2011 10:55:47 +0000 (UTC) Received: from [192.168.99.1] (helo=terran.dlink.ua) by dlink.ua with smtp (Exim 4.63) (envelope-from ) id 1RMHR3-0003fi-Si; Fri, 04 Nov 2011 12:55:46 +0200 Date: Fri, 4 Nov 2011 12:59:13 +0200 From: Aleksandr Rybalko To: Lars Engels Message-Id: <20111104125913.84cefaf8.ray@freebsd.org> In-Reply-To: <20111104102055.GP37036@e-new.0x20.net> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104102055.GP37036@e-new.0x20.net> Organization: FreeBSD Project X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 10:55:48 -0000 On Fri, 4 Nov 2011 11:20:56 +0100 Lars Engels wrote: [cut] >> >> Okay, I will see what I can do to get one for you. If it's not >> possible to port FreeBSD to it, it wouldn't be the end of the world. >> I just read of the thingy and thought that it would be nice thing to >> have. :) Hi Lars, Raspberry Pi is a world cheaper and smallest board that can do actual task(HD video, Quake 3), and I don't know any ARM/MIPS/etc. SoC's which have 256/512MB of RAM inside. I bet in one year from release of first device (maybe even not Raspberry) or Broadcom will open his sources, or folks done much RE work. WBW -- Aleksandr Rybalko From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 10:20:58 2011 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 3DBC1106564A; Fri, 4 Nov 2011 10:20:58 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) by mx1.freebsd.org (Postfix) with ESMTP id C32198FC17; Fri, 4 Nov 2011 10:20:57 +0000 (UTC) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mail.0x20.net (Postfix) with ESMTP id 8C8436A61CD; Fri, 4 Nov 2011 11:20:56 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.0x20.net Received: from mail.0x20.net ([217.69.76.211]) by mail.0x20.net (mail.0x20.net [217.69.76.211]) (amavisd-new, port 10024) with ESMTP id LakRTRPHAVhg; Fri, 4 Nov 2011 11:20:56 +0100 (CET) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 47F856A6016; Fri, 4 Nov 2011 11:20:56 +0100 (CET) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.4/8.14.4) with ESMTP id pA4AKulQ066676; Fri, 4 Nov 2011 11:20:56 +0100 (CET) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.4/8.14.4/Submit) id pA4AKu5E066082; Fri, 4 Nov 2011 11:20:56 +0100 (CET) (envelope-from lars) Date: Fri, 4 Nov 2011 11:20:56 +0100 From: Lars Engels To: Aleksandr Rybalko Message-ID: <20111104102055.GP37036@e-new.0x20.net> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="D3I0HgOdJ5+6n+7I" Content-Disposition: inline In-Reply-To: <20111103155802.7bfc1df0.ray@freebsd.org> X-Editor: VIM - Vi IMproved 7.3 X-Operation-System: FreeBSD 8.2-RELEASE-p3 User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Fri, 04 Nov 2011 11:07:09 +0000 Cc: hackers@freebsd.org Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 10:20:58 -0000 --D3I0HgOdJ5+6n+7I Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 03, 2011 at 03:58:02PM +0200, Aleksandr Rybalko wrote: > On Thu, 3 Nov 2011 10:22:22 +0100 > Lars Engels wrote: >=20 > >> Hi Hackers, > >>=20 > >> maybe you've heard of the upcoming Raspberry Pi, a credit card sized > >> ARM computer which is about to get sold for 25$ - 35$ from december > >> on. > >>=20 > >> http://www.raspberrypi.org/archives/302 > >>=20 > >> Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details > >>=20 > >> The first charge will be 10,000 pieces, so there's a fair chance that > >> one can actually buy a board. > >>=20 > >> If someone is willing to port FreeBSD to the Raspberry, I'd try to > >> get one of the boards and send it to the porter. > >>=20 > >> Cheers > >> Lars >=20 > Hi Lars, >=20 > I seen info about Raspberry Pi, this is very nice hardware. It will be > fun to port FreeBSD on it, since I already have experience with > Broadcom SoC's. But device have undocumented parts, so writing driver > for it maybe impossible or very hard (through a lot of RE). >=20 > Anyway, it would be nice to play with it. Okay, I will see what I can do to get one for you. If it's not possible to port FreeBSD to it, it wouldn't be the end of the world. I just read of the thingy and thought that it would be nice thing to have. :) --D3I0HgOdJ5+6n+7I Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6zvIcACgkQKc512sD3afjChACgvxb8fv50fOZln6zdLICkhXg4 SNgAnRmxEk2s0U95++BTl6/a/Pt9ZyJK =DKf4 -----END PGP SIGNATURE----- --D3I0HgOdJ5+6n+7I-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 13:07:13 2011 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 15D23106564A for ; Fri, 4 Nov 2011 13:07:12 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 8829C8FC14 for ; Fri, 4 Nov 2011 13:07:12 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RMJUE-00013Q-DV for freebsd-hackers@freebsd.org; Fri, 04 Nov 2011 14:07:10 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Nov 2011 14:07:10 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Nov 2011 14:07:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 04 Nov 2011 14:06:57 +0100 Lines: 41 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0911149E2C2A5C65C1D63E94" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111004 Thunderbird/7.0.1 X-Enigmail-Version: 1.1.2 Subject: sleep(3) hangs? 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, 04 Nov 2011 13:07:13 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0911149E2C2A5C65C1D63E94 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I have an "interesting" problem which is why I'm posting to the hackers@ list :) The situation is: an 8-STABLE amd64 system from a few months ago running on VMWare ESXi 5, which worked fine until today. Today, it looks like anything which "sleeps" for whatever reasons (including select(2)) simply hanged without return. Commands like "iostat 1" and "sleep 1" hang= ed. The timecounter was autodetected to HPET, hz was autoconfiguted to 100. When I changed the timecounter to ACPI-safe, situation somewhat normalized, but each second the machine sees (from "sleep 1") takes around 3-4 wall-clock seconds. I'm running the system as-is until a new kernel from todays sources is built (in the hope that something will fix it). If anyone wants me to experiment with the machine, tell me... --------------enig0911149E2C2A5C65C1D63E94 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6z43EACgkQldnAQVacBciLugCg2mfqcPkf9pFGsuxZMGP0JXus n5UAn2sjBeiSn6hq8aifkARxQPBhZ7GR =MUjj -----END PGP SIGNATURE----- --------------enig0911149E2C2A5C65C1D63E94-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 14:53:25 2011 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 641C51065670; Fri, 4 Nov 2011 14:53:25 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4018FC13; Fri, 4 Nov 2011 14:53:23 +0000 (UTC) Received: by wwp14 with SMTP id 14so3703895wwp.31 for ; Fri, 04 Nov 2011 07:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=MPuCXyV5mGEKDAKpBPrNOEcK5ab0EcdZdGS5VAgL5DI=; b=lyQkk6ZWPF6tQTiTfvKimGylIKcCQZTXnLfrM3Fdzq0H/l0Jj0AUp0TT0mzPQ3GeAx myP3UY+gVHdaAUpJMYRGI0SoA1khsYJQNMRKklNwiNbDWw62LZML2QZ70bElflJwvb2b tqERb2wWgf9xwCsgH9USQvW/AFfUT4l52Jm+Q= MIME-Version: 1.0 Received: by 10.216.30.206 with SMTP id k56mr984976wea.98.1320418403073; Fri, 04 Nov 2011 07:53:23 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Fri, 4 Nov 2011 07:53:22 -0700 (PDT) In-Reply-To: <1101963570.20111104135610@serebryakov.spb.ru> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> <1101963570.20111104135610@serebryakov.spb.ru> Date: Fri, 4 Nov 2011 10:53:22 -0400 Message-ID: From: Arnaud Lacombe To: lev@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Nate Dobbs , Greg 'groggy' Lehey , Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 14:53:25 -0000 Hi, 2011/11/4 Lev Serebryakov : > Hello, Arnaud. > You wrote 4 =D0=BD=D0=BE=D1=8F=D0=B1=D1=80=D1=8F 2011 =D0=B3., 6:30:18: > >> $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not expect >> being able to run FreeBSD on it before a few years :) > =C2=A0What is so special about A8? We have some ARM code in tree, is Cort= ex > SO different from previous architectures? As far as I understand, main > problem in such platforms is different perefireal devices on each next > chop and board, which doesn't have "common denominator" like PCI bus > or other standard pieces, which helps a lot on PC (x86, amd64) architectu= re. > > =C2=A0BTW, we have infrastructure for crypto accelerators ;-) > Yes, my bad. > =C2=A0And what about NUMA... I know only one (almost-general-purpose) OS, > which has full support for NUMA. It is Sun^WOracle Solaris. Ant it > does it very well (not to forget about boxes like SunFire 25K with 72 > 2-core sockets at, as fa as I remember, 18 processor-memory boards). > > =C2=A0 =C2=A0I participated in project, which added NUMA support to Sun J= VM > HotSpot, and Solaris was only one which gives us all needed > information -- nor Linux nor =C2=A0Windows either had not needed API two > years ago, and as far as I know, there is no big changes in this area > for them (but I could be wrong). > FWIW, referring to the technology two years ago in computer science is just like referring to the Prehistory to make a point about mankind today :/ - Arnaud From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 15:09:31 2011 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 EAAAA106566B; Fri, 4 Nov 2011 15:09:31 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id D3DC78FC08; Fri, 4 Nov 2011 15:09:30 +0000 (UTC) Received: by wwp14 with SMTP id 14so3729413wwp.31 for ; Fri, 04 Nov 2011 08:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/+oLWI0RBwJLbVEwN58qi0lxgpYaDuhBmtNKXCLlI6I=; b=F8uvCZ3Z8Vmyv7vCh1dua5cBskNFfEAZM/DiJXl2Gmix6XYmG7NFNesuAQwgJwR7l6 g39fDNkUFAPeqUdywSMOe48dFl6Zmhgp+3S0VJUajAJ0PY2We+rhyguILXwE0FU8p6lA JdltPe+8XpP3Q8hR5bnsq77GOWOova7hEUwpg= MIME-Version: 1.0 Received: by 10.216.82.196 with SMTP id o46mr256223wee.113.1320419369484; Fri, 04 Nov 2011 08:09:29 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Fri, 4 Nov 2011 08:09:29 -0700 (PDT) In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> <1101963570.20111104135610@serebryakov.spb.ru> Date: Fri, 4 Nov 2011 11:09:29 -0400 Message-ID: From: Arnaud Lacombe To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: lev@freebsd.org, Lars Engels , Nate Dobbs , Aleksandr Rybalko , hackers@freebsd.org, Greg 'groggy' Lehey Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 15:09:32 -0000 Hi, On Fri, Nov 4, 2011 at 10:57 AM, Adrian Chadd wrote: > On 4 November 2011 07:53, Arnaud Lacombe wrote: > >> FWIW, referring to the technology two years ago in computer science is >> just like referring to the Prehistory to make a point about mankind >> today :/ > > .. and that's actually a valid thing to do. Not everything old is: > > * irrelevant; > * not applicable; > * useless to know. > > I think something high profile like the Pi would be great to support. > I heard the same thing about NetBSD and OpenMoko 3 or 4 years ago, nothing came through and it was just a rather standard ARM926. > So, let's do it. ;) > I still haven't heard from either gber@, cognet@ about the current status of `projects/armv6', especially wrt. known issues. - Arnaud From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 15:27:28 2011 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 B4D51106566C; Fri, 4 Nov 2011 15:27:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4CFA58FC0A; Fri, 4 Nov 2011 15:27:28 +0000 (UTC) Received: by vcbfo14 with SMTP id fo14so1927074vcb.13 for ; Fri, 04 Nov 2011 08:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=UUtUzbFlpO5AEftDAiaM1ny3eo9I3ek+pOyN2HAdM50=; b=fD7e2F1IKtO2XBEw/g3Cmh1I8K8JX9KIuFDAumApWDLnUr96uTF8RfZoiEZRF54crd jKW9+LoVAr5vuys9ujZTaMf6MjdWZpsCgb8h2fkT19YBCkOxUSRkD9SI4cQmbm5N+wEZ 0dooYnMEDbHgb2Ds1um4j2TdQsvXHHmPfO3LM= MIME-Version: 1.0 Received: by 10.52.24.102 with SMTP id t6mr14925730vdf.106.1320418663964; Fri, 04 Nov 2011 07:57:43 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.29.198 with HTTP; Fri, 4 Nov 2011 07:57:43 -0700 (PDT) In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> <1101963570.20111104135610@serebryakov.spb.ru> Date: Fri, 4 Nov 2011 07:57:43 -0700 X-Google-Sender-Auth: MZnDikLpQ6JpLT0QSkPsUZQ39K4 Message-ID: From: Adrian Chadd To: Arnaud Lacombe Content-Type: text/plain; charset=ISO-8859-1 Cc: lev@freebsd.org, Lars Engels , Nate Dobbs , Aleksandr Rybalko , hackers@freebsd.org, Greg 'groggy' Lehey Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 15:27:28 -0000 On 4 November 2011 07:53, Arnaud Lacombe wrote: > FWIW, referring to the technology two years ago in computer science is > just like referring to the Prehistory to make a point about mankind > today :/ .. and that's actually a valid thing to do. Not everything old is: * irrelevant; * not applicable; * useless to know. I think something high profile like the Pi would be great to support. So, let's do it. ;) Adrian From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 15:32:26 2011 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 23117106566B for ; Fri, 4 Nov 2011 15:32:26 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id D358F8FC12 for ; Fri, 4 Nov 2011 15:32:25 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:78af:244a:397b:8de1]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 0B0A34AC1C; Fri, 4 Nov 2011 19:31:53 +0400 (MSK) Date: Fri, 4 Nov 2011 19:31:32 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <1427176824.20111104193132@serebryakov.spb.ru> To: Arnaud Lacombe In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> <1101963570.20111104135610@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: Porting FreeBSD to Raspberry Pi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2011 15:32:26 -0000 Hello, Arnaud. You wrote 4 =D0=BD=D0=BE=D1=8F=D0=B1=D1=80=D1=8F 2011 =D0=B3., 18:53:22: > FWIW, referring to the technology two years ago in computer science is > just like referring to the Prehistory to make a point about mankind > today :/ Yep, completely relevant in most cases ;-) Same people, same wars, same love, same envy, same jealosy, nothing changed a lot. Really, people doesn't change a lot for last 100'000 years. Evolution is unstoppable, but very slow process ;-) But it completely irrelevant to NUMA support. As far as I understand, ULE scheduler knows about multi-level topology (maybe, with some glitches, according to mailing lists, but not fatal bugs), and there is no understanding what should do good NUMA-aware memory allocator, really, because threads tend to migrate from core to core and from socket to socket anyway. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 15:48:31 2011 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 2DC3D106564A; Fri, 4 Nov 2011 15:48:31 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 3BA0A8FC0A; Fri, 4 Nov 2011 15:48:30 +0000 (UTC) Received: by wwp14 with SMTP id 14so3790237wwp.31 for ; Fri, 04 Nov 2011 08:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=HjrF2yBffZh3LkA8jLl0iMHMAiJxgqWnSU4n/7Yocok=; b=wERzXow7TKYEUaF4nQ0T2C/G+Ur8RAeXA0+XsAdVFpobVFKgdguES6kwLUIgWztyMr 9XCw41V/sbnqEvAj6wvrVosrf0KzxjxtKB64C7tS+csmfnaV8K7rO9EOT2jhs6mZy86Z 2xYiw2Jehi+Zaots7WFz7VbmM/RxbB/fJsy+A= MIME-Version: 1.0 Received: by 10.227.60.143 with SMTP id p15mr18760604wbh.28.1320421709147; Fri, 04 Nov 2011 08:48:29 -0700 (PDT) Received: by 10.180.94.106 with HTTP; Fri, 4 Nov 2011 08:48:29 -0700 (PDT) In-Reply-To: <1101963570.20111104135610@serebryakov.spb.ru> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> <1101963570.20111104135610@serebryakov.spb.ru> Date: Fri, 4 Nov 2011 11:48:29 -0400 Message-ID: From: Arnaud Lacombe To: lev@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Nate Dobbs , Greg 'groggy' Lehey , Aleksandr Rybalko , hackers@freebsd.org, Lars Engels Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 15:48:31 -0000 Hi, 2011/11/4 Lev Serebryakov : > Hello, Arnaud. > You wrote 4 =D0=BD=D0=BE=D1=8F=D0=B1=D1=80=D1=8F 2011 =D0=B3., 6:30:18: > >> $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not expect >> being able to run FreeBSD on it before a few years :) > =C2=A0What is so special about A8? > It is the consumer technology of today. The best people can afford without being in ARM's R&D centers. Let me tell you what is going to happen. ARM11 has been around for years, it will take you a year or two to complete the project, nice, hacker thrill, you did it. However, by the time you release it, the Raspberry Pi will be sold-out and will be replaced by an ARMv7 core, smaller, faster, eventually cheaper. By that time, the current technology will be a 64bits MP-core ARMv8, And you will be in the exact same situation as today, FreeBSD lagging one or two generation behind Linux, keep up. Now, I agree, no battle is lost if there one fool to fight for it. - Arnaud From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 16:02:59 2011 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 780D6106564A for ; Fri, 4 Nov 2011 16:02:59 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 30D7B8FC17 for ; Fri, 4 Nov 2011 16:02:59 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:78af:244a:397b:8de1]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 795874AC1C; Fri, 4 Nov 2011 20:02:27 +0400 (MSK) Date: Fri, 4 Nov 2011 20:02:05 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1391364710.20111104200205@serebryakov.spb.ru> To: Arnaud Lacombe In-Reply-To: References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> <1101963570.20111104135610@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: Porting FreeBSD to Raspberry Pi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2011 16:02:59 -0000 Hello, Arnaud. You wrote 4 =D0=BD=D0=BE=D1=8F=D0=B1=D1=80=D1=8F 2011 =D0=B3., 19:48:29: >>> $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not expect >>> being able to run FreeBSD on it before a few years :) >> =C2=A0What is so special about A8? >> > It is the consumer technology of today. The best people can afford > without being in ARM's R&D centers. > Let me tell you what is going to happen. ARM11 has been around for > years, it will take you a year or two to complete the project, nice, > hacker thrill, you did it. However, by the time you release it, the > Raspberry Pi will be sold-out and will be replaced by an ARMv7 core, > smaller, faster, eventually cheaper. By that time, the current > technology will be a 64bits MP-core ARMv8, And you will be in the > exact same situation as today, FreeBSD lagging one or two generation > behind Linux, keep up. As I'm not a ARM specialist, I have several questions. Does porting to ARM11 (ARVv6, am I right?) will make porting to ARMv7 (Cortex) easier? You see, i486 adds some nice commands, tricks and configuration registers to i386, but porting to i486 after you have working port to i386/Protected mode is almost trivial. Or it is completely different architectures, which doesn't have anything in common? ARMvX is only a core, as far as I understand. How much different are implementations from different vendors? MMU? Bus? Configuration space? Why do you think, porting to different ARMs should go sequentially? :) Yes, we (FreeBSD) doesn't have a lot of resources, but as nobody could be forced to do what he don't want, it is better, IMHO, to have ARM11 port, that to not have any ARM port at all. But I agree, that port to Cortex-A8/A9 looks more interesting :) --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 16:53:13 2011 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 46EA61065674 for ; Fri, 4 Nov 2011 16:53:13 +0000 (UTC) (envelope-from marktinguely@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id E5F478FC0C for ; Fri, 4 Nov 2011 16:53:12 +0000 (UTC) Received: by qyc1 with SMTP id 1so1353838qyc.13 for ; Fri, 04 Nov 2011 09:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=OAfGso8V4Z2fLHXXjZL2IZrc0m7I/oE4hKj+tLAF4OM=; b=xJWEsMNtrNAJA9Bo/iuViJPLewnNSE5d6umtlwv3VU2xCDzyBjwkP57Px4/VygEwBc MMQb1WxCXTXNy4rmlR52MbMF5rfjsz1/lqeKf3ew59ASNfM5aB8KGQrmdIaxJUIagPsM z+OMDUwgFqEM99iunmcwlJH/U8WHaAV6cL9fI= Received: by 10.229.73.33 with SMTP id o33mr1873807qcj.250.1320425591788; Fri, 04 Nov 2011 09:53:11 -0700 (PDT) Received: from [192.168.1.100] ([216.129.185.155]) by mx.google.com with ESMTPS id di3sm9491751qab.11.2011.11.04.09.53.09 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Nov 2011 09:53:09 -0700 (PDT) Message-ID: <4EB41887.5090704@gmail.com> Date: Fri, 04 Nov 2011 11:53:27 -0500 From: Mark Tinguely User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: lev@FreeBSD.org References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> <1101963570.20111104135610@serebryakov.spb.ru> <1391364710.20111104200205@serebryakov.spb.ru> In-Reply-To: <1391364710.20111104200205@serebryakov.spb.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: hackers@freebsd.org, Arnaud Lacombe Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 16:53:13 -0000 On 11/4/2011 11:02 AM, Lev Serebryakov wrote: > Hello, Arnaud. > You wrote 4 ноября 2011 г., 19:48:29: > >>>> $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not expect >>>> being able to run FreeBSD on it before a few years :) >>> What is so special about A8? >>> >> It is the consumer technology of today. The best people can afford >> without being in ARM's R&D centers. >> Let me tell you what is going to happen. ARM11 has been around for >> years, it will take you a year or two to complete the project, nice, >> hacker thrill, you did it. However, by the time you release it, the >> Raspberry Pi will be sold-out and will be replaced by an ARMv7 core, >> smaller, faster, eventually cheaper. By that time, the current >> technology will be a 64bits MP-core ARMv8, And you will be in the >> exact same situation as today, FreeBSD lagging one or two generation >> behind Linux, keep up. I am sure people will be running ARM9 (ARMv5) for a long time. Your point that they will not be available as consumer products is well taken. > As I'm not a ARM specialist, I have several questions. > > Does porting to ARM11 (ARVv6, am I right?) will make porting to > ARMv7 (Cortex) easier? You see, i486 adds some nice commands, tricks > and configuration registers to i386, but porting to i486 after you > have working port to i386/Protected mode is almost trivial. > Or it is completely different architectures, which doesn't have > anything in common? > > ARMvX is only a core, as far as I understand. How much different are > implementations from different vendors? MMU? Bus? Configuration space? We can run ARMv6/ARMv7using the ARMv5 model. But it would not be very efficient. The ARMv6/7 new features can improve how things run. For example we have hardware assisted atomic commands, we can remove all the VIVT cache fixing code, and we can share the kernel address space in each memory map. But IMO, there are enough new features in the ARMv7 that finally make something pv_entrys un-necessary. The Cortex-A15 will be out next year with a whole new memory model. (40 bit physical, 32 bit virtual kernel, 40 bit hypervisor virtual). It will have an AMBA change that can shed some bus mastering problems. Besides the core new features, we always have all the different peripherals for each SoC... > > Why do you think, porting to different ARMs should go sequentially? > :) Yes, we (FreeBSD) doesn't have a lot of resources, but as nobody > could be forced to do what he don't want, it is better, IMHO, to have > ARM11 port, that to not have any ARM port at all. > > But I agree, that port to Cortex-A8/A9 looks more interesting :) > The Cortex-A9 pandaboard is $174. The Cortex-A8 and A9 have some differences, but they are more alike than the ARM11 and the Cortex-A8. It will be tough to stay current with the hardware advances without some kind of sponsorship. --Mark Tinguely. From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 18:29:42 2011 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 2C771106564A; Fri, 4 Nov 2011 18:29:42 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 814978FC13; Fri, 4 Nov 2011 18:29:41 +0000 (UTC) Received: by faar19 with SMTP id r19so4373133faa.13 for ; Fri, 04 Nov 2011 11:29:40 -0700 (PDT) Received: by 10.223.16.82 with SMTP id n18mr25777976faa.2.1320429968733; Fri, 04 Nov 2011 11:06:08 -0700 (PDT) Received: from rnote.ddteam.net (8-45-133-95.pool.ukrtel.net. [95.133.45.8]) by mx.google.com with ESMTPS id n25sm17785387fah.15.2011.11.04.11.06.06 (version=SSLv3 cipher=OTHER); Fri, 04 Nov 2011 11:06:07 -0700 (PDT) Date: Fri, 4 Nov 2011 20:06:03 +0200 From: Aleksandr Rybalko To: Mark Tinguely Message-Id: <20111104200603.f00e810d.ray@ddteam.net> In-Reply-To: <4EB41887.5090704@gmail.com> References: <20111103092222.GN37036@e-new.0x20.net> <20111103155802.7bfc1df0.ray@freebsd.org> <20111104004007.GA74831@dereel.lemis.com> <20111104015559.GE74831@dereel.lemis.com> <1101963570.20111104135610@serebryakov.spb.ru> <1391364710.20111104200205@serebryakov.spb.ru> <4EB41887.5090704@gmail.com> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: hackers@freebsd.org, lev@FreeBSD.org, Arnaud Lacombe Subject: Re: Porting FreeBSD to Raspberry Pi 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, 04 Nov 2011 18:29:42 -0000 On Fri, 04 Nov 2011 11:53:27 -0500 Mark Tinguely wrote: > On 11/4/2011 11:02 AM, Lev Serebryakov wrote: > > Hello, Arnaud. > > You wrote 4 ноября 2011 г., 19:48:29: > > > >>>> $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not > >>>> expect being able to run FreeBSD on it before a few years :) > >>> What is so special about A8? > >>> > >> It is the consumer technology of today. The best people can afford > >> without being in ARM's R&D centers. > >> Let me tell you what is going to happen. ARM11 has been around for > >> years, it will take you a year or two to complete the project, > >> nice, hacker thrill, you did it. However, by the time you release > >> it, the Raspberry Pi will be sold-out and will be replaced by an > >> ARMv7 core, smaller, faster, eventually cheaper. By that time, the > >> current technology will be a 64bits MP-core ARMv8, And you will be > >> in the exact same situation as today, FreeBSD lagging one or two > >> generation behind Linux, keep up. > > > I am sure people will be running ARM9 (ARMv5) for a long time. Your > point that they will not be available as consumer products is well > taken. > > > > As I'm not a ARM specialist, I have several questions. > > > > Does porting to ARM11 (ARVv6, am I right?) will make porting to > > ARMv7 (Cortex) easier? You see, i486 adds some nice commands, tricks > > and configuration registers to i386, but porting to i486 after you > > have working port to i386/Protected mode is almost trivial. > > Or it is completely different architectures, which doesn't have > > anything in common? > > > > ARMvX is only a core, as far as I understand. How much different > > are implementations from different vendors? MMU? Bus? Configuration > > space? > > We can run ARMv6/ARMv7using the ARMv5 model. But it would not be very > efficient. The ARMv6/7 new features can improve how things run. For > example we have hardware assisted atomic commands, we can remove all > the VIVT cache fixing code, and we can share the kernel address space > in each memory map. > > But IMO, there are enough new features in the ARMv7 that finally make > something pv_entrys un-necessary. > > The Cortex-A15 will be out next year with a whole new memory model. > (40 bit physical, 32 bit virtual kernel, 40 bit hypervisor virtual). > It will have an AMBA change that can shed some bus mastering problems. > > > Besides the core new features, we always have all the different > peripherals for each SoC... > > > > > Why do you think, porting to different ARMs should go > > sequentially? :) Yes, we (FreeBSD) doesn't have a lot of > > resources, but as nobody could be forced to do what he don't want, > > it is better, IMHO, to have ARM11 port, that to not have any ARM > > port at all. > > > > But I agree, that port to Cortex-A8/A9 looks more interesting :) > > > > The Cortex-A9 pandaboard is $174. The Cortex-A8 and A9 have some > differences, but they are more alike than the ARM11 and the Cortex-A8. > > It will be tough to stay current with the hardware advances without > some kind of sponsorship. > > --Mark Tinguely. > _______________________________________________ > 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" Yep. I use sponsorship of my company(D-Link) to port FreeBSD onto many our devices :) Q: Why to do any port, even on "new-old"(like a ARM11 in Pi) chip? A: (my personal opinion) 1. Most vendors not have even idea about producing device with FreeBSD, because FreeBSD sold only in expensive hardware without any links which OS inside. And no one said that FreeBSD can serve box with 32M RAM and 4M Flash. So second answer is advertising FreeBSD as embedded OS. And then, when vendors will know what FreeBSD not only well for servers but for small boxes also, then vendors will decide what to use: lame Windows CE, old Linux kernel with cut-off userland or STABLE/CURRENT FreeBSD. And as result some vendors will donate H/W for development and will cooperate on development with FreeBSD hackers. 2. I like to see FreeBSD on all devices around me, so for fun! :) P.S. I know last sentence of A: Part1 already begin to work :) -- Aleksandr Rybalko From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 11:01:32 2011 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 B593A1065670; Sat, 5 Nov 2011 11:01:32 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 165698FC14; Sat, 5 Nov 2011 11:01:31 +0000 (UTC) Received: by bkbzs8 with SMTP id zs8so40289bkb.13 for ; Sat, 05 Nov 2011 04:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=wKc26XfdCTmDqcwrb/5T30JHwK9ks+V5aiuYlu+WRF8=; b=gfuKy7SrK1Dc2fwkb8d7zFWLfDZvfnhHHO3AWQk/Vh5mnO2MdtGJFN9F6Zunnmrh9t ONQ0eqlLDWVoU9eyIxPKEmQXun2yODtoO5ZFRf8X0UsobDzpxytajnGnU7dmVJHBOQAc OFQYBBOFCpTNC6iyRa019w6Z3jDHFQPeSgFm4= Received: by 10.204.146.65 with SMTP id g1mr14166501bkv.63.1320490890705; Sat, 05 Nov 2011 04:01:30 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id k13sm9782558fah.0.2011.11.05.04.01.26 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Nov 2011 04:01:27 -0700 (PDT) From: Mikolaj Golub To: Kostik Belousov References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> X-Comment-To: Kostik Belousov Sender: Mikolaj Golub Date: Sat, 05 Nov 2011 13:01:23 +0200 In-Reply-To: <20111031094948.GB50300@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 31 Oct 2011 11:49:48 +0200") Message-ID: <86r51msuik.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 05 Nov 2011 11:01:32 -0000 On Mon, 31 Oct 2011 11:49:48 +0200 Kostik Belousov wrote: KB> I suspect this is my bug: Reading the GET_PS_STRINGS_CHUNK_SZ may validly KB> return EFAULT if the string is shorter than the chunk and aligned at KB> the end of the page, assuming the next page is not mapped. There should KB> be a fallback to fubyte() read loop. I remember that copyinstr() was KB> unsuitable. Hm, I thought that this issue was only for reading arg and env strings (which could be shorter than GET_PS_STRINGS_CHUNK_SZ), but investigating the cases when EFAULT was returned in my tests (running buildworld and procstat in loop) I saw that it also returned when reading other objects (like struct ps_strings), and a fallback to fubyte() read loop was successful in those cases too. So I updated the patch to do fallback for any type of read (although it does not contain a good comment explaining why fubyte() read might succeed when proc_rwmem() failed). Also there were the cases when EFAULT was returned because arg vector contained the NULL pointer. I observed this for sh processes. In lib/libc/gen/setproctitle.c I found this comment: oargc = ps_strings->ps_nargvstr; oargv = ps_strings->ps_argvstr; for (i = len = 0; i < oargc; i++) { /* * The program may have scribbled into its * argv array, e.g., to remove some arguments. * If that has happened, break out before * trying to call strlen on a NULL pointer. */ if (oargv[i] == NULL) { oargc = i; break; } I have updated my patch to do the same. Running buildworld test after these changes I have observed EFAULT only once, for cc process, when argv contained a pointer to 0x40. Also, for kern.proc.args some times errors like below are observed: procstat: sysctl: kern.proc.args: 58002: 8: Exec format error And for kern.proc.env: procstat: sysctl: kern.proc.env: 81352: 16: Device busy But I have not investigated these cases yet. The update version: http://people.freebsd.org/~trociny/env.sys.2.patch -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 11:02:56 2011 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 036771065673 for ; Sat, 5 Nov 2011 11:02:56 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4C98FC1B for ; Sat, 5 Nov 2011 11:02:55 +0000 (UTC) Received: by faar19 with SMTP id r19so5158082faa.13 for ; Sat, 05 Nov 2011 04:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:x-mailer; bh=MJ9IDSV5ISPF+V1kt2jN5WX//J/xUmnbneUjZ3Fv2T4=; b=w9DLDU45LLxF8O/VKI+PnZ3JNrbbduQs9Uj38ES1dbbXlKulOabibDwUulPTol6nPH jPuN7uUpZzK2G0P/zdwL/bCVromQxTuddCBUdQVuxSglwrDaYPpEIGQ0WPp3OGf99tRu kavCI58MGH7G4HzXsjAQizbv2X6td61DpXjes= Received: by 10.223.92.135 with SMTP id r7mr16258084fam.35.1320490974371; Sat, 05 Nov 2011 04:02:54 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id y2sm21111292fag.12.2011.11.05.04.02.44 (version=SSLv3 cipher=OTHER); Sat, 05 Nov 2011 04:02:52 -0700 (PDT) Message-ID: <20111105.110247.867.1@DOMY-PC> From: rank1seeker@gmail.com To: hackers@freebsd.org Date: Sat, 05 Nov 2011 12:02:47 +0100 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable X-Mailer: POP Peeper (3.8.0.0) Cc: Subject: BUG: 'glabel label' name's lenght, is truncated without err/warn 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, 05 Nov 2011 11:02:56 -0000 8.2R p4 both i386/amd64=0D=0A=0D=0A=0D=0ASupplied name of 16 = chars=0D=0A--=0D=0A# glabel label -v swap_679592d048a = ada0s3b=0D=0AMetadata value stored on = ada0s3b.=0D=0ADone.=0D=0A--=0D=0A=0D=0ATruncated to 15 = chars=0D=0A--=0D=0A# ll /dev/label=0D=0Atotal 0=0D=0Acrw-r----- 1 root = operator - 0, 133 Nov 5 11:41:54 2011 = swap_679592d048=0D=0A--=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6 From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 13:58:05 2011 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 C84CC1065673; Sat, 5 Nov 2011 13:58:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 64B1C8FC0A; Sat, 5 Nov 2011 13:58:04 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pA5Dw1YJ011620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 5 Nov 2011 15:58:01 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pA5Dw1Kn050911; Sat, 5 Nov 2011 15:58:01 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pA5Dw1Si050910; Sat, 5 Nov 2011 15:58:01 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 5 Nov 2011 15:58:01 +0200 From: Kostik Belousov To: Mikolaj Golub Message-ID: <20111105135801.GT50300@deviant.kiev.zoral.com.ua> References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> <86vcr21agm.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KdGTaGOs1nMop4we" Content-Disposition: inline In-Reply-To: <86vcr21agm.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 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 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 05 Nov 2011 13:58:06 -0000 --KdGTaGOs1nMop4we Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 02, 2011 at 11:27:37PM +0200, Mikolaj Golub wrote: > > On Mon, 31 Oct 2011 11:49:48 +0200 Kostik Belousov wrote: > > KB> I think it is better to use sys/elf.h over the machine/elf.h. > > KB> Please change the comment for PROC_AUXV_MAX to "Safety limit on > KB> auxv size". Also, it worth adding a comment saying that we are > KB> reading aux vectors twice, first to get a size, second time to > KB> fetch a content, for simplicity. > > KB> When reading aux vector, if the PROC_AUXV_MAX entries are > KB> iterated over, and we still not reached AT_NULL, the return error > KB> is 0. Was it intended ? > > KB> For PROC_ARG and PROC_ENV, you blindly trust the read values of > KB> the arg and env vector sizes. This can easily cause kernel panics > KB> due to unability to malloc the requested memory. I recommend to > KB> put some clump, and twice of (PATH_MAX + ARG_MAX) is probably > KB> enough (see kern_exec.c, in particular, exec_alloc_args). Also, > KB> you might use the swappable memory for the strings as well, in > KB> the style of exec_alloc_args(). > > KB> I suspect this is my bug: Reading the GET_PS_STRINGS_CHUNK_SZ may > KB> validly return EFAULT if the string is shorter than the chunk > KB> and aligned at the end of the page, assuming the next page is > KB> not mapped. There should be a fallback to fubyte() read loop. I > KB> remember that copyinstr() was unsuitable. > > KB> The checks for P_WEXIT in the linprocfs routines look strange. > KB> Since you are unlocking the process right after the check, it > KB> does not make sense. In fact, the checks are not needed, I > KB> believe, since pseudofs already did the hold (see e.g. pfs_read > KB> and pfs_visible). > > Here is an updated version of the patch. Also available at > > http://people.freebsd.org/~trociny/env.sys.1.patch > > I decided to use the same constant (PROC_VECTOR_MAX) for limiting both > the number of arg or env strings and the numbex of aux vectors. > > Also I decided not to play with exec_alloc_args :-). + if (error == EFAULT) { + for (i = 0; i < len; i++) { + c = fubyte(sptr + i); + if (c < 0) As a purely stylistical issue, compare with -1. + return (EFAULT); + buf[i] = (char)c; + if (c == '\0') + break; + } + error = 0; + } + return error; Put () around error. + /* + * Check that that the address is in user space. + */ + if (vptr + 1 < VM_MIN_ADDRESS + 1 || vptr >= VM_MAXUSER_ADDRESS) + return (ENOEXEC); Why is this needed ? I think that the aux vector must be naturally aligned. You can return ENOEXEC early if vptr is not aligned. Why the blank after the loop statement in get_ps_strings() ? There shall be blank lines after the '{' in proc_getargv() and proc_getenvv(). Note that using cached pargs is somewhat inconsistent with the digging into ps_strings. procfs_doproccmdline() can benefit from your work. --KdGTaGOs1nMop4we Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk61QOkACgkQC3+MBN1Mb4iLrQCfSx0FaNO0VUK/tqaGtGCvedNR A94An3n7F1WOAjbrTIqT6wQ2cbcG8Paa =F5gk -----END PGP SIGNATURE----- --KdGTaGOs1nMop4we-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 14:24:07 2011 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 644AB106564A for ; Sat, 5 Nov 2011 14:24:07 +0000 (UTC) (envelope-from luke@foolishgames.com) Received: from stargazer.midnightbsd.org (cl-218.chi-02.us.sixxs.net [IPv6:2001:4978:f:d9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 030738FC16 for ; Sat, 5 Nov 2011 14:24:06 +0000 (UTC) Received: from [192.168.1.107] (70-91-226-205-BusName-Michigan.hfc.comcastbusiness.net [70.91.226.205]) (authenticated bits=0) by stargazer.midnightbsd.org (8.14.5/8.14.5) with ESMTP id pA5EO43L076060 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sat, 5 Nov 2011 10:24:05 -0400 (EDT) (envelope-from luke@foolishgames.com) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97.3 at stargazer.midnightbsd.org X-Authentication-Warning: stargazer.midnightbsd.org: Host 70-91-226-205-BusName-Michigan.hfc.comcastbusiness.net [70.91.226.205] claimed to be [192.168.1.107] X-Habeas-Swe-2: brightly anticipated In-Reply-To: <20111105.110247.867.1@DOMY-PC> X-Habeas-Swe-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-Swe-4: Copyright 2002 Habeas (tm) X-Habeas-Swe-1: winter into spring Mime-Version: 1.0 (Apple Message framework v1251.1) X-Habeas-Swe-9: mark in spam to . Date: Sat, 5 Nov 2011 10:24:04 -0400 X-Habeas-Swe-6: email in exchange for a license for this Habeas Message-Id: <1859A0FF-C3BF-4EC3-9CC6-FA97B9AF5C99@foolishgames.com> To: rank1seeker@gmail.com X-Habeas-Swe-3: like Habeas SWE (tm) Content-Transfer-Encoding: quoted-printable From: Lucas Holt References: <20111105.110247.867.1@DOMY-PC> X-Habeas-Swe-8: Message (HCM) and not spam. Please report use of this Content-Type: text/plain; charset=us-ascii X-Habeas-Swe-5: Sender Warranted Email (SWE) (tm). The sender of this X-Mailer: Apple Mail (2.1251.1) Cc: hackers@freebsd.org Subject: Re: BUG: 'glabel label' name's lenght, is truncated without err/warn 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, 05 Nov 2011 14:24:07 -0000 On Nov 5, 2011, at 7:02 AM, rank1seeker@gmail.com wrote: > 8.2R p4 both i386/amd64 >=20 >=20 > Supplied name of 16 chars > -- > # glabel label -v swap_679592d048a ada0s3b > Metadata value stored on ada0s3b. > Done. > -- >=20 > Truncated to 15 chars > -- > # ll /dev/label > total 0 > crw-r----- 1 root operator - 0, 133 Nov 5 11:41:54 2011 = swap_679592d048 > -- >=20 The maximum size for the field is 16 so that explains the behavior = you're seeing. It's strlcpy'd in. Something like the following patch = would work: --- src/sbin/geom/class/label/geom_label.c 2008/11/21 21:05:31 = 1.3 +++ src/sbin/geom/class/label/geom_label.c 2011/11/05 14:15:23 = 1.4 @@ -118,6 +118,12 @@ label_label(struct gctl_req *req) return; } =20 + label =3D gctl_get_ascii(req, "arg0"); + if (strlen(label) > 15) { + gctl_error(req, "Label cannot exceed 15 characters"); + return; + } + /* * Clear last sector first to spoil all components if device = exists. */ @@ -131,7 +137,6 @@ label_label(struct gctl_req *req) =20 strlcpy(md.md_magic, G_LABEL_MAGIC, sizeof(md.md_magic)); md.md_version =3D G_LABEL_VERSION; - label =3D gctl_get_ascii(req, "arg0"); strlcpy(md.md_label, label, sizeof(md.md_label)); md.md_provsize =3D g_get_mediasize(name); if (md.md_provsize =3D=3D 0) { Lucas Holt Luke@FoolishGames.com ________________________________________________________ MidnightBSD.org (Free OS) JustJournal.com (Free blogging) From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 15:40:29 2011 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 3652A106564A; Sat, 5 Nov 2011 15:40:29 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 905B08FC1B; Sat, 5 Nov 2011 15:40:28 +0000 (UTC) Received: by faar19 with SMTP id r19so5374879faa.13 for ; Sat, 05 Nov 2011 08:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:message-id :user-agent:mime-version:content-type; bh=1WGAzYG7WwSVXRSN1FipqA+gub0PuUjXqN3XCubxbzw=; b=t2VL6I8dLxwWSOFoc89/U+yJrF6rBDTETRecJgLrxgVoEd8jE8tTcZE0qzZb+HZBqQ VKbQaBkwzHx3AbTECJ+RPt00OJprBtSHTpavXNo71lIwHDwNMDYSU7zDCEo0v/B6sySA tlep1rZb/IyJge5C2TbVh/3yzGjYwEiWdBJO0= Received: by 10.223.63.206 with SMTP id c14mr32322899fai.3.1320507627356; Sat, 05 Nov 2011 08:40:27 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id t28sm1116885faf.13.2011.11.05.08.40.24 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Nov 2011 08:40:25 -0700 (PDT) From: Mikolaj Golub To: Kostik Belousov References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> <86vcr21agm.fsf@kopusha.home.net> <20111105135801.GT50300@deviant.kiev.zoral.com.ua> X-Comment-To: Kostik Belousov Sender: Mikolaj Golub Date: Sat, 05 Nov 2011 17:40:22 +0200 Message-ID: <86ehxmpogp.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 05 Nov 2011 15:40:29 -0000 On Sat, 5 Nov 2011 15:58:01 +0200 Kostik Belousov wrote: KB> + if (error == EFAULT) { KB> + for (i = 0; i < len; i++) { KB> + c = fubyte(sptr + i); KB> + if (c < 0) KB> As a purely stylistical issue, compare with -1. KB> + return (EFAULT); KB> + buf[i] = (char)c; KB> + if (c == '\0') KB> + break; KB> + } KB> + error = 0; KB> + } KB> + return error; KB> Put () around error. Thanks. KB> + /* KB> + * Check that that the address is in user space. KB> + */ KB> + if (vptr + 1 < VM_MIN_ADDRESS + 1 || vptr >= VM_MAXUSER_ADDRESS) KB> + return (ENOEXEC); KB> Why is this needed ? I saw this check in libkvm for ps_argvstr and ps_envstr and decided to add it too. Just some additional check that ps_string fields, which can be overwritten by the user, look reasonable. If you think this is not very useful I remove it. KB> I think that the aux vector must be naturally aligned. You can return KB> ENOEXEC early if vptr is not aligned. Not sure I see what you mean. vptr for auxv is calculated just couple lines above, and I check the result here, in the part common for all vector types. BTW, investigating the cases when I got procstat: sysctl: kern.proc.args: 58002: 8: Exec format error they were because the PROC_VECTOR_MAX limit (512 entries, as it is in linprocfs and libkvm) is small for real world cases: get_proc_vector(pid = rm[47883], type = 0): vsize (3009) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[47883], type = 0): vsize (3009) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[47890], type = 0): vsize (3008) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[47890], type = 0): vsize (3008) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[47897], type = 0): vsize (4511) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[47897], type = 0): vsize (4511) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[47897], type = 0): vsize (4511) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[48044], type = 0): vsize (611) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[52189], type = 0): vsize (772) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[52192], type = 0): vsize (1157) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[55685], type = 0): vsize (1041) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[55687], type = 0): vsize (1040) > PROC_VECTOR_MAX (512)) get_proc_vector(pid = rm[55690], type = 0): vsize (1559) > PROC_VECTOR_MAX (512)) So I am going to change it to ARG_MAX and use independent limit (256 entries) for auxv. KB> Why the blank after the loop statement in get_ps_strings() ? Sorry, what blank you mean? I don't see it in get_ps_strings(). May be you mean the blank line in get_proc_vector() before return? KB> There shall be blank lines after the '{' in proc_getargv() and proc_getenvv(). Ah, sure. KB> Note that using cached pargs is somewhat inconsistent with the digging KB> into ps_strings. KB> procfs_doproccmdline() can benefit from your work. Thanks, I will look at it :-). -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 15:44:48 2011 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 E9EFC1065670; Sat, 5 Nov 2011 15:44:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 858DD8FC08; Sat, 5 Nov 2011 15:44:47 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pA5Fihi0020514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 5 Nov 2011 17:44:43 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pA5FihsP051342; Sat, 5 Nov 2011 17:44:43 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pA5FihNr051341; Sat, 5 Nov 2011 17:44:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 5 Nov 2011 17:44:43 +0200 From: Kostik Belousov To: Mikolaj Golub Message-ID: <20111105154443.GB50300@deviant.kiev.zoral.com.ua> References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> <86vcr21agm.fsf@kopusha.home.net> <20111105135801.GT50300@deviant.kiev.zoral.com.ua> <86ehxmpogp.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="08AydYmtx6Uix/Nv" Content-Disposition: inline In-Reply-To: <86ehxmpogp.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 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 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 05 Nov 2011 15:44:48 -0000 --08AydYmtx6Uix/Nv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 05, 2011 at 05:40:22PM +0200, Mikolaj Golub wrote: >=20 > On Sat, 5 Nov 2011 15:58:01 +0200 Kostik Belousov wrote: >=20 > KB> + if (error =3D=3D EFAULT) { > KB> + for (i =3D 0; i < len; i++) { > KB> + c =3D fubyte(sptr + i); > KB> + if (c < 0) > KB> As a purely stylistical issue, compare with -1. >=20 > KB> + return (EFAULT); > KB> + buf[i] =3D (char)c; > KB> + if (c =3D=3D '\0') > KB> + break; > KB> + } > KB> + error =3D 0; > KB> + } > KB> + return error; > KB> Put () around error. >=20 > Thanks. >=20 > KB> + /* > KB> + * Check that that the address is in user space. > KB> + */ > KB> + if (vptr + 1 < VM_MIN_ADDRESS + 1 || vptr >=3D VM_MAXUSER_A= DDRESS) > KB> + return (ENOEXEC); > KB> Why is this needed ? >=20 > I saw this check in libkvm for ps_argvstr and ps_envstr and decided to ad= d it > too. Just some additional check that ps_string fields, which can be > overwritten by the user, look reasonable. If you think this is not very u= seful > I remove it. The proc_rwmem() must handle access outside the user VA (and it does). >=20 > KB> I think that the aux vector must be naturally aligned. You can return > KB> ENOEXEC early if vptr is not aligned. >=20 > Not sure I see what you mean. vptr for auxv is calculated just couple lin= es > above, and I check the result here, in the part common for all vector typ= es. You do not check for the alignment. Am I wrong ? >=20 > BTW, investigating the cases when I got >=20 > procstat: sysctl: kern.proc.args: 58002: 8: Exec format error >=20 > they were because the PROC_VECTOR_MAX limit (512 entries, as it is in > linprocfs and libkvm) is small for real world cases: >=20 > get_proc_vector(pid =3D rm[47883], type =3D 0): vsize (3009) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[47883], type =3D 0): vsize (3009) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[47890], type =3D 0): vsize (3008) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[47890], type =3D 0): vsize (3008) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[47897], type =3D 0): vsize (4511) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[47897], type =3D 0): vsize (4511) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[47897], type =3D 0): vsize (4511) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[48044], type =3D 0): vsize (611) > PROC_VECTOR= _MAX (512)) > get_proc_vector(pid =3D rm[52189], type =3D 0): vsize (772) > PROC_VECTOR= _MAX (512)) > get_proc_vector(pid =3D rm[52192], type =3D 0): vsize (1157) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[55685], type =3D 0): vsize (1041) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[55687], type =3D 0): vsize (1040) > PROC_VECTO= R_MAX (512)) > get_proc_vector(pid =3D rm[55690], type =3D 0): vsize (1559) > PROC_VECTO= R_MAX (512)) >=20 > So I am going to change it to ARG_MAX and use independent limit (256 entr= ies) > for auxv. Ok. >=20 > KB> Why the blank after the loop statement in get_ps_strings() ? >=20 > Sorry, what blank you mean? I don't see it in get_ps_strings(). May be you > mean the blank line in get_proc_vector() before return? + for (sptr =3D proc_vector[i]; ; sptr +=3D GET_PS_STRINGS_CHUNK_SZ) { + + error =3D proc_read_mem(td, p, (vm_offset_t)sptr, The line between for() and error =3D . >=20 > KB> There shall be blank lines after the '{' in proc_getargv() and proc_= getenvv(). >=20 > Ah, sure. >=20 > KB> Note that using cached pargs is somewhat inconsistent with the diggi= ng > KB> into ps_strings. >=20 > KB> procfs_doproccmdline() can benefit from your work. >=20 > Thanks, I will look at it :-). >=20 > --=20 > Mikolaj Golub --08AydYmtx6Uix/Nv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk61WesACgkQC3+MBN1Mb4gRCQCeMB3QrNQvG3UWVDIE/lYLYhc8 59MAoPRQHL/caLPhBlC01+ZawijZKxoB =FRlh -----END PGP SIGNATURE----- --08AydYmtx6Uix/Nv-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 16:42:20 2011 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 DC6C11065672 for ; Sat, 5 Nov 2011 16:42:20 +0000 (UTC) (envelope-from falkman@gamozo.org) Received: from fireblade.netcore2k.net (fireblade.netcore2k.net [92.48.127.72]) by mx1.freebsd.org (Postfix) with ESMTP id 695F98FC0A for ; Sat, 5 Nov 2011 16:42:19 +0000 (UTC) Received: by fireblade.netcore2k.net with ESMTP id pA5GgGHa027661 for ; Sat, 5 Nov 2011 16:42:18 GMT Date: Sat, 5 Nov 2011 12:42:12 -0400 From: Brandon Falk To: freebsd-hackers@freebsd.org Message-ID: <20111105164212.GB50362@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Subject: cdparanoia stuck in cbwait 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, 05 Nov 2011 16:42:20 -0000 Hello, I was got some read errors when I was reading from my disk, which is fine. But then cdparanoia starting to no longer respond. Now it's zombied and sitting in cbwait. `kill -9 ` does not take it down, it seems like it's stuck in the kernel (?). Is this an issue to look at cdparanoia for, or to look in the kernel? Perhaps cdparanoia or the kernel should have some sort of a timeout? Currently it looks like the only fix is a full reboot. Regards, Brandon Falk From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 17:09:48 2011 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 4CC4F106566B for ; Sat, 5 Nov 2011 17:09:48 +0000 (UTC) (envelope-from falkman@gamozo.org) Received: from fireblade.netcore2k.net (fireblade.netcore2k.net [92.48.127.72]) by mx1.freebsd.org (Postfix) with ESMTP id DE00D8FC0A for ; Sat, 5 Nov 2011 17:09:47 +0000 (UTC) Received: by fireblade.netcore2k.net with ESMTP id pA5H9iXH027825 ; Sat, 5 Nov 2011 17:09:46 GMT Date: Sat, 5 Nov 2011 13:09:40 -0400 From: Brandon Falk To: Mark Johnston Message-ID: <20111105170940.GC50362@localhost> References: <20111105164212.GB50362@localhost> <20111105164802.GA50515@raichu.mark-home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111105164802.GA50515@raichu.mark-home> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: cdparanoia stuck in cbwait 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, 05 Nov 2011 17:09:48 -0000 On Sat, Nov 05, 2011 at 12:48:02PM -0400, Mark Johnston wrote: > On Sat, Nov 05, 2011 at 12:42:12PM -0400, Brandon Falk wrote: > > Hello, > > > > I was got some read errors when I was reading from my disk, which is > > fine. But then cdparanoia starting to no longer respond. Now it's > > zombied and sitting in cbwait. `kill -9 ` does not take it down, it > > seems like it's stuck in the kernel (?). Is this an issue to look at > > cdparanoia for, or to look in the kernel? Perhaps cdparanoia or the > > kernel should have some sort of a timeout? Currently it looks like the > > only fix is a full reboot. > > I've seen this problem a couple of times on -BETA2 as well. I haven't > had time to try and figure out what's causing it, but a camcontrol reset > of the bus will "fix" the problem without a reboot IIRC. > > -Mark No luck on the reset. When I reset, it says it was reset successfully, but cdparanoia still sits zombied, and nothing changes. If I do `camcontrol stop`, camcontrol hangs and becomes a zombie too (until I kill it's parent process) -Brandon From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 17:14:04 2011 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 3331D106566C for ; Sat, 5 Nov 2011 17:14:04 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id E570E8FC15 for ; Sat, 5 Nov 2011 17:14:03 +0000 (UTC) Received: by vws11 with SMTP id 11so356938vws.13 for ; Sat, 05 Nov 2011 10:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=osmElzN4UsruDW2a4Qkry+fYJ1nVZglmCUERzeIv4nc=; b=WeYb4Xn8fibO47r1DryllxBgOw68lAIgG2+/C+rQvemhJxhrxdul3N2aU5mP8OdbDm 15jxiexhh9mW42Q80a1SxRLtXV46ZcZRk+6px17e4AGh0sLNfVxmW+7kDvZj+DrZ/K06 kaBHDk2onhRyytFtSn8pQqzQU7xTuIP/qAXHA= Received: by 10.52.88.51 with SMTP id bd19mr19839194vdb.20.1320511898651; Sat, 05 Nov 2011 09:51:38 -0700 (PDT) Received: from raichu.mark-home ([69.166.26.247]) by mx.google.com with ESMTPS id ha1sm19907627vdb.17.2011.11.05.09.51.37 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Nov 2011 09:51:37 -0700 (PDT) Date: Sat, 5 Nov 2011 12:48:02 -0400 From: Mark Johnston To: Brandon Falk Message-ID: <20111105164802.GA50515@raichu.mark-home> References: <20111105164212.GB50362@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111105164212.GB50362@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: cdparanoia stuck in cbwait 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, 05 Nov 2011 17:14:04 -0000 On Sat, Nov 05, 2011 at 12:42:12PM -0400, Brandon Falk wrote: > Hello, > > I was got some read errors when I was reading from my disk, which is > fine. But then cdparanoia starting to no longer respond. Now it's > zombied and sitting in cbwait. `kill -9 ` does not take it down, it > seems like it's stuck in the kernel (?). Is this an issue to look at > cdparanoia for, or to look in the kernel? Perhaps cdparanoia or the > kernel should have some sort of a timeout? Currently it looks like the > only fix is a full reboot. I've seen this problem a couple of times on -BETA2 as well. I haven't had time to try and figure out what's causing it, but a camcontrol reset of the bus will "fix" the problem without a reboot IIRC. -Mark From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 17:29:44 2011 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 48E09106564A for ; Sat, 5 Nov 2011 17:29:44 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.31.35]) by mx1.freebsd.org (Postfix) with ESMTP id 0A8AB8FC1A for ; Sat, 5 Nov 2011 17:29:43 +0000 (UTC) Received: from [87.79.158.243] (helo=fabiankeil.de) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1RMjtF-00081x-FN; Sat, 05 Nov 2011 18:18:45 +0100 Date: Sat, 5 Nov 2011 18:17:22 +0100 From: Fabian Keil To: Brandon Falk Message-ID: <20111105181722.501dea14@fabiankeil.de> In-Reply-To: <20111105164212.GB50362@localhost> References: <20111105164212.GB50362@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/1XMPc1bDaQAs+/2SkUYLunp"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: freebsd-hackers@freebsd.org Subject: Re: cdparanoia stuck in cbwait 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, 05 Nov 2011 17:29:44 -0000 --Sig_/1XMPc1bDaQAs+/2SkUYLunp Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Brandon Falk wrote: > I was got some read errors when I was reading from my disk, which is > fine. But then cdparanoia starting to no longer respond. Now it's > zombied and sitting in cbwait. `kill -9 ` does not take it down, it > seems like it's stuck in the kernel (?). Is this an issue to look at > cdparanoia for, or to look in the kernel? Perhaps cdparanoia or the > kernel should have some sort of a timeout? Currently it looks like the > only fix is a full reboot. I believe this is a kernel issue. Processes can become unresponsive and unkillable while waiting for blocks to be read and in case of read failures that can take quite some time. Note that the kernel itself has a somewhat high default retry count which multiplies the retries the firmware already does transparently, so a failed read operation can take minutes to complete while a successful one takes fractions of a second. And after the kernel eventually reports a read failure the application may "smartly" decide to retry a few times as well, again multiplying the time of the delay. Before ripping CDs and DVDs with invalid sectors I therefore set kern.cam.cd.retry_count to 0 and patched vobcopy to skip invalid-sector ranges faster. For some DVDs, this reduces the ripping time from several hours to about 20 minutes. How long did you wait for cdparanoia to die? If you only waited a couple of minutes, it's possible that rebooting may not have been necessary. Fabian --Sig_/1XMPc1bDaQAs+/2SkUYLunp Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk61b6QACgkQBYqIVf93VJ2HwACfbkpBtrqFQjOUHzuYqmYidXOg KD0AnA6ps/oq0Nn6lKjkt2ywS3ECO3K0 =j3Lk -----END PGP SIGNATURE----- --Sig_/1XMPc1bDaQAs+/2SkUYLunp-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 17:47:27 2011 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 CC3B8106564A for ; Sat, 5 Nov 2011 17:47:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDD08FC12 for ; Sat, 5 Nov 2011 17:47:27 +0000 (UTC) Received: by ywt32 with SMTP id 32so4845143ywt.13 for ; Sat, 05 Nov 2011 10:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=XTvAbOi5y5tjKWNCRLnyc85XHZFsVc5N83CpfLAdwok=; b=pjtPWSz6F0r1mE68VbVRo91CAoF/+yjCmEKrsLzyqhmxUJsRJUV3JRu8W0mptsdRw2 76subcbkKj53FCucsO+8Pmpl+bgwvrflpim2bqY6uQtzZuLd1gHf01MNYmXzTdSx+SWk uBrEb0D6aJdRhKTxkMHQjFZHF9n848Jlr0B4Q= Received: by 10.150.225.19 with SMTP id x19mr1617711ybg.93.1320515246797; Sat, 05 Nov 2011 10:47:26 -0700 (PDT) Received: from pikachu.uwaterloo.ca (129-97-197-61.uwaterloo.ca. [129.97.197.61]) by mx.google.com with ESMTPS id r4sm5425279anl.5.2011.11.05.10.47.25 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Nov 2011 10:47:26 -0700 (PDT) Date: Sat, 5 Nov 2011 13:47:03 -0400 From: Mark Johnston To: Brandon Falk Message-ID: <20111105174703.GA2666@pikachu.uwaterloo.ca> References: <20111105164212.GB50362@localhost> <20111105164802.GA50515@raichu.mark-home> <20111105170940.GC50362@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111105170940.GC50362@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: cdparanoia stuck in cbwait 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, 05 Nov 2011 17:47:27 -0000 On Sat, Nov 05, 2011 at 01:09:40PM -0400, Brandon Falk wrote: > On Sat, Nov 05, 2011 at 12:48:02PM -0400, Mark Johnston wrote: > > On Sat, Nov 05, 2011 at 12:42:12PM -0400, Brandon Falk wrote: > > > Hello, > > > > > > I was got some read errors when I was reading from my disk, which is > > > fine. But then cdparanoia starting to no longer respond. Now it's > > > zombied and sitting in cbwait. `kill -9 ` does not take it down, it > > > seems like it's stuck in the kernel (?). Is this an issue to look at > > > cdparanoia for, or to look in the kernel? Perhaps cdparanoia or the > > > kernel should have some sort of a timeout? Currently it looks like the > > > only fix is a full reboot. > > > > I've seen this problem a couple of times on -BETA2 as well. I haven't > > had time to try and figure out what's causing it, but a camcontrol reset > > of the bus will "fix" the problem without a reboot IIRC. > > > > -Mark > > No luck on the reset. When I reset, it says it was reset successfully, > but cdparanoia still sits zombied, and nothing changes. If I do > `camcontrol stop`, camcontrol hangs and becomes a zombie too (until I > kill it's parent process) Hm, perhaps I'm misremembering it. I'll try to reproduce it when I get a chance. From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 18:59:35 2011 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 AB7B8106564A; Sat, 5 Nov 2011 18:59:35 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0E50F8FC0A; Sat, 5 Nov 2011 18:59:34 +0000 (UTC) Received: by faar19 with SMTP id r19so5540892faa.13 for ; Sat, 05 Nov 2011 11:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=HmPFLkhEzOJzUFsnImczOtRd8TJya36QfUs3AC4y56o=; b=FWEVp5MooQedWuY2vEP6qW86+clNtRLa9f5wr4HpMqV9OAuVrYGg0RS0ccfOweyLpl ZgNjNRwFovQy2XWoVWaonkpMBmC+WOJMsUp3mFRj2K0mz1T15IMAthcJLQA0GZTuK6kL Qi6KJ9z/3fIyvKYJ8IjCMFd5NOmlSCDdOZ918= Received: by 10.223.75.129 with SMTP id y1mr17705759faj.34.1320519574092; Sat, 05 Nov 2011 11:59:34 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id k13sm11159513fah.0.2011.11.05.11.59.23 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Nov 2011 11:59:30 -0700 (PDT) From: Mikolaj Golub To: Kostik Belousov References: <86y5wkeuw9.fsf@kopusha.home.net> <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> <86vcr21agm.fsf@kopusha.home.net> <20111105135801.GT50300@deviant.kiev.zoral.com.ua> <86ehxmpogp.fsf@kopusha.home.net> <20111105154443.GB50300@deviant.kiev.zoral.com.ua> X-Comment-To: Kostik Belousov Sender: Mikolaj Golub Date: Sat, 05 Nov 2011 20:59:21 +0200 In-Reply-To: <20111105154443.GB50300@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Sat, 5 Nov 2011 17:44:43 +0200") Message-ID: <86ehxmjsza.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 05 Nov 2011 18:59:35 -0000 On Sat, 5 Nov 2011 17:44:43 +0200 Kostik Belousov wrote: >> KB> I think that the aux vector must be naturally aligned. You can return >> KB> ENOEXEC early if vptr is not aligned. >> >> Not sure I see what you mean. vptr for auxv is calculated just couple lines >> above, and I check the result here, in the part common for all vector types. KB> You do not check for the alignment. Am I wrong ? I see now. If natural alignment means "addr % sizeof(aux) == 0" then the aux vectors are not naturally aligned. After adding this check: if (vptr % sizeof(aux) != 0) return (ENOEXEC); I started to observe many ENOEXEC errors. Adding printf showed that the vectors are half size aligned. On i386: get_proc_vector(pid = getty[3442], type = 2): vptr (2143284876) % sizeof(aux) (8) = 4) On amd64: get_proc_vector(pid = getty[2425], type = 2): vptr (140737488346568) % sizeof(aux) (16) = 8) Looking at exec_copyout_strings() from kern_exec.c, how destp is calculated, I think they are sizeof(char *) aligned. Do you think it is worth adding the check for sizeof(char *) alignment? if (vptr % (sizeof(char *) != 0) return (ENOEXEC); -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 19:45:57 2011 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 7780F1065676; Sat, 5 Nov 2011 19:45:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 125D08FC13; Sat, 5 Nov 2011 19:45:56 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pA5JjrPn040551 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 5 Nov 2011 21:45:53 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pA5JjrZi052143; Sat, 5 Nov 2011 21:45:53 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pA5Jjr6B052142; Sat, 5 Nov 2011 21:45:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 5 Nov 2011 21:45:53 +0200 From: Kostik Belousov To: Mikolaj Golub Message-ID: <20111105194553.GK50300@deviant.kiev.zoral.com.ua> References: <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> <86vcr21agm.fsf@kopusha.home.net> <20111105135801.GT50300@deviant.kiev.zoral.com.ua> <86ehxmpogp.fsf@kopusha.home.net> <20111105154443.GB50300@deviant.kiev.zoral.com.ua> <86ehxmjsza.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Epf9GrANMtiMvSmS" Content-Disposition: inline In-Reply-To: <86ehxmjsza.fsf@kopusha.home.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 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 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 05 Nov 2011 19:45:57 -0000 --Epf9GrANMtiMvSmS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 05, 2011 at 08:59:21PM +0200, Mikolaj Golub wrote: >=20 > On Sat, 5 Nov 2011 17:44:43 +0200 Kostik Belousov wrote: >=20 > >> KB> I think that the aux vector must be naturally aligned. You can r= eturn > >> KB> ENOEXEC early if vptr is not aligned. > >>=20 > >> Not sure I see what you mean. vptr for auxv is calculated just couple= lines > >> above, and I check the result here, in the part common for all vector= types. > KB> You do not check for the alignment. Am I wrong ? >=20 > I see now. If natural alignment means "addr % sizeof(aux) =3D=3D 0" then = the aux > vectors are not naturally aligned. After adding this check: >=20 > if (vptr % sizeof(aux) !=3D 0) > return (ENOEXEC); No, the natural alignment of the structure is the alignment of the most demanding member. So it is 4 bytes on 32bit, and 8 bytes on 64. >=20 > I started to observe many ENOEXEC errors. Adding printf showed that the > vectors are half size aligned. >=20 > On i386: >=20 > get_proc_vector(pid =3D getty[3442], type =3D 2): vptr (2143284876) % siz= eof(aux) (8) =3D 4) >=20 > On amd64: >=20 > get_proc_vector(pid =3D getty[2425], type =3D 2): vptr (140737488346568) = % sizeof(aux) (16) =3D 8) >=20 > Looking at exec_copyout_strings() from kern_exec.c, how destp is calculat= ed, I > think they are sizeof(char *) aligned. >=20 > Do you think it is worth adding the check for sizeof(char *) alignment? >=20 > if (vptr % (sizeof(char *) !=3D 0) > return (ENOEXEC); I suggest to use #if __ELF_WORD_SIZE =3D=3D 32 or 64. --Epf9GrANMtiMvSmS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk61knAACgkQC3+MBN1Mb4jTLwCeN7ZGTs3fkzi2O2u4ekESbzyP xrMAni700mDgj4WYfQb0ZWWHVWGPkWeG =DPWn -----END PGP SIGNATURE----- --Epf9GrANMtiMvSmS-- From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 20:37:52 2011 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 062FD1065670; Sat, 5 Nov 2011 20:37:52 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5D2C68FC0A; Sat, 5 Nov 2011 20:37:50 +0000 (UTC) Received: by faar19 with SMTP id r19so5647446faa.13 for ; Sat, 05 Nov 2011 13:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=bsL8YR0vkN+7SWcP/DSxN4Bh91j4hzN5MU1fcLXeGt0=; b=nSIWVedAb0qNUOSDoldjyxEtPYaPamQLk0xgtCCpIUpkT5qA7Q1BdJUiHsaXd8jiQx Xu+x3YZ5ip3JK9aTDQf2qtaTFTJHtZJmsMHJAsAQBeK+UpvLq9mnJSZMLnrJd+okAESq RfmJam9VJozkc8lQ8c/6IVah+DJwKpI482Lq8= Received: by 10.223.85.134 with SMTP id o6mr18996551fal.27.1320525470169; Sat, 05 Nov 2011 13:37:50 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id d22sm23241622fad.19.2011.11.05.13.37.48 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Nov 2011 13:37:49 -0700 (PDT) From: Mikolaj Golub To: Kostik Belousov References: <20111016171005.GB50300@deviant.kiev.zoral.com.ua> <86aa8qozyx.fsf@kopusha.home.net> <20111025082451.GO50300@deviant.kiev.zoral.com.ua> <86aa8k2im0.fsf@kopusha.home.net> <20111031094948.GB50300@deviant.kiev.zoral.com.ua> <86vcr21agm.fsf@kopusha.home.net> <20111105135801.GT50300@deviant.kiev.zoral.com.ua> <86ehxmpogp.fsf@kopusha.home.net> <20111105154443.GB50300@deviant.kiev.zoral.com.ua> <86ehxmjsza.fsf@kopusha.home.net> <20111105194553.GK50300@deviant.kiev.zoral.com.ua> X-Comment-To: Kostik Belousov Sender: Mikolaj Golub Date: Sat, 05 Nov 2011 22:37:46 +0200 In-Reply-To: <20111105194553.GK50300@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Sat, 5 Nov 2011 21:45:53 +0200") Message-ID: <8662iyjof9.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: "ps -e" without procfs(5) 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, 05 Nov 2011 20:37:52 -0000 On Sat, 5 Nov 2011 21:45:53 +0200 Kostik Belousov wrote: KB> On Sat, Nov 05, 2011 at 08:59:21PM +0200, Mikolaj Golub wrote: >> >> On Sat, 5 Nov 2011 17:44:43 +0200 Kostik Belousov wrote: >> >> >> KB> I think that the aux vector must be naturally aligned. You can return >> >> KB> ENOEXEC early if vptr is not aligned. >> >> >> >> Not sure I see what you mean. vptr for auxv is calculated just couple lines >> >> above, and I check the result here, in the part common for all vector types. >> KB> You do not check for the alignment. Am I wrong ? >> >> I see now. If natural alignment means "addr % sizeof(aux) == 0" then the aux >> vectors are not naturally aligned. After adding this check: >> >> if (vptr % sizeof(aux) != 0) >> return (ENOEXEC); KB> No, the natural alignment of the structure is the alignment of the most KB> demanding member. So it is 4 bytes on 32bit, and 8 bytes on 64. >> >> I started to observe many ENOEXEC errors. Adding printf showed that the >> vectors are half size aligned. >> >> On i386: >> >> get_proc_vector(pid = getty[3442], type = 2): vptr (2143284876) % sizeof(aux) (8) = 4) >> >> On amd64: >> >> get_proc_vector(pid = getty[2425], type = 2): vptr (140737488346568) % sizeof(aux) (16) = 8) >> >> Looking at exec_copyout_strings() from kern_exec.c, how destp is calculated, I >> think they are sizeof(char *) aligned. >> >> Do you think it is worth adding the check for sizeof(char *) alignment? >> >> if (vptr % (sizeof(char *) != 0) >> return (ENOEXEC); KB> I suggest to use #if __ELF_WORD_SIZE == 32 or 64. Thanks. The updated patch: http://people.freebsd.org/~trociny/env.sys.3.patch -- Mikolaj Golub From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 19:26:17 2011 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 CC4B4106566B; Sat, 5 Nov 2011 19:26:17 +0000 (UTC) (envelope-from ben.r.gray@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0519D8FC18; Sat, 5 Nov 2011 19:26:16 +0000 (UTC) Received: by wyg36 with SMTP id 36so4566044wyg.13 for ; Sat, 05 Nov 2011 12:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ubq93a3X94mBbTjhrRofmQG308/LctNj3uPtBl6cgCs=; b=u9k9BBg9HBVudbHLqzPDOn2A/B6+WuvPE5/EgT2O383tthfobNesoKNv7oRu+0n6cp Gf6IAzZerHXMsjbNzSq0g+/SXW58+2ZrGG9veieR76lJLZQ3vZisnSWKl3NyigPkUAoJ gIom1/DFv9ibUEEzULtV9AbuRIVq7I9XDNXVQ= Received: by 10.180.105.102 with SMTP id gl6mr3503351wib.46.1320519801335; Sat, 05 Nov 2011 12:03:21 -0700 (PDT) Received: from Bens-MBP.local (93-97-50-127.zone5.bethere.co.uk. [93.97.50.127]) by mx.google.com with ESMTPS id z5sm2015389wix.5.2011.11.05.12.03.18 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Nov 2011 12:03:19 -0700 (PDT) Message-ID: <4EB58875.1050908@gmail.com> Date: Sat, 05 Nov 2011 19:03:17 +0000 From: Ben Gray User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Arnaud Lacombe References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 05 Nov 2011 21:35:58 +0000 Cc: Greg 'groggy' Lehey , Nate Dobbs , Aleksandr Rybalko , hackers@freebsd.org Subject: Re: FreeBSD on ARM Cortex board [Was: Porting FreeBSD to Raspberry Pi] 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, 05 Nov 2011 19:26:17 -0000 On 04/11/2011 02:51, Arnaud Lacombe wrote: > Hi, > > [Starting a new thread, added Ben Gray to the Cc: list] > > On Thu, Nov 3, 2011 at 10:30 PM, Arnaud Lacombe wrote: >> Hi, >> >> On Thu, Nov 3, 2011 at 10:05 PM, Nate Dobbs wrote: >>> On Thu, Nov 3, 2011 at 9:55 PM, Greg 'groggy' Lehey >>> wrote: >>>> On Thursday, 3 November 2011 at 21:05:54 -0400, Arnaud Lacombe wrote: >>>>> On Thu, Nov 3, 2011 at 8:40 PM, Greg 'groggy' Lehey >>>>> wrote: >>>>>> On Thursday, 3 November 2011 at 11:33:25 -0400, Arnaud Lacombe wrote: >>>>>>> On Thu, Nov 3, 2011 at 11:20 AM, Nate Dobbs >>>>>>> wrote: >>>>>>>> 10 year old core or not, the ARM is the worlds most widely used >>>>>>>> processor; >>>>>>>> >>>>>>> Please read what I said correctly, I said "this ARM11 is obsolete" >>>>>>> (even if still used, for sure) ... >>>>>> Clearly price is an issue for this device. What's so bad about ARM11 >>>>>> that it shouldn't be used? >>>>>> >>>>> If you read my original comment, I did point out the $25 price tag was >>>>> pretty much the only interesting thing. Now, what it has been designed >>>>> for, multimedia, is going to be handled by a closed-source binary blob >>>>> without datasheet, so let me turn back the question: what do you >>>>> expect doing with it ? >>>> That's not turning back the question; that's a separate question. But >>>> it's a good one. I don't really see it as a multimedia device. My >>>> interest would be in little embedded agents in different parts of the >>>> house, for things like measuring temperatures. I'm sure lots of other >>>> applications will come to mind. >>>> >>>> And yes, I'll probably use the supplied Linux port. But if a FreeBSD >>>> alternative becomes available, I'd certainly prefer that. >>>> >>>> Greg >>>> -- >>>> Sent from my desktop computer >>>> Finger grog@FreeBSD.org for PGP public key. >>>> See complete headers for address and phone numbers. >>>> This message is digitally signed. If your Microsoft MUA reports >>>> problems, please read http://tinyurl.com/broken-mua >>> I agree with groggy, something I'd personally use it for is a small SSH >>> server to allow a pinhole into my home network. It would serve as a very >>> good replacement for the mac mini that's sitting in my DMZ simply handling >>> connections for my SSH tunnel so I can bypass the proxy at work. >>> >>> Power savings would be significant and it would be plenty powerful to handle >>> this task. A small webcam server comes to mind as well; there could be >>> plenty of useful things I could think of outside the realm of multimedia. >>> >> you certainly want: >> >> http://beagleboard.org/bone >> >> $89, 700MHz Cortex A8, 256MB DRR2, micro-SD. However, do not expect >> being able to run FreeBSD on it before a few years :) >> > actually, some initial work has been started by Ben Gray: > > http://code.google.com/p/beagleboard-freebsd/ > > and > > https://gitorious.org/+freebsd-omap-team/freebsd/freebsd-omap/ > > - Arnaud Hi, while it's true that I've done some initial porting work to the beagleboard and pandaboard it's not entirely ready to go. The port contains many hacks and bits of uglyness (is that a word?), anyway just a warning, you can take that code and boot a kernel but userspace tends to crash, which makes the whole thing pretty useless. Also the code is written for the beagleboard and pandaboard, not the beaglebone, which contains a different lower spec SoC, however I expect a lot of components are similar and therefore I imagine most of the drivers could be reused. The bright news - I was recently contacted by a bloke called Oliver Houchard who has picked up my code and started merging it into the armv6/7 branch. Once that is done and debugged I think the support should be pretty good and should in theory work directly out of the box (svn). Cheers, Ben. From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 22:30:21 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id B7EF3106566C; Sat, 5 Nov 2011 22:30:21 +0000 (UTC) Date: Sat, 5 Nov 2011 22:30:21 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20111105223021.GA52651@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: reducing compiler instances during buildkernel 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, 05 Nov 2011 22:30:21 -0000 hi there, when doing buildkernel one notices that the gcc or clang instances are spawned and closed so fast that top isn't fast enough to show them and the "last pid" field increases quite fast. obviously this produces quite a lot of syscall overhead. wouldn't it be possible to somehow spawn N gcc or clang instances (make -jN buildkernel) and then pipe the src to one of those N instances? just like with something like multics N processes were started and then people used the job control language to load binaries into those processes. cheers. alex From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 22:34:17 2011 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 922581065674 for ; Sat, 5 Nov 2011 22:34:17 +0000 (UTC) (envelope-from falkman@gamozo.org) Received: from fireblade.netcore2k.net (fireblade.netcore2k.net [92.48.127.72]) by mx1.freebsd.org (Postfix) with ESMTP id 2CE0B8FC16 for ; Sat, 5 Nov 2011 22:34:16 +0000 (UTC) Received: by fireblade.netcore2k.net with ESMTP id pA5MYD7r029449 for ; Sat, 5 Nov 2011 22:34:15 GMT Date: Sat, 5 Nov 2011 18:34:08 -0400 From: Brandon Falk To: freebsd-hackers@freebsd.org Message-ID: <20111105223408.GA1785@localhost> References: <20111105164212.GB50362@localhost> <20111105164802.GA50515@raichu.mark-home> <20111105170940.GC50362@localhost> <20111105174703.GA2666@pikachu.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111105174703.GA2666@pikachu.uwaterloo.ca> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: cdparanoia stuck in cbwait 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, 05 Nov 2011 22:34:17 -0000 On Sat, Nov 05, 2011 at 01:47:03PM -0400, Mark Johnston wrote: > On Sat, Nov 05, 2011 at 01:09:40PM -0400, Brandon Falk wrote: > > On Sat, Nov 05, 2011 at 12:48:02PM -0400, Mark Johnston wrote: > > > On Sat, Nov 05, 2011 at 12:42:12PM -0400, Brandon Falk wrote: > > > > Hello, > > > > > > > > I was got some read errors when I was reading from my disk, which is > > > > fine. But then cdparanoia starting to no longer respond. Now it's > > > > zombied and sitting in cbwait. `kill -9 ` does not take it down, it > > > > seems like it's stuck in the kernel (?). Is this an issue to look at > > > > cdparanoia for, or to look in the kernel? Perhaps cdparanoia or the > > > > kernel should have some sort of a timeout? Currently it looks like the > > > > only fix is a full reboot. > > > > > > I've seen this problem a couple of times on -BETA2 as well. I haven't > > > had time to try and figure out what's causing it, but a camcontrol reset > > > of the bus will "fix" the problem without a reboot IIRC. > > > > > > -Mark > > > > No luck on the reset. When I reset, it says it was reset successfully, > > but cdparanoia still sits zombied, and nothing changes. If I do > > `camcontrol stop`, camcontrol hangs and becomes a zombie too (until I > > kill it's parent process) > > Hm, perhaps I'm misremembering it. I'll try to reproduce it when I get a > chance. I did a reboot, which ended up hanging... I had to forcefully reboot as it seems the reboot process must not have liked that lingering request. I booted up, and I got the same error when the CD was in the drive... I've not had issues with other CDs, nor did I have an issue till I ripped the first 8 tracks of this one... that's when everything went wrong. I'll try the sysctl stuff mentioned before. -Brandon