summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_aout.c
Commit message (Collapse)AuthorAgeFilesLines
* Add three new VOPs: VOP_CREATEVOBJECT, VOP_DESTROYVOBJECT and VOP_GETVOBJECT.bp2000-09-121-1/+1
| | | | | | | They will be used by nullfs and other stacked filesystems to support full cache coherency. Reviewed in general by: mckusick, dillon
* Move the include of <sys/systm.h> so that KTR gets a declaration fordfr2000-09-101-1/+1
| | | | snprintf().
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-191-1/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* s/p_cred->pc_ucred/p_ucred/gphk1999-11-211-1/+1
|
* useracc() the prequel:phk1999-10-291-1/+0
| | | | | | | | | | | Merge the contents (less some trivial bordering the silly comments) of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>. This puts the #defines for the vm_inherit_t and vm_prot_t types next to their typedefs. This paves the road for the commit to follow shortly: change useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE} as argument.
* Trim unused options (or #ifdef for undoc options).peter1999-10-111-1/+0
| | | | Submitted by: phk
* Fixed style regressions in previous commit.bde1999-09-041-6/+4
|
* General cleanup of core-dumping code.julian1999-09-011-37/+7
| | | | Submitted by: Sean Fagan,
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Don't follow symlinks on coredumps.dima1999-08-261-3/+3
| | | | Reviewed by: dillon && security-officer
* Add the options MAP_PREFAULT and MAP_PREFAULT_PARTIAL to vm_map_find/insert,alc1999-05-171-7/+3
| | | | | | | eliminating the need for the pmap_object_init_pt calls in imgact_* and mmap. Reviewed by: David Greenman <dg@root.com>
* Simplify vm_map_find/insert's interface: remove the MAP_COPY_NEEDED option.alc1999-05-141-3/+3
| | | | | | | It never makes sense to specify MAP_COPY_NEEDED without also specifying MAP_COPY_ON_WRITE, and vice versa. Thus, MAP_COPY_ON_WRITE suffices. Reviewed by: David Greenman <dg@root.com>
* Fix a couple of warnings and some bitrot in comments.peter1999-05-091-3/+1
|
* Restore support for executing BSD/OS binaries on the i386 by passingjdp1999-04-031-1/+4
| | | | | | | | the address of the ps_strings structure to the process via %ebx. For other kinds of binaries, %ebx is still zeroed as before. Submitted by: Thomas Stephens <tas@stephens.org> Reviewed by: jdp
* For clarity, use the "map" variable introduced by the last commitalc1999-03-101-5/+5
| | | | throughout exec_aout_imgact.
* exec_aout_imgact should lock the vm_map before calling vm_map_insert.alc1999-03-041-6/+15
| | | | | | Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>, "John S. Dyson" <dyson@iquest.net>, and David Greenman <dg@root.com>
* Hide access to vmspace:vm_pmap with inline function vmspace_pmap(). Thisluoqi1999-02-191-2/+2
| | | | | | | is the preparation step for moving pmap storage out of vmspace proper. Reviewed by: Alan Cox <alc@cs.rice.edu> Matthew Dillion <dillon@apollo.backplane.com>
* *_execsw static structures cannot be const due to the way they interactdillon1999-01-291-2/+2
| | | | | | with EXEC_SET, DECLARE_MODULE, and module_register. Specifically, module_register. We may eventually be able to make these const, but not now.
* Fixed bitrot in a comment. Fixed some style bugs.bde1999-01-011-5/+3
|
* *gulp*. Jordan specifically OK'ed this..peter1998-10-161-2/+2
| | | | | | | | This is the bulk of the support for doing kld modules. Two linker_sets were replaced by SYSINIT()'s. VFS's and exec handlers are self registered. kld is now a superset of lkm. I have converted most of them, they will follow as a seperate commit as samples. This all still works as a static a.out kernel using LKM's.
* Add provisions for variant core dump file formats, depending on thejdp1998-09-141-1/+95
| | | | | | | | | | | object format of the executable being dumped. This is the first step toward producing ELF core dumps in the proper format. I will commit the code to generate the ELF core dumps Real Soon Now. In the meantime, ELF executables won't dump core at all. That is probably no less useful than dumping a.out-style core dumps as they have done until now. Submitted by: Alex <garbanzo@hooked.net> (with very minor changes by me)
* Cast u_longs to uintptr_t before casting them to pointers. Don'tbde1998-07-151-3/+4
| | | | | attempt to even partially support systems with function pointers larger than object pointers.
* Removed unused #includes.bde1998-02-201-3/+1
|
* Fixed staticization.bde1998-02-031-2/+2
|
* Implement the first page access for object type determination moredyson1998-01-111-33/+36
| | | | | VM clean. Also, use vm_map_insert instead of vm_mmap. Reviewed by: dg@freebsd.org
* Make our v_usecount vnode reference count work identically to thedyson1998-01-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | original BSD code. The association between the vnode and the vm_object no longer includes reference counts. The major difference is that vm_object's are no longer freed gratuitiously from the vnode, and so once an object is created for the vnode, it will last as long as the vnode does. When a vnode object reference count is incremented, then the underlying vnode reference count is incremented also. The two "objects" are now more intimately related, and so the interactions are now much less complex. When vnodes are now normally placed onto the free queue with an object still attached. The rundown of the object happens at vnode rundown time, and happens with exactly the same filesystem semantics of the original VFS code. There is absolutely no need for vnode_pager_uncache and other travesties like that anymore. A side-effect of these changes is that SMP locking should be much simpler, the I/O copyin/copyout optimizations work, NFS should be more ponderable, and further work on layered filesystems should be less frustrating, because of the totally coherent management of the vnode objects and vnodes. Please be careful with your system while running this code, but I would greatly appreciate feedback as soon a reasonably possible.
* Removed unused #includes.bde1997-09-021-4/+1
|
* Removed redundant test against MAXDSIZ (the rlimit test is stronger).bde1997-08-261-4/+1
|
* Fully implement vfork. Vfork is now much much faster than even ourdyson1997-04-131-2/+7
| | | | | | | | | | | | | | | | | fork. (On my machine, fork is about 240usecs, vfork is 78usecs.) Implement rfork(!RFPROC !RFMEM), which allows a thread to divorce its memory from the other threads of a group. Implement rfork(!RFPROC RFCFDG), which closes all file descriptors, eliminating possible existing shares with other threads/processes. Implement rfork(!RFPROC RFFDG), which divorces the file descriptors for a thread from the rest of the group. Fix the case where a thread does an exec. It is almost nonsense for a thread to modify the other threads address space by an exec, so we now automatically divorce the address space before modifying it.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-1/+1
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Make DFLDSIZ and MAXDSIZ fully-supported options.joerg1996-12-221-1/+3
| | | | "Don't forget to do a ``make depend''" :-)
* Fixed the easy cases of const poisoning in the kernel. Cosmetic.bde1996-08-311-2/+2
|
* First pass at cleaning up macros relating to pages, clusters and all that.phk1996-05-021-7/+6
|
* Removed unnecessary #includes from <sys/imgact.h> so that it isbde1996-05-011-1/+3
| | | | self-sufficient and added explicit #includes where required.
* Killed sections 3 and 4 of my copyright as I don't agree with it (I believedg1996-04-081-6/+1
| | | | | it to be unnecessarily restrictive). For tty_subr.c, update to my standard copyright.
* Fixed unsigned longs that should have been vm_offset_t.bde1996-03-191-2/+3
| | | | | | | | | | vm_offset_t is currently unsigned long but should probably be plain unsigned for i386's to match the choice of minimal types to represent for fixed-width types in Lite2. Anyway, it shouldn't be assumed to be unsigned long. I only fixed the type mismatches that were detected when I changed vm_offset_t to unsigned. Only pointer type mismatches were detected.
* Deal with NetBSD byte-swapped a.out magic when checking the MID to excludepeter1996-03-031-2/+4
| | | | | | | linux binaries from the *BSD a.out loader. This is a hack, but lets me run static NetBSD binaries. Dynamic binaries are a much bigger problem because the shared libraries would conflict with our native libraries, so a /compat/netbsd alternate namespace and translation would be needed.
* Mega-commit for Linux emulator update.. This has been stress tested underpeter1996-03-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-) I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out. The main changes: COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX". A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these. linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value. Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc. The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly. Supporting changes elsewhere in the kernel: The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers. The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered. makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-) At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
* Eliminated many redundant vm_map_lookup operations for vm_mmap.dyson1996-01-191-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish overhead for merged cache. Efficiency improvement for vfs_cluster. It used to do alot of redundant calls to cluster_rbuild. Correct the ordering for vrele of .text and release of credentials. Use the selective tlb update for 486/586/P6. Numerous fixes to the size of objects allocated for files. Additionally, fixes in the various pagers. Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs. Fixes in the swap pager for exhausted resources. The pageout code will not as readily thrash. Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE), thereby improving efficiency of several routines. Eliminate even more unnecessary vm_page_protect operations. Significantly speed up process forks. Make vm_object_page_clean more efficient, thereby eliminating the pause that happens every 30seconds. Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the case of filesystems mounted async. Fix a panic with busy pages when write clustering is done for non-VMIO buffers.
* Oops. I forgot the change to this file for supporting static configurationpeter1995-12-151-3/+3
| | | | of the linux emulator.
* Changes to support 1Tb filesizes. Pages are now named by andyson1995-12-111-2/+3
| | | | (object,index) pair instead of (object,offset) pair.
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+7
|
* Staticized.bde1995-12-021-3/+4
| | | | Added prototypes.
* All:dg1995-11-061-15/+15
| | | | | | | | | | | | Changed vnodep -> vp for consistency with the rest of the kernel, and changed iparams -> imgp for brevity. kern_exec.c: Explicitly initialized some additional parts of the image_params struct to avoid bzeroing it. Rewrote the set-id code to reduce the number of logical tests. The rewrite exposed a mostly benign bug in the algorithm: traced set-id images would get ktracing disabled even if the set-id didn't happen for other reasons.
* Fix my copyright.dg1995-09-081-2/+2
|
* Moved setting of VTEXT flag into the appropriate image activators. Thisdg1995-08-241-1/+5
| | | | fixes a bug where linux binaries would get the flag set inappropriately.
* Merge RELENG_2_0_5 into HEADrgrimes1995-06-111-4/+5
|
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
OpenPOWER on IntegriCloud