From owner-freebsd-current@FreeBSD.ORG Tue Oct 6 23:15:16 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BD08106566B; Tue, 6 Oct 2009 23:15:16 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id BFEC68FC21; Tue, 6 Oct 2009 23:15:15 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAMtsy0qDaFvK/2dsb2JhbADVA4QqBA X-IronPort-AV: E=Sophos;i="4.44,515,1249272000"; d="scan'208";a="49082467" Received: from fraser.cs.uoguelph.ca ([131.104.91.202]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 06 Oct 2009 19:15:13 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by fraser.cs.uoguelph.ca (Postfix) with ESMTP id C3003109C2DA; Tue, 6 Oct 2009 19:15:13 -0400 (EDT) X-Virus-Scanned: amavisd-new at fraser.cs.uoguelph.ca Received: from fraser.cs.uoguelph.ca ([127.0.0.1]) by localhost (fraser.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id faSYLA-3E+fZ; Tue, 6 Oct 2009 19:15:13 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by fraser.cs.uoguelph.ca (Postfix) with ESMTP id 4B33D109C2E5; Tue, 6 Oct 2009 19:15:13 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n96NLTe00555; Tue, 6 Oct 2009 19:21:29 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Tue, 6 Oct 2009 19:21:29 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Robert Watson In-Reply-To: Message-ID: References: <4ABD4BB9.1030804@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: stable@FreeBSD.org, Marcel Moolenaar , "current@freebsd.org mailing list" , Jamie Gritton Subject: Re: 8.0-RC1: kernel page fault in NLM master thread (VIMAGE or ZFS related?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 23:15:16 -0000 On Sun, 27 Sep 2009, Robert Watson wrote: > > On Fri, 25 Sep 2009, Jamie Gritton wrote: > >> It seems to be NFS related. I think the null pointer in question is from >> the export's anonymous credential. Try the patch below and see if it helps >> (which I guess means run it overnight and see if it crashes again). I've >> also patched a similar missing cred prison in GSS_SVC, since I'm not versed >> enough in NFS/RPC stuff to know if it might be the problem. > > This is one of the reasons I really dislike "magic" credentials and special > handling of NULL credentials -- they always get into code the author doesn't > expect, and either there are bad pointer dereferences, or incorrect security > decisions. It's almost always the case that a correct credential should have > been cached or generated at some earlier point to represent the security > context... > I don't really understand prisons/jails, but would creating these credentials via: crdup(td->td_ucred); // duplicating the daemon thread's cred - and then replacing the make sense as an alternative to starting with crget()? (ie. All the other stuff except would be "inherited" from the credential for the daemon thread.) rick