NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/40259: pxeboot_ia32.bin loads a kernel on the heap



>Number:         40259
>Category:       bin
>Synopsis:       pxeboot_ia32.bin loads a kernel on the heap
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 24 01:10:01 +0000 2008
>Originator:     David Young
>Release:        NetBSD 5.99.5
>Organization:
OJC Technologies
>Environment:
Architecture: i386
Machine: i386

./Makefile.inc:
     $NetBSD: Makefile.inc,v 1.6 2008/08/29 00:02:23 gmcgarry Exp $

./Makefile:
     $NetBSD: Makefile,v 1.25 2007/01/06 20:48:59 dsl Exp $

./boot/biosboot/Makefile:
     $NetBSD: Makefile,v 1.3 2005/12/11 12:17:48 christos Exp $

./boot/Makefile.boot:
     $NetBSD: Makefile.boot,v 1.36 2008/10/20 03:02:07 christos Exp $

./boot/Makefile:
     $NetBSD: Makefile,v 1.7 2006/11/14 14:03:12 drochner Exp $

./boot/biosboot.S:
     $NetBSD: biosboot.S,v 1.6 2008/04/28 20:23:25 martin Exp $

./boot/boot2.c:
     $NetBSD: boot2.c,v 1.39 2008/11/19 12:36:41 ad Exp $

./boot/conf.c:
     $NetBSD: conf.c,v 1.5 2008/04/05 18:21:34 tsutsui Exp $

./boot/devopen.c:
     $NetBSD: devopen.c,v 1.7 2008/05/02 15:26:38 ad Exp $

./boot/devopen.h:
     $NetBSD: devopen.h,v 1.3 2005/12/11 12:17:47 christos Exp $

./boot/version:
     $NetBSD: version,v 1.9 2008/11/19 12:36:41 ad Exp $

./Makefile.booters:
     $NetBSD: Makefile.booters,v 1.76 2008/08/29 00:02:23 gmcgarry Exp $

./lib/Makefile.inc:
     $NetBSD: Makefile.inc,v 1.13 2005/12/11 12:17:48 christos Exp $

./lib/Makefile:
     $NetBSD: Makefile,v 1.25 2008/10/11 11:06:20 joerg Exp $

./lib/biosdisk_ll.c:
     $NetBSD: biosdisk_ll.c,v 1.26 2008/04/28 20:23:25 martin Exp $

./lib/bios_disk.S:
     $NetBSD: bios_disk.S,v 1.18 2005/12/11 12:17:48 christos Exp $

./lib/bios_pci.S:
     $NetBSD: bios_pci.S,v 1.6 2005/12/11 12:17:48 christos Exp $

./lib/biosdelay.S:
     $NetBSD: biosdelay.S,v 1.4 2005/12/11 12:17:48 christos Exp $

./lib/biosdisk.c:
     $NetBSD: biosdisk.c,v 1.28 2008/01/05 15:28:43 dsl Exp $

./lib/biosdisk.h:
     $NetBSD: biosdisk.h,v 1.6 2005/12/11 12:17:48 christos Exp $

./lib/bootinfo_biosgeom.c:
     $NetBSD: bootinfo_biosgeom.c,v 1.19 2005/12/11 12:17:48 christos Exp $

./lib/biosdisk_ll.h:
     $NetBSD: biosdisk_ll.h,v 1.15 2007/12/25 18:33:34 perry Exp $

./lib/biosgetrtc.S:
     $NetBSD: biosgetrtc.S,v 1.6 2005/12/11 12:17:48 christos Exp $

./lib/biosgetsystime.S:
     $NetBSD: biosgetsystime.S,v 1.2 2008/04/28 20:23:25 martin Exp $

./lib/biosmca.S:
     $NetBSD: biosmca.S,v 1.4 2003/02/01 14:48:18 dsl Exp $

./lib/biosmca.h:
     $NetBSD: biosmca.h,v 1.2 2008/04/28 20:23:25 martin Exp $

./lib/biosmem.S:
     $NetBSD: biosmem.S,v 1.8 2005/12/11 12:17:48 christos Exp $

