From owner-svn-src-head@freebsd.org Tue Sep 27 17:36:37 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 0F8DABECD1A for ; Tue, 27 Sep 2016 17:36:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 D5619A83 for ; Tue, 27 Sep 2016 17:36:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id 92so22249230iol.2 for ; Tue, 27 Sep 2016 10:36:36 -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=zMrCJenGpAJ9hj3qmslEZ+DAvX9E4lUvTWwl+8k0NRA=; b=YpMy43ZGvfr8/5FCCtumOY3rqH2wxE+XiAebOSzH6f5xmjTAUHfhpBOAhjWpOhRllG bRN7Pc7Vub2DoEerx0iJmkHU+ypPsamzU60WVxG/vRjiJHMGGNB1CRjww0/zsmlCMpby BwAA2R2esqx31TzmSiozqpIPS5s55su6EH+4EW2kb/WvVYdaBpE1ejrmrsymcXNuyJ7P a8YAnYfb10KPZN1u/+Nv/ufGWvygGuSyJTbeoLP0tE3lWEgpHtVFoE1nYaESAbbHYDyX 6hlRPx/0zkMgMYe2A/loIrrTA0jsevW2JrK6u4c4dLsuQzfPbmbYy1FeDwG5sxJ6Pksq MsXg== 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=zMrCJenGpAJ9hj3qmslEZ+DAvX9E4lUvTWwl+8k0NRA=; b=XK70tRMcRItQYbqX7oBN4Q++tIY5YSEsnvpFSRNAkBYTPq9G1z0gj4X35TikA8RcFh NK48Z+QZJeT40ciT8BMrOsw0REBWK5oorK86cLZdy4xEDSjP4DAPbsxLr0KBO/1TWZdi mgLdW9q/J8yzn9T1pxvBP0fx/T054bWpbMSqTDxOpUSvTDpte2eL1opvMXdGYioK2nag BF0ZuK+nw33/bC7ewvXmlNmR95k0stEN6qBKCJ0PnyWuBu9TZ9wQDYaH7wnODIQBXITT 0DSyXPeplyK7fJ337c5Ywz29PLammE81cKLQvUxmtfxwG6vhZdQZQzZCoMEyCx4poq4r ioGQ== X-Gm-Message-State: AE9vXwOsxsMDPIEiYkXUVz9eEA+hgGk4lpVJ2z8CHezPX19x0ohIl1LZczx7iAUXxRVevf+Ljy1GbZ6cATQspA== X-Received: by 10.107.161.210 with SMTP id k201mr35211433ioe.65.1474997795478; Tue, 27 Sep 2016 10:36:35 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Tue, 27 Sep 2016 10:36:34 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <88d79107-7fbc-1dfd-4ea9-feceaf4a4fac@freebsd.org> References: <201609031526.u83FQSCZ017350@repo.freebsd.org> <4af03d4b-5e5e-2482-c21f-538d95e921b6@freebsd.org> <1577832.dOPa6L4zTd@ralph.baldwin.cx> <88d79107-7fbc-1dfd-4ea9-feceaf4a4fac@freebsd.org> From: Warner Losh Date: Tue, 27 Sep 2016 11:36:34 -0600 X-Google-Sender-Auth: Py2ewdNq8wk86rkbtdCS_6pT3PY 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: Allan Jude Cc: John Baldwin , 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 17:36:37 -0000 On Tue, Sep 27, 2016 at 2:14 AM, Allan Jude wrote: > On 2016-09-27 01:02, Warner Losh wrote: >> 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 >> > > It works fine for me with a regular boot, but when booting a GELI > encrypted disk, is dies. > > It is in boot2, before it reads the loader. > > Specifically, it seems to be at the call to: enc_xform_aes_xts.reinit > [opencrypto aes_xts_reinit()] > > Now that I am back home, I'll try to narrow it down further, and look at > the difference between gptzfsboot compiled with and without the > different LD flags. > > It works perfectly fine with the makefile changes reverted. OK. Thanks Allan. Since I didn't test gel-booting, I can believe it failed there. Please let me know if you need more help or followup. Warner