summaryrefslogtreecommitdiffstats
path: root/sys/kern/exec_elf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* do not include machine/cpu.h from a .c file; it is the responsibility ofderaadt2013-03-281-2/+1
| | | | | .h files to pull it in, if needed ok tedu
* Slice & dice coredump write requests into MAXPHYS blocks, andderaadt2013-01-151-1/+4
| | | | | | yield between operations. Re-grab the vnode every operation, so that multiple coredumps can be saved at the same time. ok guenther beck etc
* Recognize executables tagged with ELFOSABI_OPENBSD (such as generatedmatthew2012-09-171-2/+3
| | | | | | | | 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
* Remove the 'OLF method' used for the transition from a.out to ELF andderaadt2012-09-111-21/+7
| | | | | | | 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
* Add support for .openbsd.randomdata sections and PT_OPENBSD_RANDOMIZEmatthew2012-08-201-1/+26
| | | | | | | | 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
* 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
|