summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_exec.h
AgeCommit message (Collapse)Author
2018-08-22- Cleanup for dynamic sysctl:msaitoh
- Remove unused *_NAMES macros for sysctl. - Remove unused *_MAXID for sysctls. - Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and use them on all m68k machines.
2017-02-12es_arglen is now in units of bytes, update the emulations accordingly.chs
2014-02-21Increase LINUX32_ELF_AUX_ENTRIES to avoid overrun in linux32/. Also,maxv
add comments and KASSERTs to make sure people don't forget to increase XX_AUX_ENTRIES's when adding vectors. Reported by martin@ (CV), with suggestions from chs@. ok martin@ chs@
2014-02-09account for the 16 bytes of AT_RANDOM data in the stack setup. fixes PR 48518.chs
use cprng_strong32() instead of random(). add AT_RANDOM support for linux32.
2013-11-18implement AT_RANDOM.chs
2010-07-07many changes for COMPAT_LINUX:chs
- update the linux syscall table for each platform. - support new-style (NPTL) linux pthreads on all platforms. clone() with CLONE_THREAD uses 1 process with many LWPs instead of separate processes. - move the contents of sys__lwp_setprivate() into a new lwp_setprivate() and use that everywhere. - update linux_release[] and linux32_release[] to "2.6.18". - adjust placement of emul fork/exec/exit hooks as needed and adjust other emul code to match. - convert all struct emul definitions to use named initializers. - change the pid allocator to allow multiple pids to refer to the same proc. - remove a few fields from struct proc that are no longer needed. - disable the non-functional "vdso" code in linux32/amd64, glibc works fine without it. - fix a race in the futex code where we could miss a wakeup after a requeue operation. - redo futex locking to be a little more efficient.
2009-12-10Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostlymatt
involves setregs and vmcmds). Should result in no code differences.
2009-08-15Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> tomatt
do it for you.
2008-11-19Make the emulations, exec formats, coredump, NFS, and the NFS serverad
into modules. By and large this commit: - shuffles header files and ifdefs - splits code out where necessary to be modular - adds module glue for each of the components - adds/replaces hooks for things that can be installed at runtime
2008-10-25Add preliminary tls support for i386. Does not work yet. From FreeBSD.christos
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2007-12-04Remove all the __Pdsl
2007-02-15Fix Linux compat on amd64.ad
2007-02-09Merge newlock2 to head.ad
2006-08-231) Complete Linux exit_group() emulationmanu
Members of the thread group must die without reporting to the parent and without going to zombie stage. We do that by reparenting to init before catching a SIGKILL. The parent will not see the child death. The thread group leader must report the exit status, even if it exits because of another thread calling exit_group(). We do that by storing the exit status in struct linux_emuldata_shared, and the exit hook has the duty of setting struct proc's p_xstat for the thread group leader. 2) For exit/fork/exec hooks, move the NPTL specific code to separate functions that are shared between COMPAT_LINUX and COMPAT_LINUX32 3) Fix LINUX_CLONE_PARENT_SETTID semantics
2006-08-07Add a new signature test for linux probe function. We look for a .debuglinkmanu
section, which is specific to the Linux dynamic interpeter (yes, Linux can execute it as a stand alone program)
2006-02-09Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough somanu
that the i386 license manager part of amd64 version of Fluent works. While I'm here, add SysV IPC to COMPAT_LINUX/amd64
2005-12-11merge ktrace-lwp.christos
2005-05-20Define linux_usertrap function, and set it in struct emul. For allfvdl
but amd64, it just returns 0, doing nothing. For amd64, it implements vsyscalls through cheating: if the faulting address is in the vsyscall area (which is statically known on Linux/amd64), and the intruction pointer is too, it must have been a vsyscall. In that case, retrieve the return address from the user stack, fix up %rip and %rsp, and just execute the normal system call. It will return as if the vsyscall has been executed.
2005-05-03First work on COMPAT_LINUX/amd64manu
Process startup and dynamiclinking work, but processes hang due to Linux arch_prctl(2) not being really supported yet.
2005-02-26nuke trailing whitespaceperry
2004-03-26all ports define __HAVE_SIGINFO now, so remove the CPP conditionalsdrochner
2003-09-25constify sendsig/trapsignalchristos
2003-09-06SA_SIGINFO changeschristos
2003-06-29Back out the lwp/ktrace changes. They contained a lot of colateral damage,fvdl
and need to be examined and discussed more.
2003-06-28Pass lwp pointers throughtout the kernel, as required, so that the lwpid candarrenr
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
2003-04-09Use PAGE_SIZE rather than NBPG.thorpej
2003-01-18Merge the nathanw_sa branch.thorpej
2002-11-21back previous off; port can only supply LINUX_ELF_AUX_ENTRIES if it alsojdolecek
overrides the ELF copyargs function
2002-11-15Fix LINUX_ELF_AUX_ENTRIES sociability issue with Mips based portswdk
2002-11-13add generic linux compat ELF copyargs functionjdolecek
this gives: * linux sysconf(_SC_CLK_TCK) gives correct value for linux binaries (hz) even if hz != 100 * glibc gets proper information on real/effective uid and enables secure mode for suid binaries g/c LINUX_COPYARGS_FUNCTION, replaced by linux ELF copyargs function g/c alpha-specific linux ELF copyargs function and linux ELF defines
2002-08-26Implement passing AT_{E,R}{U,G}ID in the elf aux vector, like solaris.christos
- pass struct proc to copyargs. - eliminate svr4_copyargs, since it is the same as ours now.
2002-04-02rename sysctl_linux() to linux_sysctl() and hook it into emul_linuxjdolecek
2002-03-21Don't bitch if we don't have support for a particular arch. This makes itchristos
easier to include this header from userland binaries [sysctl] on archs that don't support compat-linux without incurring ifdef hell.
2002-03-20emulation specific sysctls. Also change the kernel date to nov 11 as requestedchristos
by bad.
2002-01-14Crude first cut at ARMLinux binary compatibility. Successfully runsbjh21
"/emul/linux/bin/echo hello, world", dynamically linked.
2001-09-22Enable Mips Linux emulation in header filesmanu
2001-07-29Adjust to the new copyargs() footprint.christos
2001-06-18Add an e_trapsignal member to struct emul, so that emulated processes canchristos
send the appropriate signal depending on the trap type.
2001-01-19Added Linux compatibility support for powerpc portsmanu
2000-11-21restructure struct emul and execsw, in preparation to make emulations LKMable:jdolecek
* 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
1998-12-15Added linux compat support on m68k ports.itohy
1998-10-04Assign my copyright to TNF. Merge with others were appropriate.fvdl
Regen syscall files after script change.
1998-10-03Attempt to fix the mess.christos
1998-10-01Move compat/linux/linux_exec.h to common.erh
1998-01-24Prototype new functions.mycroft
1996-09-26adapt ELF-using compat code to use new ELF definitions/code. At this point,cgd
these are restricted to 32-bit ELF, and should be severely cleaned.
1996-06-13- Pass the Elf32_Ehdr in the linux probe function, and use it!christos
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.
1995-10-07Prefix names of system call implementation functions with `sys_'.mycroft
1995-06-22* Changed to use generic ELF code from kern/exec_elf.c (which was takenfvdl
from the svr4 exec code plus the linux compat mods) * Include file change * Add multicast sockopts (from John Brezak)