From owner-freebsd-current@freebsd.org Mon Aug 5 18:10:53 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55643A98FE for ; Mon, 5 Aug 2019 18:10:53 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (enterprise.ximalas.info [IPv6:2001:700:1100:1::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ximalas.info", Issuer "Hostmaster ximalas.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 462Qmr06PWz41WB; Mon, 5 Aug 2019 18:10:51 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (Ximalas@localhost [127.0.0.1]) by enterprise.ximalas.info (8.15.2/8.15.2) with ESMTPS id x75IAiK4030520 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 5 Aug 2019 20:10:44 +0200 (CEST) (envelope-from trond.endrestol@ximalas.info) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ximalas.info; s=default; t=1565028644; bh=jPmYHwQWJyzAI7uWZQDF5+rpRIzlF2mOWan/vskxmMU=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=s+/rUYZjpd9F6dc94oDlbSJnol90Najpx3v3ltxZTdHhGjxaISIpyFuKnJzqAt6k+ 9iQVHhfhf8wJSElNLz2YS1IDQYNB3skOVHd77h+UJBI0ScbnbzCMxP5ZbeH9CDoVo0 3Al2RalJjy1LFisGi2B8XG3A23bJhlOGzf5VqLOw1r8y7e3hoLvldemRiyqJhbv8YW wvNFskRyDQBC27Qs8HoFIXncTON7gr4jvi9/yAklUGwFqdFBOY/xjc0NqvN07EaBTX wPkM+OnWlHHlQYN8r6Z2x7MtBwPhA8DFWAMpTKZ23j3mSM+DAkKD4ytya77zx508j7 MzVRWTXh2vj6Q== Received: from localhost (trond@localhost) by enterprise.ximalas.info (8.15.2/8.15.2/Submit) with ESMTP id x75IAhG4030517; Mon, 5 Aug 2019 20:10:43 +0200 (CEST) (envelope-from trond.endrestol@ximalas.info) X-Authentication-Warning: enterprise.ximalas.info: trond owned process doing -bs Date: Mon, 5 Aug 2019 20:10:43 +0200 (CEST) From: =?UTF-8?Q?Trond_Endrest=C3=B8l?= Sender: Trond.Endrestol@ximalas.info To: freebsd-current@freebsd.org cc: kib@freebsd.org Subject: Re: r350484 and ASLR enabled - init died (signal 6, exit 0) In-Reply-To: <20190805130255.GA1121@albert.catwhisker.org> Message-ID: References: <20190805130255.GA1121@albert.catwhisker.org> User-Agent: Alpine 2.21.99999 (BSF 352 2019-06-22) OpenPGP: url=http://ximalas.info/about/tronds-openpgp-public-key MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on enterprise.ximalas.info X-Rspamd-Queue-Id: 462Qmr06PWz41WB X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ximalas.info header.s=default header.b=s+/rUYZj; dmarc=pass (policy=none) header.from=ximalas.info; spf=pass (mx1.freebsd.org: domain of trond.endrestol@ximalas.info designates 2001:700:1100:1::8 as permitted sender) smtp.mailfrom=trond.endrestol@ximalas.info X-Spamd-Result: default: False [-1.87 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.965,0]; R_DKIM_ALLOW(-0.20)[ximalas.info:s=default]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[ximalas.info:+]; CTYPE_MIXED_BOGUS(1.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.81)[-0.814,0]; DMARC_POLICY_ALLOW(-0.50)[ximalas.info,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:224, ipnet:2001:700::/32, country:NO]; IP_SCORE(-0.09)[ipnet: 2001:700::/32(-0.15), asn: 224(-0.28), country: NO(-0.01)] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Mon, 05 Aug 2019 18:10:53 -0000 On Mon, 5 Aug 2019 06:02-0700, David Wolfskill wrote: > On Mon, Aug 05, 2019 at 02:53:04PM +0200, Trond Endrestøl wrote: > > Hi, > > > > Has anyone else noticed the kernel being unable to spawn init lately? > > > > All I get is: > > > > init died (signal 6, exit 0) > > panic: Going nowhere without my init! > > > > /sbin/init hasn't had any changes in 4 months, and is present in /sbin > > in the new BE. > > > > I've tried and failed in VBox at home this weekend, and in Citrix > > Hypervisor 8 at $WORK today. I think we can rule out the hypervisors. > > > > Last known working revision is r350400. > > > > There are numerous kernel changes between r350400 and r350583. I'll > > try each revision in succession and see if I can identify any > > culprits. > > ... > > I have not seen the behavior in question; my last update was from > r350566 to r350584 (and was quite uneventful). > > In each case, a "real machine" was used (laptop & a build machine). After more trial and error, r350484 is the culprit for Citrix Hypervisor 8. I have these lines in /boot/loader.conf: kern.elf32.aslr.enable="1" kern.elf32.aslr.pie_enable="1" kern.elf64.aslr.enable="1" kern.elf64.aslr.pie_enable="1" r350483 works like a charm, and so does r350484 iff I disable ASLR. Reenabling ASLR and setting kern.elf{64,32}.aslr.stack_gap to zero has no effect. I've cc'd kib@ on this one. I'm going home and see if VBox 6.0.10 exhibits the same behaviour. -- Trond. From owner-freebsd-current@freebsd.org Mon Aug 5 19:23:17 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FA6AAB301 for ; Mon, 5 Aug 2019 19:23:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 462SNN47XKz46T3 for ; Mon, 5 Aug 2019 19:23:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x75JN5ib022427 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 5 Aug 2019 22:23:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x75JN5ib022427 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x75JN5jS022426; Mon, 5 Aug 2019 22:23:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 Aug 2019 22:23:05 +0300 From: Konstantin Belousov To: Trond =?utf-8?Q?Endrest=C3=B8l?= Cc: freebsd-current@freebsd.org Subject: Re: r350484 and ASLR enabled - init died (signal 6, exit 0) Message-ID: <20190805192305.GC2731@kib.kiev.ua> References: <20190805130255.GA1121@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 462SNN47XKz46T3 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-1.98 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(0.00)[ip: (-2.49), ipnet: 2001:470::/32(-4.51), asn: 6939(-2.90), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Mon, 05 Aug 2019 19:23:17 -0000 On Mon, Aug 05, 2019 at 08:10:43PM +0200, Trond Endrestøl wrote: > On Mon, 5 Aug 2019 06:02-0700, David Wolfskill wrote: > > > On Mon, Aug 05, 2019 at 02:53:04PM +0200, Trond Endrestøl wrote: > > > Hi, > > > > > > Has anyone else noticed the kernel being unable to spawn init lately? > > > > > > All I get is: > > > > > > init died (signal 6, exit 0) > > > panic: Going nowhere without my init! > > > > > > /sbin/init hasn't had any changes in 4 months, and is present in /sbin > > > in the new BE. > > > > > > I've tried and failed in VBox at home this weekend, and in Citrix > > > Hypervisor 8 at $WORK today. I think we can rule out the hypervisors. > > > > > > Last known working revision is r350400. > > > > > > There are numerous kernel changes between r350400 and r350583. I'll > > > try each revision in succession and see if I can identify any > > > culprits. > > > ... > > > > I have not seen the behavior in question; my last update was from > > r350566 to r350584 (and was quite uneventful). > > > > In each case, a "real machine" was used (laptop & a build machine). > > After more trial and error, r350484 is the culprit for Citrix > Hypervisor 8. > > I have these lines in /boot/loader.conf: > > kern.elf32.aslr.enable="1" > kern.elf32.aslr.pie_enable="1" > > kern.elf64.aslr.enable="1" > kern.elf64.aslr.pie_enable="1" > > r350483 works like a charm, and so does r350484 iff I disable ASLR. > > Reenabling ASLR and setting kern.elf{64,32}.aslr.stack_gap to zero has > no effect. > > I've cc'd kib@ on this one. > > I'm going home and see if VBox 6.0.10 exhibits the same behaviour. Try r350608. There was a mis-merge in the committed patch (more serious part), and some limits were not applied, which I did not see in my testing due to the mismatch between stock FreeBSD and my testing environment.