[3941] in arla-drinkers
Re: Process pointer PID panics
daemon@ATHENA.MIT.EDU (christopher@0x90.org)
Sun Jun 11 13:43:14 2006
From arla-drinkers-bounces@stacken.kth.se Sun Jun 11 17:43:14 2006
Return-Path: <arla-drinkers-bounces@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 24289 invoked from network); 11 Jun 2006 17:43:14 -0000
Received: from mx2.kth.se (130.237.48.98)
by charon.mit.edu with SMTP; 11 Jun 2006 17:43:14 -0000
Received: from localhost (localhost.localdomain [127.0.0.1])
by mx2.kth.se (Postfix) with ESMTP id D6AE1140688;
Sun, 11 Jun 2006 19:43:12 +0200 (CEST)
Received: from mx2.kth.se ([127.0.0.1])
by localhost (mx2.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP
id 31480-05-25; Sun, 11 Jun 2006 19:43:11 +0200 (CEST)
Received: from tapas.stacken.kth.se (tapas.stacken.kth.se [130.237.234.140])
by mx2.kth.se (Postfix) with ESMTP id D19EE140FAA;
Sun, 11 Jun 2006 19:43:10 +0200 (CEST)
Received: from tapas.stacken.kth.se (localhost [127.0.0.1])
by tapas.stacken.kth.se (Postfix) with ESMTP id 4C466534FC;
Sun, 11 Jun 2006 19:43:10 +0200 (CEST)
X-Original-To: arla-drinkers@tapas.stacken.kth.se
Delivered-To: arla-drinkers@tapas.stacken.kth.se
Received: from brev.stacken.kth.se (brev.stacken.kth.se [130.237.234.84])
by tapas.stacken.kth.se (Postfix) with ESMTP id C2272534FC
for <arla-drinkers@tapas.stacken.kth.se>;
Sun, 11 Jun 2006 19:43:08 +0200 (CEST)
Received: from mx3.kth.se (mx3.kth.se [130.237.48.97])
by brev.stacken.kth.se (8.12.10/8.12.10) with ESMTP id k5BHh7Rv011286
for <arla-drinkers@stacken.kth.se>;
Sun, 11 Jun 2006 19:43:08 +0200 (MET DST)
Received: from localhost (localhost.localdomain [127.0.0.1])
by mx3.kth.se (Postfix) with ESMTP id B4C33140A0E
for <arla-drinkers@stacken.kth.se>;
Sun, 11 Jun 2006 19:43:07 +0200 (CEST)
Received: from mx3.kth.se ([127.0.0.1])
by localhost (mx3.kth.se [127.0.0.1]) (amavisd-new,
port 10024) with LMTP
id 11789-01-94 for <arla-drinkers@stacken.kth.se>;
Sun, 11 Jun 2006 19:43:06 +0200 (CEST)
Received: from nop.0x90.org (unknown [66.241.137.149])
by mx3.kth.se (Postfix) with ESMTP id 87529140A03
for <arla-drinkers@stacken.kth.se>;
Sun, 11 Jun 2006 19:43:06 +0200 (CEST)
Received: by nop.0x90.org (Postfix, from userid 1008)
id 7062442074A; Sun, 11 Jun 2006 13:41:04 -0400 (EDT)
Date: Sun, 11 Jun 2006 13:41:04 -0400
From: christopher@0x90.org
To: Tomas Olsson <tol@stacken.kth.se>
Subject: Re: Process pointer PID panics
Message-ID: <20060611174104.GA19361@0x90.org>
References: <20060610060852.GA19245@0x90.org>
<lsrirn8jz80.fsf@kashyyyk.ite.kth.se>
Mime-Version: 1.0
Content-Disposition: inline
In-Reply-To: <lsrirn8jz80.fsf@kashyyyk.ite.kth.se>
User-Agent: Mutt/1.5.11
X-Virus-Scanned: by amavisd-new at kth.se
X-Spam-Status: No, hits=-2.3 tagged_above=-200.0 required=5.0 tests=BAYES_00,
NO_REAL_NAME
X-Spam-Level:
Cc: arla-drinkers@stacken.kth.se
X-BeenThere: arla-drinkers@stacken.kth.se
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: Arla discussions <arla-drinkers.stacken.kth.se>
List-Unsubscribe: <https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers>,
<mailto:arla-drinkers-request@stacken.kth.se?subject=unsubscribe>
List-Archive: <http://lists.stacken.kth.se/pipermail/arla-drinkers>
List-Post: <mailto:arla-drinkers@stacken.kth.se>
List-Help: <mailto:arla-drinkers-request@stacken.kth.se?subject=help>
List-Subscribe: <https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers>,
<mailto:arla-drinkers-request@stacken.kth.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: arla-drinkers-bounces@stacken.kth.se
Errors-To: arla-drinkers-bounces@stacken.kth.se
X-Virus-Scanned: by amavisd-new at kth.se
On Sun, Jun 11, 2006 at 02:46:39AM +0200, Tomas Olsson wrote:
> christopher@0x90.org writes:
> > If a client application (ie: not arlad) opens the /dev/nnpfs0 device
> > before daemon-ifying itself, the (chan->proc) pointer will point into
> > the process struct from the starting shell.
> >
> Any particular reason why one would do such a thing?
Logging fatal startup errors to console, since daemon() closes stderr.
Nasty things like the device returning EBUSY, config file or
/var/spool/afs not existing, etc.
Privilege separation will also do it, when forking an unprivileged child
after opening the fd.
> > + if (chan->proc == NULL || chan->proc != nnpfs_get_proc(uiop))
> > chan->proc = nnpfs_get_proc(uiop);
> >
> Apple demands that procs are released too. It's not hard at all, I just
> want to understand why we want this.
For arla as a whole, it is a corner case that will never happen in the
current arlad code. A warning in doc/nnpfs.txt to never change process
ID after open()ing the nnpfs device would probably suffice.
If there is some kernel magic that can detect the process change on the
descriptor, it would be better than comparing process pointers with
every message. I will have to defer to someone more familiar with what
is possible here.
cheers
--chris
_______________________________________________
Arla-drinkers mailing list
Arla-drinkers@stacken.kth.se
https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers