summaryrefslogtreecommitdiff
path: root/sys/kern/exec_elf.c
AgeCommit message (Collapse)Author
2003-11-03verify exec headers before attempting malloc. reported by Georgi Guninski.Ted Unangst
2003-08-21emulation is now controlled by sysctl. changes:Ted Unangst
add e_flags to struct emul. this stores on/off and native flags. check for emul enabled in check_exec(). gather all the emuls into a emulsw so a sysctl can find them. create sysctl. move maxhdrsiz calcualation into init_main so it cleans up sys_execve codepath. teach sysctl utility to grok kern.emul hierarchy. requested and ok deraadt@ some comments from mickey@
2003-05-17Typos; from Julien Bordet <zejames@greyhats.org>Alexander Yurchenko
Close PR 3262
2003-05-13Use EI_OSABI instead of EI_BRANDTodd C. Miller
2003-04-16Use uvm_findspace() to verify that the addresses allocated to ld.so areDale Rahn
not already used. limit nphdr to 32. ok tedu@
2003-02-18Map just the requested pages not p_aligned pages. ok art@Dale Rahn
2002-11-22Allow more than two load sections on ELF executables, this limitDale Rahn
should not be required, and may be violated soon. With two fixes art pointed out. ok art@
2002-10-06Move out the execution of vmcmds into a separate function.Artur Grabowski
2002-09-23Add support for vmcmds that load sections relative to a base section.Artur Grabowski
You mark one section with VMCMD_BASE and the rest are marked RELATIVE. Use that to load ELF interpreter correctly in all cases. Inspired by NetBSD. Great debugging help from drahn@ deraadt@ ok
2002-09-18Mark ELF ld.so as VTEXT to prevent the file from being overwritten.Dale Rahn
ok deraadt@ art@
2002-08-22Change the vnode locking in exec to not keep the vnode locked almost allArtur Grabowski
the time. This could lead to problems when a process wants to do an exec on the same vnode it's being run from and needs to copy in arguments from an uncached page in the data segment. When that happens uvm detects a vnode deadlock and returns an error causing execve() return EFAULT. This fixes the regress test in regress/sys/kern/exec_self Also, initialize scriptvp early in exec_script because it could be used uninitialized in a failure case.
2002-03-14First round of __P removal in sysTodd C. Miller
2001-11-15New function vn_marktext - mark a vnode as executing a text image.Artur Grabowski
Use where VTEXT was set in vnode flags before. Doesn't do anything else (yet).
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-09-19Unify elf32 and elf64 code with macros. This forced a renamingArtur Grabowski
of a few functions from elf32.
2001-08-11Why is it so popular to include <vm/*.h> everywhere?Artur Grabowski
2001-07-30Add a check for too big e_phnum that could cause us to malloc toArtur Grabowski
much and barf. This should have been merged into this file from exec_elf64.c a long time ago. Looking for volunteers to merge exec_elf.c and exec_elf64.c
2001-06-22KNFTheo de Raadt
2001-01-22NATIVE_ELF -> NATIVE_EXEC_ELF (just some leftovers)Artur Grabowski
2001-01-16Indentation nit.Artur Grabowski
2000-01-01grammar in commentMichael Shalayeff
1999-11-25Use PAGE_SIZE instead of NBPG.Artur Grabowski
1999-08-12Probe svr4 before linuxNiklas Hallqvist
1999-07-20correct os_mask handling for OLF; pefoTheo de Raadt
1999-06-01Fix some mips -> __mips__ stuff.Per Fogelstrom
1999-02-10branding support and freebsd elfTheo de Raadt
1999-01-11panic prints a newline for you, don't do it in the panic stringTodd C. Miller
1998-07-28Return EINVAL when msg_iovlen or iovcnt <= 0; Make uio_resid unsigned ↵Todd C. Miller
(size_t) and don't return EINVAL if it is < 0 in sys_{read,write}. Remove check for uio_resid < 0 uiomove() now that uio_resid is unsigned and brack remaining panics with #ifdef DIAGNOSTIC. vn_rdwr() must now take a size_t * as its 9th argument so change that and clean up uses of vn_rdwr(). Fixes 549 + more
1998-03-06Ensure the correct probe will be run for an OLF binaryNiklas Hallqvist
1998-02-22Save possible OLF OS tag, or similar deduced ELF info for later perusal.Niklas Hallqvist
KNF. This has been sitting for a long time in my tree now.
1996-12-23use _{NLIST,KERN}_DO_{AOUT,ELF,ECOFF} to select binary typesTheo de Raadt
1996-11-24OLF is ALIVE!etheisen
1996-09-12ok, must have read access at least.Per Fogelstrom
1996-09-12remove excess tests...Per Fogelstrom
1996-09-05ld has some funny things going with alignments...Per Fogelstrom
1996-08-31Cleanup execPer Fogelstrom
1996-08-05layout style nit (am I a pedant, or what?)Niklas Hallqvist
1996-06-16Whoops. Don't forget to take alignment into account when processing file.etheisen
Thanks Per.
1996-06-15elf_check_header() is now fully functional. Still need to add OS checks.etheisen
1996-06-10emul_elf has a name of "native"Theo de Raadt
1996-06-10use a shorter emul nameTheo de Raadt
1996-06-09emulation name is "native elf"Theo de Raadt
1996-06-06Paging exec_elf + mips enhancementsPer Fogelstrom
1996-05-22Moved contents of elf_abi.h into exec_elf.h. Modified dependant files toetheisen
reflect this.
1996-04-18Rename the COMPAT_SVR4_MAP_PAGE_ZERO option to ELF_MAP_PAGE_ZERO as theNiklas Hallqvist
change affected all ELF formats
1996-04-18Support mapping of page zero read-only if COMPAT_SVR4_MAP_PAGE_ZERONiklas Hallqvist
is used. Dell SVR4 behaved this way, and some binaries rely on such icky behaviour.
1996-03-03From NetBSD: 960217 mergeNiklas Hallqvist
1996-01-29from netbsd:Theo de Raadt
Don't rely on the protection bits of segments anymore to decide whether it's text or data; use the entry point instead (this solves some trouble with ELF executables with strange permissions) Incorporate some fixes from r_friedl@informatik.uni-kl.de sent to netbsd-bugs a while ago
1995-10-18initial import of NetBSD treeTheo de Raadt