From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 08:38:43 2007 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 37DB516A41B for ; Mon, 23 Jul 2007 08:38:43 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.freebsd.org (Postfix) with ESMTP id 131D213C46E for ; Mon, 23 Jul 2007 08:38:43 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l6N8cgjd028981 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 Jul 2007 01:38:42 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l6N8cg0R014179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 23 Jul 2007 01:38:42 -0700 Message-ID: <46A46910.9080901@u.washington.edu> Date: Mon, 23 Jul 2007 01:38:40 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.23.12033 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: Subject: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 08:38:43 -0000 As the subject suggests I'm trying to determine how I can daemonize a C process, outside of using the rc infrastructure, so that it won't exit when the TTY exists. Does anyone know any quick references or examples? Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 08:41:02 2007 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 D79D216A417 for ; Mon, 23 Jul 2007 08:41:02 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.freebsd.org (Postfix) with ESMTP id B1F3E13C45D for ; Mon, 23 Jul 2007 08:41:02 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l6N8f2t5004945 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 Jul 2007 01:41:02 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l6N8f1Mx014270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 23 Jul 2007 01:41:02 -0700 Message-ID: <46A4699C.5080906@u.washington.edu> Date: Mon, 23 Jul 2007 01:41:00 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: hackers@freebsd.org References: <46A46910.9080901@u.washington.edu> In-Reply-To: <46A46910.9080901@u.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.23.12033 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 08:41:02 -0000 Garrett Cooper wrote: > As the subject suggests I'm trying to determine how I can daemonize > a C process, outside of using the rc infrastructure, so that it won't > exit when the TTY exists. Does anyone know any quick references or > examples? > Thanks, > -Garrett s/C process/C application process/ s/exists/exits/ s/any quick/of any quick/ Tonight's not my night for communicating I suppose :(.. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 08:43:47 2007 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 D8AB916A41A for ; Mon, 23 Jul 2007 08:43:47 +0000 (UTC) (envelope-from corecode@fs.ei.tum.de) Received: from stella.fs.ei.tum.de (stella.fs.ei.tum.de [IPv6:2001:4ca0:22ff:10::7]) by mx1.freebsd.org (Postfix) with ESMTP id 24CF813C442 for ; Mon, 23 Jul 2007 08:43:47 +0000 (UTC) (envelope-from corecode@fs.ei.tum.de) Received: from localhost (localhost [127.0.0.1]) by localhost.fs.ei.tum.de (Postfix) with ESMTP id E7D72280F1; Mon, 23 Jul 2007 10:43:44 +0200 (CEST) X-Virus-Scanned: by amavisd-new at fs.ei.tum.de Received: from stella.fs.ei.tum.de ([127.0.0.1]) by localhost (stella.fs.ei.tum.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5rolGH50tf30; Mon, 23 Jul 2007 10:43:44 +0200 (CEST) Received: from sweatshorts.home.corecode.ath.cx (85-218-11-202.dclient.lsne.ch [85.218.11.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by stella.fs.ei.tum.de (Postfix) with ESMTP id 90E3B280E7; Mon, 23 Jul 2007 10:43:44 +0200 (CEST) Message-ID: <46A46A40.1080004@fs.ei.tum.de> Date: Mon, 23 Jul 2007 10:43:44 +0200 From: Simon 'corecode' Schubert User-Agent: Thunderbird 2.0.0.4 (X11/20070627) MIME-Version: 1.0 To: Garrett Cooper References: <46A46910.9080901@u.washington.edu> <46A4699C.5080906@u.washington.edu> In-Reply-To: <46A4699C.5080906@u.washington.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: hackers@freebsd.org Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 08:43:47 -0000 Garrett Cooper wrote: > Garrett Cooper wrote: >> As the subject suggests I'm trying to determine how I can daemonize >> a C process, outside of using the rc infrastructure, so that it won't >> exit when the TTY exists. Does anyone know any quick references or >> examples? >> Thanks, >> -Garrett > > s/C process/C application process/ > s/exists/exits/ > s/any quick/of any quick/ I suggest daemon(3) if it doesn't have to be portable. cheers simon -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \ From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 08:56:42 2007 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 40B6116A417 for ; Mon, 23 Jul 2007 08:56:42 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.freebsd.org (Postfix) with ESMTP id 19BB813C428 for ; Mon, 23 Jul 2007 08:56:42 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l6N8udAx031329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Jul 2007 01:56:39 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l6N8uc38002527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 23 Jul 2007 01:56:38 -0700 Message-ID: <46A46D44.9050504@u.washington.edu> Date: Mon, 23 Jul 2007 01:56:36 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Jose-Marcio.Martins@ensmp.fr References: <46A46910.9080901@u.washington.edu> <46A4699C.5080906@u.washington.edu> <46A46A40.1080004@fs.ei.tum.de> <46A46CE2.4060607@ensmp.fr> In-Reply-To: <46A46CE2.4060607@ensmp.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.23.13736 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: hackers@freebsd.org Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 08:56:42 -0000 Jose-Marcio Martins da Cruz wrote: > Simon 'corecode' Schubert wrote: >> Garrett Cooper wrote: >>> Garrett Cooper wrote: >>>> As the subject suggests I'm trying to determine how I can >>>> daemonize a C process, outside of using the rc infrastructure, so >>>> that it won't exit when the TTY exists. Does anyone know any quick >>>> references or examples? > > >> >> I suggest daemon(3) if it doesn't have to be portable. > > Or something like this, if it has to be portable or if you don't want > to modify C code : > > nohup /pathto/c-application & > > You'll eventually need to add things like redirect stdout to /dev/null... > > Ok, many thanks for the suggestions all :). I'm more than happy not to do the double fork(2) solution =\.. -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 08:59:21 2007 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 0060A16A468 for ; Mon, 23 Jul 2007 08:59:20 +0000 (UTC) (envelope-from peter@boosten.org) Received: from ra.egypt.nl (cp268254-a.landg1.lb.home.nl [213.51.103.48]) by mx1.freebsd.org (Postfix) with ESMTP id A357613C483 for ; Mon, 23 Jul 2007 08:59:20 +0000 (UTC) (envelope-from peter@boosten.org) Received: from ra.egypt.nl (localhost.egypt.nl [127.0.0.1]) by ra.egypt.nl (Postfix) with ESMTP id A856939884 for ; Mon, 23 Jul 2007 10:59:19 +0200 (CEST) Received: by ra.egypt.nl (Postfix, from userid 1008) id 34FF63987F; Mon, 23 Jul 2007 11:04:54 +0200 (CEST) Received: from ra.egypt.nl (localhost.egypt.nl [127.0.0.1]) by ra.egypt.nl (Postfix) with ESMTP id 2846A3987B for ; Mon, 23 Jul 2007 10:51:20 +0200 (CEST) Received: by ra.egypt.nl (Postfix, from userid 1008) id E999A39868; Mon, 23 Jul 2007 10:53:37 +0200 (CEST) Received: from ra.egypt.nl (localhost.egypt.nl [127.0.0.1]) by ra.egypt.nl (Postfix) with ESMTP id CA53439884 for ; Mon, 23 Jul 2007 10:48:34 +0200 (CEST) Received: by ra.egypt.nl (Postfix, from userid 501) id 8406B3987F; Mon, 23 Jul 2007 10:48:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on ra.egypt.nl X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham version=3.2.1 Received: from [127.0.0.1] (xp.egypt.nl [192.168.13.35]) by ra.egypt.nl (Postfix) with ESMTP id C8ED839868 for ; Mon, 23 Jul 2007 10:48:30 +0200 (CEST) Message-ID: <46A46B5C.5080003@boosten.org> Date: Mon, 23 Jul 2007 10:48:28 +0200 From: Peter Boosten User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060516 Thunderbird/1.5.0.4 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: hackers@freebsd.org References: <46A46910.9080901@u.washington.edu> <46A4699C.5080906@u.washington.edu> <46A46A40.1080004@fs.ei.tum.de> In-Reply-To: <46A46A40.1080004@fs.ei.tum.de> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 000758-3, 07/22/2007), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: ClamAV using ClamSMTP Cc: Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 08:59:21 -0000 Simon 'corecode' Schubert wrote: > Garrett Cooper wrote: >> Garrett Cooper wrote: >>> As the subject suggests I'm trying to determine how I can >>> daemonize a C process, outside of using the rc infrastructure, so >>> that it won't exit when the TTY exists. Does anyone know any quick >>> references or examples? >>> Thanks, >>> -Garrett >> >> s/C process/C application process/ >> s/exists/exits/ >> s/any quick/of any quick/ > > I suggest daemon(3) if it doesn't have to be portable. > What's wrong with nohup(1)? Peter -- http://www.boosten.org From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 09:07:11 2007 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 607FC16A41F for ; Mon, 23 Jul 2007 09:07:11 +0000 (UTC) (envelope-from Jose-Marcio.Martins@ensmp.fr) Received: from cascavel.ensmp.fr (cascavel.ensmp.fr [194.214.158.227]) by mx1.freebsd.org (Postfix) with ESMTP id ECD1D13C4B3 for ; Mon, 23 Jul 2007 09:07:10 +0000 (UTC) (envelope-from Jose-Marcio.Martins@ensmp.fr) Received: from [10.3.5.5] (minho [10.3.5.5]) (authenticated bits=0) by cascavel.ensmp.fr (8.14.0/8.14.0/JMMC-23/Mar/2006) with ESMTP id l6N8swtc024914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Jul 2007 10:54:59 +0200 (MEST) Message-ID: <46A46CE2.4060607@ensmp.fr> Date: Mon, 23 Jul 2007 10:54:58 +0200 From: Jose-Marcio Martins da Cruz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070531 Fedora/1.0.9-1.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: Garrett Cooper References: <46A46910.9080901@u.washington.edu> <46A4699C.5080906@u.washington.edu> <46A46A40.1080004@fs.ei.tum.de> In-Reply-To: <46A46A40.1080004@fs.ei.tum.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at cascavel with ID 46A46CE2.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-j-chkmail-Score: MSGID : 46A46CE2.000 on cascavel : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Status: HAM Cc: hackers@freebsd.org Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jose-Marcio.Martins@ensmp.fr List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 09:07:11 -0000 Simon 'corecode' Schubert wrote: > Garrett Cooper wrote: >> Garrett Cooper wrote: >>> As the subject suggests I'm trying to determine how I can >>> daemonize a C process, outside of using the rc infrastructure, so >>> that it won't exit when the TTY exists. Does anyone know any quick >>> references or examples? > > I suggest daemon(3) if it doesn't have to be portable. Or something like this, if it has to be portable or if you don't want to modify C code : nohup /pathto/c-application & You'll eventually need to add things like redirect stdout to /dev/null... -- --------------------------------------------------------------- Jose Marcio MARTINS DA CRUZ Ecole des Mines de Paris http://j-chkmail.ensmp.fr 60, bd Saint Michel http://www.ensmp.fr/~martins 75272 - PARIS CEDEX 06 mailto:Jose-Marcio.Martins@ensmp.fr From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 09:08:09 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A9C016A468 for ; Mon, 23 Jul 2007 09:08:09 +0000 (UTC) (envelope-from jacques@trispen.com) Received: from brolloks.trispen.com (brolloks.trispen.com [196.22.177.34]) by mx1.freebsd.org (Postfix) with ESMTP id CC30813C478 for ; Mon, 23 Jul 2007 09:08:08 +0000 (UTC) (envelope-from jacques@trispen.com) Received: by brolloks.trispen.com (Postfix, from userid 1000) id BA56620A; Mon, 23 Jul 2007 10:46:50 +0200 (SAST) Date: Mon, 23 Jul 2007 10:46:50 +0200 From: Jacques Fourie To: Garrett Cooper Message-ID: <20070723084650.GA32117@trispen.com> References: <46A46910.9080901@u.washington.edu> <46A4699C.5080906@u.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46A4699C.5080906@u.washington.edu> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jf@trispen.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 09:08:09 -0000 On Mon, Jul 23, 2007 at 01:41:00AM -0700, Garrett Cooper wrote: > Garrett Cooper wrote: > > As the subject suggests I'm trying to determine how I can daemonize > >a C process, outside of using the rc infrastructure, so that it won't > >exit when the TTY exists. Does anyone know any quick references or > >examples? > >Thanks, > >-Garrett > > s/C process/C application process/ > s/exists/exits/ > s/any quick/of any quick/ > > Tonight's not my night for communicating I suppose :(.. > -Garrett > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" If you can modify the source, have a look at the daemon() function : man 3 daemon jacques From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 09:15:27 2007 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 E6B7E16A418 for ; Mon, 23 Jul 2007 09:15:27 +0000 (UTC) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id D401913C457 for ; Mon, 23 Jul 2007 09:15:27 +0000 (UTC) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id E791B1A4D81; Mon, 23 Jul 2007 01:48:10 -0700 (PDT) Date: Mon, 23 Jul 2007 10:48:10 +0200 From: Maxime Henrion To: Garrett Cooper Message-ID: <20070723084810.GE44455@elvis.mu.org> References: <46A46910.9080901@u.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46A46910.9080901@u.washington.edu> User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 09:15:28 -0000 Garrett Cooper wrote: > As the subject suggests I'm trying to determine how I can daemonize > a C process, outside of using the rc infrastructure, so that it won't > exit when the TTY exists. Does anyone know any quick references or examples? > Thanks, > -Garrett The proper way to do this is to use the setsid() function. If it is somehow not available on one of your target system, some people use a hack which consists in calling fork() two times to daemonize the process; that is supposed to work too. Cheers, Maxime From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 16:44:12 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8710516A468 for ; Mon, 23 Jul 2007 16:44:12 +0000 (UTC) (envelope-from kristis.makris@asu.edu) Received: from mail.mkgnu.net (net.mkgnu.net [67.40.69.52]) by mx1.freebsd.org (Postfix) with ESMTP id 315C013C459 for ; Mon, 23 Jul 2007 16:44:09 +0000 (UTC) (envelope-from kristis.makris@asu.edu) Received: from [192.168.1.5] ([::ffff:87.228.217.9]) (AUTH: LOGIN mkgnu@mkgnu.net) by morpheus with esmtp; Mon, 23 Jul 2007 09:29:46 -0700 id 00014F2D.46A4D77B.00003630 From: Kristis Makris To: linux-kernel@vger.kernel.org, freebsd-hackers@freebsd.org, gnusol-devel@lists.sonic.net, opensolaris-code@opensolaris.org Date: Mon, 23 Jul 2007 09:32:09 -0700 Message-Id: <1185208329.20434.23.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_morpheus-13872-1185208189-0001-2" X-Mailer: Evolution 2.6.3 X-Mailman-Approved-At: Mon, 23 Jul 2007 17:08:11 +0000 Cc: Subject: Dynamic kernel updates using DynAMOS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 23 Jul 2007 16:44:12 -0000 This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_morpheus-13872-1185208189-0001-2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello, please CC me as I'm not registered in these lists. I'd like to announce DynAMOS, a dynamic kernel updating system that supports Linux and could be of help in kernel development and high availability. This system has been a research project at Arizona State University for the past 3 years and has finally become publicly available under the GPL. Feedback would be very much appreciated. It is an on-the-fly kernel updating system that enables commodity operating systems to gain adaptive and mutative capabilities without kernel recompilation or reboot. It employs a new dynamic instrumentation technique called adaptive function cloning. Execution flow can be switched adaptively among multiple editions of functions, possibly concurrently running. This approach becomes the foundation for dynamic replacement of non-quiescent kernel subsystems when the timeliness of an update depends on synchronization of multiple kernel paths. This system can assist in kernel code prototyping and testing. It can help fine-tune and benchmark live code (e.g. a scheduling policy) that would otherwise require a full recompilation and reboot to adjust. It can also be of help in long-lived systems that need to patch security holes or benefit from new kernel features without downtime (e.g. parallel computing clusters). A long-term goal is to automate dynamically updating a live kernel from one version to the next. Dynamic updates we've so far been able to carry out with DynAMOS include: o Extending the Linux 2.2 kernel process scheduler to support unobtrusive, fine-grain cycle stealing offered by the Linger-Longer system. o Introducing adaptive memory paging for efficient gang-scheduling in a Linux 2.4 cluster. o Adaptively updating the Linux pipefs implementation during large data transfers. o Introducing kernel-assisted process checkpointing offered by EPCKPT in Linux 2.4. o Applying security fixes provided by the Openwall project. o Injecting performance monitoring functionality in kernel functions. o Updating DynAMOS itself. The current release is functional on Linux with ports to FreeBSD and GNU OpenSolaris waiting for bugs to be ironed out. It builds with gcc 3.3 and 2.95, but not 4.x (yet). It comes with examples (e.g. update get_pid(), update Linux 2.4 scheduler) of dynamic kernel updates for people to easily try it out and comes prepackaged in .rpm and .deb for Linux 2.4 (but not 2.2 or 2.6). The source distribution contains the more complex updates mentioned above (adaptive updating, kernel thread updates, checkpointing) and if compiled from source will work for Linux versions 2.2-2.6. People interested in learning more about the system can read: o The project webpage:=20 http://freshmeat.net/projects/dynamos/ o The current users manual: http://files.mkgnu.net/files/dynamos/doc/latest_manual/html-single/manual.h= tml o A paper published in EuroSys '07 discussing the design and technical issues surrounding this work: http://files.mkgnu.net/files/dynamos/doc/papers/dynamos_eurosys_07.pdf o A set of presentation slides that summarize the system: http://files.mkgnu.net/files/dynamos/doc/papers/dynamos_eurosys_07.ppt I hope people will find this work useful and interesting enough for it to continue being developed. Thanks, Kristis --=_morpheus-13872-1185208189-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGpNgJ/KuTDwnYLxERAnz0AKCZBj0rJ+N46Acx1Sgkv00EEdOkEgCgnyM+ IfF+K1sc0CWROBTNKI97rEY= =CF9/ -----END PGP SIGNATURE----- --=_morpheus-13872-1185208189-0001-2-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 23 20:49:46 2007 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 572B816A418 for ; Mon, 23 Jul 2007 20:49:46 +0000 (UTC) (envelope-from jaj@hcl-club.lu) Received: from 0b10111.de (hcl-club.lu [62.75.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 2C63F13C457 for ; Mon, 23 Jul 2007 20:49:46 +0000 (UTC) (envelope-from jaj@hcl-club.lu) Received: from spaceman.my.domain (d90-129-9-224.cust.tele2.lu [90.129.9.224]) by 0b10111.de (Postfix) with ESMTP id 37D75872C2D0; Mon, 23 Jul 2007 22:16:24 +0200 (CEST) Date: Mon, 23 Jul 2007 22:16:19 +0200 From: Jona Joachim To: Garrett Cooper Message-ID: <20070723221619.2f336beb@spaceman.my.domain> In-Reply-To: <46A46910.9080901@u.washington.edu> References: <46A46910.9080901@u.washington.edu> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.12; x86_64-unknown-openbsd4.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 23 Jul 2007 21:07:39 +0000 Cc: hackers@freebsd.org Subject: Re: How do I daemonize a process? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2007 20:49:46 -0000 On Mon, 23 Jul 2007 01:38:40 -0700 Garrett Cooper wrote: > As the subject suggests I'm trying to determine how I can > daemonize a C process, outside of using the rc infrastructure, so > that it won't exit when the TTY exists. Does anyone know any quick > references or examples? Thanks, The daemonize() function in this small program of mine: http://hcl-club.lu/svn/development/c/console%20c/fetchiterd/fetchiterd.c is the right portable way to do it according to "Advanced Programming in the UNIX Environment" by Stevens and Rago. (I love that book) Regards, Jona From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 01:20:20 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C25816A417 for ; Tue, 24 Jul 2007 01:20:20 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from mail05.ifxnetworks.com (mail05.ifxnetworks.com [190.61.128.15]) by mx1.freebsd.org (Postfix) with ESMTP id 0A61A13C467 for ; Tue, 24 Jul 2007 01:20:19 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 3724 invoked from network); 24 Jul 2007 00:53:38 -0000 X-Spam-DCC: CTc-dcc2: mail05.ifxnetworks.com 1031; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on mail05.ifxnetworks.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=7.0 tests=RDNS_NONE autolearn=disabled version=3.2.1 Received: from unknown (HELO quake) (dmw@unete.cl@[200.73.82.7]) (envelope-sender ) by mail05.ifxnetworks.com (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 24 Jul 2007 00:53:37 -0000 From: Daniel Molina Wegener Organization: DMW To: FreeBSD Hackers Date: Mon, 23 Jul 2007 20:52:58 -0400 User-Agent: KMail/1.9.6 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707232052.58485.dmw@unete.cl> Subject: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 01:20:20 -0000 Hello, I need information about few things, I hope someone can help me and thanks in advance. a) Is there any function or variable that tells me which is the root user UID in the system, or root always have 0 and it's an "elegant" option to compare the variables or structure members against zero. b) Can normal users look for system processes or kernel threads? c) Can root look for system processes or kernel threads? Regards, -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | FreeBSD & Linux User | Standards Rocks! From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 04:14:28 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6800916A417 for ; Tue, 24 Jul 2007 04:14:28 +0000 (UTC) (envelope-from freebsd@bitfreak.org) Received: from mail.twinthornes.com (mail.twinthornes.com [65.75.198.147]) by mx1.freebsd.org (Postfix) with ESMTP id 4728F13C465 for ; Tue, 24 Jul 2007 04:14:28 +0000 (UTC) (envelope-from freebsd@bitfreak.org) Received: from [10.9.70.101] (pool-72-90-106-233.ptldor.fios.verizon.net [72.90.106.233]) by mail.twinthornes.com (Postfix) with ESMTP id A7B19A59; Mon, 23 Jul 2007 20:54:12 -0700 (PDT) Message-ID: <46A577BB.5020400@bitfreak.org> Date: Mon, 23 Jul 2007 20:53:31 -0700 From: Darren Pilgrim User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: dmw@unete.cl References: <200707232052.58485.dmw@unete.cl> In-Reply-To: <200707232052.58485.dmw@unete.cl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 04:14:28 -0000 Daniel Molina Wegener wrote: > Hello, > > I need information about few things, I hope someone can help > me and thanks in advance. > > a) Is there any function or variable that tells me which is the > root user UID in the system, or root always have 0 and it's > an "elegant" option to compare the variables or structure > members against zero. Root is always UID 0. Checking UID == 0 is the common practice for determining if the effective UID has root priveleges. > b) Can normal users look for system processes or kernel threads? Yes, depending on the value of the security.bsd.see_other_uids sysctl. If security.bsd.see_other_uids=0, non-root users can only see their own processes. > c) Can root look for system processes or kernel threads? Yes, regardless of the value of security.bsd.see_other_uids. From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 01:02:30 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1734016A417 for ; Tue, 24 Jul 2007 01:02:30 +0000 (UTC) (envelope-from yurtesen@ispro.net) Received: from mail.ispro.net (mail.ispro.net [87.251.0.19]) by mx1.freebsd.org (Postfix) with SMTP id 2CA2C13C461 for ; Tue, 24 Jul 2007 01:02:26 +0000 (UTC) (envelope-from yurtesen@ispro.net) Received: (qmail 80775 invoked by uid 399); 24 Jul 2007 03:35:43 +0300 Received: from unknown (HELO ?84.250.38.203?) (yurtesen@ispro.net@84.250.38.203) by mail.ispro.net with ESMTP; 24 Jul 2007 03:35:43 +0300 X-Originating-IP: 84.250.38.203 Message-ID: <46A5492E.90500@ispro.net> Date: Tue, 24 Jul 2007 03:34:54 +0300 From: Evren Yurtesen User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 24 Jul 2007 04:37:04 +0000 Subject: alias netmask bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 01:02:30 -0000 Hi, I remember from earlier versions of FreeBSD that it had a restriction about alias IP netmasks (somewhere in 3.x,4.x days)... as explained here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html ------------------------------------- The calculation of alias netmasks is important, but fortunately quite simple. For a given interface, there must be one address which correctly represents the network's netmask. Any other addresses which fall within this network must have a netmask of all 1s (expressed as either 255.255.255.255 or 0xffffffff). ------------------------------------- However I tried on the loopback interface to add a 2nd IP with the same netmask as the original IP and it accepts it fine. (on 6.2) lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet 127.0.0.2 netmask 0xff000000 Is FreeBSD allowing this a bug or ??? If this is not a bug. What happens if an interface which is connecting to the machine has 2 IP addresses with same netmask which is not 255.255.255.255? Does FreeBSD use each IP randomly? Thanks, Evren From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 04:50:54 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CF6216A419 for ; Tue, 24 Jul 2007 04:50:54 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC5313C428 for ; Tue, 24 Jul 2007 04:50:54 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 6D1E31CC064; Mon, 23 Jul 2007 21:50:54 -0700 (PDT) Date: Mon, 23 Jul 2007 21:50:54 -0700 From: Jeremy Chadwick To: Evren Yurtesen Message-ID: <20070724045054.GA81397@eos.sc1.parodius.com> References: <46A5492E.90500@ispro.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46A5492E.90500@ispro.net> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-hackers@freebsd.org Subject: Re: alias netmask bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 04:50:54 -0000 On Tue, Jul 24, 2007 at 03:34:54AM +0300, Evren Yurtesen wrote: > I remember from earlier versions of FreeBSD that it had a restriction about > alias IP netmasks (somewhere in 3.x,4.x days)... > > as explained here: > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html > > However I tried on the loopback interface to add a 2nd IP with the same > netmask as the original IP and it accepts it fine. (on 6.2) > > lo0: flags=8049 mtu 16384 > inet 127.0.0.1 netmask 0xff000000 > inet 127.0.0.2 netmask 0xff000000 > > Is FreeBSD allowing this a bug or ??? It's not a bug. Why did you disregard the instructions, though? > If this is not a bug. What happens if an interface which is connecting to > the machine has 2 IP addresses with same netmask which is not > 255.255.255.255? Does FreeBSD use each IP randomly? Don't know, but my guess is no, it probably does not use "each IP randomly", and I cannot even fathom the network breakage that would ensue as a result of such. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 06:07:00 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 456D616A41B for ; Tue, 24 Jul 2007 06:07:00 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by mx1.freebsd.org (Postfix) with ESMTP id 0158313C478 for ; Tue, 24 Jul 2007 06:06:59 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: by wr-out-0506.google.com with SMTP id i21so1108431wra for ; Mon, 23 Jul 2007 23:06:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NFqoHYjYHWU2Z6jTJPo5802f5PhTP/7/5i735qcQ0fvDGO1J4IsDun2t0eulV6XJ1smhmh/UUbk/inFk/UoQJ8tTA23zlkseR4bII5yrnZ3/MuqSMekTACKa51DJWLyLAibBeDv3ZYfv23EAgpsQyKj4R2OX/ybTWNP00YVBC+s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rmKYWDo2ut/sd9CO2Yk6AtW87k2ofBuFFx/uN+I22t/BdrEZIy3dmHiCA8Mnb2ggga0miQBcyiRnLJXi0BZ1vO0vqOmCckwUfGfmYzzrc24O2m6a/FO9ss3p1XsyzvFHj+fCtSd+ka5ZL9gjvFEbx1ToQynRzi0UtMSwHPEUCDw= Received: by 10.142.76.4 with SMTP id y4mr271346wfa.1185255473096; Mon, 23 Jul 2007 22:37:53 -0700 (PDT) Received: by 10.143.1.8 with HTTP; Mon, 23 Jul 2007 22:37:53 -0700 (PDT) Message-ID: <47d0403c0707232237t272f4e7exb0f55c21bbd097c7@mail.gmail.com> Date: Tue, 24 Jul 2007 00:37:53 -0500 From: "Ben Kaduk" To: "Darren Pilgrim" In-Reply-To: <46A577BB.5020400@bitfreak.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707232052.58485.dmw@unete.cl> <46A577BB.5020400@bitfreak.org> Cc: FreeBSD Hackers , dmw@unete.cl Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 06:07:00 -0000 On 7/23/07, Darren Pilgrim wrote: > Daniel Molina Wegener wrote: > > Hello, > > > > I need information about few things, I hope someone can help > > me and thanks in advance. > > > > a) Is there any function or variable that tells me which is the > > root user UID in the system, or root always have 0 and it's > > an "elegant" option to compare the variables or structure > > members against zero. > > Root is always UID 0. Checking UID == 0 is the common practice for > determining if the effective UID has root priveleges. > But should it be common practice? What of suser(9) and priv(9)? -Ben Kaduk From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 07:50:07 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C61316A417 for ; Tue, 24 Jul 2007 07:50:07 +0000 (UTC) (envelope-from yurtesen@ispro.net) Received: from mail.ispro.net (mail.ispro.net [87.251.0.19]) by mx1.freebsd.org (Postfix) with SMTP id 038AD13C478 for ; Tue, 24 Jul 2007 07:50:05 +0000 (UTC) (envelope-from yurtesen@ispro.net) Received: (qmail 93937 invoked by uid 399); 24 Jul 2007 10:50:04 +0300 Received: from unknown (HELO ?84.250.38.203?) (yurtesen@ispro.net@84.250.38.203) by mail.ispro.net with ESMTP; 24 Jul 2007 10:50:04 +0300 X-Originating-IP: 84.250.38.203 Message-ID: <46A5AEED.4080104@ispro.net> Date: Tue, 24 Jul 2007 10:49:01 +0300 From: Evren Yurtesen User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Jeremy Chadwick References: <46A5492E.90500@ispro.net> <20070724045054.GA81397@eos.sc1.parodius.com> In-Reply-To: <20070724045054.GA81397@eos.sc1.parodius.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: alias netmask bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 07:50:07 -0000 Jeremy Chadwick wrote: > On Tue, Jul 24, 2007 at 03:34:54AM +0300, Evren Yurtesen wrote: >> I remember from earlier versions of FreeBSD that it had a restriction about >> alias IP netmasks (somewhere in 3.x,4.x days)... >> >> as explained here: >> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html >> >> However I tried on the loopback interface to add a 2nd IP with the same >> netmask as the original IP and it accepts it fine. (on 6.2) >> >> lo0: flags=8049 mtu 16384 >> inet 127.0.0.1 netmask 0xff000000 >> inet 127.0.0.2 netmask 0xff000000 >> >> Is FreeBSD allowing this a bug or ??? > > It's not a bug. Why did you disregard the instructions, though? I didnt disregard the instructions. I read somebody suggesting not using 255.255.255.255 in some forum. Then I tried it out and FreeBSD accepted the netmask for the alias IP. Why does FreeBSD accept such netmask which can cause problems when earlier it was rejecting it? >> If this is not a bug. What happens if an interface which is connecting to >> the machine has 2 IP addresses with same netmask which is not >> 255.255.255.255? Does FreeBSD use each IP randomly? > > Don't know, but my guess is no, it probably does not use "each IP > randomly", and I cannot even fathom the network breakage that would > ensue as a result of such. I understand, I will try to test that sometime to see what FreeBSD does in this kind of situation. However, it might be nice if ifconfig did not allow this kind of wrong setting. Thanks, Evren From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 07:58:51 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36DD216A41A for ; Tue, 24 Jul 2007 07:58:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outV.internet-mail-service.net (outV.internet-mail-service.net [216.240.47.245]) by mx1.freebsd.org (Postfix) with ESMTP id 14F9D13C469 for ; Tue, 24 Jul 2007 07:58:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Tue, 24 Jul 2007 00:58:50 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 2058E125AE2; Tue, 24 Jul 2007 00:58:50 -0700 (PDT) Message-ID: <46A5B15D.80805@elischer.org> Date: Tue, 24 Jul 2007 00:59:25 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.5 (Macintosh/20070716) MIME-Version: 1.0 To: Evren Yurtesen References: <46A5492E.90500@ispro.net> <20070724045054.GA81397@eos.sc1.parodius.com> <46A5AEED.4080104@ispro.net> In-Reply-To: <46A5AEED.4080104@ispro.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Jeremy Chadwick Subject: Re: alias netmask bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 07:58:51 -0000 Evren Yurtesen wrote: > Jeremy Chadwick wrote: >> On Tue, Jul 24, 2007 at 03:34:54AM +0300, Evren Yurtesen wrote: >>> I remember from earlier versions of FreeBSD that it had a >>> restriction about alias IP netmasks (somewhere in 3.x,4.x days)... >>> >>> as explained here: >>> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html >>> >>> >>> However I tried on the loopback interface to add a 2nd IP with the >>> same netmask as the original IP and it accepts it fine. (on 6.2) >>> >>> lo0: flags=8049 mtu 16384 >>> inet 127.0.0.1 netmask 0xff000000 >>> inet 127.0.0.2 netmask 0xff000000 >>> >>> Is FreeBSD allowing this a bug or ??? >> >> It's not a bug. Why did you disregard the instructions, though? > > I didnt disregard the instructions. I read somebody suggesting not using > 255.255.255.255 in some forum. Then I tried it out and FreeBSD accepted > the netmask for the alias IP. > > Why does FreeBSD accept such netmask which can cause problems when > earlier it was rejecting it? > >>> If this is not a bug. What happens if an interface which is >>> connecting to the machine has 2 IP addresses with same netmask which >>> is not 255.255.255.255? Does FreeBSD use each IP randomly? I'm not sure but it is possible that lo0 is treated more like a P2P interface in which case the netmask is not used in routing decisions. >> >> Don't know, but my guess is no, it probably does not use "each IP >> randomly", and I cannot even fathom the network breakage that would >> ensue as a result of such. > > I understand, I will try to test that sometime to see what FreeBSD does > in this kind of situation. > > However, it might be nice if ifconfig did not allow this kind of wrong > setting. > > Thanks, > Evren > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 08:24:46 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26F3F16A419 for ; Tue, 24 Jul 2007 08:24:46 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from smtp808.mail.ird.yahoo.com (smtp808.mail.ird.yahoo.com [217.146.188.68]) by mx1.freebsd.org (Postfix) with SMTP id 789AE13C46C for ; Tue, 24 Jul 2007 08:24:45 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: (qmail 30678 invoked from network); 24 Jul 2007 08:24:44 -0000 Received: from unknown (HELO ?192.168.1.2?) (thomasjudge@btinternet.com@86.140.28.215 with plain) by smtp808.mail.ird.yahoo.com with SMTP; 24 Jul 2007 08:24:43 -0000 X-YMail-OSG: ovKbEdQVM1memgg6ztoQKUedOwv3i9LqQsvBufws8HPJwicLKxK3JkD.vKVzQ44pJPH2bioxxUOuQmCp9XTx8AOaXlksslwrGg-- Message-ID: <46A5C5B9.3000005@tomjudge.com> Date: Tue, 24 Jul 2007 10:26:17 +0100 From: Tom Judge User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Jeremy Chadwick References: <46A5492E.90500@ispro.net> <20070724045054.GA81397@eos.sc1.parodius.com> In-Reply-To: <20070724045054.GA81397@eos.sc1.parodius.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Evren Yurtesen , freebsd-hackers@freebsd.org Subject: Re: alias netmask bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 08:24:46 -0000 Jeremy Chadwick wrote: > On Tue, Jul 24, 2007 at 03:34:54AM +0300, Evren Yurtesen wrote: >> I remember from earlier versions of FreeBSD that it had a restriction about >> alias IP netmasks (somewhere in 3.x,4.x days)... >> >> as explained here: >> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-virtual-hosts.html >> >> However I tried on the loopback interface to add a 2nd IP with the same >> netmask as the original IP and it accepts it fine. (on 6.2) >> >> lo0: flags=8049 mtu 16384 >> inet 127.0.0.1 netmask 0xff000000 >> inet 127.0.0.2 netmask 0xff000000 >> >> Is FreeBSD allowing this a bug or ??? > > It's not a bug. Why did you disregard the instructions, though? > >> If this is not a bug. What happens if an interface which is connecting to >> the machine has 2 IP addresses with same netmask which is not >> 255.255.255.255? Does FreeBSD use each IP randomly? > > Don't know, but my guess is no, it probably does not use "each IP > randomly", and I cannot even fathom the network breakage that would > ensue as a result of such. > I have seen systems that have been configured like this (on physical interfaces) have some strange problems. I'm sure one box that got a config like this by accident kicked one of the IP's off the interface several hours after it was set up. Never been able to reproduce that though. Tom From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 13:03:03 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3774616A41A for ; Tue, 24 Jul 2007 13:03:03 +0000 (UTC) (envelope-from sharadc@niksun.com) Received: from in.niksun.com (210.18.76.166.sify.net [210.18.76.166]) by mx1.freebsd.org (Postfix) with ESMTP id CB75F13C483 for ; Tue, 24 Jul 2007 13:03:02 +0000 (UTC) (envelope-from sharadc@niksun.com) Received: from sharadc.niksun.com (unknown [10.60.5.27]) by in.niksun.com (Postfix) with ESMTP id 712695CC1 for ; Tue, 24 Jul 2007 18:17:01 +0530 (IST) From: Sharad Chandra Organization: Niksun India To: freebsd-hackers Date: Tue, 24 Jul 2007 18:09:53 +0530 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707241809.54039.sharadc@niksun.com> Subject: rsh help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 13:03:03 -0000 Hi Guys, I was looking at rsh on freebsd 6.0, is it really execute commands I run inetd by modifying /etc/inetd.conf, but not able to execute any command, althouth it gets login see whats wrong in it => rsh -l IP_of_the_SYS ls [sharad@~]$ rsh 127.0.0.1 ls rshd: Login incorrect. Thanks Sharad Chandra From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 15:39:17 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBCCE16A468 for ; Tue, 24 Jul 2007 15:39:17 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (grnl-static-02-0046.dsl.iowatelecom.net [69.66.56.110]) by mx1.freebsd.org (Postfix) with ESMTP id 90DB213C45E for ; Tue, 24 Jul 2007 15:39:17 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id l6OFAZwE019536; Tue, 24 Jul 2007 10:10:35 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id l6OFAXrE019535; Tue, 24 Jul 2007 10:10:33 -0500 (CDT) (envelope-from brooks) Date: Tue, 24 Jul 2007 10:10:33 -0500 From: Brooks Davis To: Ben Kaduk Message-ID: <20070724151033.GA19358@lor.one-eyed-alien.net> References: <200707232052.58485.dmw@unete.cl> <46A577BB.5020400@bitfreak.org> <47d0403c0707232237t272f4e7exb0f55c21bbd097c7@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <47d0403c0707232237t272f4e7exb0f55c21bbd097c7@mail.gmail.com> User-Agent: Mutt/1.5.15 (2007-04-06) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Tue, 24 Jul 2007 10:10:36 -0500 (CDT) Cc: Darren Pilgrim , dmw@unete.cl, FreeBSD Hackers Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 15:39:18 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 24, 2007 at 12:37:53AM -0500, Ben Kaduk wrote: > On 7/23/07, Darren Pilgrim wrote: > > Daniel Molina Wegener wrote: > > > Hello, > > > > > > I need information about few things, I hope someone can help > > > me and thanks in advance. > > > > > > a) Is there any function or variable that tells me which is the > > > root user UID in the system, or root always have 0 and it's > > > an "elegant" option to compare the variables or structure > > > members against zero. > > > > Root is always UID 0. Checking UID =3D=3D 0 is the common practice for > > determining if the effective UID has root priveleges. >=20 > But should it be common practice? What of suser(9) and priv(9)? In userspace it's what you have to do if you're going to check privleges. In general though, you shouldn't check at all and just attempt the operation and let the kernel decide (there are of course exceptions to this rule). In the kernel you should use priv(9). -- Brooks --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGphZpXY6L6fI4GtQRAoZHAJ9n47/ixv0cfA8LRZO2J9k1ENSHpwCeObT8 Q0pN+Xi90Fwf8BH+9mkudpo= =Yane -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 18:43:57 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C952C16A41B for ; Tue, 24 Jul 2007 18:43:57 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5E213C46B for ; Tue, 24 Jul 2007 18:43:57 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (m8d7kbkhzlx6jgic@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l6OIhuw9040331; Tue, 24 Jul 2007 11:43:56 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l6OIhuGq040330; Tue, 24 Jul 2007 11:43:56 -0700 (PDT) (envelope-from jmg) Date: Tue, 24 Jul 2007 11:43:55 -0700 From: John-Mark Gurney To: Daniel Molina Wegener Message-ID: <20070724184355.GH99491@funkthat.com> Mail-Followup-To: Daniel Molina Wegener , FreeBSD Hackers References: <200707232052.58485.dmw@unete.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200707232052.58485.dmw@unete.cl> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: FreeBSD Hackers Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 18:43:57 -0000 Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 -0400: > a) Is there any function or variable that tells me which is the > root user UID in the system, or root always have 0 and it's > an "elegant" option to compare the variables or structure > members against zero. #include uid == UID_ROOT > b) Can normal users look for system processes or kernel threads? Yes, ps does this... > c) Can root look for system processes or kernel threads? Yes, ps does this... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 20:01:27 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 475EF16A418 for ; Tue, 24 Jul 2007 20:01:27 +0000 (UTC) (envelope-from victorloureirolima@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.237]) by mx1.freebsd.org (Postfix) with ESMTP id 090C013C45A for ; Tue, 24 Jul 2007 20:01:26 +0000 (UTC) (envelope-from victorloureirolima@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so1366100nzf for ; Tue, 24 Jul 2007 13:01:26 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JMTo3j0wD1vD7saIINyyk+woi+WTa7U18KW+4StzVlTEhu2ZPXoZRZVtABOjJfpvA08BOGzaAt9tiVd2s5zkWKe/DTVqm7LctVB7WilURgbfOyEdBZW2W4K58DpBfuJPczCHqiTSt2u+wGlYOciwL26so7cEPOgmiZjnU7282P4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=U1SzaOVE7VIV33OUx/h47+6kcMxXqPXFDHKlzDS2lDT95c2AEkhuVjCiEblNKC8e/sj3zBkz1QnmkOJdnspifYdk6pgr/hOe44ZA5MoEk0JzIlTS4CPLQEsBoldIdudqKfy7riLWPPLMB/VHPWLoewGGHbdm0MU8CVYf7TxyKSo= Received: by 10.115.17.1 with SMTP id u1mr4379041wai.1185305735496; Tue, 24 Jul 2007 12:35:35 -0700 (PDT) Received: by 10.114.177.7 with HTTP; Tue, 24 Jul 2007 12:35:35 -0700 (PDT) Message-ID: Date: Tue, 24 Jul 2007 16:35:35 -0300 From: "Victor Loureiro Lima" To: "John-Mark Gurney" , "Daniel Molina Wegener" , "FreeBSD Hackers" In-Reply-To: <20070724184355.GH99491@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707232052.58485.dmw@unete.cl> <20070724184355.GH99491@funkthat.com> Cc: Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 24 Jul 2007 20:01:27 -0000 2007/7/24, John-Mark Gurney : > Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 -0400: > > a) Is there any function or variable that tells me which is the > > root user UID in the system, or root always have 0 and it's > > an "elegant" option to compare the variables or structure > > members against zero. > > #include > > uid == UID_ROOT > > > b) Can normal users look for system processes or kernel threads? > > Yes, ps does this... > ps(1) either elevates its priviledges during execution, or has some other way of medling into the afairs of other processes that will eventually need some higher priviledge status (either that, or I am really out-dated on modern operational systems) There lots of ways of finding information on other process, using libkvm was the most recent option that I saw ;) might be worth taking a look at it... victor loureiro lima From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 24 22:51:59 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 944CC16A417 for ; Tue, 24 Jul 2007 22:51:59 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 5E70A13C45D for ; Tue, 24 Jul 2007 22:51:59 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (x54mvj0fpq1rpqqk@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l6OMpwa7043769; Tue, 24 Jul 2007 15:51:58 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l6OMpvGc043768; Tue, 24 Jul 2007 15:51:57 -0700 (PDT) (envelope-from jmg) Date: Tue, 24 Jul 2007 15:51:57 -0700 From: John-Mark Gurney To: Victor Loureiro Lima Message-ID: <20070724225157.GI99491@funkthat.com> Mail-Followup-To: Victor Loureiro Lima , Daniel Molina Wegener , FreeBSD Hackers References: <200707232052.58485.dmw@unete.cl> <20070724184355.GH99491@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: FreeBSD Hackers , Daniel Molina Wegener Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 22:51:59 -0000 Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 -0300: > 2007/7/24, John-Mark Gurney : > >Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 > >-0400: > >> a) Is there any function or variable that tells me which is the > >> root user UID in the system, or root always have 0 and it's > >> an "elegant" option to compare the variables or structure > >> members against zero. > > > >#include > > > >uid == UID_ROOT > > > >> b) Can normal users look for system processes or kernel threads? > > > >Yes, ps does this... > > > > ps(1) either elevates its priviledges during execution, or has some > other way of medling into the afairs of other processes that will > eventually need some higher priviledge status (either that, or I am > really out-dated on modern operational systems) hydrogen,ttypm,/home/johng,503$ls -l /bin/ps -r-xr-xr-x 1 root wheel 31372 May 8 2005 /bin/ps* So, as you see, no suid or sgid necessary for ps to function... FreeBSD exports most/all of the info through sysctl which does not require elevated privs to get... And ps doesn't medling.. it's just a voyeur.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 25 05:02:00 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D33C416A421 for ; Wed, 25 Jul 2007 05:02:00 +0000 (UTC) (envelope-from sharadc@niksun.com) Received: from in.niksun.com (210.18.76.166.sify.net [210.18.76.166]) by mx1.freebsd.org (Postfix) with ESMTP id 7D96013C458 for ; Wed, 25 Jul 2007 05:02:00 +0000 (UTC) (envelope-from sharadc@niksun.com) Received: from sharadc.niksun.com (unknown [10.60.5.27]) by in.niksun.com (Postfix) with ESMTP id 5A16B5D3A for ; Wed, 25 Jul 2007 10:36:35 +0530 (IST) From: Sharad Chandra Organization: Niksun India To: freebsd-hackers@freebsd.org Date: Wed, 25 Jul 2007 10:29:27 +0530 User-Agent: KMail/1.8.2 References: <200707241809.54039.sharadc@niksun.com> In-Reply-To: <200707241809.54039.sharadc@niksun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707251029.27766.sharadc@niksun.com> Subject: Re: rsh help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Jul 2007 05:02:00 -0000 I got it for those who had a look on rsh, need to modify /etc/hosts.equiv file and read rshd man page is sufficient. Sharad Chandra On Tuesday 24 July 2007 6:09 pm, Sharad Chandra wrote: > Hi Guys, > > I was looking at rsh on freebsd 6.0, is it really execute commands > I run inetd by modifying /etc/inetd.conf, but not able to execute any > command, althouth it gets login > see whats wrong in it => rsh -l IP_of_the_SYS ls > [sharad@~]$ rsh 127.0.0.1 ls > rshd: Login incorrect. > > Thanks > Sharad Chandra > _______________________________________________ > 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 Wed Jul 25 15:14:23 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EFD616A420 for ; Wed, 25 Jul 2007 15:14:23 +0000 (UTC) (envelope-from victorloureirolima@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by mx1.freebsd.org (Postfix) with ESMTP id 691DA13C442 for ; Wed, 25 Jul 2007 15:14:23 +0000 (UTC) (envelope-from victorloureirolima@gmail.com) Received: by wa-out-1112.google.com with SMTP id j37so263335waf for ; Wed, 25 Jul 2007 08:14:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=StAHZEuqphJWxmgjKoUaUP0vRk9HkigVGohE5nn3DH5AY09wtJSnOMygAvgKl1ZMnXEX+lEkbhd0HQdmRDdCey2GFWQA7xtaBnli0V2FlGzLVlNWR6yNdVFgoN3iKLZLV5fCOVKEjeTeKdvcOD+mqo2P3AshtQVSQOcpJkL8a7I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lWHuWmOVeocKv9NUpdPGxHP4TBBKs2jOauQIodC7V7XYXEAemhz7X21f/OuIonI7ylyfYDh1WkiSkN8B7/tER5Vl4PSjeiIgpO+nqXAUr4baJoKmF4oW+Jt38MSAjSaOw7QEtQ4WYH12AVsXmZqOxc/xbe0gAbG4xK2b8WI9RP4= Received: by 10.115.18.1 with SMTP id v1mr750724wai.1185376463151; Wed, 25 Jul 2007 08:14:23 -0700 (PDT) Received: by 10.114.177.7 with HTTP; Wed, 25 Jul 2007 08:14:23 -0700 (PDT) Message-ID: Date: Wed, 25 Jul 2007 12:14:23 -0300 From: "Victor Loureiro Lima" To: "John-Mark Gurney" , "Victor Loureiro Lima" , "Daniel Molina Wegener" , "FreeBSD Hackers" In-Reply-To: <20070724225157.GI99491@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707232052.58485.dmw@unete.cl> <20070724184355.GH99491@funkthat.com> <20070724225157.GI99491@funkthat.com> Cc: Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Jul 2007 15:14:23 -0000 2007/7/24, John-Mark Gurney : > Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 -0300: > > 2007/7/24, John-Mark Gurney : > > >Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 > > >-0400: > > >> a) Is there any function or variable that tells me which is the > > >> root user UID in the system, or root always have 0 and it's > > >> an "elegant" option to compare the variables or structure > > >> members against zero. > > > > > >#include > > > > > >uid == UID_ROOT > > > > > >> b) Can normal users look for system processes or kernel threads? > > > > > >Yes, ps does this... > > > > > > > ps(1) either elevates its priviledges during execution, or has some > > other way of medling into the afairs of other processes that will > > eventually need some higher priviledge status (either that, or I am > > really out-dated on modern operational systems) > > hydrogen,ttypm,/home/johng,503$ls -l /bin/ps > -r-xr-xr-x 1 root wheel 31372 May 8 2005 /bin/ps* > > So, as you see, no suid or sgid necessary for ps to function... > FreeBSD exports most/all of the info through sysctl which does not > require elevated privs to get... > > And ps doesn't medling.. it's just a voyeur.. hahaha I liked that phrase ;) Check this out: http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/ps/ps.c?rev=1.106.2.2;content-type=text%2Fplain Turns out ps(1) uses libkvm, more specifically kvm_getprocs() function (the function that I said was in the middle of my last experience on getting process information from FreeBSD ;)) Im pretty sure it doesnt get _any_ of its info thru sysctl's, but using the kvm interface which is simple, clean and orthogonal, however I guess I was a little bit incorrect in my last email, ps(1) in its common execution mode will attempt to retrieve only the processes information that are pertinent to the current user uid, as this snippets from ps.c shows: ----- kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf); if (kd == 0) errx(1, "%s", errbuf); if (!_fmt) parsefmt(dfmt, 0); if (nselectors == 0) { uidlist.l.ptr = malloc(sizeof(uid_t)); if (uidlist.l.ptr == NULL) errx(1, "malloc failed"); nselectors = 1; uidlist.count = uidlist.maxcount = 1; *uidlist.l.uids = getuid(); } ----- So yes, you are correct, it wont need any "root" priviledge in order to get the information about its own processes, but it will need root priviledge to get information on all process running on the system (am I correct? I am assuming a lot of things based on very little source-code reading, so feel free to bash me if I am wrong ;)) I guess the whole sanity checking for permission is done inside libkvm somewhere ;) cheers, victor f. loureiro lima From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 25 18:30:51 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2788616A41B for ; Wed, 25 Jul 2007 18:30:51 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by mx1.freebsd.org (Postfix) with ESMTP id CDE2F13C46B for ; Wed, 25 Jul 2007 18:30:50 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: by py-out-1112.google.com with SMTP id a73so556098pye for ; Wed, 25 Jul 2007 11:30:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=anNq3C0JDTfik9sh8mKEc/3ibTvbN870CG0o8+1nMmYLzbz9MqAFwaA50CG4qF9t9M/SS7AKUtvjfecyQkXhhuBxdKtk30BfwOAxu7n8mKbRibvUUjU0qiq6l3fRR/sf9RuIH67Hs9VqUyfB4Pj9FyxJYZD9RpCJH9mSjq3Ubo8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=FrqAyPRocf9AHdVhY+yDDFhXxE4Hb8Vrs3uyGhCe0FQvloyA95rNmWo2eYo+feLVxTWvU/7Cq1T9NyIi56eYTaAs0D8Mhug8BMncyV394VfZd2GldVqGzDNbekrK28UmxSajgytV+ranLxyAL3Pi73ru2W/rj9Qndqniv32Wg/M= Received: by 10.35.86.12 with SMTP id o12mr9893972pyl.1185386755064; Wed, 25 Jul 2007 11:05:55 -0700 (PDT) Received: from ?192.168.1.5? ( [74.134.230.123]) by mx.google.com with ESMTPS id a22sm732977pye.2007.07.25.11.05.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Jul 2007 11:05:54 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v624) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: freebsd-hackers@freebsd.org From: Joshua Isom Date: Wed, 25 Jul 2007 13:07:25 -0500 X-Mailer: Apple Mail (2.624) Subject: Getting FreeBSD to see my dvd drive X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Jul 2007 18:30:51 -0000 I've reposted this from freebsd-questions, and added some minor details. Yesterday I bought and installed a Lite-ON SATA DVD Writer for my computer. But FreeBSD fails to recognize it at all. I'd wondered if something was broken on the motherboard or the drive or if something wasn't hooked up completely. The BIOS recognizes the drive just fine, on IDE Channel 2. If I switch connectors, the same result happens, the drive's not recognized by the system. I tried booting the amd64 6.2 install disk from the drive and loader fails very quickly with this error: int=0000000d err=00000000 efl=00030002 eip=00010000 eax=0000ffff ebx=00000000 ecx=00000002 edx=0000ffff esi=00007261 edi=00000004 ebp=0000ffff esp=00000000 cs=f000 ds=42c9 es=42a9 fs=0000 gs=0000 ss=9dd7 cs:eip=00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ss:esp=c9 42 08 00 00 91 61 72-6f ef 00 f0 f1 bd 00 f0 46 02 ac 72 00 f0 46 00-00 91 61 72 6f ef 00 f0 I have an old darwin 8.01 x86 disc and I was able to boot it into the shell just fine. I burned an ubuntu disk on another drive and tried booting it, and it worked perfectly. So I know that the drive and motherboard and everything hardware is fine. I can boot linux just fine from the drive, yet I can't find it at all in FreeBSD. Since linux recognizes it as a scsi drive, I recompiled my kernel to try to support it, but it failed. My custom kernel gets the same results as the generic kernel. Here's my dmesg. Copyright (c) 1992-2007 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 6.2-STABLE #4: Sat Jul 21 23:55:54 CDT 2007 root@freebsd:/usr/obj/usr/src/sys/CUSTOM Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Athlon(tm) 64 Processor 3000+ (1999.79-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0xf4a Stepping = 10 Features=0x78bfbff AMD Features=0xe0500800 real memory = 518914048 (494 MB) avail memory = 492441600 (469 MB) ACPI APIC Table: ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_button0: on acpi0 acpi_button1: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xf8000000-0xf9ffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) atapci0: port 0xe100-0xe107,0xe700-0xe703,0xe800-0xe807,0xe900-0xe903,0xe000 -0xe00f,0xd000-0xd0ff irq 20 at device 15.0 on pci0 ata2: on atapci0 ata3: on atapci0 atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe200-0xe20f at device 15.1 on pci0 ata0: on atapci1 ata1: on atapci1 uhci0: port 0xe300-0xe31f irq 21 at device 16.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xe400-0xe41f irq 21 at device 16.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xe500-0xe51f irq 21 at device 16.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3: port 0xe600-0xe61f irq 21 at device 16.3 on pci0 uhci3: [GIANT-LOCKED] usb3: on uhci3 usb3: USB revision 1.0 uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xfc000000-0xfc0000ff irq 21 at device 16.4 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered isab0: at device 17.0 on pci0 isa0: on isab0 pcm0: port 0xd400-0xd4ff irq 22 at device 17.5 on pci0 pcm0: pcm0: vr0: port 0xdc00-0xdcff mem 0xfc001000-0xfc0010ff irq 23 at device 18.0 on pci0 miibus0: on vr0 rlphy0: on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto vr0: Ethernet address: 00:19:21:48:7f:47 acpi_tz0: on acpi0 sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled Timecounter "TSC" frequency 1999793892 Hz quality 800 Timecounters tick every 1.000 msec ad0: 28615MB at ata0-master UDMA100 Trying to mount root from ufs:/dev/ad0s1a The chipset on the motherboard is a VIA VT8237R Plus. I guess the VT6420 is integrated in or just recognized oddly. The driver that works for the nic card isn't what the motherboard says it's supposed to be so I'm unsure what to make of much of it, but sound, video, and ethernet are all fine. Perhaps someone else can make sense of why loader fails and why nothing about the drive's existence is known to FreeBSD. I've ran `atacontrol list` and nothing's found other than the primary hard drive. The motherboard in question is a K8M800-M7A(http://www.biostar.com.tw/app/en-us/mb/content.php? S_ID=209). I may see about borrowing another sata drive to see if the problem is the sata controller or the drive itself. The boot0 lists only the hard drive as a bootable drive. I faintly remember that having a bootable cd in the cdrom drive would list it as well. Running lsdev in the loader lists no cd devices. But I have two other operating systems recognize the drive. I can provide information about what linux reports(provided I know what linux commands to run) if it will help narrow it all down. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 25 20:14:56 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 797E516A41B; Wed, 25 Jul 2007 20:14:56 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 0633B13C46E; Wed, 25 Jul 2007 20:14:55 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from 80-218-187-205.dclient.hispeed.ch ([80.218.187.205] helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IDmcM-0006rH-F0; Wed, 25 Jul 2007 21:33:54 +0200 Message-ID: <46A7A5B1.8020900@gahr.ch> Date: Wed, 25 Jul 2007 21:34:09 +0200 From: Pietro Cerutti User-Agent: Thunderbird 2.0.0.5 (X11/20070723) MIME-Version: 1.0 To: freebsd-acpi@freebsd.org, freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.2 OpenPGP: id=9571F78E; url=http://www.gahr.ch/pgp Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig1439401C7BF64E1F5E915EB9" X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gahr.ch X-Source: X-Source-Args: X-Source-Dir: Cc: Subject: apci_thermal doesn't send 0x80 or 0x81 notifies X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Jul 2007 20:14:56 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1439401C7BF64E1F5E915EB9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi lists, under heavy loads, my laptop's temperature reaches the hw.acpi.thermal.tz0._CRT level, at which point it shuts down. Passive cooling is not supported on my system: # sysctl hw.acpi.thermal.tz0.passive_cooling=3D1 hw.acpi.thermal.tz0.passive_cooling: 0 sysctl: hw.acpi.thermal.tz0.passive_cooling: Operation not supported by device My idea was to write a little script invoked by devd when acpi_thermal sends a temperature change (0x80) or trip point change (0x81) notify, so I added these lines to my /etc/devd.conf file: notify 100 { match "system" "ACPI"; match "subsystem" "Thermal"; match "notify" "0x80"; action "/root/bin/acpi_thermal"; }; However, I noticed that the script is never called. I added a device_printf(9) debug call at the beginning of the acpi_tz_notify_handler function of acpi_thermal.c (line 752), but nothing is printed where it should. So my question: is acpi_thermal missing the 0x80 and 0x81 notifies, or I am missing something? Note that 0xcc works, since the following is called when the temperature reaches the hw.acpi.thermal.tz0._CRT level. notify 10 { match "system" "ACPI"; match "subsystem" "Thermal"; match "notify" "0xcc"; action "logger -p kern.emerg 'WARNING: system temperature too high, shutting }; Thanks for any input! P.S. freebsd-acpi@ people, please CC me or freebsd-hackers@ since I'm not on your list! --=20 Pietro Cerutti PGP Public Key: http://gahr.ch/pgp --------------enig1439401C7BF64E1F5E915EB9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGp6W2wMJqmJVx944RCtr+AKCLMokzq82Vld4mHMv6HBU/lBr8mACaAnRP +hXkKGF+lnupeTSw6oLF4LE= =GSKK -----END PGP SIGNATURE----- --------------enig1439401C7BF64E1F5E915EB9-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 06:12:26 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BED3216A41B for ; Thu, 26 Jul 2007 06:12:26 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 8973413C428 for ; Thu, 26 Jul 2007 06:12:26 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (mmre20x0wu3nrin5@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l6Q6CQN4070372; Wed, 25 Jul 2007 23:12:26 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l6Q6CPJn070371; Wed, 25 Jul 2007 23:12:25 -0700 (PDT) (envelope-from jmg) Date: Wed, 25 Jul 2007 23:12:25 -0700 From: John-Mark Gurney To: Victor Loureiro Lima Message-ID: <20070726061225.GJ99491@funkthat.com> Mail-Followup-To: Victor Loureiro Lima , Daniel Molina Wegener , FreeBSD Hackers References: <200707232052.58485.dmw@unete.cl> <20070724184355.GH99491@funkthat.com> <20070724225157.GI99491@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: FreeBSD Hackers , Daniel Molina Wegener Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2007 06:12:26 -0000 Victor Loureiro Lima wrote this message on Wed, Jul 25, 2007 at 12:14 -0300: > 2007/7/24, John-Mark Gurney : > >Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 > >-0300: > >> 2007/7/24, John-Mark Gurney : > >> >Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 > >> >-0400: > >> >> a) Is there any function or variable that tells me which is the > >> >> root user UID in the system, or root always have 0 and it's > >> >> an "elegant" option to compare the variables or structure > >> >> members against zero. > >> > > >> >#include > >> > > >> >uid == UID_ROOT > >> > > >> >> b) Can normal users look for system processes or kernel threads? > >> > > >> >Yes, ps does this... > >> > > >> > >> ps(1) either elevates its priviledges during execution, or has some > >> other way of medling into the afairs of other processes that will > >> eventually need some higher priviledge status (either that, or I am > >> really out-dated on modern operational systems) > > > >hydrogen,ttypm,/home/johng,503$ls -l /bin/ps > >-r-xr-xr-x 1 root wheel 31372 May 8 2005 /bin/ps* > > > >So, as you see, no suid or sgid necessary for ps to function... > >FreeBSD exports most/all of the info through sysctl which does not > >require elevated privs to get... > > > >And ps doesn't medling.. it's just a voyeur.. > hahaha I liked that phrase ;) > > > Check this out: > http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/ps/ps.c?rev=1.106.2.2;content-type=text%2Fplain > > Turns out ps(1) uses libkvm, more specifically kvm_getprocs() function > (the function that I said was in the middle of my last experience on > getting process information from FreeBSD ;)) Im pretty sure it doesnt > get _any_ of its info thru sysctl's, but using the kvm interface which > is simple, clean and orthogonal, however I guess I was a little bit > incorrect in my last email, ps(1) in its common execution mode will Have you looked at the source to kvm_getprocs(3)? struct kinfo_proc * kvm_getprocs(kd, op, arg, cnt) [...] { [...] if (ISALIVE(kd)) { size = 0; mib[0] = CTL_KERN; mib[1] = KERN_PROC; mib[2] = op; mib[3] = arg; temp_op = op & ~KERN_PROC_INC_THREAD; st = sysctl(mib, temp_op == KERN_PROC_ALL || temp_op == KERN_PROC_PROC ? 3 : 4, NULL, &size, NULL, 0); [...] So, yes, ps isn't using sysctl directly, but kvm_getprocs is... And if you look at -current's ps(1): -a Display information about other users' processes as well as your own. This will skip any processes which do not have a control- ling terminal, unless the -x option is also specified. This can be disabled by setting the security.bsd.see_other_uids sysctl to zero. and security.bsd.see_other_uids defaults to 1... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 07:22:28 2007 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 DB78316A417 for ; Thu, 26 Jul 2007 07:22:28 +0000 (UTC) (envelope-from stephen.hocking@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.235]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2BF13C467 for ; Thu, 26 Jul 2007 07:22:28 +0000 (UTC) (envelope-from stephen.hocking@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so359110nzf for ; Thu, 26 Jul 2007 00:22:27 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=p6YrdaJgBOMEbtI9guatx+qKijzUV71jyrOSsQBnyE8RLsFiIbmyDUTlSQ3t6GzO6OzfRh4T88VIRJ8cPjsc7dFyOmSNhSXLp6+xw1Cr9Ewle7XM2QN1J6p5riojFdJSZJvhOooxSSy7iUmMfcOePC8BLzGV0arxxmHiU72Wncc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bPgfD9aw4sdLYYbTjPqG174MAh2l+M9gREwq1oF3szTFiI3mzkVAM+cv28Yr3z7LEe53SdBzkLMdKmYDZJee645oQMbI9FuqbJE782uhz4vsYHYODbJ0wdCd7mcvO/PvYX3noGitLh6PgT3L7JY4SpYIbqATgnn0WSd/s6Rj/MY= Received: by 10.114.204.7 with SMTP id b7mr1404936wag.1185432997049; Wed, 25 Jul 2007 23:56:37 -0700 (PDT) Received: by 10.114.59.11 with HTTP; Wed, 25 Jul 2007 23:56:37 -0700 (PDT) Message-ID: <6300771b0707252356i3e902d6ch7919ddbb70d411e7@mail.gmail.com> Date: Thu, 26 Jul 2007 16:56:37 +1000 From: "Stephen Hocking" To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: FreeBSD & Hot pluggable disks (SATA?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 07:22:28 -0000 Hi, Have been looking at FreeNAS (http://www.freenas.org/) and thinking about the iSCSI portion of it. At the moment the box requires you to shutdown when a disk fails in order to replace it. Is this a feature of the GEOM RAID stuff? Is it possible (assuming suitable hardware) to have hot-pluggable disks under the control of GEOM? Stephen From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 08:49:18 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7859D16A418 for ; Thu, 26 Jul 2007 08:49:18 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.190]) by mx1.freebsd.org (Postfix) with ESMTP id F378C13C45E for ; Thu, 26 Jul 2007 08:49:17 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by mu-out-0910.google.com with SMTP id w9so481042mue for ; Thu, 26 Jul 2007 01:49:15 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=kfTFMcfUbBDJHMvY9r4fB/Aj/XWNQ7TXHwLNv//Zb6OhYom25Z2U0Szf/7IonE0awQPvVE+rkvMf2+uvBDJGFotWrSmOB9LvLSfZSM3tElhRgBJdlq0UlwdJN1w66ayL6QFpDFSSqnURVbSroalzt0l9YU7+FJNtUtjY12CvE9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=E4IZRcQexNQ6Hbjv+fL2mxMvLTHxrsp4ojggE0bw1fe/fJ/USjLaZpWr1fMGft07+mGnyvDqQX/AygS2q0MExosRcgm4ht/RdeAwB/8r5HJhy3o9bZQ2wSj5wIh8z3FP32w1MjP4OgfxSR8KUF5hhqMej2HxX8V+u+HiU0ej0r8= Received: by 10.82.152.16 with SMTP id z16mr1107524bud.1185439755280; Thu, 26 Jul 2007 01:49:15 -0700 (PDT) Received: from ?127.0.0.1? ( [217.206.187.79]) by mx.google.com with ESMTPS id k9sm3525193nfh.2007.07.26.01.49.14 (version=SSLv3 cipher=RC4-MD5); Thu, 26 Jul 2007 01:49:14 -0700 (PDT) From: Tom Evans To: Joshua Isom In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-HD6Hs2JTew5hwiaHcKU8" Date: Thu, 26 Jul 2007 09:49:13 +0100 Message-Id: <1185439753.1457.1.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 FreeBSD GNOME Team Port Cc: freebsd-hackers@freebsd.org Subject: Re: Getting FreeBSD to see my dvd drive X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 08:49:18 -0000 --=-HD6Hs2JTew5hwiaHcKU8 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2007-07-25 at 13:07 -0500, Joshua Isom wrote: > I've reposted this from freebsd-questions, and added some minor details. >=20 > Yesterday I bought and installed a Lite-ON SATA DVD Writer for my =20 > computer. But FreeBSD fails to recognize it at all. > Hi Joshua. FreeBSD doesn't support SATA ATAPI devices iirc. Sorry --=-HD6Hs2JTew5hwiaHcKU8 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGqGAElcRvFfyds/cRAqBhAKC6O8mLCg7oymts9ExVxwo+bDmyJgCglUUt zGw3XetE1D8UyXjhSrhv8l8= =SkuS -----END PGP SIGNATURE----- --=-HD6Hs2JTew5hwiaHcKU8-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 09:29:23 2007 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 70A6C16A417 for ; Thu, 26 Jul 2007 09:29:23 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2EEE613C521 for ; Thu, 26 Jul 2007 09:29:23 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 7AC512085; Thu, 26 Jul 2007 11:12:58 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 022D22082; Thu, 26 Jul 2007 11:12:57 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id C7DC884440; Thu, 26 Jul 2007 11:12:57 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Stephen Hocking" References: <6300771b0707252356i3e902d6ch7919ddbb70d411e7@mail.gmail.com> Date: Thu, 26 Jul 2007 11:12:57 +0200 In-Reply-To: <6300771b0707252356i3e902d6ch7919ddbb70d411e7@mail.gmail.com> (Stephen Hocking's message of "Thu\, 26 Jul 2007 16\:56\:37 +1000") Message-ID: <86abtj34va.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: FreeBSD & Hot pluggable disks (SATA?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 09:29:23 -0000 "Stephen Hocking" writes: > Have been looking at FreeNAS (http://www.freenas.org/) and thinking > about the iSCSI portion of it. At the moment the box requires you to > shutdown when a disk fails in order to replace it. Is this a feature > of the GEOM RAID stuff? Is it possible (assuming suitable hardware) to > have hot-pluggable disks under the control of GEOM? It is a function of the disk controller and driver. AFAIK, the ata driver supports hot-plug as long as the SATA controller does. I believe most Promise and Intel ICH SATA controllers do, not sure about Sil or nVidia MCP. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 11:07:44 2007 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 C716B16A419 for ; Thu, 26 Jul 2007 11:07:44 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from smtp804.mail.ird.yahoo.com (smtp804.mail.ird.yahoo.com [217.146.188.64]) by mx1.freebsd.org (Postfix) with SMTP id 2276413C4EF for ; Thu, 26 Jul 2007 11:07:43 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: (qmail 46126 invoked from network); 26 Jul 2007 10:41:03 -0000 Received: from unknown (HELO ?192.168.1.2?) (thomasjudge@btinternet.com@86.140.28.215 with plain) by smtp804.mail.ird.yahoo.com with SMTP; 26 Jul 2007 10:41:02 -0000 X-YMail-OSG: rhAotZQVM1kQjWC1X6glvAFrK7dhmpI5CVFKXj4tLQgY2KO9uEJXQaxgvSajYk4coEe5b6HxOIH7ESAr83mlxBU- Message-ID: <46A888BA.3010905@tomjudge.com> Date: Thu, 26 Jul 2007 12:42:50 +0100 From: Tom Judge User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <6300771b0707252356i3e902d6ch7919ddbb70d411e7@mail.gmail.com> <86abtj34va.fsf@ds4.des.no> In-Reply-To: <86abtj34va.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Stephen Hocking , hackers@freebsd.org Subject: Re: FreeBSD & Hot pluggable disks (SATA?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 11:07:44 -0000 Dag-Erling Smørgrav wrote: > "Stephen Hocking" writes: >> Have been looking at FreeNAS (http://www.freenas.org/) and thinking >> about the iSCSI portion of it. At the moment the box requires you to >> shutdown when a disk fails in order to replace it. Is this a feature >> of the GEOM RAID stuff? Is it possible (assuming suitable hardware) to >> have hot-pluggable disks under the control of GEOM? > > It is a function of the disk controller and driver. AFAIK, the ata > driver supports hot-plug as long as the SATA controller does. I believe > most Promise and Intel ICH SATA controllers do, not sure about Sil or > nVidia MCP. > > DES If you where using SATA disks on a SAS controller then I think you would also need a back plane with an environmental services controller on it to support hot plug. Tom From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 11:32:53 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEBBF16A469; Thu, 26 Jul 2007 11:32:53 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.freebsd.org (Postfix) with ESMTP id 7594D13C45E; Thu, 26 Jul 2007 11:32:53 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id AACD3EB2A85; Thu, 26 Jul 2007 19:32:52 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id vWj4kXowfETe; Thu, 26 Jul 2007 19:32:46 +0800 (CST) Received: from charlie.delphij.net (unknown [61.49.186.182]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 47E1EEB12F6; Thu, 26 Jul 2007 19:32:46 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:cc:subject: content-type:content-transfer-encoding; b=mV9bthDRiuzTDI3NRggRBSHAoRHE+D6mvUywzB1d8XSmMA/tL5NvFJ4s1Hn5f1+MZ NwAPKGehuKgcg1EiUyRjg== Message-ID: <46A8865D.2000509@delphij.net> Date: Thu, 26 Jul 2007 19:32:45 +0800 From: Xin LI User-Agent: Thunderbird 2.0.0.5 (X11/20070721) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Xin LI Subject: cvs: how to put vendor-deleted file into Attic? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 11:32:53 -0000 Hi, While maintaining some third party contributed software packages I ran into a problem where, say, if I remove a file from the vendor branch (the file was never dragged off the vendor branch), it does not appear in Attic. Is there a way to move it into Attic (presumably this would give better checkout speed for -HEAD)? Cheers, From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 11:37:05 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C84C916A41A; Thu, 26 Jul 2007 11:37:05 +0000 (UTC) (envelope-from corecode@fs.ei.tum.de) Received: from stella.fs.ei.tum.de (stella.fs.ei.tum.de [IPv6:2001:4ca0:22ff:10::7]) by mx1.freebsd.org (Postfix) with ESMTP id 165ED13C469; Thu, 26 Jul 2007 11:37:05 +0000 (UTC) (envelope-from corecode@fs.ei.tum.de) Received: from localhost (localhost [127.0.0.1]) by localhost.fs.ei.tum.de (Postfix) with ESMTP id D4EE728149; Thu, 26 Jul 2007 13:37:02 +0200 (CEST) X-Virus-Scanned: by amavisd-new at fs.ei.tum.de Received: from stella.fs.ei.tum.de ([127.0.0.1]) by localhost (stella.fs.ei.tum.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vFkVUUu23iyR; Thu, 26 Jul 2007 13:37:02 +0200 (CEST) Received: from [128.178.149.21] (nslpc6.epfl.ch [128.178.149.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by stella.fs.ei.tum.de (Postfix) with ESMTP id 762F92813A; Thu, 26 Jul 2007 13:37:02 +0200 (CEST) Message-ID: <46A8875E.3010905@fs.ei.tum.de> Date: Thu, 26 Jul 2007 13:37:02 +0200 From: Simon 'corecode' Schubert User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Xin LI References: <46A8865D.2000509@delphij.net> In-Reply-To: <46A8865D.2000509@delphij.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, Xin LI Subject: Re: cvs: how to put vendor-deleted file into Attic? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 11:37:05 -0000 Xin LI wrote: > While maintaining some third party contributed software packages I ran > into a problem where, say, if I remove a file from the vendor branch > (the file was never dragged off the vendor branch), it does not appear > in Attic. But it appears as deleted? That's interesting then. How is that possible? Can you share the RCS file? > Is there a way to move it into Attic (presumably this would give better > checkout speed for -HEAD)? Do you think that CVS is so clever to check the Attic only for branches other than HEAD? I didn't think so, but, hey, who knows. cheers simon From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 12:54:33 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4480916A417 for ; Thu, 26 Jul 2007 12:54:33 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id EF38713C467 for ; Thu, 26 Jul 2007 12:54:32 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 2C4D42089; Thu, 26 Jul 2007 14:54:26 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 903562085; Thu, 26 Jul 2007 14:54:25 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 42F758444E; Thu, 26 Jul 2007 14:54:22 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Simon 'corecode' Schubert References: <46A8865D.2000509@delphij.net> <46A8875E.3010905@fs.ei.tum.de> Date: Thu, 26 Jul 2007 14:54:22 +0200 In-Reply-To: <46A8875E.3010905@fs.ei.tum.de> (Simon Schubert's message of "Thu\, 26 Jul 2007 13\:37\:02 +0200") Message-ID: <86odhz1g1t.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, Xin LI , Xin LI Subject: Re: cvs: how to put vendor-deleted file into Attic? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 12:54:33 -0000 Simon 'corecode' Schubert writes: > Xin LI wrote: > > While maintaining some third party contributed software packages I > > ran into a problem where, say, if I remove a file from the vendor > > branch (the file was never dragged off the vendor branch), it does > > not appear in Attic. > But it appears as deleted? That's interesting then. How is that > possible? Can you share the RCS file? There is nothing interesting about it; a deleted file simply has 'state dead' instead of 'state Exp' in the entry for the commit that deleted it. The Attic serves absolutely no function except an increase in code complexity, a minimal increase in speed for operations on the trunk, and a corresponding decrease for operations on branches, since they must check the Attic for files that are deleted on the trunk but still exist on the branch. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 16:57:19 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11BB616A419 for ; Thu, 26 Jul 2007 16:57:19 +0000 (UTC) (envelope-from victorloureirolima@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.236]) by mx1.freebsd.org (Postfix) with ESMTP id C03AB13C46A for ; Thu, 26 Jul 2007 16:57:18 +0000 (UTC) (envelope-from victorloureirolima@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so480378nzf for ; Thu, 26 Jul 2007 09:57:18 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jC1wG2ey/Dcy+AFkSdMagTHTxTk4tAkry0CY7bt24ZnvIn07DW4iVbQfqSC7cgpfYISKTSexrYV6LEoskM6mEeIw/QaaUz6UThXx3dYeSSv3F2HBC1okVe8+iFGcYprPZMYcLjraXSNJVRO33bdUL4iGHPdE28VqF0Rs7Mclg3U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NNKmAtxj9uq01XKLLorpL0F3p3yMfyOQ0d5rf17ByQ0v+FKh/IDCeP338XKrNyvLH33vZJMJUt3RHx/7Ccd2xECpB7qDodjUyKSoRcWK1qH6xreItqIRy78jEMGqptsjuJBhukPgb7bHNV+yZad8UVaF1lPD47WaBlK8m5DF3hs= Received: by 10.114.126.1 with SMTP id y1mr1991877wac.1185469037303; Thu, 26 Jul 2007 09:57:17 -0700 (PDT) Received: by 10.114.177.7 with HTTP; Thu, 26 Jul 2007 09:57:17 -0700 (PDT) Message-ID: Date: Thu, 26 Jul 2007 13:57:17 -0300 From: "Victor Loureiro Lima" To: "John-Mark Gurney" , "Victor Loureiro Lima" , "Daniel Molina Wegener" , "FreeBSD Hackers" In-Reply-To: <20070726061225.GJ99491@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707232052.58485.dmw@unete.cl> <20070724184355.GH99491@funkthat.com> <20070724225157.GI99491@funkthat.com> <20070726061225.GJ99491@funkthat.com> Cc: Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 16:57:19 -0000 2007/7/26, John-Mark Gurney : > Victor Loureiro Lima wrote this message on Wed, Jul 25, 2007 at 12:14 -0300: > > 2007/7/24, John-Mark Gurney : > > >Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 > > >-0300: > > >> 2007/7/24, John-Mark Gurney : > > >> >Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 > > >> >-0400: > > >> >> a) Is there any function or variable that tells me which is the > > >> >> root user UID in the system, or root always have 0 and it's > > >> >> an "elegant" option to compare the variables or structure > > >> >> members against zero. > > >> > > > >> >#include > > >> > > > >> >uid == UID_ROOT > > >> > > > >> >> b) Can normal users look for system processes or kernel threads? > > >> > > > >> >Yes, ps does this... > > >> > > > >> > > >> ps(1) either elevates its priviledges during execution, or has some > > >> other way of medling into the afairs of other processes that will > > >> eventually need some higher priviledge status (either that, or I am > > >> really out-dated on modern operational systems) > > > > > >hydrogen,ttypm,/home/johng,503$ls -l /bin/ps > > >-r-xr-xr-x 1 root wheel 31372 May 8 2005 /bin/ps* > > > > > >So, as you see, no suid or sgid necessary for ps to function... > > >FreeBSD exports most/all of the info through sysctl which does not > > >require elevated privs to get... > > > > > >And ps doesn't medling.. it's just a voyeur.. > > hahaha I liked that phrase ;) > > > > > > Check this out: > > http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/ps/ps.c?rev=1.106.2.2;content-type=text%2Fplain > > > > Turns out ps(1) uses libkvm, more specifically kvm_getprocs() function > > (the function that I said was in the middle of my last experience on > > getting process information from FreeBSD ;)) Im pretty sure it doesnt > > get _any_ of its info thru sysctl's, but using the kvm interface which > > is simple, clean and orthogonal, however I guess I was a little bit > > incorrect in my last email, ps(1) in its common execution mode will > > Have you looked at the source to kvm_getprocs(3)? > struct kinfo_proc * > kvm_getprocs(kd, op, arg, cnt) > [...] > { > [...] > if (ISALIVE(kd)) { > size = 0; > mib[0] = CTL_KERN; > mib[1] = KERN_PROC; > mib[2] = op; > mib[3] = arg; > temp_op = op & ~KERN_PROC_INC_THREAD; > st = sysctl(mib, > temp_op == KERN_PROC_ALL || temp_op == KERN_PROC_PROC ? > 3 : 4, NULL, &size, NULL, 0); > [...] > > So, yes, ps isn't using sysctl directly, but kvm_getprocs is... And > if you look at -current's ps(1): > -a Display information about other users' processes as well as your > own. This will skip any processes which do not have a control- > ling terminal, unless the -x option is also specified. This can > be disabled by setting the security.bsd.see_other_uids sysctl to > zero. > > and security.bsd.see_other_uids defaults to 1... Check-mate ;) I am defeated!!! But at least it was illustrative (for me). But getting back on the topic, the prefered way is using kvm_getprocs(3) (for historic purposes on the list ;)) cheers and hugs, victor f. loureiro lima From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 18:17:30 2007 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 AA93F16A417 for ; Thu, 26 Jul 2007 18:17:30 +0000 (UTC) (envelope-from tom.hurst@clara.net) Received: from spork.qfe3.net (spork.qfe3.net [212.13.207.101]) by mx1.freebsd.org (Postfix) with ESMTP id 7166B13C469 for ; Thu, 26 Jul 2007 18:17:30 +0000 (UTC) (envelope-from tom.hurst@clara.net) Received: from [81.104.144.87] (helo=voi.aagh.net) by spork.qfe3.net with esmtp (Exim 4.66 (FreeBSD)) (envelope-from ) id 1IE7Wr-000MX8-EN; Thu, 26 Jul 2007 18:53:37 +0100 Received: from freaky by voi.aagh.net with local (Exim 4.67 (FreeBSD)) (envelope-from ) id 1IE7Wr-000L7w-AL; Thu, 26 Jul 2007 18:53:37 +0100 Date: Thu, 26 Jul 2007 18:53:37 +0100 From: Thomas Hurst To: Dag-Erling Sm?rgrav Message-ID: <20070726175337.GA75432@voi.aagh.net> Mail-Followup-To: Dag-Erling Sm?rgrav , Stephen Hocking , hackers@freebsd.org References: <6300771b0707252356i3e902d6ch7919ddbb70d411e7@mail.gmail.com> <86abtj34va.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86abtj34va.fsf@ds4.des.no> Organization: Not much. User-Agent: Mutt/1.5.15 (2007-04-06) Sender: Thomas Hurst Cc: Stephen Hocking , hackers@freebsd.org Subject: Re: FreeBSD & Hot pluggable disks (SATA?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 18:17:30 -0000 * Dag-Erling Sm?rgrav (des@des.no) wrote: > It is a function of the disk controller and driver. AFAIK, the ata > driver supports hot-plug as long as the SATA controller does. I > believe most Promise and Intel ICH SATA controllers do, not sure about > Sil or nVidia MCP. Both SiI and nForce's should support hot-swap, though if ata(4) actually handles them correctly is another matter. I have an nForce 4 Pro board (a Tyan K8WE, CK804 chipset) which in FreeBSD gracefully handles hot removal, but needs a reboot to correctly recognise hot-plugged devices. I thought I'd filed a PR about it, but I can't seem to find it... I also have an 8 port Marvell SATA controller (88SX6081) which needs an atacontrol reinit to pick up new devices, but otherwise seems to work fine. -- Thomas 'Freaky' Hurst http://hur.st/ From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 26 21:06:18 2007 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 67D9916A418 for ; Thu, 26 Jul 2007 21:06:18 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4C64013C4A6 for ; Thu, 26 Jul 2007 21:06:18 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 258641CC01C; Thu, 26 Jul 2007 13:50:42 -0700 (PDT) Date: Thu, 26 Jul 2007 13:50:42 -0700 From: Jeremy Chadwick To: Dag-Erling Sm?rgrav , Stephen Hocking , hackers@freebsd.org Message-ID: <20070726205042.GA4414@eos.sc1.parodius.com> References: <6300771b0707252356i3e902d6ch7919ddbb70d411e7@mail.gmail.com> <86abtj34va.fsf@ds4.des.no> <20070726175337.GA75432@voi.aagh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070726175337.GA75432@voi.aagh.net> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Subject: Re: FreeBSD & Hot pluggable disks (SATA?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 26 Jul 2007 21:06:18 -0000 On Thu, Jul 26, 2007 at 06:53:37PM +0100, Thomas Hurst wrote: > * Dag-Erling Sm?rgrav (des@des.no) wrote: > > > It is a function of the disk controller and driver. AFAIK, the ata > > driver supports hot-plug as long as the SATA controller does. I > > believe most Promise and Intel ICH SATA controllers do, not sure about > > Sil or nVidia MCP. > > Both SiI and nForce's should support hot-swap, though if ata(4) actually > handles them correctly is another matter. > > I have an nForce 4 Pro board (a Tyan K8WE, CK804 chipset) which in > FreeBSD gracefully handles hot removal, but needs a reboot to correctly > recognise hot-plugged devices. I thought I'd filed a PR about it, but I > can't seem to find it... > > I also have an 8 port Marvell SATA controller (88SX6081) which needs an > atacontrol reinit to pick up new devices, but otherwise seems to work > fine. I recently had the joy of needing to hot-swap a disk in one of our running servers (Supermicro SuperServer 5015M-T, Intel ICH7 SATA controller). The server does have a hot-swap SATA backplane, and AHCI is enabled on the box (and reported by FreeBSD too). I moved all data off of the disk and umount'd it. Once our datacenter guy got there, I did an atacontrol detach ad6, which resulted in: subdisk6: detached ad6: detached I had our DC guy pull the carriage/disk, put the replacement, and re-insert it. I then did an atacontrol attach ad6, which resulted in: ad6: 238475MB at ata3-master SATA300 I was immediately able to see the drive, began newfs, mount, moved data back, and all was well. I like telling this incredibly boring story because both our DC guy and myself were amazed at the fact that it *actually worked*. He and I both deal with hardware and software "insanities" on a daily basis (at our day jobs), and we were expecting either the kernel to panic or the drive to simply not show up until a reinit or even a reboot. It's really nice when things *just work*, you know what I mean? Comparatively, at my home I have an Asus A8N-E (nForce CK804 SATA controller) with numerous disks in it. One recently went bad, and for "fun" I decided to go through the same procedure as above. It went well until the physical portion -- I disconnected the SATA cable without issue, but the instant I disconnected the SATA power cable, I heard all of the drives on the bus reset. I looked up at the console and found the machine had panic'd. I plugged in the new disk (SATA cable first, power 2nd) and again heard all the drives on the bus reset. After rebooting the box, the BIOS found the new disk as well as all the old ones, and of course FreeBSD did as well. I'm not sure why all the devices on the bus reset. Was this due to the lack of SATA hot-swap backplane? I really have no idea what those backplanes do/provide on purely an electronic (and electrical) level, so maybe what happened was normal for the scenario. If someone could clue me in here, I'd really appreciate it. I'm pretty sure FreeBSD panic'd because the existing (and mounted) disks which got reset disappeared from the bus; there's another -stable thread about what FreeBSD does when you pull hardware out from underneath it and it tries to access a device with a mounted filesystem. :-) An interesting/educational experience nonetheless. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 06:06:15 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F61716A419 for ; Fri, 27 Jul 2007 06:06:15 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by mx1.freebsd.org (Postfix) with ESMTP id 5008613C458 for ; Fri, 27 Jul 2007 06:06:14 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: by py-out-1112.google.com with SMTP id a73so1493982pye for ; Thu, 26 Jul 2007 23:06:14 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:cc:from:subject:date:to:x-mailer; b=cCQesuq+m9KzpshiQKZ9TdvGO24HROBKm05fwNyjG1jYbY+ejYxF7jhq5viSeb6ZR8tvHPQun0U+sET1EDZ7tm7pMWZq1zYEjULS4oEr24aTTwT9VXyKs4dQhbICb6GdcgHSHfxa7WtPzW4R7HRehgmsOiFR7cRnt0omrb/JbT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:cc:from:subject:date:to:x-mailer; b=DX2T8TdjuZnbqEQ6KvPPYzR5zXgye67+yGy5WCB9tXkA57b8RGem0We6KEWSPfRTSZBoeNGtKHk8p6NfvN5x+G6szeoa1lXZ4QM/UaLq0ETRabp5H2WZZGuAtS4wwl0d8TcmvSXXm9g/zwVSlNpwhcrvLbqlgy3wD6wNbPhriQw= Received: by 10.35.40.10 with SMTP id s10mr12692026pyj.1185516374258; Thu, 26 Jul 2007 23:06:14 -0700 (PDT) Received: from ?192.168.1.3? ( [74.134.230.123]) by mx.google.com with ESMTPS id n45sm2542757pyh.2007.07.26.23.06.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2007 23:06:13 -0700 (PDT) In-Reply-To: <62421185390337@webmail26.yandex.ru> References: 1550000000188138709 <62421185390337@webmail26.yandex.ru> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <6de5e4e5cf8d3aea5c5b34b923cb5457@gmail.com> Content-Transfer-Encoding: 7bit From: Joshua Isom Date: Fri, 27 Jul 2007 01:07:47 -0500 To: "Andrey V. Elsukov" X-Mailer: Apple Mail (2.624) Cc: freebsd-hackers@freebsd.org Subject: Re: Getting FreeBSD to see my dvd drive X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jul 2007 06:06:15 -0000 On Jul 25, 2007, at 2:05 PM, Andrey V. Elsukov wrote: > 25.07.07, 22:07, Joshua Isom : > > > Can you try the last CURRENT snapshot with your drive? > > ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/ > > I guess the problem is with a SATA controller support... > > > -- > > WBR, Andrey V. Elsukov > Well, the problem with the drive not recognizing has been fixed with CURRENT. The inability to boot freebsd still occured with the latest snapshot so FreeBSD's not perfect on it. I may temporarily downgrade back to STABLE(and keep a CURRENT in /boot for when I want to use the drive even if it means rebooting). In anycase, here's the relevant lines in dmesg. atapci0: port 0xe100-0xe107,0xe700-0xe703,0xe800-0xe807,0xe900-0xe903,0xe000 -0xe00f,0xd000-0xd0ff irq 20 at device 15.0 on pci0 atapci0: [ITHREAD] ata2: on atapci0 ata2: [ITHREAD] ata3: on atapci0 ata3: [ITHREAD] acd0: DVDR at ata2-master SATA150 WARNING: WITNESS option enabled, expect reduced performance. GEOM_LABEL: Label for provider acd0 is iso9660/FreeBSD_bootonly. So now comes the next two questions, any ETA on getting into STABLE and how about the loader not crashing? From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 09:46:20 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EE4516A417 for ; Fri, 27 Jul 2007 09:46:20 +0000 (UTC) (envelope-from sharadc@niksun.com) Received: from in.niksun.com (210.18.76.166.sify.net [210.18.76.166]) by mx1.freebsd.org (Postfix) with ESMTP id 47D3C13C478 for ; Fri, 27 Jul 2007 09:46:20 +0000 (UTC) (envelope-from sharadc@niksun.com) Received: from sharadc.niksun.com (unknown [10.60.5.27]) by in.niksun.com (Postfix) with ESMTP id 68CB85D5E for ; Fri, 27 Jul 2007 15:21:08 +0530 (IST) From: Sharad Chandra Organization: Niksun India To: "FreeBSD Hackers" Date: Fri, 27 Jul 2007 15:13:48 +0530 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707271513.48639.sharadc@niksun.com> Subject: gcc -m32 option on amd64. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jul 2007 09:46:20 -0000 Hi guys, I am trying gcc -m32 on freebsd 6.1 amd64 env, but it does not seems to be working. i also installed /usr/port/lang/linux-libgcc/ but did not help what i did is=> echo "main () {}" > t.c; gcc -m32 t.c /usr/bin/ld: skipping incompatible /usr/local/lib/gcc/x86_64-portbld-freebsd6.1/4.2.0/gcc/x86_64-portbld-freebsd6.1/4.2.0/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc collect2: ld returned 1 exit status how can we make this working? Thanks Sharad Chandra From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 10:20:31 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E621016A419 for ; Fri, 27 Jul 2007 10:20:31 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mx1.freebsd.org (Postfix) with ESMTP id 7289E13C4DE for ; Fri, 27 Jul 2007 10:20:31 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id l6RAKRJ4001837; Fri, 27 Jul 2007 20:20:27 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id l6RAKR7e001836; Fri, 27 Jul 2007 20:20:27 +1000 (EST) (envelope-from peter) Date: Fri, 27 Jul 2007 20:20:27 +1000 From: Peter Jeremy To: Sharad Chandra Message-ID: <20070727102027.GH1152@turion.vk2pj.dyndns.org> References: <200707271513.48639.sharadc@niksun.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1LKvkjL3sHcu1TtY" Content-Disposition: inline In-Reply-To: <200707271513.48639.sharadc@niksun.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.16 (2007-06-09) Cc: FreeBSD Hackers Subject: Re: gcc -m32 option on amd64. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jul 2007 10:20:32 -0000 --1LKvkjL3sHcu1TtY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-Jul-27 15:13:48 +0530, Sharad Chandra wrote: >I am trying gcc -m32 on freebsd 6.1 amd64 env, but it does not seems to be= =20 >working. i also installed /usr/port/lang/linux-libgcc/ but did not help >what i did is=3D> >echo "main () {}" > t.c; gcc -m32 t.c >/usr/bin/ld: skipping=20 >incompatible /usr/local/lib/gcc/x86_64-portbld-freebsd6.1/4.2.0/gcc/x86_64= -portbld-freebsd6.1/4.2.0/libgcc.a=20 >when searching for -lgcc >/usr/bin/ld: cannot find -lgcc >collect2: ld returned 1 exit status > >how can we make this working? You are using gcc 4.2 from ports. I suspect this only includes the 64-bit libraries. gcc in the base system includes both 32-bit and 64-bit libraries by default but it still suffers the same problem. I had a go at fixing the problem in amd64/112215 but this has other problems and needs more work. Note that non-trivial code will break because points at amd64 headers whilst the -m32 compiler needs i386 headers in many cases. There's a non-trivial amount of work needed to actually get cross-building working. I suggest you look throught the FreeBSD-amd64 archives. --=20 Peter Jeremy --1LKvkjL3sHcu1TtY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGqcbr/opHv/APuIcRAum1AJ9/Nc57oDejiK+Uod0PTflaVSyXJgCfbeqg egv8cV8WsCKC3WqLF6Alvk0= =RcU8 -----END PGP SIGNATURE----- --1LKvkjL3sHcu1TtY-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 14:43:15 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3595F16A46B for ; Fri, 27 Jul 2007 14:43:15 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id E806E13C46B for ; Fri, 27 Jul 2007 14:43:14 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from 80-218-187-205.dclient.hispeed.ch ([80.218.187.205] helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IER26-0002Nl-UC for freebsd-hackers@freebsd.org; Fri, 27 Jul 2007 16:43:10 +0200 Message-ID: <46AA0491.5000203@gahr.ch> Date: Fri, 27 Jul 2007 16:43:29 +0200 From: Pietro Cerutti User-Agent: Thunderbird 2.0.0.5 (X11/20070723) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - gahr.ch X-Source: X-Source-Args: X-Source-Dir: Subject: [patch] enhance powerd(8) to handle max temperature X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jul 2007 14:43:15 -0000 Hi list, here is a patch to allow powerd(8) accept a "-t tval" option to set a temperature limit above which performance should be decreased. It's a first draft, and I identified the following problems: - the CPU temperature takes some time to decrease, so powerd keeps decreasing the CPU frequency until the temperature is below the limit. The effect is a "increase to maximum, decrease to minimum, increase to maximum, decrease to minimum, ...." which may not be desirable. - the temperature is retrieved by the hw.acpi.thermal.tz0.temperature sysctl MIB. Support for other methods would be desirable. The patches to powerd.c and powerd.8 are here: http://www.gahr.ch/FreeBSD/patches/powerd.c.diff http://www.gahr.ch/FreeBSD/patches/powerd.8.diff Any comment is welcome! -- Pietro Cerutti PGP Public Key: http://gahr.ch/pgp From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 16:32:39 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0953616A419 for ; Fri, 27 Jul 2007 16:32:39 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.185]) by mx1.freebsd.org (Postfix) with ESMTP id 6FF8F13C4E8 for ; Fri, 27 Jul 2007 16:32:38 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by mu-out-0910.google.com with SMTP id w9so901938mue for ; Fri, 27 Jul 2007 09:32:37 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=b/lcCuLN4X3FVQx/E3d+TCHXddxTGT3VWYY11xmJHdIfgYxaDk2T0oQoakXMlUjFuxuHWKK9LT/cWEruQisCyntdHhRUaxEZrApL8+eo/Ce2bbI197ww0N2K5OueJKB1Uv0mw0HoXYL2nEES+42WE8XPfF2sry8tOKm3wR92LUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=Uh2Io/aK1k7g0bQtN9uZ9F0r8biME+gsyShjV5vIcp+dT5jd/b4x35yi6ImW0u/3bew7xxbXJEYLWDKquXZY2EAElKXJWEZ9dP8THmM+jAiJCTywL3eaH91fhByp9ADbY3fIRpavXMVNWKw+N846FuKYsulNaTaW29YNDs4PGsE= Received: by 10.82.162.14 with SMTP id k14mr2860488bue.1185553956940; Fri, 27 Jul 2007 09:32:36 -0700 (PDT) Received: from ?127.0.0.1? ( [217.206.187.79]) by mx.google.com with ESMTPS id f7sm588225nfh.2007.07.27.09.32.35 (version=SSLv3 cipher=RC4-MD5); Fri, 27 Jul 2007 09:32:36 -0700 (PDT) From: Tom Evans To: Peter Jeremy In-Reply-To: <20070727102027.GH1152@turion.vk2pj.dyndns.org> References: <200707271513.48639.sharadc@niksun.com> <20070727102027.GH1152@turion.vk2pj.dyndns.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-7o+A3uSvJUVkkyaOSDIU" Date: Fri, 27 Jul 2007 17:32:35 +0100 Message-Id: <1185553955.1457.8.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 FreeBSD GNOME Team Port Cc: Sharad Chandra , FreeBSD Hackers Subject: Re: gcc -m32 option on amd64. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jul 2007 16:32:39 -0000 --=-7o+A3uSvJUVkkyaOSDIU Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2007-07-27 at 20:20 +1000, Peter Jeremy wrote: > On 2007-Jul-27 15:13:48 +0530, Sharad Chandra wrote: > >I am trying gcc -m32 on freebsd 6.1 amd64 env, but it does not seems to = be=20 > >working. i also installed /usr/port/lang/linux-libgcc/ but did not help > >what i did is=3D> > >echo "main () {}" > t.c; gcc -m32 t.c > >/usr/bin/ld: skipping=20 > >incompatible /usr/local/lib/gcc/x86_64-portbld-freebsd6.1/4.2.0/gcc/x86_= 64-portbld-freebsd6.1/4.2.0/libgcc.a=20 > >when searching for -lgcc > >/usr/bin/ld: cannot find -lgcc > >collect2: ld returned 1 exit status > > > >how can we make this working? >=20 > You are using gcc 4.2 from ports. I suspect this only includes the > 64-bit libraries. gcc in the base system includes both 32-bit and > 64-bit libraries by default but it still suffers the same problem. >=20 > I had a go at fixing the problem in amd64/112215 but this has other > problems and needs more work. Note that non-trivial code will break > because points at amd64 headers whilst the -m32 > compiler needs i386 headers in many cases. There's a non-trivial > amount of work needed to actually get cross-building working. I > suggest you look throught the FreeBSD-amd64 archives. >=20 gcc on amd64 is capable of generating i386 code, but ld on amd64 is incapable of linking i386 code together without serious amounts of work. At work, we use a large number of amd64 boxes as compile farm servers for i386 development, using distcc and a wrapper to invoke gcc correctly on the external boxes. To verify that it works (it compiles to i386 code), do this: $ uname -a; echo "main() { } " > t.c ; gcc -c -m32 -o t.o t.c; file t.o FreeBSD chef.mintel.co.uk 6.1-STABLE FreeBSD 6.1-STABLE #1: Fri Jun 23 12:48:28 BST 2006 operator@chef.mintel.co.uk:/usr/obj/usr/src/sys/CHEF amd64 t.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (FreeBSD), not stripped --=-7o+A3uSvJUVkkyaOSDIU Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGqh4dlcRvFfyds/cRAlHPAKCEobXeinMaJu4IZTdyEdlFlyKHRQCgvNjy mvMk1ivTtGNKTtCiLt49rpY= =7zQL -----END PGP SIGNATURE----- --=-7o+A3uSvJUVkkyaOSDIU-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 17:32:19 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77E8F16A417 for ; Fri, 27 Jul 2007 17:32:19 +0000 (UTC) (envelope-from dmw@unete.cl) Received: from mail02.ifxnetworks.com (mail02.ifxnetworks.com [190.61.128.12]) by mx1.freebsd.org (Postfix) with ESMTP id 25B3B13C4B3 for ; Fri, 27 Jul 2007 17:32:18 +0000 (UTC) (envelope-from dmw@unete.cl) Received: (qmail 31316 invoked from network); 27 Jul 2007 17:32:17 -0000 Received: from unknown (HELO webmail.ifxnw.cl) ([190.61.128.22]) (envelope-sender ) by mail02.ifxnetworks.com (qmail-ldap-1.03) with SMTP for ; 27 Jul 2007 17:32:17 -0000 Received: from 64.117.137.69 (proxying for 161.131.179.196) (SquirrelMail authenticated user dmw@unete.cl) by webmail.ifxnw.cl with HTTP; Fri, 27 Jul 2007 13:32:17 -0400 (CLT) Message-ID: <54257.64.117.137.69.1185557537.squirrel@webmail.ifxnw.cl> Date: Fri, 27 Jul 2007 13:32:17 -0400 (CLT) From: "Daniel Molina Wegener" To: freebsd-hackers@freebsd.org User-Agent: SquirrelMail/1.4.8 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: kevent notes implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dmw@unete.cl List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2007 17:32:19 -0000 Hello, I was looking the code of kqueue(2)/kevent(2), also the manual pages. Is there any reason why NOTE_OPEN, NOTE_CLOSE and NOTE_READ aren't implemented yet. What may be considered in these KNOTEs implementation? Best regards. -- .O. | Daniel Molina Wegener | C/C++ Developer ..O | dmw [at] unete [dot] cl | FOSS Coding Adict OOO | BSD & Linux User | Standards Rocks! From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 22:00:21 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFFC316A469 for ; Fri, 27 Jul 2007 22:00:21 +0000 (UTC) (envelope-from carlsonmark@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.freebsd.org (Postfix) with ESMTP id 81F7313C46C for ; Fri, 27 Jul 2007 22:00:21 +0000 (UTC) (envelope-from carlsonmark@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so766274wxd for ; Fri, 27 Jul 2007 15:00:21 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UChe0gF0QO6O81dI8tGySLYfWaV0ij6EeE369jTRAgDwBvFLvjJ8f8dFleKXWrrfgQpAOxlgF/fH4XCrmru2XgATzGoGodUzmTNGoes2tTGBjQPhTifZUnasFv1TcCwDTsG8f77CLJpxBLPbCtSKhs1NDqrvsnCobJlcWa2WTR0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FBm/IHxDInxbHdmWxai5cnk1unfv2WQ8S7ZiCxLCVuiyjofCIqv1+hHSgBqmYqytyYqi7QIg5dMM8iY/UIVL86tUedfwOweNOohBfrvT9TPSVNRF72EfWOLmeeuTg8IQM7JCIPXM6jXyHQiBB3za4IQaPJ0LoTwftwxthMP3Gq4= Received: by 10.70.34.13 with SMTP id h13mr5642740wxh.1185572046587; Fri, 27 Jul 2007 14:34:06 -0700 (PDT) Received: by 10.70.91.15 with HTTP; Fri, 27 Jul 2007 14:34:06 -0700 (PDT) Message-ID: Date: Fri, 27 Jul 2007 15:34:06 -0600 From: "Mark Carlson" To: "Tom Evans" In-Reply-To: <1185439753.1457.1.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1185439753.1457.1.camel@localhost> Cc: freebsd-hackers@freebsd.org, Joshua Isom Subject: Re: Getting FreeBSD to see my dvd drive X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jul 2007 22:00:21 -0000 On 7/26/07, Tom Evans wrote: > On Wed, 2007-07-25 at 13:07 -0500, Joshua Isom wrote: > > I've reposted this from freebsd-questions, and added some minor details. > > > > Yesterday I bought and installed a Lite-ON SATA DVD Writer for my > > computer. But FreeBSD fails to recognize it at all. > > > > Hi Joshua. > > FreeBSD doesn't support SATA ATAPI devices iirc. > > Sorry > > That's funny, I was able to install 6.2-release (both 32-bit and 64-bit) just fine from my SATA DVD drive a few weeks ago (LG Super Multi DVD Writer 18x18x10 DVD +/-RW Dual-Layer Lightscribe.) I had no idea FreeBSD didn't support it until I read this email. I have since upgraded to 7.0-CURRENT (32-bit): FreeBSD 7.0-CURRENT #0: Sat Jul 14 21:22:14 MDT 2007 Now, from my dmesg (sorry, didn't keep one from 6.2...): ata5: on atapci1 ata5: SATA ATAPI devices not supported yet ata5: [ITHREAD] I know my BIOS setup is not the same now as it was when I did the initial install, but AFAIK, the only difference is that I had to disable the onboard RAID controller to install to the RAID array then re-enable it to boot off of the array (funny, I know, but it was the only way the BIOS would let me boot off of the SATA DVD drive at all!) -Mark Carlson For posterity, the mobo was a S3000AHLX, which works OK, it'll be nicer when I can get the SMBUS controller working... if I can, that is. From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 27 22:22:55 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 204C416A419 for ; Fri, 27 Jul 2007 22:22:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id CB1C113C4A8 for ; Fri, 27 Jul 2007 22:22:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l6RMKXl7040376; Fri, 27 Jul 2007 16:20:34 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 27 Jul 2007 16:20:36 -0600 (MDT) Message-Id: <20070727.162036.-1350495603.imp@bsdimp.com> To: dmw@unete.cl From: "M. Warner Losh" In-Reply-To: <200707232052.58485.dmw@unete.cl> References: <200707232052.58485.dmw@unete.cl> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 27 Jul 2007 16:20:34 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: A few questions... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 27 Jul 2007 22:22:55 -0000 In message: <200707232052.58485.dmw@unete.cl> Daniel Molina Wegener writes: : : Hello, : : I need information about few things, I hope someone can help : me and thanks in advance. : : a) Is there any function or variable that tells me which is the : root user UID in the system, or root always have 0 and it's : an "elegant" option to compare the variables or structure : members against zero. The super user is always UID == 0. By definition. The root account typically is 0, but doesn't have to be. User accounts typically aren't 0, but can be (cf toor). Any account with a uid of 0 is a super user. It is the super user that gets all the toys. : b) Can normal users look for system processes or kernel threads? Sometimes. See the sysctls security.bsd.see_other_gids and security.bsd.see_other_uids. : c) Can root look for system processes or kernel threads? If it is the super user, yes. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 28 02:24:04 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEF3A16A417 for ; Sat, 28 Jul 2007 02:24:04 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6888613C45A for ; Sat, 28 Jul 2007 02:24:04 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from kasuga.mahoroba.org (IDENT:Ecaa6NvitOZ8+cpTe7Huyx4np3n0yF/odM/BdOnAGEv6jlEefsXA3jaTHgtj/o1L@kasuga.mahoroba.org [IPv6:2001:2f0:104:8010:20b:97ff:fe2e:b521]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.8/8.13.8) with ESMTP/inet6 id l6S2NtmS013634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Jul 2007 11:23:56 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sat, 28 Jul 2007 11:23:55 +0900 Message-ID: From: Hajimu UMEMOTO To: Pietro Cerutti In-Reply-To: <46AA0491.5000203@gahr.ch> References: <46AA0491.5000203@gahr.ch> User-Agent: xcite1.57> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.1 (i386-pc-freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.2-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (ameno.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Sat, 28 Jul 2007 11:23:56 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, DKIM_POLICY_SIGNSOME,DK_POLICY_SIGNSOME autolearn=ham version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on ameno.mahoroba.org Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] enhance powerd(8) to handle max temperature X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jul 2007 02:24:04 -0000 Hi, >>>>> On Fri, 27 Jul 2007 16:43:29 +0200 >>>>> Pietro Cerutti said: gahr> Hi list, gahr> here is a patch to allow powerd(8) accept a "-t tval" option to set a gahr> temperature limit above which performance should be decreased. gahr> It's a first draft, and I identified the following problems: gahr> - the CPU temperature takes some time to decrease, so powerd keeps gahr> decreasing the CPU frequency until the temperature is below the limit. gahr> The effect is a "increase to maximum, decrease to minimum, increase to gahr> maximum, decrease to minimum, ...." which may not be desirable. gahr> - the temperature is retrieved by the hw.acpi.thermal.tz0.temperature gahr> sysctl MIB. Support for other methods would be desirable. gahr> The patches to powerd.c and powerd.8 are here: gahr> http://www.gahr.ch/FreeBSD/patches/powerd.c.diff gahr> http://www.gahr.ch/FreeBSD/patches/powerd.8.diff gahr> Any comment is welcome! We have a passive cooling mechanism already in our kernel. It runs according to an ACPI specification. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 28 07:36:07 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DECB216A41F for ; Sat, 28 Jul 2007 07:36:07 +0000 (UTC) (envelope-from nike_d@cytexbg.com) Received: from sellinet.net (galileo.sellinet.net [82.199.192.2]) by mx1.freebsd.org (Postfix) with SMTP id 45AC913C457 for ; Sat, 28 Jul 2007 07:36:07 +0000 (UTC) (envelope-from nike_d@cytexbg.com) Received: (qmail 13357 invoked by uid 1009); 28 Jul 2007 10:09:24 +0300 Received: from nike_d@cytexbg.com by galileo by uid 1002 with qmail-scanner-1.22 (spamassassin: 3.0.3. Clear:RC:1(82.199.197.152):. Processed in 0.037862 secs); 28 Jul 2007 07:09:24 -0000 Received: from unknown (HELO ndenev.totalterror.net) (82.199.197.152) by galileo.sellinet.net with SMTP; 28 Jul 2007 10:09:24 +0300 Received: (qmail 52365 invoked from network); 28 Jul 2007 10:09:24 +0300 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by ndenev.totalterror.net with SMTP; 28 Jul 2007 10:09:24 +0300 Message-ID: <46AAEBA3.5020303@cytexbg.com> Date: Sat, 28 Jul 2007 10:09:23 +0300 From: Niki Denev User-Agent: Thunderbird 1.5.0.10 (X11/20070326) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <1185439753.1457.1.camel@localhost> In-Reply-To: X-Enigmail-Version: 0.94.3.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Getting FreeBSD to see my dvd drive X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jul 2007 07:36:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark Carlson wrote: > On 7/26/07, Tom Evans wrote: >> On Wed, 2007-07-25 at 13:07 -0500, Joshua Isom wrote: >>> I've reposted this from freebsd-questions, and added some minor details. >>> >>> Yesterday I bought and installed a Lite-ON SATA DVD Writer for my >>> computer. But FreeBSD fails to recognize it at all. >>> >> Hi Joshua. >> >> FreeBSD doesn't support SATA ATAPI devices iirc. >> >> Sorry >> >> > > That's funny, I was able to install 6.2-release (both 32-bit and > 64-bit) just fine from my SATA DVD drive a few weeks ago (LG Super > Multi DVD Writer 18x18x10 DVD +/-RW Dual-Layer Lightscribe.) > > I had no idea FreeBSD didn't support it until I read this email. I > have since upgraded to 7.0-CURRENT (32-bit): > FreeBSD 7.0-CURRENT #0: Sat Jul 14 21:22:14 MDT 2007 > > Now, from my dmesg (sorry, didn't keep one from 6.2...): > ata5: on atapci1 > ata5: SATA ATAPI devices not supported yet > ata5: [ITHREAD] > > I know my BIOS setup is not the same now as it was when I did the > initial install, but AFAIK, the only difference is that I had to > disable the onboard RAID controller to install to the RAID array then > re-enable it to boot off of the array (funny, I know, but it was the > only way the BIOS would let me boot off of the SATA DVD drive at all!) > > -Mark Carlson > > For posterity, the mobo was a S3000AHLX, which works OK, it'll be > nicer when I can get the SMBUS controller working... if I can, that > is. I got my SATA DVD burner working by switching the SATA mode in BIOS from AHCI to IDE, and it is now detected as IDE drive.. but of course this depends on mobo/chipset/bios. Mine is Asus p5b with Intel chipset. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGquujHNAJ/fLbfrkRAqbFAJsEuRI/MH++jy3dB/bSP1hec4H6wwCgktVX T0QL6ok5kXEfYEQzLuj/I4Q= =auxx -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 28 07:55:55 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84C9316A421 for ; Sat, 28 Jul 2007 07:55:55 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mx1.freebsd.org (Postfix) with ESMTP id 1F89C13C46B for ; Sat, 28 Jul 2007 07:55:54 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id l6S7trZJ018582; Sat, 28 Jul 2007 17:55:53 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id l6S7trSR018581; Sat, 28 Jul 2007 17:55:53 +1000 (EST) (envelope-from peter) Date: Sat, 28 Jul 2007 17:55:53 +1000 From: Peter Jeremy To: Tom Evans Message-ID: <20070728075553.GW1152@turion.vk2pj.dyndns.org> References: <200707271513.48639.sharadc@niksun.com> <20070727102027.GH1152@turion.vk2pj.dyndns.org> <1185553955.1457.8.camel@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NtwzykIc2mflq5ck" Content-Disposition: inline In-Reply-To: <1185553955.1457.8.camel@localhost> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.16 (2007-06-09) Cc: FreeBSD Hackers Subject: Re: gcc -m32 option on amd64. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 28 Jul 2007 07:55:55 -0000 --NtwzykIc2mflq5ck Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-Jul-27 17:32:35 +0100, Tom Evans wrote: >gcc on amd64 is capable of generating i386 code, but ld on amd64 is >incapable of linking i386 code together without serious amounts of work. Can you elaborate on what you mean by "incapable of linking i386 code"? The stock ld can definitely link i386 code: turion% ld -V GNU ld version 2.15 [FreeBSD] 2004-05-23 Supported emulations: elf_i386_fbsd elf_x86_64_fbsd turion%=20 There is a problem that the 32-bit pathnames on FreeBSD/amd64 are different to the 32-bit pathnames on FreeBSD/i386 (ie an i386 executable built on amd64 will point to /libexec/ld-elf32.so.1, rather than /libexec/ld-elf.so.1) so the result won't execute on a FreeBSD/i386 box - but I don't see that as a problem with ld, rather the configuration. --=20 Peter Jeremy --NtwzykIc2mflq5ck Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGqvaJ/opHv/APuIcRAiGPAJ9a7oZcY+MHSrUa9MbDW8+NLHlRjACcDubC HfHdWJwm9S6t4UAQ4Ri2fSM= =3zYe -----END PGP SIGNATURE----- --NtwzykIc2mflq5ck--