From owner-cvs-src-old@FreeBSD.ORG Thu Nov 20 14:57:24 2008 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A12E61065782 for ; Thu, 20 Nov 2008 14:57:24 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8BA9C8FC12 for ; Thu, 20 Nov 2008 14:57:24 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mAKEvO98014697 for ; Thu, 20 Nov 2008 14:57:24 GMT (envelope-from luigi@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mAKEvOK0014696 for cvs-src-old@freebsd.org; Thu, 20 Nov 2008 14:57:24 GMT (envelope-from luigi@repoman.freebsd.org) Message-Id: <200811201457.mAKEvOK0014696@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to luigi@repoman.freebsd.org using -f From: Luigi Rizzo Date: Thu, 20 Nov 2008 14:57:09 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/boot/common interp.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2008 14:57:24 -0000 luigi 2008-11-20 14:57:09 UTC FreeBSD src repository Modified files: sys/boot/common interp.c Log: SVN rev 185132 on 2008-11-20 14:57:09Z by luigi As reported in kern/118222, pxeboot in RELENG7 (and presumably above) exhibits some misbehaviours on machines with AMD64 CPUs, which at least in some cases I have tracked down to a heap overflow. It is unclear whether it depends on the CPU or on the pxe bios itself which may use more memory on AMD machines. Noticeably a pxeboot compiled from 6.x sources works fine on all machines I have tried so far, while a pxeboot compiled from 7.x sources does not. This patch is a first step in reducing the amount of memory used while processing the configuration files read by the loader at boot (some of them are quite large, 1700+ lines), and it does so by: + moving a buffer to static memory instead of allocating in the heap; + skipping empty lines; + reducing the amount of memory used for line descriptors; Unfortunately there are several changes between 6.x and above, affecting the compiler, the loader code itself, and libstand, and it is not so straightforward to These changes fix the behaviour on one motherboard with a single-core AMD cpu, but are still not enough e.g on an Asus M2N-VM (with a dual-core CPU). I need to investigate the problem a bit more before figuring out what should be committed to RELENG_7 PR: kern/118222 Revision Changes Path 1.30 +13 -5 src/sys/boot/common/interp.c