From owner-svn-src-all@freebsd.org Fri May 20 14:54:12 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 7B561B42F4A; Fri, 20 May 2016 14:54:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BA8C1FCA; Fri, 20 May 2016 14:54:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 10341B977; Fri, 20 May 2016 10:54:11 -0400 (EDT) From: John Baldwin To: Allan Jude Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r300257 - in head/sys/boot/i386: libi386 zfsboot Date: Fri, 20 May 2016 07:48:15 -0700 Message-ID: <1780135.VYYOsNudFi@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201605200141.u4K1flpV094958@repo.freebsd.org> References: <201605200141.u4K1flpV094958@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 20 May 2016 10:54:11 -0400 (EDT) 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 14:54:12 -0000 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. -- John Baldwin