Received: from eggs.gnu.org ([209.51.188.92]:53500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMll1-0005sF-2l for qemu-devel@nongnu.org; Fri, 03 May 2019 23:54:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMll0-0007Nu-37 for qemu-devel@nongnu.org; Fri, 03 May 2019 23:54:39 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:32983) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMlkz-0007Mv-Re for qemu-devel@nongnu.org; Fri, 03 May 2019 23:54:38 -0400 Received: by mail-pf1-x442.google.com with SMTP id z28so3890001pfk.0 for ; Fri, 03 May 2019 20:54:36 -0700 (PDT) References: <20190503171347.13747-1-peter.maydell@linaro.org> <20190503171347.13747-3-peter.maydell@linaro.org> From: Richard Henderson Message-ID: <690764a2-4998-c6ae-9e2f-11a3bfdaa215@linaro.org> Date: Fri, 3 May 2019 20:54:32 -0700 MIME-Version: 1.0 In-Reply-To: <20190503171347.13747-3-peter.maydell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] hw/arm/boot: Honour image size field in AArch64 Image format kernels List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Mark Rutland On 5/3/19 10:13 AM, Peter Maydell wrote: > Since Linux v3.17, the kernel's Image header includes a field image_size, > which gives the total size of the kernel including unpopulated data > sections such as the BSS). If this is present, then return it from > load_aarch64_image() as the true size of the kernel rather than > just using the size of the Image file itself. This allows the code > which calculates where to put the initrd to avoid putting it in > the kernel's BSS area. > > This means that we should be able to reliably load kernel images > which are larger than 128MB without accidentally putting the > initrd or dtb in locations that clash with the kernel itself. > > Fixes: https://bugs.launchpad.net/qemu/+bug/1823998 > Signed-off-by: Peter Maydell > --- > hw/arm/boot.c | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~