summaryrefslogtreecommitdiff
path: root/sys/compat/linux32
AgeCommit message (Collapse)Author
2014-02-25Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist beforepooka
the sysctl link sets are processed, and remove redundancy. Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate lines of code.
2014-02-23Use Aux32Info not AuxInfo. Noticed by Maxime Villard.njoly
2014-02-23Fix wrong KASSERTs. Do not compare size vs. entries count.njoly
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-19Explicitly include x86/fpu.h instead of relying in x86/frame.h including it.dsl
2014-02-15Remove all references to MDL_USEDFPU and deferred fpu initialisation.dsl
The cost of zeroing the save area on exec is minimal. This stops the FP registers of a random process being used the first time an lwp uses the fpu. sendsig_siginfo() and get_mcontext() now unconditionally copy the FP registers. I'll remove the double-copy for signal handlers soon. get_mcontext() might have been leaking kernel memory to userspace - and may still do so if i386_use_fxsave is false (short copies).
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.
2014-02-07Convert the amd64 build to use x86/cpu_extended_state.h so that the fpudsl
definitions match those of i386. Mostly just structure and field renames, in addition: 1) process_xmm_to_s87() and process_s87_to_xmm() moved into x86/convert_xmm_s87.c so they can be used by amd64's netbsd32 code. 2) The linux signal code simplified to use a structure copy for ths fxsave data - it matches the hardware definition and won't change.
2014-01-14use new bsd.syscall.mkchristos
2013-12-01revert fpu/pcu changes until we figure out what's wrong; they cause randomchristos
freezes
2013-11-18Regenchristos
2013-11-18Fix extended attribute syscalls to use the proper types and call their netbsd32christos
counterparts for now.
2013-11-18claim to be linux 3.11.6 (opensuse 13.1).chs
2013-11-18regenchs
2013-11-18implement the *at() syscalls.chs
bring the unimplemented syscall list up to date.
2013-11-07Regen for dup/dup2/dup3 argument types fix.njoly
2013-11-07Fix dup/dup2/dup3 argument types (u_int -> int).njoly
2013-10-23Use the MI "pcu" framework for bookkeeping of npx/fpu states on x86.drochner
This reduces the amount of MD code enormously, and makes it easier to implement support for newer CPU features which require more fpu state, or for fpu usage by the kernel. For access to FPU state across CPUs, an xcall kthread is used now rather than a dedicated IPI. No user visible changes intended.
2013-09-19exec modules need to be of the exec kindchristos
2013-01-11Use copyin/copyout and linux-specific ifreq structures (they are the samechristos
as the netbsd ones, but this disconnects them)
2012-10-02kernel portion of clock_nanosleep()christos
2012-09-22LINUX_RLIM_INFINITY doesn't fit into the value range for linux32, sojoerg
introduce a variant with correct value.
2012-07-15Rename MDP_IRET to MDL_IRET since it is an lwp flag, not a proc one.dsl
Add an MDL_COMPAT32 flag to the lwp's md_flags, set it for 32bit lwps and use it to force 'return to user' with iret (as is done when MDL_IRET is set). Split the iret/sysret code paths much later. Remove all the replicated code for 32bit system calls - which was only needed so that iret was always used. frameasm.h for XEN contains '#define swapgs', while XEN probable never needs swapgs, this is likely to be confusing. Add a SWAPGS which is a nop on XEN and swapgs otherwise. (I've not yet checked all the swapgs in files that include frameasm.h) Simple x86 programs still work. Hijack 6.99.9 kernel bump (needed for compat32 modules)
2012-07-13regenchristos
2012-07-13add xattr stubschristos
2012-07-08The MDP_USEDFPU (amd64 and sh3) and MDP_SSTEP (sh3) are lwp flags notdsl
process ones, rename to MDL_xxx.
2012-05-10regenchristos
2012-05-10Fix rt_sigtimedwait():christos
It is wishful thinking that: 1. declaring a 32 bit syscall with 64 bit pointers 2. passing a struct with 32 bit pointers to a 64 bit function is going to work.
2012-05-10prefix message with linux32christos
2012-03-15Do not read past end of array. Found by gcc -03bouyer
2012-02-19Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!rmind
Approved by core@.
2012-02-03Add a hook for freeing an ep_emul_arg. Add a wrapper routinematt
(exec_free_emul_arg) to call the hook and then clear the ep_emul_arg and ep_emul_arg_free members in the exec_package. Change users/accessors to use these routines. Approved by releng.
2011-11-18remove incorrect assertions (the len passed is the size of the bsd structurechristos
not the linux one)
2011-11-18regenchristos
2011-11-18add sigtimedwait supportchristos
2011-10-14Change the vnode locking protocol of VOP_GETATTR() to request at leasthannken
a shared lock. Make all calls outside of file systems respect it. The calls from file systems need review. No objections from tech-kern.
2011-05-30Regenerate files to pick up correct RCS Ids. Suggested by Chris Badura.alnsn
2011-05-30Add fadvise64 and fadvise64_64 syscalls to compat_linux and compat_linux32.alnsn
2011-04-10implement pipe2 and dup3christos
2011-04-10Regen: XXX: produces errors because of rump changes!christos
2011-04-10add pipe2 and dup3christos
2011-03-04Refactor ps_strings access. Based on PK_32, write either the normaljoerg
version or the 32bit compat layout in execve1. Introduce a new function copyin_psstrings for reading it back from userland and converting it to the native layout. Refactor procfs to share most of the code with the kern.proc_args sysctl handler. This material is based upon work partially supported by The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-02-07move macros for validating fs/gs to segments.h and use themchs
in the linux32 code as well.
2010-11-02personality() now interprets its parameter as havingchs
the base personality type in the low byte and various flags in the upper bytes. for now just mask off the flags to make sure the base type is one we accept. store the current personality in the emuldata so that we can return the expected value for PER_QUERY.
2010-11-02regenchs
2010-11-02implement the following syscalls for linux32:chs
truncate64 ftruncate64 profil ioperm iopl setdomainname modify_ldt statfs64 fstatfs64 note that iopl(), ioperm() and modify_ldt() just call the respective 64-bit handlers, which don't do anything yet.
2010-09-11recent versions of linux (which we now claim to be) supply a BSD-stylechs
d_type value in getdents() results, after the d_name field. make our emulation do the same. fixes part of PR 43695.
2010-09-11always supply an auxiliary vector for linux ELF processes.chs
static executables (such as newer versions of /sbin/ldconfig) require this to work properly. since static executables also don't have a PT_PHDR entry, use the same heuristic as linux does to provide a value for AT_PHDR in this case.
2010-07-12Add CLOCK_MONOTONIC support for compat linux/linux32njoly
clock_nanosleep(2).
2010-07-12fix debugging build.christos