summaryrefslogtreecommitdiff
path: root/sys/compat
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-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-19Explicitly include x86/fpu.h instead of relying in x86/frame.h including it.dsl
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-02-03 Properly translate struct swapent for COMPAT_NETBSD32 (missing commit)manu
2014-02-03Properly translate struct swapent for COMPAT_NETBSD32manu
2014-02-02Limit the amount of kernel memory a posix_spawn syscall can use (for handlingmartin
the file action list) by limiting the maximum number of file actions to twice the current file descriptor limit. Fix a few bugs in the support functions and document the new limit. From Maxime Villard.
2014-01-28add a struct for the 4.3BSD struct directchristos
2014-01-28Fix the compat-4.3 getdirentries call (pre d_type). This is used in NetBSD-0.9.christos
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-25Clear the VM_TOPDOWN flag only when we succeed.christos
2014-01-25regenchristos
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-25a.out binaries can't handle topdown.christos
Now 1.0 binaries work correctly on NetBSD-current.
2014-01-25ifdef debug printfchristos
2014-01-25compat_10 fix: open(NULL) == open(".");christos
2014-01-24remove useless flag mangling. It is done already.christos
2014-01-24need to lock the process.christos
2014-01-24It is wishful thinking that vn_readdir will return dirent12 structures.christos
2014-01-24sigaction until 1.4 had an int sigmask, don't trash the stack.christos
2014-01-24Fix locking botch, and ...christos
Yes, we want to be careful because the sizes are different.
2014-01-24Support WSDISPLAYIO_GETCMAP/WSDISPLAYIO_PUTCMAP. Tested on evbmips/loongsonbouyer
2014-01-24Add ATAIOCCOMMAND ioctl form COMPAT_NETBSD32manu
This enables SMART monitoring by a netbsd32 binary.
2014-01-23Fix inverted pid/lid arguments in do_sched_{get,set}param calls.njoly
2014-01-23Fix netbsd32 compatibility bug in kevent()manu
The keo_put_events() callback copies the events from kernel to userland. It is called for sets of up to 8 events (constant chosen in kevbuf definitition in kevent1()). The callback is called with pointer to userland buffer, count of events to copy, and an index parameter which tracks where we are in userland buffer when called multiple time. COMPAT_NETBSD32's flavor of keo_put_events() is netbsd32_kevent_put_events(). It did not honour the index parameter, which caused invalid event data to be returned when userland requested more that 8 events. This caused many reliability problems, and the obvious startup crash of dovecot log process when it accessed udata in the nineth event in its buffer, which was NULL.
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-19No longer used.dsl
2014-01-19Rip out the code that might once have supported the freebsd ptracedsl
system calls. Removes some very dodgy conversions of FP register layouts. Most of it has been disabled since 2007 when I removed the stackgap.
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.
2014-01-01Change the type of the 'cookie' that holds the state of the core dump filedsl
from 'void *' to the actual type 'struct coredump_iostate *'. In most of the code the contents of the structure are still unknown. This just stops the wrong type of pointer being passed to the 'void *' parameter. I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
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