./lib/biosmemps2.S:
     $NetBSD: biosmemps2.S,v 1.3 2008/04/28 20:23:25 martin Exp $

./lib/biosmemx.S:
     $NetBSD: biosmemx.S,v 1.9 2008/10/14 14:18:11 ad Exp $

./lib/biospci.c:
     $NetBSD: biospci.c,v 1.4 2005/12/11 12:17:48 christos Exp $

./lib/biosreboot.S:
     $NetBSD: biosreboot.S,v 1.4 2005/12/11 12:17:48 christos Exp $

./lib/biosvideomode.S:
     $NetBSD: biosvideomode.S,v 1.3 2003/04/16 13:49:21 dsl Exp $

./lib/menuutils.c:
     $NetBSD: menuutils.c,v 1.1 1997/09/17 17:13:02 drochner Exp $

./lib/boot_params.S:
     $NetBSD: boot_params.S,v 1.4 2005/12/11 12:17:48 christos Exp $

./lib/bootinfo.c:
     $NetBSD: bootinfo.c,v 1.3 2005/12/11 12:17:48 christos Exp $

./lib/bootinfo.h:
     $NetBSD: bootinfo.h,v 1.9 2006/01/25 18:28:26 christos Exp $

./lib/message.S:
     $NetBSD: message.S,v 1.3 2008/04/28 20:23:25 martin Exp $

./lib/bootinfo_memmap.c:
     $NetBSD: bootinfo_memmap.c,v 1.4 2005/12/11 12:17:48 christos Exp $

./lib/comio.S:
     $NetBSD: comio.S,v 1.4 2003/04/16 14:23:11 dsl Exp $

./lib/comio_direct.c:
     $NetBSD: comio_direct.c,v 1.8 2005/11/11 22:25:09 dsl Exp $

./lib/comio_direct.h:
     $NetBSD: comio_direct.h,v 1.4 2005/11/11 22:25:09 dsl Exp $

./lib/conio.S:
     $NetBSD: conio.S,v 1.6 2008/05/21 01:51:34 ad Exp $

./lib/diskbuf.c:
     $NetBSD: diskbuf.c,v 1.6 2005/12/11 12:17:48 christos Exp $

./lib/diskbuf.h:
     $NetBSD: diskbuf.h,v 1.4 2005/12/11 12:17:48 christos Exp $

./lib/dos_file.S:
     $NetBSD: dos_file.S,v 1.5 2003/02/01 14:48:18 dsl Exp $

./lib/dosfile.c:
     $NetBSD: dosfile.c,v 1.13 2006/05/10 06:24:02 skrll Exp $

./lib/dosfile.h:
     $NetBSD: dosfile.h,v 1.4 2005/12/11 12:17:48 christos Exp $

./lib/dump_eax.S:
     $NetBSD: dump_eax.S,v 1.2 2008/04/28 20:23:25 martin Exp $

./lib/exec.c:
     $NetBSD: exec.c,v 1.34 2008/11/19 12:36:41 ad Exp $

./lib/gatea20.c:
     $NetBSD: gatea20.c,v 1.11 2008/10/14 14:18:11 ad Exp $

./lib/getextmemx.c:
     $NetBSD: getextmemx.c,v 1.8 2007/12/25 18:33:34 perry Exp $

./lib/getsecs.c:
     $NetBSD: getsecs.c,v 1.2

./lib/isadma.c:
     $NetBSD: isadma.c,v 1.1.1.1 1997/03/14 02:40:32 perry Exp $

./lib/isadmavar.h:
     $NetBSD: isadmavar.h,v 1.1.1.1 1997/03/14 02:40:33 perry Exp $

./lib/isapnp.c:
     $NetBSD: isapnp.c,v 1.4 2005/12/11 12:17:48 christos Exp $

./lib/isapnpvar.h:
     $NetBSD: isapnpvar.h,v 1.3 2005/12/11 12:17:48 christos Exp $

./lib/libi386.h:
     $NetBSD: libi386.h,v 1.27 2008/11/19 12:36:41 ad Exp $

./lib/panic.c:
     $NetBSD: panic.c,v 1.7 2005/12/11 12:17:48 christos Exp $

