Date: Sun, 26 Jan 1997 13:34:52 -0800 From: David Greenman <dg@root.com> To: Steven Wallace <swallace@ece.uci.edu> Cc: current@freebsd.org Subject: Re: exec bug Message-ID: <199701262134.NAA08167@root.com> In-Reply-To: Your message of "Sun, 26 Jan 1997 11:25:46 PST." <199701261925.LAA06985@newport.ece.uci.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
>> The only solution I can think of at the moment to this problem would be to >>change the code to do a read of the file header into a malloced buffer. The >>overhead for this would be very (unacceptably) high, however. > >What do you think of my alternate solution: > >When the first page of a program is mapped, it should be possible to determine >if this page exists already in physical memory. If it does, no problemo! >On the other hand, if it does not, immediately bring this page into memory >by reading from disk. If this read fails, then return an error condition. >Otherwise, we now know the page is resident in memory and there will be no >problems when the header is checked. > >The idea here is we do not need to wait for a page fault in exec_aout_imgact() >a few lines of code away. We know it will happen very soon so proceed >almost as if a fault had occurred by bringing the page into memory. >That way if it fails, we know where we are at so we can gracefully discontinue >exec rather than a panic. Yes, this is possible...see my reply to Bruce. The concern is the overhead for determining page residency. This isn't all that cheap of an operation, and it will have to happen for every exec. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701262134.NAA08167>
