summaryrefslogtreecommitdiff
path: root/sys/kern/exec_elf.c
AgeCommit message (Collapse)Author
2013-07-04now that free(null) is safe, delete checksTed Unangst
2013-06-02Coredumping is now single-threaded, so update comment about lockingPhilip Guenther
2013-03-28do not include machine/cpu.h from a .c file; it is the responsibility ofTheo de Raadt
.h files to pull it in, if needed ok tedu
2013-01-15Slice & dice coredump write requests into MAXPHYS blocks, andTheo de Raadt
yield between operations. Re-grab the vnode every operation, so that multiple coredumps can be saved at the same time. ok guenther beck etc
2012-09-17Recognize executables tagged with ELFOSABI_OPENBSD (such as generatedMatthew Dempsky
by the Go linker) as native executables even if they don't contain an OpenBSD PT_NOTE segment. Confirmed to fix Go by sthen ok kettenis, deraadt
2012-09-11Remove the 'OLF method' used for the transition from a.out to ELF andTheo de Raadt
for all the compat layers which are now gone. Linux compat still works because it always used another method in any case, and nothing looks at p_os anymore. ok jsing
2012-08-20Add support for .openbsd.randomdata sections and PT_OPENBSD_RANDOMIZEMatthew Dempsky
segments to the kernel, ld (2.15), and ld.so. Tested on alpha, amd64, i386, macppc, and sparc64 (thanks naddy, mpi, and okan!). Idea discussed for some time; committing now for further testing. ok deraadt
2012-03-09New vmmap implementation.Ariane van der Steldt
no oks (it is really a pain to review properly) extensively tested, I'm confident it'll be stable 'now is the time' from several icb inhabitants Diff provides: - ability to specify different allocators for different regions/maps - a simpler implementation of the current allocator - currently in compatibility mode: it will generate similar addresses as the old allocator
2011-07-05Recommit the reverted sigacts change now that the NFS use-after-freePhilip Guenthe
problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits goes in struct proc. ok deraadt@
2011-07-04remove compat_svr4 support. ok deraadtTed Unangst
2011-06-06Backout vmmap in order to repair virtual address selection algorithmsAriane van der Steldt
outside the tree.
2011-05-24Reimplement uvm/uvm_map.Ariane van der Steldt
vmmap is designed to perform address space randomized allocations, without letting fragmentation of the address space go through the roof. Some highlights: - kernel address space randomization - proper implementation of guardpages - roughly 10% system time reduction during kernel build Tested by alot of people on tech@ and developers. Theo's machines are still happy.
2011-04-18Revert the sigacts diff: NFS can apparently retain pointers to processesPhilip Guenthe
until they're zombies and then send them signals (for intr mounts). Until that is untangled, the sigacts change is unsafe. sthen@ was the victim for this one
2011-04-15Correct the sharing of the signal handling state: stuff that shouldPhilip Guenthe
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better. Oh, and remove the old SunOS-compat ps_usertramp member. "I like the sound of this" tedu@
2011-04-05Push COMPAT_FREEBSD in front of a whale. Buggy, out of date, noPhilip Guenthe
one has been weeding it, and it makes life harder. Toasts of Brennivin for its passing from many; diff ok henning@
2010-12-15add a BRKSIZ define and use it for the heap gap constant, decouplingTed Unangst
heap gap from max data size. nothing else changes yet. ok deraadt
2010-09-17don't forget to free program header sections when writingMike Belopuhov
core files. fixes a local DoS that can be carried out by an unprivileged user. ok kettenis
2010-07-26Correct the links between threads, processes, pgrps, and sessions,Philip Guenthe
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
2010-07-24struct emul's e_arglen member is expected to count in units ofPhilip Guenthe
sizeof(char *), not in bytes, so we've been allocating and copying around four or eight times as many bytes as we needed to ok kettenis@ deraadt@
2010-06-29Eliminate RTHREADS kernel option in favor of a sysctl. The actual statusTed Unangst
(not done) hasn't changed, but now it's less work to test things. ok art deraadt
2010-05-02Use intermediate vaddr_t cast when casting a pointer to off_t. PreventsMark Kettenis
gcc4 from complaining about casting a pointer to an integer type of different size. ok guenther@, jsg@
2010-01-14fix typos in comments, no code changes;Ingo Schwarze
from Brad Tilley <brad at 16systems dot com>; ok oga@
2009-11-19Dell's SVR4 apparently mapped page zero to the executable. We don'tPhilip Guenthe
do that and, given the security issues it exacerbates, never will. So document it and delete the disabled support. ok deraadt@ tedu@
2009-06-06We need miod's no-coredumps-on-ramdisks diff, because we have grown theTheo de Raadt
media just a wee bit too much.
2009-03-08If a session leader exists s_leader is set to NULL, so don't dereference itMark Kettenis
unconditionally. ok miod@
2009-03-05Make ELF platforms generate ELF core dumps. Somewhat based on code fromMark Kettenis
NetBSD. ok kurt@, drahn@, miod@
2008-11-10vm_map_lock() around calls to uvm_map_findspace(); ok teduTheo de Raadt
2008-07-18Add support for the kernel to recognize, load and execute positionKurt Miller
independent executables using the uvm_map_pie() function to randomize the load address. okay miod@, kettenis@, drahn@
2008-06-12Oops, do not dereference a NULL function pointer used as an array endMiod Vallat
marker; found the hard way by sturm@
2008-06-12Reorder foreign binaries probe list, so that more permissive ones are at theMiod Vallat
end. Makes static linux binaries run again.
2008-06-07Remove the OLF os bitmask field from the compat probe functions array;Miod Vallat
ok deraadt@
2008-06-04olf support starts to die (easy stuff first); ok miodTheo de Raadt
2007-05-28Maintaining a broken compatibility layer for a broken OS is not a productiveBob Beck
activity for anyone. Bye bye COMPAT_NETBSD. ok tedu@, deraadt@, and many others in the hackathon room.
2007-04-10``it's'' -> ``its'' when the grammar gods require this change.Miod Vallat
2007-03-20zap unused variable.Thordur I. Bjornsson
ok pedro@
2007-03-14Clean up after miod.Mark Kettenis
2007-03-13Don't bother checking for OLF binaries if option SMALL_KERNEL.Miod Vallat
2006-12-29Avoid void * arithmetic, okay deraadt@, suggestions from millert@Pedro Martelletto
2006-11-14grammar, spelling, and style fixes from bret lambert;Jason McIntyre
kern_descrip.c change ok deraadt
2006-07-10Handle executables that have all load sections marked read-only.Mark Kettenis
ok drahn@
2006-01-19redo (w/ proper changes everywhere ;):Michael Shalayeff
take interp[MAXPATHLEN] off the stack. from mickey, ok otto while here, switch above from malloc to pool, remove stupid casts tedu@ miod@ ok
2006-01-07Backout last revision, it's broken. Try pkg_add redhat_base-8.0p7 on i386Aaron Campbell
to see; page fault trap in linux_elf_probe (char *itp is being passed as NULL and then "if (itp[0])" attempts to dereference it). deraadt@ "trash it asap"
2006-01-06take interp[MAXPATHLEN] off the stack. from mickey, ok ottoTed Unangst
while here, switch above from malloc to pool, remove stupid casts
2005-11-11Allow binaries to run if all sections are marked writableDale Rahn
(some unusual linux binaries), ok deraadt.
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