From owner-svn-src-all@freebsd.org Fri May 20 15:00:24 2016 Return-Path: Delivered-To: svn-src-all@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 0D65FB43052; Fri, 20 May 2016 15:00:24 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id E6CDE1334; Fri, 20 May 2016 15:00:23 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 112FDD45F; Fri, 20 May 2016 15:00:23 +0000 (UTC) Subject: Re: svn commit: r300257 - in head/sys/boot/i386: libi386 zfsboot To: John Baldwin References: <201605200141.u4K1flpV094958@repo.freebsd.org> <1780135.VYYOsNudFi@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: <573F2686.20509@freebsd.org> Date: Fri, 20 May 2016 11:00:22 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1780135.VYYOsNudFi@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2016 15:00:24 -0000 On 2016-05-20 10:48, John Baldwin wrote: > On Friday, May 20, 2016 01:41:47 AM Allan Jude wrote: >> Author: allanjude >> Date: Fri May 20 01:41:47 2016 >> New Revision: 300257 >> URL: https://svnweb.freebsd.org/changeset/base/300257 >> >> Log: >> Fixup the geliboot sector rounding code >> >> Replace all rounding with the round{up,down}2 macros >> a missing set of braces caused the previous code to be incorrect >> >> replace alloca() with malloc() because alloca() can return an allocation >> that is actually invalid, causing boot to fail > > No, you have to revert the malloc! malloc() can be anywhere. The alloca > is _on purpose_ to get a bufer below 1MB so that it will work with all > devices. Some BIOSes can only store data in the first 1MB. > to be clear, the alloca() was something I added, not something that was there before. And it was breaking, because ZFS was trying to allocate too large a block of memory, that wouldn't fit below 1MB. -- Allan Jude