summaryrefslogtreecommitdiff
path: root/sys/compat/linux
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 cprng_strong32 for LINUX_AT_RANDOM on amd64 too.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-19Add explicit #include <x86/fpu.h> instead of relying on pcb.h including it.dsl
2014-02-19Don't rely on pcb.h including x86/include/sysarch.hdsl
2014-02-15Regen.njoly
2014-02-15Reduce diffs between archs, add mincore/madvise to m68k.njoly
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-11Move sys/arch/amd64/amd64/fpu.c and sys/arch/amd64/include/fpu.hdsl
into sys/arch/x86 in preparation for using the same code for i386.
2014-02-11Fix uninitialized variable. Harmless: it does not change the behaviormaxv
at all. ok rmind@ christos@
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-27Add basic IPV6 level socket options support (IPV6_V6ONLY).njoly
2014-01-27Add SO_SNDLOWAT, SO_RCVLOWAT and SO_ACCEPTCONN support for socketnjoly
options.
2014-01-26Remove support for 'external' floating point units and the MS-DOSdsl
compatible method of handling floating point exceptions. Make kernel support for teh fpu non-optional (486SX should still work). Only 386 cpus support external fpu, and i386 support was removed years ago. This means that the npx code no longer uses port 0xf0 or interupt 13. All the "npx at isa" lines go from the configs, arch/i386/isa/npx.c is now mandatory for all i386 kernels. I've renamed npxinit() to fpuinit() and npxinit_cpu() to fpuinit_cpu() to match the very similar amd64 functions. The fpu of the boot cpu is now initialised by a direct call from cpu_configure(), this enables FP emulation for a 486SX. (for amd64 the cr0 values are set in locore.S and similar). This fixes a long-standing bug in linux_setregs() - which did not save the fpu regsiters if they were active. I've test booted a single cpu i386 kernel (using anita). amd64 builds - none of teh changes should affect it. The i386 XEN kernels build, but I'm not sure where they set cr0, and it might have got lost!
2014-01-25Update linux socket socket options (SO_*). Add common version to itsnjoly
own file (linux_socket_generic.h); use it for all but alpha and mips.
2014-01-25More alignment spellosskrll
2014-01-23Fix inverted pid/lid arguments in do_sched_{get,set}param calls.njoly
2014-01-19Flatten the floating point register structures bu moving thedsl
'environment' registers into the main strcuture. There are x87 instructions that only affect the environment, but that is no real excuse for all the sub-structures. Rename fields so that there are far fewer collisions between the two sets of field names.
2014-01-14use new bsd.syscall.mkchristos
2014-01-13Regen.njoly
2014-01-13Cleanup, and reduce diffs between arches. Make alpha usenjoly
linux_sys_{get,set}timeofday like others.
2014-01-04Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the sizedsl
of the fp save area to all the process_read_fpregs() and process_write_fpregs() functions. None of the functions have been modified to use the new parameters. The size is set for all the writes, but some of the arch-specific reads just pass NULL. The amd64 (and i386) need variable sized fp register save areas in order to support AVX and other enhanced register areas. These functions are rarely called - so the extra argument won't matter.
2013-12-27Add easy parts (TCOOFF/TCOON) of the TCXONC linux termios ioctl.njoly
2013-12-27Rename ipcall/socketcall specific defines to avoid conflict withnjoly
syscalls definitions. No functional changes.
2013-12-27Regen.njoly
2013-12-27Add struct linux_stat64 definition for alpha, and enable syscalls thatnjoly
use it.
2013-12-24Regen for fcntl64().njoly
2013-12-24Reduce diffs between arches, add fcntl64() to m68k.njoly
2013-12-22CTASSERT that native to compat errno translation tables are kept innjoly
sync with native errno list. Remove extra entries (linux) which resulted in bad translated values, and add missing ones (ibcs2, osf1 and svr4) which made some out of bounds accesses.
2013-12-17Cleanup compat linux errnos by adding generic errnos in a single file.njoly
Use it for all arches except alpha and mips. Add a few missing native to linux errno conversions.
2013-12-10Regen.njoly
2013-12-10Add *at() syscalls like other arches.njoly
2013-12-09Missing change to the fxsave structure renamedsl
2013-12-08Regen.njoly
2013-12-08Sprinkle a few more linux_umode_t where appropriate.njoly
Reduce diffs between archs.
2013-12-08Add missing syscall argument fd in comment.njoly
2013-12-01revert fpu/pcu changes until we figure out what's wrong; they cause randomchristos
freezes
2013-11-19regenchs
2013-11-19add the *at() syscalls.chs
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-18initialize %ds to something valid to help ptrace().chs
2013-11-18implement AT_RANDOM.chs
2013-11-10On linux_sys_getdents, insert d_type at the end of each record.slp
Fixes PR kern/47806.
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.