[PATCH] (backport to 2.2) linux_binprm/exec cleanup

From: Robert M. Love (rml@tech9.net)
Date: Tue Aug 01 2000 - 11:34:22 EST


this is a backport of some cleanup against linux_binprm and do_exec. it
was originally for 2.4, but there is nothing unstable that 2.2
should not see it (its simple cleanups).

it is currently in 2.4.0-test6/1. this patch is against 2.2.14pre14.

- create a BINPRM_BUF_SIZE define to hold the buffer size (128) of
linux_binprm->buf and any references against this size (this magic number
turns up in multiple files and is easy to lose), this effects
(thus far found) 6 files.

- the comments above prepare_binprm() in fs/exec.c are wrong. they read
that 512 bytes are read in; in fact, 128 are.

- simple optimization in fs/exec.c's do_exec(): previously, the bprm page
table is created and initialized, and then the file-to-exec is read, to
see if it exists. i swap the reading and initializing, so we dont have to
create and memset() the table if the file does not even exist.

- addition to CREDITS file

thanks..

-- 
Robert M. Love
rml@tech9.net	tech9 MindWorks
rml@ufl.edu	University of Florida, Dept. of CS


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:06 EST