./lib/printmemlist.c:
     $NetBSD: printmemlist.c,v 1.1 1999/12/21 14:22:55 drochner Exp $

./lib/parseutils.c:
     $NetBSD: parseutils.c,v 1.3 2000/09/24 12:32:35 jdolecek Exp $

./lib/pcio.c:
     $NetBSD: pcio.c,v 1.23 2008/05/21 13:36:45 ad Exp $

./lib/pcivar.h:
     $NetBSD: pcivar.h,v 1.3 2005/12/11 12:17:48 christos Exp $

./lib/pread.c:
     $NetBSD: pread.c,v 1.6 2005/12/11 12:17:48 christos Exp $

./lib/realprot.S:
     $NetBSD: realprot.S,v 1.7 2008/04/28 20:23:25 martin Exp $

./lib/putstr.S:
     $NetBSD: putstr.S,v 1.2 2008/04/28 20:23:25 martin Exp $

./lib/pvcopy.S:
     $NetBSD: pvcopy.S,v 1.2 2008/04/28 20:23:25 martin Exp $

./lib/startprog.S:
     $NetBSD: startprog.S,v 1.3 2003/02/01 14:48:18 dsl Exp $

./lib/test/Makefile.satest:
     $NetBSD: Makefile.satest,v 1.2 1999/02/19 19:53:01 drochner Exp $

./lib/test/biosdisk_user.c:
     $NetBSD: biosdisk_user.c,v 1.6 2005/12/11 12:17:49 christos Exp $

./lib/test/biosdisk_user.h:
     $NetBSD: biosdisk_user.h,v 1.4 2005/12/11 12:17:49 christos Exp $

./lib/test/ether_bpf.c:
     $NetBSD: ether_bpf.c,v 1.9 2007/12/05 22:50:00 dyoung Exp $

./lib/test/pci_user.c:
     $NetBSD: pci_user.c,v 1.3 2005/12/11 12:17:49 christos Exp $

./lib/test/sanamespace.h:
     $NetBSD: sanamespace.h,v 1.1 1998/05/15 17:07:16 drochner Exp $

./lib/test/stand_user.c:
     $NetBSD: stand_user.c,v 1.5 2007/03/04 06:00:02 christos Exp $

./lib/cpufunc.S:
     $NetBSD: cpufunc.S,v 1.3 2008/10/22 08:42:38 ad Exp $

./lib/cpufunc.h:
     $NetBSD: cpufunc.h,v 1.2 2008/04/28 20:23:25 martin Exp $

./lib/bootmod.h:
     $NetBSD: bootmod.h,v 1.3 2008/05/05 00:12:49 jmcneill Exp $

./libsa/getopt.c:
     $NetBSD: getopt.c,v 1.4 2005/12/11 12:17:49 christos Exp $

./libsa/nfs.c:
     $NetBSD: nfs.c,v 1.13 2006/12/29 13:05:48 yamt Exp $

./pxeboot/dev_net.c:
     $NetBSD: dev_net.c,v 1.7 2008/05/11 11:42:02 chris Exp $

./pxeboot/Makefile:
     $NetBSD: Makefile,v 1.15 2008/10/20 03:02:07 christos Exp $

./pxeboot/conf.c:
     $NetBSD: conf.c,v 1.5 2005/12/11 12:17:49 christos Exp $

./pxeboot/dev_net.h:
     $NetBSD: dev_net.h,v 1.1 2002/02/16 16:26:23 thorpej Exp $

./pxeboot/devopen.c:
     $NetBSD: devopen.c,v 1.7 2005/12/11 12:17:49 christos Exp $

./pxeboot/main.c:
     $NetBSD: main.c,v 1.15 2008/09/26 14:12:50 christos Exp $

./pxeboot/pxe.c:
     $NetBSD: pxe.c,v 1.10 2006/04/14 05:32:26 dyoung Exp $

./pxeboot/pxe.h:
     $NetBSD: pxe.h,v 1.5 2007/12/25 18:33:34 perry Exp $

./pxeboot/pxe_call.S:
     $NetBSD: pxe_call.S,v 1.3 2003/02/01 14:48:19 dsl Exp $

