summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* - Handle mixer read ioctls correctly. They have the same group, number andluoqi1999-04-291-18/+149
| | | | | argument size as their write counterparts and were handled as write ioctls. - Emulate some cdrom ioctls.
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-04-281-9/+5
| | | | | | | | | | | | | | | | | - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
* Change suser_xxx() to suser() where it applies.phk1999-04-271-2/+2
|
* Suser() simplification:phk1999-04-274-7/+7
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* unifdef -DVM_STACK - it's been on for a while for x86 and was checkedpeter1999-04-191-14/+1
| | | | and appeared to be working for the Alpha some time ago.
* Well folks, this is it - The second stage of the removal for build supportpeter1999-04-171-1/+1
| | | | for LKM's..
* Image activators use EXEC_SET(), not TEXT_SET(). (The first is a macropeter1999-04-171-1/+1
| | | | wrapper for DECLARE_MODULE(), the second is a linker set declaration)
* Fix thread/process tracking and differentiation for Linux threads emulation.julian1999-03-021-19/+16
| | | | | | Submitted by: Richard Seaman, Jr." <dick@tar.com> Also clean some compiler warnings in surrounding code.
* svr4 emulator will refuse to unload itself if it is currently in use.newton1999-02-041-8/+8
|
* Acquiesce to proc.h for declarations of M_ZOMBIE, M_SUBPROC (and reordernewton1999-02-011-4/+1
| | | | | | includes so proc.h knows the right type for 'em). Suggested by: bde
* Oops - Ripped out a bit of debugging code which will stop certain bitsnewton1999-01-301-1/+1
| | | | of networking from working for people without DEC Tulip ethernet cards.
* Emulator KLD for SysVR4 executables grabbed from NetBSD.newton1999-01-3056-0/+14053
| | | | | See http://www.freebsd.org/~newton/freebsd-svr4 for limitations, capabilities, history and TO-DO list.
* Enable Linux threads support by default.julian1999-01-261-33/+3
| | | | | | | | | This takes the conditionals out of the code that has been tested by various people for a while. ps and friends (libkvm) will need a recompile as some proc structure changes are made. Submitted by: "Richard Seaman, Jr." <dick@tar.com>
* Fix linux sendmsg() emulationmsmith1999-01-111-2/+35
| | | | Submitted by: Brian Feldman <green@unixhelp.org>
* Use truncate() instead of otruncate() - step on the way to stoppingeivind1999-01-101-3/+3
| | | | the linulator from depending on COMPAT_43.
* Add (but don't activate) code for a special VM option to makejulian1999-01-061-47/+46
| | | | | | | | | | | | | downward growing stacks more general. Add (but don't activate) code to use the new stack facility when running threads, (specifically the linux threads support). This allows people to use both linux compiled linuxthreads, and also the native FreeBSD linux-threads port. The code is conditional on VM_STACK. Not using this will produce the old heavily tested system. Submitted by: Richard Seaman <dick@tar.com>
* Commit patch insos1998-12-301-1/+6
| | | | | PR: 9232 Submitted by: marcel@scc.nl <Marcel Moolenaar>
* Commit #2 ofsos1998-12-301-1/+73
| | | | | PR: 9235 Submitted by: marcel@scc.nl <Marcel Moolenaar>
* According to the author..julian1998-12-241-9/+4
| | | | | | | | | | | | | | | | | | "I've been having a problem running the patches [committed to current] installed with the COMPAT_LINUX_THREADS option along with the VM_STACK patches I did. I'm not sure what the problem is, since it seemed to work before. In any event, the attached patch fixes the problem for me. While I've had no report of problems from anyone else, possibly it would be wise to commit the patch until the problem is found. Also, there was some left-over junk in the linux_misc.c file from some earlier work I did. The attached patch cleans that up too." Submitted by: "Richard Seaman, Jr." <dick@tar.com>
* Kill(pid, 0) normally returns 0 on both FreeBSD and Redhat after havingsos1998-12-211-2/+2
| | | | | | | | | performed all sorts of sanity checks. The FreeBSD linux emulator returns EINVAL in such a case. Allowing signal 0 to be passed to kill will result in compatible behaviour. PR: 9082 Submitted by: Marcel Moolenaar <marcel@scc.nl>
* Reviewed by: Luoqi Chen, Jordan Hubbardjulian1998-12-191-1/+173
| | | | | | | | | | | | Submitted by: "Richard Seaman, Jr." <lists@tar.com> Obtained from: linux :-) Code to allow Linux Threads to run under FreeBSD. By default not enabled This code is dependent on the conditional COMPAT_LINUX_THREADS (suggested by Garret) This is not yet a 'real' option but will be within some number of hours.
* Removed the cast to a pointer in the definition of PS_STRINGS andbde1998-12-161-2/+2
| | | | | | | adjusted related casts to match (only in the kernel in this commit). The pointer was only wanted in one place in kern_exec.c. Applications should use the kern.ps_strings sysctl instead of PS_STRINGS, so they shouldn't notice this change.
* linux_pipe does not preserve the edx register. Linux andjkh1998-12-101-3/+12
| | | | | | | | | programs using glibc expect edx to be preserved accross syscalls. As a result, linux programs running in emulation mode can have whatever value may be represented by edx clobbered. PR: 9038 Submitted-By: Richard Seaman, Jr. <dick@tar.com>
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-7/+13
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* MF22: Bring in some linux sound ioctl support which I committed to 2.2jkh1998-11-121-1/+61
| | | | | | | for PR 7792 but did not bring forward. Submitted by: Avatar Liang <avatar@www.mmlab.cse.yzu.edu.tw> PR: 8656
* Fix a couple of out-of-bounds array references in mapping betweenjdp1998-10-111-4/+9
| | | | | | Linux and FreeBSD signal numbers. Also, check signal numbers passed in from application programs for validity. Without these checks, it is trivial to panic the system from a Linux program.
* Make async I/O on a socket work.jfieber1998-10-051-1/+4
| | | | | Although the current Sybase license does not permit running under emulation, FreeBSD 3.0 is now "Sybase Ready" should the license change.
* In linux_newuname bzero the right type of struct (linux_newuname_t).sos1998-10-051-2/+2
|
* Add several missing ioctl handlers. One needed by Sybase, the othersjfieber1998-09-301-1/+21
| | | | found while looking for the one.
* MF22: revert time bogon.jkh1998-09-241-2/+1
|
* return time in proper format for linux.jkh1998-09-231-1/+2
|
* Argh! *Now* the correct 3.0 fix is committed.jkh1998-08-311-7/+7
|
* Whoops! Stamp out a 2.2-ism that snuck between branches here.jkh1998-08-311-2/+2
|
* Initial support for using linux X servers under emulation - to use anjkh1998-08-311-4/+36
| | | | | | | | | | | | | | | | XFree86 server, users need to create the following links in their /compat/linux/dev directory (assuming kernel configured with 4 VTs). lrwxrwxrwx 1 root wheel 7 Aug 30 22:59 tty0 -> console lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty1 -> ttyv0 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty2 -> ttyv1 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty3 -> ttyv2 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty4 -> ttyv3 VT switching is still not yet supported. Attempting to switch VT currently will cause Xserver bus error. Submitted by: Chain Lee <chain@110.net>
* Use [u]intptr_t instead of [u_]long for casts between pointers andbde1998-08-161-3/+3
| | | | integers. Don't forget to cast to (void *) as well.
* Oops, the previous fix confused Linux's sigset_t with a pointer type.bde1998-08-151-5/+5
| | | | | | It can be integral or a struct in POSIX, so it is difficult to print, but it is actually declared as unsigned long. Assume that it is unsigned integral.
* Converted the second last instance of hzto() to tvtohz().bde1998-08-051-20/+15
| | | | | | | | | | | | | | | | | Fixed nearby bugs (in linux_alarm()): - the itimer for the alarm was relative to the epoch instead of relative to the boot time. This was harmless because the itimer's interval is 0. - the seconds arg was not checked for validity before converting it to a possibly different value. - printf format errors. Improvements: Don't use splclock(). splsoftclock() suffices. Don't complicate things by micro-optimizing interrupt latency. Minor improvements: Various micro-optimizations to exploit the specialness of the alarm itimer and the value 0.
* Fixed print format errors.bde1998-07-294-51/+56
|
* Quick and dirty support for Linux's mremap. Not used by anythingjkh1998-07-101-1/+32
| | | | | | but quake2 AFAIK. Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
* remove option LINUX as it did nothing, add DEBUG_LINUX to debug thejmg1998-06-301-1/+3
| | | | | | linux emulation... (actually moved LINUX to opt_dontuse.h)
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* ".. x11amp appears to be calling shmctl(id, IPC_RMID, 0) and the emulationjkh1998-06-021-9/+13
| | | | | | | | layer does not like the null shmid_ds buffer pointer. The emulation layer returned an error without ever calling FreeBSD's shmctl, so the segments were not being deleted when the reference count went to zero." Submitted by: Kevin Street <street@iname.com>
* s/nanoruntime/nanouptime/gphk1998-05-171-2/+2
| | | | | | s/microruntime/microuptime/g Reviewed by: bde
* Make a kernel version of the timer* functions called timerval* to bephk1998-04-061-9/+9
| | | | | | more consistent. OK'ed by: bde
* Use microruntime() rather than doing it by hand.phk1998-04-041-3/+2
|
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* The linux chown syscall is more like lchown, a new chown syscall thatpeter1998-03-291-1/+22
| | | | follows links was added.
* Moved some #includes from <sys/param.h> nearer to where they are actuallybde1998-03-281-1/+2
| | | | used.
* Removed redundant test against MAXDSIZ (the rlimit test is stronger).bde1998-02-251-3/+3
|
* In the words of the submitter:msmith1998-02-071-2/+62
| | | | | | | | | | | | | | | | | | | | | | | ---- I've worked to enhance the connect() patches. I've just tested this with the Linux JDK appletviewer on an applet that does a lot of connects, and it works as well as during my previous tests. The connect() patch is now a merge between my older patch and the OpenBSD stuff. It ensures that any async error is returned by connect() instead of getsockopt(SOL_SOCKET, SO_ERROR) as reasonnable systems do. There are also minor patches to implement IPPROTO_TCP for get/setsocktopt(). These are also tested (with Linux Apache). ---- I would appreciate any feedback regarding these changes, as they'd be very useful in 2.2.6. Submitted by: pb@fasterix.freenix.org (Pierre Beyssac)
OpenPOWER on IntegriCloud