Date: Sun, 26 Jan 1997 11:25:46 -0800 From: Steven Wallace <swallace@ece.uci.edu> To: dg@root.com Cc: current@freebsd.org Subject: Re: exec bug Message-ID: <199701261925.LAA06985@newport.ece.uci.edu> In-Reply-To: Your message of "Sun, 26 Jan 1997 04:01:01 PST." <199701261201.EAA06656@root.com>
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. Steven Steven
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701261925.LAA06985>
