From owner-freebsd-virtualization@FreeBSD.ORG Sun May 17 14:41:54 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7D821065673 for ; Sun, 17 May 2009 14:41:54 +0000 (UTC) (envelope-from venture37@gmail.com) Received: from mail-fx0-f216.google.com (mail-fx0-f216.google.com [209.85.220.216]) by mx1.freebsd.org (Postfix) with ESMTP id 2F99C8FC12 for ; Sun, 17 May 2009 14:41:53 +0000 (UTC) (envelope-from venture37@gmail.com) Received: by fxm12 with SMTP id 12so2773352fxm.43 for ; Sun, 17 May 2009 07:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=jCX4q2ZjaL7Az92afuq/4BLECPsBf04QDNKYN52CSbw=; b=Q0kYaI5PVB6lO89KDCcRHPJ0pUolxkiTvFXr7QIJpuTw8WgLShx5rmAoYvmRJ035wp VtraB+YZmFcrB/7CoDF4XW+aR5Id+ZMSOGIXWIxPETp1UhjKiAdD1qIBlu2x1J+vjZTk /ne/ee7rfh4kCfSP9Fv43a/Zfk3xQrFRlDZ98= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=UDPDG8yH0UBy9r++t1uSMSkXUISj/0D2ajDmlolSg3h/ah2yIuspOMK6QGmNsVGCss 3IeoWUoVemAeFRxEmmRZOtFY/Ptw9xobtMWbJSMekO36VHdApBnDdMbolFEyHJroGjvl CUzA/TkoI0kuKDw60hAWXYT3DiHenoSWzxLl4= Received: by 10.103.224.17 with SMTP id b17mr3470415mur.61.1242571313174; Sun, 17 May 2009 07:41:53 -0700 (PDT) Received: from sevans-mac-pro.local (newbie.thingamajig-systems.co.uk [93.97.185.103]) by mx.google.com with ESMTPS id i5sm1588718mue.25.2009.05.17.07.41.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 17 May 2009 07:41:51 -0700 (PDT) Message-ID: <4A10222D.8080100@gmail.com> Date: Sun, 17 May 2009 15:41:49 +0100 From: Sevan / Venture37 User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org References: <4A06E7B0.10600@gmail.com> <200905110409.04612.zec@icir.org> In-Reply-To: <200905110409.04612.zec@icir.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Kernel Compiled with options VIMAGE panics on boot X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2009 14:41:55 -0000 Marko Zec wrote: > On Sunday 10 May 2009 16:41:52 Sevan / Venture37 wrote: >> Hi >> I've installed a fresh copy of this months snapshot, updated src via >> cvsup, made a copy of the GENERIC config file, added 'options VIMAGE' & >> 'nooptions SCTP' & compiled & installed it, on boot the system panics >> with the error: >> panic: in /usr/src/sys/net/if.c:485 if_alloc() >> vnet=0 curvnet=0 >> cpuid = 0 >> >> photo of panic: >> http://img18.imageshack.us/img18/3297/img1057e.jpg >> >> Any ideas?? >> >> /usr/src/sys/net/if.c is v1.328 if that helps. > > It seems that the USB code should set the curvnet context when attaching and > detaching ifnets (rum0 in your case), which it currently does not. I'll look > into this in the next few days - thanks for the report! > > Marko I've tried to compile a new kernel once again after updating src, this time it bombs out during the build process. http://img33.imageshack.us/img33/6164/img1064.jpg Sevan / Venture37 From owner-freebsd-virtualization@FreeBSD.ORG Sun May 17 14:49:51 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CD741065672 for ; Sun, 17 May 2009 14:49:51 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 15DCD8FC1D for ; Sun, 17 May 2009 14:49:51 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 5B51141C690; Sun, 17 May 2009 16:49:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id oSqc5DLXpqUZ; Sun, 17 May 2009 16:49:50 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id EFFCE41C678; Sun, 17 May 2009 16:49:49 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 559484448E6; Sun, 17 May 2009 14:49:32 +0000 (UTC) Date: Sun, 17 May 2009 14:49:32 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Sevan / Venture37 In-Reply-To: <4A10222D.8080100@gmail.com> Message-ID: <20090517144647.R72053@maildrop.int.zabbadoz.net> References: <4A06E7B0.10600@gmail.com> <200905110409.04612.zec@icir.org> <4A10222D.8080100@gmail.com> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD virtualization mailing list Subject: Re: Kernel Compiled with options VIMAGE panics on boot X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2009 14:49:51 -0000 On Sun, 17 May 2009, Sevan / Venture37 wrote: Hi, > I've tried to compile a new kernel once again after updating src, this time > it bombs out during the build process. > > http://img33.imageshack.us/img33/6164/img1064.jpg yes, we are aware of that one and the patch is easy and both Marko and I have it but the commit, that introduced this compile time regression for VIMAGE, also introduced a regression for the !VIMAGE && !VIMAGE_GLOBALS case that we are currently trying to indentify. Here's the patch you want to apply (pasted in) to make things compile again. Index: sys/netinet/in.c =================================================================== --- sys/netinet/in.c (revision 192250) +++ sys/netinet/in.c (working copy) @@ -814,6 +814,7 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin, int scrub) { + INIT_VNET_NET(ifp->if_vnet); INIT_VNET_INET(ifp->if_vnet); register u_long i = ntohl(sin->sin_addr.s_addr); struct sockaddr_in oldaddr; @@ -1007,6 +1008,7 @@ static int in_scrubprefix(struct in_ifaddr *target) { + INIT_VNET_NET(curvnet); INIT_VNET_INET(curvnet); struct in_ifaddr *ia; struct in_addr prefix, mask, p; /bz -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-freebsd-virtualization@FreeBSD.ORG Sun May 17 18:40:56 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E49D1065673 for ; Sun, 17 May 2009 18:40:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outG.internet-mail-service.net (outg.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id 63AEA8FC0A for ; Sun, 17 May 2009 18:40:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 9A90F14DC93; Sun, 17 May 2009 11:28:07 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id C63132D6018; Sun, 17 May 2009 11:28:06 -0700 (PDT) Message-ID: <4A105736.5080505@elischer.org> Date: Sun, 17 May 2009 11:28:06 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <4A06E7B0.10600@gmail.com> <200905110409.04612.zec@icir.org> <4A10222D.8080100@gmail.com> <20090517144647.R72053@maildrop.int.zabbadoz.net> In-Reply-To: <20090517144647.R72053@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD virtualization mailing list Subject: Re: Kernel Compiled with options VIMAGE panics on boot X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2009 18:40:57 -0000 Bjoern A. Zeeb wrote: > On Sun, 17 May 2009, Sevan / Venture37 wrote: > > Hi, > >> I've tried to compile a new kernel once again after updating src, this >> time it bombs out during the build process. >> >> http://img33.imageshack.us/img33/6164/img1064.jpg > > yes, we are aware of that one and the patch is easy and both Marko and > I have it but the commit, that introduced this compile time regression > for VIMAGE, also introduced a regression for the !VIMAGE && > !VIMAGE_GLOBALS case that we are currently trying to indentify. > > Here's the patch you want to apply (pasted in) to make things compile > again. BTW Marko is offline for 3 days. > > > Index: sys/netinet/in.c > =================================================================== > --- sys/netinet/in.c (revision 192250) > +++ sys/netinet/in.c (working copy) > @@ -814,6 +814,7 @@ > in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in > *sin, > int scrub) > { > + INIT_VNET_NET(ifp->if_vnet); > INIT_VNET_INET(ifp->if_vnet); > register u_long i = ntohl(sin->sin_addr.s_addr); > struct sockaddr_in oldaddr; > @@ -1007,6 +1008,7 @@ > static int > in_scrubprefix(struct in_ifaddr *target) > { > + INIT_VNET_NET(curvnet); > INIT_VNET_INET(curvnet); > struct in_ifaddr *ia; > struct in_addr prefix, mask, p; > > > /bz > From owner-freebsd-virtualization@FreeBSD.ORG Tue May 19 20:31:35 2009 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C7611065672 for ; Tue, 19 May 2009 20:31:35 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outA.internet-mail-service.net (outa.internet-mail-service.net [216.240.47.224]) by mx1.freebsd.org (Postfix) with ESMTP id 6ABEB8FC18 for ; Tue, 19 May 2009 20:31:35 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id C45CE14DD58; Tue, 19 May 2009 13:31:35 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 89EF52D600F; Tue, 19 May 2009 13:31:34 -0700 (PDT) Message-ID: <4A131726.6010003@elischer.org> Date: Tue, 19 May 2009 13:31:34 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: John Baldwin References: <200905182234.n4IMYifY077079@svn.freebsd.org> <200905190819.12407.jhb@freebsd.org> <4A12E85B.7050107@elischer.org> <200905191330.54024.jhb@freebsd.org> In-Reply-To: <200905191330.54024.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Bjoern A. Zeeb" , src-committers@freebsd.org, FreeBSD virtualization mailing list Subject: Re: svn commit: r192351 - head/sys/netinet X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2009 20:31:35 -0000 John Baldwin wrote: > On Tuesday 19 May 2009 1:11:55 pm Julian Elischer wrote: >> John Baldwin wrote: >>> On Monday 18 May 2009 6:34:44 pm Bjoern A. Zeeb wrote: >>>> Author: bz >>>> Date: Mon May 18 22:34:44 2009 >>>> New Revision: 192351 >>>> URL: http://svn.freebsd.org/changeset/base/192351 >>>> >>>> Log: >>>> Revert the logical change of r192341. >>>> >>>> net.inet.ip.fw.one_pass is a classic ip_input.c variable and is used in >>>> the pfil and bridge code as well. As ipfw is loadable we need to always >>>> provide it. That is the reason why it lives in struct vnet_inet and >>>> not in struct vnet_ipfw. >>> Gah, I had thought I had seen it in vnet_ipfw when adding > default_to_accept >>> (as at first I had looked into making default_to_accept per-image but >>> tunables + VIMAGE don't mix). >> we need to look at this.. what does it MEAN to have a tunable and >> multiple images? my guess is that normal tunables are only valid for >> teh base image, but that one might have a way to set the 'tunables' >> for one's child images.. possibly by setting them in one's environment? > > Do you have a kernel environment per vimage? If not, you could still have > per-vimage variables that are settable via tunables look at kenv during > vimage creation to parse any tunables perhaps. However, that is possibly > tricky since you can sometimes use sysctl.conf to override a setting done via > loader.conf and in that case, what value should a new vimage get > One could make the argument that tunables are set from outside the base jail (i.e. at boot), and that the equivalent should exist for each image/jail, where what is outside the jail is the parent jail. We do not have a kernel environment per jail, but I think that is because we haven't thought of it until now. I'd suggest that just as you inherit new environment values from a parent process, you could inherrit a 'changed' kernel environment from a parent image, and in fact a parent might want to send you differnet vale of something (e.g. linux uname value). :-) The