aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/exec.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove SPARE_USRSPACE.John Baldwin2019-12-061-1/+0
| | | | | | | | | | | | | | | This constant was used to reserve space at the top of the stack to hold translated system call arguments for non-default ABIs (the "stackgap"). However, none of the compatibility ABIs have used the stackgap in many years and the last use of SPARE_USRSPACE was removed in r355373. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D22697 Notes: svn path=/head/; revision=355459
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* exec.h: Move PS_STRINGS define to kernel-only sectionEd Maste2016-05-111-7/+7
| | | | | | | | | | | | | The kern.ps_strings sysctl was introduced in r103767 and the last use of PS_STRINGS in userspace code was removed in r297888. PR: 208760 [exp-run] Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5933 Notes: svn path=/head/; revision=299482
* Fix core corruption caused by race in note_procstat_vmmapConrad Meyer2015-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is spiritually similar to r287442 and was discovered thanks to the KASSERT added in that revision. NT_PROCSTAT_VMMAP output length, when packing kinfo structs, is tied to the length of filenames corresponding to vnodes in the process' vm map via vn_fullpath. As vnodes may move during coredump, this is racy. We do not remove the race, only prevent it from causing coredump corruption. - Add a sysctl, kern.coredump_pack_vmmapinfo, to allow users to disable kinfo packing for PROCSTAT_VMMAP notes. This avoids VMMAP corruption and truncation, even if names change, at the cost of up to PATH_MAX bytes per mapped object. The new sysctl is documented in core.5. - Fix note_procstat_vmmap to self-limit in the second pass. This addresses corruption, at the cost of sometimes producing a truncated result. - Fix PROCSTAT_VMMAP consumers libutil (and libprocstat, via copy-paste) to grok the new zero padding. Reported by: pho (https://people.freebsd.org/~pho/stress/log/datamove4-2.txt) Relnotes: yes Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3824 Notes: svn path=/head/; revision=288944
* Follow-up to r287442: Move sysctl to compiled-once fileConrad Meyer2015-09-071-0/+2
| | | | | | | | | | | | Avoid duplicate sysctl nodes. Found by: tijl Approved by: markj (mentor) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3586 Notes: svn path=/head/; revision=287537
* Update the comments in exec.h with help from jilles.Warren Block2014-08-081-6/+12
| | | | | | | | | | PR: 180970 Submitted by: Carlos Jacobo Puga Medina <cjpugmed@gmail.com> Reviewed by: jilles MFC after: 1 week Notes: svn path=/head/; revision=269743
* Add macro DECLARE_MODULE_TIED to denote a module as requiring theKonstantin Belousov2010-10-121-1/+2
| | | | | | | | | | | | | | | | | | kernel of exactly the same __FreeBSD_version as the headers module was compiled against. Mark our in-tree ABI emulators with DECLARE_MODULE_TIED. The modules use kernel interfaces that the Release Engineering Team feel are not stable enough to guarantee they will not change during the life cycle of a STABLE branch. In particular, the layout of struct sysentvec is declared to be not part of the STABLE KBI. Discussed with: bz, rwatson Approved by: re (bz, kensmith) MFC after: 2 weeks Notes: svn path=/head/; revision=213716
* Make ps_nargvstr and ps_nenvstr unsigned. This fixes an inputDavid Schultz2005-03-231-2/+2
| | | | | | | | | | | | | | validation error in procfs/linprocfs that can be exploited by local users to cause a kernel panic. All versions of FreeBSD with the patch referenced in SA-04:17.procfs have this bug, but versions without that patch have a more serious bug instead. This problem only affects systems on which procfs or linprocfs is mounted. Found by: Coverity Prevent analysis tool Security: Local DOS Notes: svn path=/head/; revision=144011
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPPoul-Henning Kamp2004-07-151-0/+1
| | | | | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything". Notes: svn path=/head/; revision=132199
* Remove advertising clause from University of California Regent's license,Warner Losh2004-04-071-4/+0
| | | | | | | | | per letter dated July 22, 1999. Approved by: core Notes: svn path=/head/; revision=127976
* Increase the size of SPARE_USRSPACE. It is way too small by defaultPeter Wemm2003-11-071-1/+1
| | | | | | | for things like execve. Notes: svn path=/head/; revision=122252
* Use __CONCAT and __XSTRING when concatenating or stringifying arguments toJake Burkholder2003-01-041-7/+8
| | | | | | | | the EXEC_SET macro, so that the arguments themselves can be macros. (Actually __STRING would suffice, instead of __XSTRING, but oh well). Notes: svn path=/head/; revision=108647
* Remove __PAlfred Perlstein2002-03-191-5/+5
| | | | Notes: svn path=/head/; revision=92719
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-1/+1
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Well folks, this is it - The second stage of the removal for build supportPeter Wemm1999-04-171-4/+1
| | | | | | | for LKM's.. Notes: svn path=/head/; revision=45739
* More -Wall / -Wcast-qual cleanup. Also, EXEC_SET can't useMatthew Dillon1999-01-291-2/+10
| | | | | | | | C_DECLARE_MODULE due to the linker_file_sysinit() function making modifications to the data. Notes: svn path=/head/; revision=43387
* Have EXEC_SET use C_DECLARE_MODULE instead of DECLARE_MODULE.Matthew Dillon1999-01-291-2/+2
| | | | | | | | | | | Add C_DECLARE_MODULE - same as DECLARE_MODULE but uses C_SYSINIT instead of SYSINIT. The C_ items are going to be used for items passing const data to sysinit. Notes: svn path=/head/; revision=43381
* Removed the cast to a pointer in the definition of PS_STRINGS andBruce Evans1998-12-161-3/+2
| | | | | | | | | | adjusted related casts to match (only in the kernel in this commit). The pointer was only wanted in one place in kern_exec.c. Applications should use the kern.ps_strings sysctl instead of PS_STRINGS, so they shouldn't notice this change. Notes: svn path=/head/; revision=41871
* Finished updating module event handlers to be compatible withBruce Evans1998-11-151-3/+2
| | | | | | | modeventhand_t. Notes: svn path=/head/; revision=41173
* *gulp*. Jordan specifically OK'ed this..Peter Wemm1998-10-161-1/+38
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=40435
* Update the ELF image activator to use some of the exec resources ratherPeter Wemm1998-03-021-1/+8
| | | | | | | | | | | | | | | than rolling it's own. This means that it now uses the "safe" exec_map_first_page() to get the ld.so headers rather than risking a panic on a page fault failure (eg: NFS server goes down). Since all the ELF tools go to a lot of trouble to make sure everything lives in the first page for executables, this is a win. I have not seen any ELF executable on any system where all the headers didn't fit in the first page with lots of room to spare. I have been running variations of this code for some time on my pure ELF systems. Notes: svn path=/head/; revision=33983
* Fixed gratuitous ANSIisms.Bruce Evans1997-09-161-2/+2
| | | | Notes: svn path=/head/; revision=29506
* Some staticized variables were still declared to be extern.Bruce Evans1997-09-071-6/+1
| | | | Notes: svn path=/head/; revision=29179
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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. Notes: svn path=/head/; revision=21673
* Mega-commit for Linux emulator update.. This has been stress tested underPeter Wemm1996-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=14331
* Reorganise ps_strings in order to gain BSD/OS 2.0 binary compatability.Peter Wemm1995-12-091-5/+5
| | | | | | | | | | | This is now in line with NetBSD as well.. Note that once this series of commits is finished, you must recompile libkvm, then ps and maybe 'w'. If you are running the recently imported sendmail-8.7, you should recompile that too (src/conf.c at least). Notes: svn path=/head/; revision=12679
* Fixed the type of a function pointer in struct execsw.Bruce Evans1995-11-131-2/+4
| | | | Notes: svn path=/head/; revision=12251
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'Bruce Evans1995-03-161-10/+1
| | | | | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones. Notes: svn path=/head/; revision=7090
* Latest ibcs2 changes, add errno conversion table.Søren Schmidt1994-10-091-3/+4
| | | | | | | Also add 256 byte spare space on the usr stack. Notes: svn path=/head/; revision=3471
* Prototypes, prototypes and even more prototypes. Not quite done yet, butPoul-Henning Kamp1994-10-021-3/+1
| | | | | | | getting closer all the time. Notes: svn path=/head/; revision=3304
* Shuffled macros and definitions around to facilitate architectureDavid Greenman1994-09-241-3/+3
| | | | | | | independance. Notes: svn path=/head/; revision=3058
* Made them all idempotent.Paul Richards1994-08-211-1/+5
| | | | | | | | Reviewed by: Submitted by: Notes: svn path=/head/; revision=2165
* Hmmm...my workaround for Garrett's new exec prototypes wasn't sufficient.David Greenman1994-08-191-3/+3
| | | | | | | | I guess we'll have to not specify what the args to the exec functions are. Notes: svn path=/head/; revision=2133
* Terry Lambert's loadable kernel module support w/improvements from theDavid Greenman1994-08-191-1/+14
| | | | | | | NetBSD group. Notes: svn path=/head/; revision=2124
* Added $Id$David Greenman1994-08-021-0/+1
| | | | Notes: svn path=/head/; revision=1817
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.Rodney W. Grimes1994-05-251-2/+2
| | | | | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman Notes: svn path=/head/; revision=1549
* BSD 4.4 Lite Kernel SourcesRodney W. Grimes1994-05-241-0/+71
Notes: svn path=/head/; revision=1541