[PATCH] linux_binprm/exec changes

From: Robert M. Love (rml@tech9.net)
Date: Sat Jul 29 2000 - 17:01:29 EST


attached is a patch against linux 2.4.0-test5 that cleans up some
struct linux_binprm and exec() issues by employing a define for
some stray magic numbers, fixing an error in a comment, and using a
simple optimization.

specifically:

- 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 somewhere), this effects
(thus far found) 6 files.

- the comments above prepare_binprm() in fs/exec.c 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

these have been tested and should be an Obviously Right deal, no?

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 Jul 31 2000 - 21:00:30 EST