]> Zhao Yanbai Git Server - minix.git/commit
libexec: detect short files 92/292/2
authorBen Gras <ben@minix3.org>
Mon, 4 Feb 2013 00:49:48 +0000 (01:49 +0100)
committerBen Gras <ben@minix3.org>
Mon, 4 Feb 2013 11:04:35 +0000 (12:04 +0100)
commit298b41b52327711ea55805d23e26e8c918afae51
treed8da8c5902743f86b7ff1c4eeea682efb10cf6d0
parent57bab02d57bc982e6b07d715ae6d1a753343a021
libexec: detect short files

if an exec() fails partway through reading in the sections, the target
process is already gone and a defunct process remains. sanity checking
the binary beforehand helps that.

test10 mutilates binaries and exec()s them on purpose; making an exec()
fail cleanly in such cases seems like acceptable behaviour.

fixes test10 on ARM.

Change-Id: I1ed9bb200ce469d4d349073cadccad5503b2fcb0
kernel/arch/earm/protect.c
kernel/arch/i386/protect.c
lib/libexec/exec_elf.c
lib/libexec/libexec.h
servers/rs/exec.c
servers/vfs/exec.c
servers/vm/main.c
test/test10.c