./pxeboot/pxe_netif.h:
     $NetBSD: pxe_netif.h,v 1.1 2003/03/12 17:33:10 drochner Exp $

./pxeboot/pxeboot.h:
     $NetBSD: pxeboot.h,v 1.1 2002/02/16 03:37:40 thorpej Exp $

./pxeboot/start_pxe.S:
     $NetBSD: start_pxe.S,v 1.4 2005/11/11 21:42:13 dsl Exp $

./pxeboot/version:
     $NetBSD: version,v 1.3 2008/07/15 23:16:27 perry Exp $

>Description:
pxeboot_ia32.bin tries to load the kernel on the heap instead of
in extended memory, where it belongs.  It seems to me that pxeboot
loads the kernel when it is supposed to load boot.cfg, and that is
an unforeseen consequence of this change:

  Module Name:    src
  Committed By:   ad
  Date:           Tue Nov 25 13:23:54 UTC 2008

  Modified Files:
          src/sys/arch/i386/stand/boot: boot2.c
          src/sys/arch/i386/stand/lib: Makefile exec.c
          src/sys/arch/i386/stand/pxeboot: main.c
  Added Files:
          src/sys/arch/i386/stand/lib: bootmenu.c bootmenu.h

  Log Message:
  Make pxeboot understand boot.cfg.


  To generate a diff of this commit:
  cvs rdiff -r1.39 -r1.40 src/sys/arch/i386/stand/boot/boot2.c
  cvs rdiff -r1.25 -r1.26 src/sys/arch/i386/stand/lib/Makefile
  cvs rdiff -r0 -r1.1 src/sys/arch/i386/stand/lib/bootmenu.c \
      src/sys/arch/i386/stand/lib/bootmenu.h
  cvs rdiff -r1.34 -r1.35 src/sys/arch/i386/stand/lib/exec.c
  cvs rdiff -r1.15 -r1.16 src/sys/arch/i386/stand/pxeboot/main.c


Here are relevant bits from
a log of the console on my net4801:

  NSC DP83815/DP83816 Fast Ethernet UNDI, v1.03
  Copyright (C) 2002, 2003 National Semiconductor Corporation
  All rights reserved.

  Pre-boot eXecution Environment  PXE-2.0 (build 082)
  Copyright (C) 1997-2000  Intel Corporation


  CLIENT MAC ADDR: 00 00 24 C6 A5 24
  CLIENT IP: 192.168.1.2  MASK: 255.255.255.0  DHCP IP: 192.168.1.101
  GATEWAY IP: 192.168.1.101

  PXE BIOS Version 2.1
  Using PCI device at bus 0 device 6 function 0
  Ethernet address 00:00:24:c6:a5:24
  heap full (0x137e8+4530508)
  Boot fail

Kernel listing:

  -rwxr-xr-x  1 dyoung  wasabi  4530507 Dec 16 14:08 /tftpboot/kernel

>How-To-Repeat:

Try to boot from a kernel that is served by TFTP.  Here is a fragment
from the dhcpd.conf that I use:

  host kernel {
          hardware ethernet 00:00:24:C6:A5:24;
          fixed-address 192.168.1.2;
          next-server 192.168.1.101;
          option root-path "/home/dyoung/scratch-cuw/i386/N";
          if substring(option vendor-class-identifier, 0, 19) =
             "NetBSD:i386:libsa" {
                  filename "tftp:kernel";
          } elsif substring(option vendor-class-identifier, 0, 9) =
                     "PXEClient" {
                  filename "pxeboot_ia32_com0_19200.bin";
          }
  }

I install the loader, pxeboot_ia32_com0_19200.bin, by copying
pxeboot_ia32.bin to /tftpboot/pxeboot_ia32_com0_19200.bin, and then
running 'installboot -e -o console=com0,speed=19200
/tftpboot/pxeboot_ia32_com0_19200.bin'.

>Fix:
I can PXE-boot if I roll back the sources in src/sys/arch/i386/stand/
to 24 Nov 2008.



Home | Main Index | Thread Index | Old Index