From owner-svn-src-head@freebsd.org Tue Sep 27 05:02:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBC8DBEB1F2 for ; Tue, 27 Sep 2016 05:02:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0C73D36 for ; Tue, 27 Sep 2016 05:02:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id 92so4046037iol.2 for ; Mon, 26 Sep 2016 22:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=NF74+LZJ+8y8vCQFDPSg7Wg7COLkm8pAdv5y+qek/JA=; b=nu6+ahUICQfAlAcoNMPX/SaH7FUg5TdUIPhGTZa9Joj+Qe3gpCVJzpI+4hU+m59my7 wSr8S3EGAdcbZ3ENKA0GlPKZX/+TXTGsC5ol0cFl1D60w85p9WX2SOn0AGZebw0LpajL WkmMcsVgV6zW6hbg9DMKFkiomlS3Z/SSuc26zEP5kzsmmFtwGZojVYKv0+PQpPDy8xhU VMiqC9nk70FM0yDjEfODB4x1OYson2MPsYcRe5jt489Hiw+91wvjA0ywXqgcMZTKty6b /ax2pnFnDhJoD1xtqfImgo2U1UBYp4jcLgDDviS/vkm+qTRutUE1qgXstbdD3pipgseL K2HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=NF74+LZJ+8y8vCQFDPSg7Wg7COLkm8pAdv5y+qek/JA=; b=a7iY06MtBs18PoCnn3OnqBeLz5QHE1jSkNWb9hYWP3ZXwOLW2wfniWZps0ADqTB/Z0 t21RDEUZL8g+8tIl6hFpcY5fASu1wEeHAcrdnssTSuJI/8mDuUvvat7srtoqwax9qP6Q OnkX+6LEwzkXTKa0G2CqvYu4YIIgGMS2q9EaM0ubqzZwGwKB+O4JX4xKvNFlLi27ZnPW sZrnIijS/Lza53MbKf34Pa7xp/i5ASz+SwPCBwaBWRaTZlnr+9Z3ZAST7QQ9OwucBLon jykrPbrvV/JKswDGfZ6RADWNcMOgWLgBw1sHsy2DQBRV5lP3cLtapNYQ9pV9A4ZVzN9X ujMg== X-Gm-Message-State: AE9vXwNNW4NUL+15rFVj27qzjkTLGTNGIVL0CGWGlm5RREJFGGBSVGpgL0W+vudjCByy6J+1RgxMktU8BCasIg== X-Received: by 10.107.138.200 with SMTP id c69mr26343245ioj.43.1474952546119; Mon, 26 Sep 2016 22:02:26 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 26 Sep 2016 22:02:25 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <1577832.dOPa6L4zTd@ralph.baldwin.cx> References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> <1577832.dOPa6L4zTd@ralph.baldwin.cx> From: Warner Losh Date: Mon, 26 Sep 2016 23:02:25 -0600 X-Google-Sender-Auth: nfeuGdO0jKR_vtE0G6mip3Y8QJI Message-ID: Subject: Re: svn commit: r305353 - in head/sys/boot: i386 i386/boot0 i386/boot2 i386/btx/btx i386/btx/btxldr i386/cdboot i386/gptboot i386/gptzfsboot i386/mbr i386/pmbr i386/pxeldr i386/zfsboot pc98 pc98/boot0 ... To: John Baldwin Cc: Allan Jude , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Ed Maste Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 05:02:27 -0000 On Mon, Sep 26, 2016 at 11:00 AM, John Baldwin wrote: > On Saturday, September 24, 2016 02:56:05 PM Warner Losh wrote: >> On Fri, Sep 23, 2016 at 4:17 PM, Allan Jude wrote: >> > On 09/03/16 11:26 AM, Warner Losh wrote: >> >> Author: imp >> >> Date: Sat Sep 3 15:26:28 2016 >> >> New Revision: 305353 >> >> URL: https://svnweb.freebsd.org/changeset/base/305353 >> >> >> >> Log: >> >> Don't use -N to set the OMAGIC with data and text writeable and data >> >> not page aligned. To do this, use the ld script gnu ld installs on my >> >> system. >> >> >> >> This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different >> >> things. The loader script could be better named and take into account >> >> other architectures. And having two different mechanisms to do >> >> basically the same thing needs study. However, it's blocking forward >> >> progress on lld, so I'll work in parallel to sort these out. >> >> >> >> Differential Revision: https://reviews.freebsd.org/D7409 >> >> Reviewed by: emaste >> >> >> > >> > This breaks booting on my Lenovo laptop. The BTX client crashes and >> > dumps the registers. >> > >> > Reverting this commit solved it. >> > >> > Is there something I can do to help investigate this? >> >> I assume you bisected all boot loader changes and it fails across this >> commit? If not, that's the first step. >> >> If so, perhaps the place to start is with the dump? > > The dump is a good place to start, but it would also be useful to know > > 1) Which stage dies (e.g. can you get into the gptboot/boot2 prompt meaning > it it is probably btxldr.S dying trying to parse a.out header from > /boot/loader vs are you dying before that point meaning it is in boot1.S > or gptldr.S)? Yes. This is absolutely critical. Until we know what dies, what the trace backs are, what options were in effect and how the binaries were broken there's little more that I can do because it works for me everywhere I've tried it. > 2) Once we know which stage, it would be good to compare the a.out headers > and possibly the contents of the relevant binaries. The aforementioned > .S files all parse the a.out header in assembly as well as the BTX > header (they assume that BTX itself is present in the bits loaded from > disk immediately followed by the binary header). That code isn't very > flexible and it doesn't seem far fetched for this change to break it. I just wonder why it works on the amd64 servers and laptops, the i386 laptops and in qemu for me, but fails for the OP. If it broke a.out, I contend it would break for everybody since a.out headers are 'hit dinosaur over the head' level of complexity and subtly. While I don't doubt there's a problem, I suspect it is very specific to a particular set of laptops that were on the edge before and this kicks us over the edge just enough to stomp on some area that was protected before. Warner