From owner-freebsd-current Sat Nov 28 17:33:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA06955 for freebsd-current-outgoing; Sat, 28 Nov 1998 17:33:46 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA06950 for ; Sat, 28 Nov 1998 17:33:45 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.1/8.9.1) with ESMTP id RAA06624; Sat, 28 Nov 1998 17:33:37 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.1/8.9.1) id RAA27144; Sat, 28 Nov 1998 17:33:36 -0800 (PST) (envelope-from jdp@polstra.com) Date: Sat, 28 Nov 1998 17:33:36 -0800 (PST) Message-Id: <199811290133.RAA27144@vashon.polstra.com> To: wolman@cs.washington.edu Subject: Re: MAXDSIZ limit Newsgroups: polstra.freebsd.current In-Reply-To: <199811282349.PAA16757@miles.cs.washington.edu> Organization: Polstra & Co., Seattle, WA Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <199811282349.PAA16757@miles.cs.washington.edu>, Alec Wolman wrote: > > Hello, > > I'm running FreeBSD 3.0-19981103 SNAP, and I'm running into a problem > or two. I first tried changing MAXDSIZE in my kernel config file to > > MAXDSIZ 2048*1024*1024 > > This causes numerous compilation warnings, presumably because the > calculations being done with the number are signed rather than unsigned. You should have defined MAXDSIZ as something like "2048UL*1024*1024" ^^ to make it explicitly an unsigned long. That's the form that is used in . > Setting it to 2000*1024*1024 eliminates all of those warnings except > for one, in imgact_elf.c. I tried booting this kernel, but it dies. > I don't have the exact error message, but the kernel boots up and > manages to go through the device configuration, but when it gets to > execing an elf process things go haywire. I think the error message > had to do with being unable to start getty. > > When I fixed the compiler warning with the following change, > and I changed MAXDSIZ to 1500*1024*1024, and rebooted, then things > seemed to work ok. However, I suspect that lowering MAXDSIZ rather > than fixing the code is what made things better. Does anyone here > understand why the elf code needs to multiply MAXDSIZ by 2 and then > use that as a base address for something else? Is anyone with a > bit more expertise interested in looking into this problem? The code is loading the dynamic linker at the address 2*MAXDSIZ, which by default works out to 0x40000000. I don't know why it's being loaded there. The traditional place for ELF dynamic linkers (in SVR4) is at 0x08000000, which is "far enough" below the load address for executables, 0x08048000. Would you mind trying it with that statement in imgact_elf.c changed to "addr = 0x08000000"? I'd be interested to know whether it works OK. If it does, we should probably change it. It would have the nice advantage that we could count on the dynamic linker being at a fixed address. We wouldn't have to build it PIC any more, so it would be faster. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Nobody ever went broke underestimating the taste of the American public." -- H. L. Mencken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message