Home | History | Annotate | Download | only in common
History log of /src/sys/compat/linux/common/linux_exec_aout.c
RevisionDateAuthorComments
 1.68  18-Oct-2015  maxv Make sure we have space for the aout header.
 1.67  09-Nov-2014  maxv branches: 1.67.2;
Do not uselessly include <sys/malloc.h>.
 1.66  15-Aug-2009  matt branches: 1.66.22; 1.66.38;
Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for you.
 1.65  28-Apr-2008  martin branches: 1.65.2;
Remove clause 3 and 4 from TNF licenses
 1.64  08-Dec-2007  dsl branches: 1.64.12; 1.64.14; 1.64.16;
ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...
 1.63  04-Dec-2007  dsl Remove all the __P
 1.62  19-Oct-2007  ad branches: 1.62.2; 1.62.4;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.61  09-Feb-2007  ad branches: 1.61.6; 1.61.18; 1.61.20; 1.61.24;
Merge newlock2 to head.
 1.60  16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.59  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.58  11-Dec-2005  christos branches: 1.58.20; 1.58.22;
merge ktrace-lwp.
 1.57  26-Feb-2005  perry branches: 1.57.4;
nuke trailing whitespace
 1.56  30-Jan-2005  christos Don't try to map a 0 size bss.
 1.55  08-Aug-2003  christos branches: 1.55.8; 1.55.10;
- GC all the setup_stack functions
- add one for linux/i386
 1.54  29-Jun-2003  fvdl branches: 1.54.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.53  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.52  01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.51  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.50  05-Oct-2002  chs count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).
 1.49  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.48  26-Aug-2002  christos Implement passing AT_{E,R}{U,G}ID in the elf aux vector, like solaris.
- pass struct proc to copyargs.
- eliminate svr4_copyargs, since it is the same as ours now.
 1.47  13-Nov-2001  lukem branches: 1.47.8; 1.47.10;
add RCSIDs (including regeneration of files as appropriate)
 1.46  30-Oct-2001  thorpej - Add a new vnode flag VEXECMAP, which indicates that a vnode has
executable mappings. Stop overloading VTEXT for this purpose (VTEXT
also has another meaning).
- Rename vn_marktext() to vn_markexec(), and use it when executable
mappings of a vnode are established.
- In places where we want to set VTEXT, set it in v_flag directly, rather
than making a function call to do this (it no longer makes sense to
use a function call, since we no longer overload VTEXT with VEXECMAP's
meaning).

VEXECMAP suggested by Chuq Silvers.
 1.45  29-Jul-2001  christos branches: 1.45.4;
Adjust to the new copyargs() footprint.
 1.44  01-Dec-2000  jdolecek branches: 1.44.2; 1.44.4;
put linux_sys_uselib() to separate file linux_uselib.c
 1.43  01-Dec-2000  jdolecek add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now
 1.42  21-Nov-2000  jdolecek restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
provide single struct emul per emulation
* elf:
- kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
per emulation and contains pointer to respective probe function
- interp is allocated via MALLOC() rather than on stack
- elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
part of appropriate execsw[] entry
* constify couple of structures
 1.41  13-Nov-2000  jdolecek change the type of *syscallnames[] array to 'const char * const foo[]'
 1.40  29-Jun-2000  mrg remove include of <vm/vm.h>
 1.39  26-Jun-2000  mrg remove redundant vm includes.
 1.38  11-Apr-2000  chs add a new function vn_marktext() for exec code to let others know
that the vnode is now being used as process text.
 1.37  09-Feb-1999  christos branches: 1.37.4; 1.37.8;
const poisoning.
 1.36  23-Oct-1998  veego Include linux_errno.h to fix the recent error->errno losage.
 1.35  23-Oct-1998  erh Change linux_error to native_to_linux_errno. Add some (unrelated) debugging printfs.
 1.34  07-Oct-1998  erh The siginfo include line is not needed here anymore.
 1.33  04-Oct-1998  fvdl Assign my copyright to TNF. Merge with others were appropriate.
Regen syscall files after script change.
 1.32  03-Oct-1998  christos Attempt to fix the mess.
 1.31  01-Oct-1998  erh Split compat/linux/linux_exec.c into common, elf and a.out parts.
 1.30  11-Sep-1998  mycroft Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
