summaryrefslogtreecommitdiffstats
path: root/sys/kern/exec_elf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* New vmmap implementation.ariane2012-03-091-12/+14
| | | | | | | | | | | | 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
* Recommit the reverted sigacts change now that the NFS use-after-freeguenther2011-07-051-5/+5
| | | | | | | | 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@
* remove compat_svr4 support. ok deraadttedu2011-07-041-8/+1
|
* Backout vmmap in order to repair virtual address selection algorithmsariane2011-06-061-13/+11
| | | | outside the tree.
* Reimplement uvm/uvm_map.ariane2011-05-241-11/+13
| | | | | | | | | | | | | 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.
* Revert the sigacts diff: NFS can apparently retain pointers to processesguenther2011-04-181-5/+5
| | | | | | 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
* Correct the sharing of the signal handling state: stuff that shouldguenther2011-04-151-5/+5
| | | | | | | | | | | | 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@
* Push COMPAT_FREEBSD in front of a whale. Buggy, out of date, noguenther2011-04-051-8/+1
| | | | | | one has been weeding it, and it makes life harder. Toasts of Brennivin for its passing from many; diff ok henning@
* add a BRKSIZ define and use it for the heap gap constant, decouplingtedu2010-12-151-4/+4
| | | | heap gap from max data size. nothing else changes yet. ok deraadt
* don't forget to free program header sections when writingmikeb2010-09-171-1/+3
| | | | | | | core files. fixes a local DoS that can be carried out by an unprivileged user. ok kettenis
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-261-7/+8
| | | | | | | | | 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
* struct emul's e_arglen member is expected to count in units ofguenther2010-07-241-2/+2
| | | | | | | 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@
* Eliminate RTHREADS kernel option in favor of a sysctl. The actual statustedu2010-06-291-5/+1
| | | | | (not done) hasn't changed, but now it's less work to test things. ok art deraadt
* Use intermediate vaddr_t cast when casting a pointer to off_t. Preventskettenis2010-05-021-2/+2
| | | | | | | gcc4 from complaining about casting a pointer to an integer type of different size. ok guenther@, jsg@
* fix typos in comments, no code changes;schwarze2010-01-141-4/+4
| | | | | from Brad Tilley <brad at 16systems dot com>; ok oga@
* Dell's SVR4 apparently mapped page zero to the executable. We don'tguenther2009-11-191-10/+1
| | | | | | | do that and, given the security issues it exacerbates, never will. So document it and delete the disabled support. ok deraadt@ tedu@
* We need miod's no-coredumps-on-ramdisks diff, because we have grown thederaadt2009-06-061-1/+17
| | | | media just a wee bit too much.
* If a session leader exists s_leader is set to NULL, so don't dereference itkettenis2009-03-081-2/+5
| | | | | | unconditionally. ok miod@
* Make ELF platforms generate ELF core dumps. Somewhat based on code fromkettenis2009-03-051-1/+475
| | | | | | NetBSD. ok kurt@, drahn@, miod@
* vm_map_lock() around calls to uvm_map_findspace(); ok teduderaadt2008-11-101-1/+4
|
* Add support for the kernel to recognize, load and execute positionkurt2008-07-181-23/+53
| | | | | independent executables using the uvm_map_pie() function to randomize the load address. okay miod@, kettenis@, drahn@
* Oops, do not dereference a NULL function pointer used as an array endmiod2008-06-121-4/+2
| | | | marker; found the hard way by sturm@
* Reorder foreign binaries probe list, so that more permissive ones are at themiod2008-06-121-4/+4
| | | | end. Makes static linux binaries run again.
* Remove the OLF os bitmask field from the compat probe functions array;miod2008-06-071-13/+7
| | | | ok deraadt@
* olf support starts to die (easy stuff first); ok miodderaadt2008-06-041-63/+3
|
* Maintaining a broken compatibility layer for a broken OS is not a productivebeck2007-05-281-8/+1
| | | | | activity for anyone. Bye bye COMPAT_NETBSD. ok tedu@, deraadt@, and many others in the hackathon room.
* ``it's'' -> ``its'' when the grammar gods require this change.miod2007-04-101-3/+3
|
* zap unused variable.thib2007-03-201-3/+1
| | | | ok pedro@
* Clean up after miod.kettenis2007-03-141-1/+3
|
* Don't bother checking for OLF binaries if option SMALL_KERNEL.miod2007-03-131-5/+13
|
* Avoid void * arithmetic, okay deraadt@, suggestions from millert@pedro2006-12-291-2/+2
|
* grammar, spelling, and style fixes from bret lambert;jmc2006-11-141-2/+2
| | | | kern_descrip.c change ok deraadt
* Handle executables that have all load sections marked read-only.kettenis2006-07-101-1/+10
| | | | ok drahn@
* redo (w/ proper changes everywhere ;):mickey2006-01-191-33/+29
| | | | | | take interp[MAXPATHLEN] off the stack. from mickey, ok otto while here, switch above from malloc to pool, remove stupid casts tedu@ miod@ ok
* Backout last revision, it's broken. Try pkg_add redhat_base-8.0p7 on i386aaron2006-01-071-29/+33
| | | | | 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"
* take interp[MAXPATHLEN] off the stack. from mickey, ok ottotedu2006-01-061-33/+29
| | | | while here, switch above from malloc to pool, remove stupid casts
* Allow binaries to run if all sections are marked writabledrahn2005-11-111-1/+8
| | | | (some unusual linux binaries), ok deraadt.
* verify exec headers before attempting malloc. reported by Georgi Guninski.tedu2003-11-031-1/+2
|
* emulation is now controlled by sysctl. changes:tedu2003-08-211-1/+2
| | | | | | | | | 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@
* Typos; from Julien Bordet <zejames@greyhats.org>grange2003-05-171-2/+2
| | | | Close PR 3262
* Use EI_OSABI instead of EI_BRANDmillert2003-05-131-3/+7
|
* Use uvm_findspace() to verify that the addresses allocated to ld.so aredrahn2003-04-161-13/+85
| | | | not already used. limit nphdr to 32. ok tedu@
* Map just the requested pages not p_aligned pages. ok art@drahn2003-02-181-15/+24
|
* Allow more than two load sections on ELF executables, this limitdrahn2002-11-221-16/+38
| | | | | should not be required, and may be violated soon. With two fixes art pointed out. ok art@
* Move out the execution of vmcmds into a separate function.art2002-10-061-21/+4
|
* Add support for vmcmds that load sections relative to a base section.art2002-09-231-23/+40
| | | | | | | | 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
* Mark ELF ld.so as VTEXT to prevent the file from being overwritten.drahn2002-09-181-1/+3
| | | | ok deraadt@ art@
* Change the vnode locking in exec to not keep the vnode locked almost allart2002-08-221-2/+2
| | | | | | | | | | | | | | 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.
* First round of __P removal in sysmillert2002-03-141-3/+3
|
* New function vn_marktext - mark a vnode as executing a text image.art2001-11-151-2/+2
| | | | Use where VTEXT was set in vnode flags before. Doesn't do anything else (yet).