From owner-freebsd-ia64 Mon Jun 17 6:10:11 2002 Delivered-To: freebsd-ia64@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id CC29D37B40D for ; Mon, 17 Jun 2002 06:10:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5HDA1936460; Mon, 17 Jun 2002 06:10:01 -0700 (PDT) (envelope-from gnats) Received: from iraun2.uka.de (iraun2.uka.de [129.13.10.91]) by hub.freebsd.org (Postfix) with ESMTP id C30B537B40D for ; Mon, 17 Jun 2002 06:01:21 -0700 (PDT) Received: from i30nb20.ira.uka.de ([129.13.30.70]) by iraun2.uka.de with esmtp (Exim 3.30 #7 (Debian)) id 17Jw8G-0002V0-01 for ; Mon, 17 Jun 2002 15:01:20 +0200 Received: from i30nb20.ira.uka.de (localhost [127.0.0.1]) by i30nb20.ira.uka.de (8.12.3/8.12.3) with ESMTP id g5EKWwMK016169 for ; Fri, 14 Jun 2002 22:32:58 +0200 (CEST) (envelope-from esk@i30nb20.ira.uka.de) Received: (from esk@localhost) by i30nb20.ira.uka.de (8.12.3/8.12.3/Submit) id g5EKWwk2016168; Fri, 14 Jun 2002 22:32:58 +0200 (CEST) Message-Id: <200206142032.g5EKWwk2016168@i30nb20.ira.uka.de> Date: Fri, 14 Jun 2002 22:32:58 +0200 (CEST) From: Espen Skoglund Reply-To: esk@ira.uka.de To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.2 Subject: ia64/39415: Bootloader assuming 8KB buffer when only 4KB is allocated Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39415 >Category: ia64 >Synopsis: Bootloader assuming 8KB buffer when only 4KB is allocated >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ia64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 17 06:10:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Espen Skoglund >Release: FreeBSD 5.0-CURRENT ia64 >Organization: Karlsruhe University >Environment: >Description: The AllocatePages() call in sys/boot/efi/libefi/elf_freebsd.c only allocate one 4KB page. The bi_load() in sys/boot/efi/libefi/bootinfo.c, however, assumes that 8KB has been allocated when stashing the EFI memory map behind the bootinfo. This could lead to "interesting" behaviour in certain (albeit probably unlikely) scenarios. >How-To-Repeat: >Fix: Make sure that 8KB are allocated instead of only 4KB. --- elf_freebsd.c.orig Fri Jun 14 22:21:42 2002 +++ elf_freebsd.c Fri Jun 14 22:22:13 2002 @@ -151,7 +151,7 @@ hdr = (Elf_Ehdr *)&(md->md_data); status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, - EFI_SIZE_TO_PAGES(sizeof(struct bootinfo)), (void*)&bi); + 8192/4096, (void*)&bi); if (EFI_ERROR(status)) { printf("unable to create bootinfo block (status=0x%lx)\n", (long)status); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message