sys_sigpending() and sys_sigsuspend() into separate functions, and call them
from all the emulations rather than hard-coding everything. (Avoids uses
the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified. Other ports and
emulations need to be updated.
 1.29  05-Sep-1998  christos Assign copyright to TNF.
 1.28  09-Aug-1998  perry bzero->memset, bcopy->memcpy, bcmp->memcmp
 1.27  28-Jul-1998  thorpej Change the "aresid" argument of vn_rdwr() from an int * to a size_t *,
to match the new uio_resid type.
 1.26  24-Jan-1998  mycroft Use linux_setregs().
 1.25  13-Oct-1996  christos branches: 1.25.14;
catch up with Jason's exec.h inclusion.
 1.24  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.23  07-Oct-1996  cgd include <sys/exec.h> rather than <machine/exec.h>
 1.22  05-Oct-1996  jtk update to compile; needs new enum name 'Elf_sht_progbits'
 1.21  03-Oct-1996  cgd kill (re)definitions of EXEC_ELF32. They're no longer necessary
(because of the EXEC_* option changes), and now cause warnings.
 1.20  03-Oct-1996  thorpej Fix a section header check that didn't get updated with the elf32/elf64
changes. Make this compile again with the new EXEC_* options.
 1.19  30-Sep-1996  christos Elf32_sht_progbits -> Elf_sht_progbits
 1.18  27-Sep-1996  cgd slightly clean up some of the changes made when ELF64 support went in
 1.17  26-Sep-1996  cgd adapt ELF-using compat code to use new ELF definitions/code. At this point,
these are restricted to 32-bit ELF, and should be severely cleaned.
 1.16  03-Sep-1996  mycroft Define execv() and execve() consistently across emulations.
Do path name translation.
 1.15  13-Jun-1996  christos Simplify and add comments.
 1.14  13-Jun-1996  christos - Pass the Elf32_Ehdr in the linux probe function, and use it!

Since linux binaries are (mostly) always compiled with gcc, look for
the gcc signature in the .comment section header: "\0 GCC: (GNU) ".
I've changed the probe order in kern/exec_elf.c to probe for linux ELF
binaries first and fall back to SVR4 binaries. This makes statically
linked binaries work for both linux and svr4. Note that gcc-compiled
svr4 binaries, still contain the operating system signature first and
then the GCC signature, so there is no conflict. Yes this is a hack.
 1.13  05-Apr-1996  christos branches: 1.13.4;
Prototyping changes.
 1.12  07-Oct-1995  mycroft Prefix names of system call implementation functions with `sys_'.
 1.11  19-Sep-1995  thorpej Make system calls conform to a standard prototype and bring those
prototypes into scope.
 1.10  14-Aug-1995  mycroft Rearrange #includes.
 1.9  24-Jun-1995  christos Use compat_util.[ch].
 1.8  22-Jun-1995  fvdl * Changed to use generic ELF code from kern/exec_elf.c (which was taken
from the svr4 exec code plus the linux compat mods)
* Include file change
* Add multicast sockopts (from John Brezak)
 1.7  11-Jun-1995  fvdl Don't forget to acknowledge that all the ELF stuff was taken from
Christos' svr4 code.
 1.6  11-Jun-1995  fvdl * Make Linux ELF binaries work. Lots of code duplication, but it will have to do
for now.
* Add a sanity check in linux_uselib
 1.5  16-May-1995  mycroft Generate the new ps_strings format.
 1.4  22-Apr-1995  christos - added struct emul to all emulations.
- removed all setup functions.
- added copyargs() functions where needed.
 1.3  07-Apr-1995  fvdl Handle Linux signal tramp code differently. Some changes because of the
now seperate Linux signal trampoline code. Add linux_sigreturn to
syscalls.master.
 1.2  05-Mar-1995  fvdl Added a few more system calls.
More consistent alternate root file semantics throughout.
 1.1  28-Feb-1995  fvdl Added Linux compat code.
 1.13.4.1  10-Dec-1996  mycroft From trunk:
Do execv() and execve() path name translation consistently across
emulations.
 1.25.14.1  29-Jan-1998  mellon Pull up 1.26 (mycroft)
 1.37.8.3  08-Dec-2000  bouyer Sync with HEAD.
 1.37.8.2  22-Nov-2000  bouyer Sync with HEAD.
 1.37.8.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.37.4.1  04-Jul-1999  chs after setting VTEXT on a vnode, flush any UBC mappings
to try to prevent unnecessary VAC aliases.
 1.44.4.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.44.4.3  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.44.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.44.4.1  03-Aug-2001  lukem update to -current
 1.44.2.5  18-Oct-2002  nathanw Catch up to -current.
 1.44.2.4  27-Aug-2002  nathanw Catch up to -current.
 1.44.2.3  29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.44.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.44.2.1  24-Aug-2001  nathanw Catch up with -current.
 1.45.4.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.47.10.2  02-Oct-2003  tron Pull up revision 1.50 (requested by junyoung in ticket #1488):
count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).
 1.47.10.1  27-Sep-2003  tron Pull up revision 1.49 (requested by junyoung in ticket #1466):
remove trailing \n in panic(). approved perry.
 1.47.8.1  29-Aug-2002  gehenna catch up with -current.
 1.54.2.7  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.54.2.6  04-Feb-2005  skrll Sync with HEAD.
 1.54.2.5  04-Feb-2005  skrll Adapt to branch.
 1.54.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.54.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.54.2.2  03-Aug-2004  skrll Sync with HEAD
 1.54.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.55.10.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.55.10.1  12-Feb-2005  yamt sync with head.
 1.55.8.1  29-Apr-2005  kent sync with -current
 1.57.4.6  21-Jan-2008  yamt sync with head
 1.57.4.5  07-Dec-2007  yamt sync with head
 1.57.4.4  27-Oct-2007  yamt sync with head.
 1.57.4.3  26-Feb-2007  yamt sync with head.
 1.57.4.2  30-Dec-2006  yamt sync with head.
 1.57.4.1  21-Jun-2006  yamt sync with head.
 1.58.22.2  10-Dec-2006  yamt sync with head.
 1.58.22.1  22-Oct-2006  yamt sync with head
 1.58.20.2  30-Jan-2007  ad Remove support for SA. Ok core@.
 1.58.20.1  18-Nov-2006  ad Sync with head.
 1.61.24.1  25-Oct-2007  bouyer Sync with HEAD.
 1.61.20.2  09-Jan-2008  matt sync with HEAD
 1.61.20.1  06-Nov-2007  matt sync with HEAD
 1.61.18.2  09-Dec-2007  jmcneill Sync with HEAD.
 1.61.18.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.61.6.1  23-Oct-2007  ad Sync with head.
 1.62.4.2  26-Dec-2007  ad Sync with head.
 1.62.4.1  08-Dec-2007  ad Sync with head.
 1.62.2.2  27-Dec-2007  mjf Sync with HEAD.
 1.62.2.1  08-Dec-2007  mjf Sync with HEAD.
 1.64.16.2  19-Aug-2009  yamt sync with head.
 1.64.16.1  16-May-2008  yamt sync with head.
 1.64.14.1  18-May-2008  yamt sync with head.
 1.64.12.1  02-Jun-2008  mjf Sync with HEAD.
 1.65.2.2  14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.65.2.1  10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.66.38.1  17-Jan-2015  martin Pull up following revision(s) (requested by maxv in ticket #427):
sys/compat/svr4/svr4_schedctl.c: revision 1.8
sys/netinet/tcp_timer.c: revision 1.88
sys/miscfs/genfs/layer_vfsops.c: revision 1.45
sys/compat/svr4/svr4_ioctl.c: revision 1.37
sys/ufs/chfs/chfs_vfsops.c: revision 1.14
sys/miscfs/fdesc/fdesc_vfsops.c: revision 1.91
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.30
sys/compat/common/kern_time_50.c: revision 1.28
sys/netinet6/ip6_forward.c: revision 1.74
sys/miscfs/umapfs/umap_vnops.c: revision 1.57
sys/compat/svr4/svr4_fcntl.c: revision 1.74
distrib/sets/lists/comp/mi: revision 1.1931
sys/netinet6/udp6_output.c: revision 1.46
sys/fs/puffs/puffs_compat.c: revision 1.3
sys/fs/udf/udf_rename.c: revision 1.11
sys/compat/svr4/svr4_filio.c: revision 1.24
sys/fs/udf/udf_rename.c: revision 1.12
sys/netinet/tcp_usrreq.c: revision 1.202
sys/miscfs/umapfs/umap_subr.c: revision 1.29
sys/compat/linux/common/linux_fadvise64.c: revision 1.3
sys/netinet/if_atm.c: revision 1.34
sys/miscfs/procfs/procfs_subr.c: revision 1.106
sys/miscfs/genfs/layer_subr.c: revision 1.37
sys/netinet/tcp_sack.c: revision 1.30
sys/compat/freebsd/freebsd_misc.c: revision 1.33
sys/compat/freebsd/freebsd_file.c: revision 1.33
sys/ufs/chfs/chfs_vnode.c: revision 1.12
sys/compat/svr4/svr4_ttold.c: revision 1.34
sys/compat/linux/common/linux_file.c: revision 1.114
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.43
sys/compat/linux/common/linux_signal.c: revision 1.76
sys/compat/common/compat_util.c: revision 1.46
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.18
sys/compat/svr4/svr4_sockio.c: revision 1.36
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.32
sys/compat/svr4/svr4_signal.c: revision 1.66
sys/kern/kern_exec.c: revision 1.410
sys/fs/puffs/puffs_vfsops.c: revision 1.115
sys/compat/svr4/svr4_exec_elf64.c: revision 1.15
sys/compat/linux/arch/i386/linux_machdep.c: revision 1.159
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.50
sys/compat/linux32/common/linux32_misc.c: revision 1.24
sys/netinet/in_pcb.c: revision 1.153
sys/sys/malloc.h: revision 1.116
sys/compat/common/if_43.c: revision 1.9
share/man/man9/Makefile: revision 1.380
sys/netinet/tcp_vtw.c: revision 1.12
sys/miscfs/umapfs/umap_vfsops.c: revision 1.95
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.186
sys/compat/common/uipc_syscalls_43.c: revision 1.46
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.115
sys/fs/puffs/puffs_msgif.c: revision 1.97
sys/compat/svr4/svr4_ipc.c: revision 1.27
sys/compat/linux/common/linux_exec.c: revision 1.117
sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.66
sys/netinet/tcp_output.c: revision 1.179
sys/compat/svr4/svr4_termios.c: revision 1.28
sys/fs/udf/udf_strat_bootstrap.c: revision 1.4
sys/fs/puffs/puffs_subr.c: revision 1.67
sys/fs/puffs/puffs_node.c: revision 1.36
sys/miscfs/overlay/overlay_vnops.c: revision 1.21
sys/fs/cd9660/cd9660_node.c: revision 1.34
sys/netinet/raw_ip.c: revision 1.146
sys/sys/mallocvar.h: revision 1.13
sys/miscfs/overlay/overlay_vfsops.c: revision 1.63
share/man/man9/malloc.9: revision 1.50
sys/netinet6/dest6.c: revision 1.18
sys/compat/linux/common/linux_uselib.c: revision 1.33
sys/compat/linux/common/linux_socket.c: revision 1.120
share/man/man9/malloc.9: revision 1.51
sys/netinet/tcp_subr.c: revision 1.257
sys/compat/linux/common/linux_socketcall.c: revision 1.45
sys/compat/linux/common/linux_fadvise64_64.c: revision 1.3
sys/compat/freebsd/freebsd_ipc.c: revision 1.17
sys/compat/linux/common/linux_misc_notalpha.c: revision 1.109
sys/compat/linux/arch/alpha/linux_pipe.c: revision 1.17
sys/netinet6/in6_pcb.c: revision 1.132
sys/netinet6/in6_ifattach.c: revision 1.94
sys/compat/svr4/svr4_exec_elf32.c: revision 1.15
sys/miscfs/nullfs/null_vfsops.c: revision 1.90
sys/fs/cd9660/cd9660_util.c: revision 1.12
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.48
sys/compat/freebsd/freebsd_exec_elf32.c: revision 1.20
sys/miscfs/procfs/procfs_vfsops.c: revision 1.94
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.28
sys/compat/linux/common/linux_sched.c: revision 1.67
sys/compat/linux/common/linux_exec_aout.c: revision 1.67
sys/compat/linux/common/linux_pipe.c: revision 1.67
sys/compat/linux/common/linux_llseek.c: revision 1.34
sys/compat/linux/arch/mips/linux_ptrace.c: revision 1.10
Do not uselessly include <sys/malloc.h>.
Cleanup:
- remove struct kmembuckets (dead)
- correctly deadify MALLOC_XX
- remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
- remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
New sentence, new line. Bump date for previous.
Obsolete malloc_roundup(9), malloc_type_setlimit(9) and MALLOC_DEFINE_LIMIT(9)
man pages.
 1.66.22.1  03-Dec-2017  jdolecek update from HEAD
 1.67.2.1  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)

RSS XML Feed