diff options
author | peter <peter@FreeBSD.org> | 1998-03-02 05:47:58 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-03-02 05:47:58 +0000 |
commit | 1cfd0bd0613cd9f70523467e4df52ff8a9ade484 (patch) | |
tree | 83a80e0ce0da6fc2ee1bc2c9270593904a5166bf /sys/kern/kern_exec.c | |
parent | 68bfdcd64447abb503306b7272b1f9734eb209c6 (diff) | |
download | FreeBSD-src-1cfd0bd0613cd9f70523467e4df52ff8a9ade484.zip FreeBSD-src-1cfd0bd0613cd9f70523467e4df52ff8a9ade484.tar.gz |
Update the ELF image activator to use some of the exec resources rather
than rolling it's own. This means that it now uses the "safe"
exec_map_first_page() to get the ld.so headers rather than risking a panic
on a page fault failure (eg: NFS server goes down).
Since all the ELF tools go to a lot of trouble to make sure everything
lives in the first page for executables, this is a win. I have not seen
any ELF executable on any system where all the headers didn't fit in the
first page with lots of room to spare.
I have been running variations of this code for some time on my pure ELF
systems.
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index a264102..fcfe4e2 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.77 1998/02/06 12:13:23 eivind Exp $ + * $Id: kern_exec.c,v 1.78 1998/02/25 13:08:06 bde Exp $ */ #include <sys/param.h> @@ -65,10 +65,6 @@ static int *exec_copyout_strings __P((struct image_params *)); -static int exec_check_permissions __P((struct image_params *)); -static int exec_map_first_page __P((struct image_params *)); -static void exec_unmap_first_page __P((struct image_params *)); - /* * XXX trouble here if sizeof(caddr_t) != sizeof(int), other parts * of the sysctl code also assumes this, and sizeof(int) == sizeof(long). @@ -107,7 +103,6 @@ execve(p, uap) int error, len, i; struct image_params image_params, *imgp; struct vattr attr; - struct buf *bp = NULL; imgp = &image_params; @@ -645,7 +640,7 @@ exec_copyout_strings(imgp) * Check permissions of file to execute. * Return 0 for success or error code on failure. */ -static int +int exec_check_permissions(imgp) struct image_params *imgp; { |