From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LA1ek-0004IO-95 for qemu-devel@nongnu.org; Tue, 09 Dec 2008 07:25:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LA1ei-0004G3-La for qemu-devel@nongnu.org; Tue, 09 Dec 2008 07:25:37 -0500 Received: from [199.232.76.173] (port=48235 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA1eh-0004Fn-Gs for qemu-devel@nongnu.org; Tue, 09 Dec 2008 07:25:36 -0500 Received: from pop-sarus.atl.sa.earthlink.net ([207.69.195.72]:56192) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LA1eh-0007LG-An for qemu-devel@nongnu.org; Tue, 09 Dec 2008 07:25:35 -0500 Message-ID: <493E63B5.2020402@earthlink.net> Date: Tue, 09 Dec 2008 07:25:25 -0500 From: Robert Reif MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Rewrite mmap_find_vma() to work fine on 64-bit hosts with 32-bit targets References: <1228303789-25653-1-git-send-email-kirill@shutemov.name> <1228303789-25653-6-git-send-email-kirill@shutemov.name> <1228303789-25653-7-git-send-email-kirill@shutemov.name> <200812031234.18733.paul@codesourcery.com> <20081203125057.GA29192@epbyminw8406h.minsk.epam.com> <20081208204815.GA6724@epbyminw8406h.minsk.epam.com> <493D8B83.3030403@opensuse.org> In-Reply-To: <493D8B83.3030403@opensuse.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paul Brook Martin Mohring wrote: > Kirill A. Shutemov wrote: > >> On Wed, Dec 03, 2008 at 02:50:57PM +0200, Kirill A. Shutemov wrote: >> >> >>> On Wed, Dec 03, 2008 at 12:34:18PM +0000, Paul Brook wrote: >>> >>> >>>> On Wednesday 03 December 2008, Kirill A. Shutemov wrote: >>>> >>>> >>>>> qemu's page table can be incomple if /proc/self/maps is unavailable or >>>>> host allocating a memory with mmap(), so we can't use it to find free >>>>> memory area. >>>>> >>>>> >>>> Do we really care? Do such systems exist? >>>> >>>> >>> I use qemu-arm to build packages in restricted environment -- in hasher[1]. >>> hasher mounts /proc only for packages that really need it for building >>> (java, for example). >>> >>> [1] http://en.altlinux.org/Hasher >>> >>> >> Paul, do you have any objection or not? I really want to see it into >> upstream. >> >> > And last, but not least: what if I have a very old Debian Etch, where > the kernel does not have MREMAP defined? E.g.: > > gcc -I. -I.. -I/usr/src/packages/BUILD/target-i386 > -I/usr/src/packages/BUILD -MMD -MT mmap.o -MP -DNEED_CPU_H -D_GNU_SOURCE > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/src/packages/BUILD/tcg > -I/usr/src/packages/BUILD/tcg/i386 -I/usr/src/packages/BUILD/fpu > -I/usr/src/packages/BUILD/linux-user > -I/usr/src/packages/BUILD/linux-user/i386 -O2 -g -fno-strict-aliasing > -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes > -Wstrict-prototypes -Wredundant-decls -m32 -c -o mmap.o > /usr/src/packages/BUILD/linux-user/mmap.c > /usr/src/packages/BUILD/linux-user/mmap.c:265: warning: no previous > prototype for 'mmap_find_vma' > /usr/src/packages/BUILD/linux-user/mmap.c: In function 'target_mremap': > /usr/src/packages/BUILD/linux-user/mmap.c:556: error: 'MREMAP_FIXED' > undeclared (first use in this function) > /usr/src/packages/BUILD/linux-user/mmap.c:556: error: (Each undeclared > identifier is reported only once > /usr/src/packages/BUILD/linux-user/mmap.c:556: error: for each function > it appears in.) > /usr/src/packages/BUILD/linux-user/mmap.c:558: error: too many arguments > to function 'mremap' > /usr/src/packages/BUILD/linux-user/mmap.c:569: error: too many arguments > to function 'mremap' > > > Martin > > > > > I get this same build error now with RedHat 9.