From owner-freebsd-current@FreeBSD.ORG Tue Mar 4 06:42:46 2008 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 22559106566C; Tue, 4 Mar 2008 06:42:46 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.72]) by mx1.freebsd.org (Postfix) with ESMTP id 14DC88FC12; Tue, 4 Mar 2008 06:42:46 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp008-s [10.150.69.71]) by smtpoutm.mac.com (Xserve/smtpout009/MantshX 4.0) with ESMTP id m246ftBf006885; Mon, 3 Mar 2008 22:41:55 -0800 (PST) Received: from [192.168.1.100] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp008/MantshX 4.0) with ESMTP id m246frao026661 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 3 Mar 2008 22:41:54 -0800 (PST) Message-Id: From: Marcel Moolenaar To: Sam Leffler In-Reply-To: <47CCDA8A.60004@errno.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 3 Mar 2008 22:41:52 -0800 References: <47CCB187.8070808@FreeBSD.org> <723D012C-7907-4CFC-B134-C5E5A0B486D9@mac.com> <47CCDA8A.60004@errno.com> X-Mailer: Apple Mail (2.919.2) Cc: re@freebsd.org, "current@freebsd.org" , "George V. Neville-Neil" Subject: Re: IPSEC/crypto is broken in FreeBSD/powerpc 7.0-RELEASE! 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, 04 Mar 2008 06:42:46 -0000 On Mar 3, 2008, at 9:13 PM, Sam Leffler wrote: > Marcel Moolenaar wrote: >> >> On Mar 3, 2008, at 6:18 PM, Maxim Sobolev wrote: >> >>> Hi, >>> >>> It appears to be that "options IPSEC" along with "device crypto" >>> breaks FreeBSD/powerpc kernel badly. When enabling these options, >>> apparently kernel doesn't perform any initialization tasks (I >>> don't see usual probe/init sequence output) but jumps straight >>> into root fs mounting after initing crypto(4) and ipsec(4), which >>> is not usable since no devices has been attached. Keyboard is not >>> working either. >> >> The problem is with device crypto. It attaches to nexus(4) and >> expects to be the only child. As you can see from the log, all >> children of nexus suddenly become instantiations of cryptosoft(4) >> rather then the usual drivers that attach. >> >> The swcr_probe() function should check that the device it gets >> is really the one created for it. >> > > Don't know about "expects to be the only child" but I did was jhb > said was right. A driver's probe function gets called for all devices on the bus the driver has an attachment on. Typically the probe function performs some tests to see if the device in question corresponds to hardware the driver works with. For PCI this is typically the vendor and device ID. In this case, swcr_probe() always returns success, no matter what device it's passed. This only works if it's the only device on the bus... > If you know otherwise please fix it. I'll play with it. I think the best way is to do it the same as null(4). There's nothing in the probe function we can test for. -- Marcel Moolenaar xcllnt@mac.com